Parkinson Disease Database

spirals.data
Class SimpleTabletDataViewer

java.lang.Object
  extended by spirals.data.TabletDataViewer
      extended by spirals.data.SimpleTabletDataViewer

public class SimpleTabletDataViewer
extends TabletDataViewer

Simple viewing algorithm of captured data

Copyright: Copyright (c) 2005 Jan Dolezel

Company: ÈVUT FEL, Prague


Field Summary
private  int border
          number of pixels between active area and border
private  boolean detail
          zoom
private  boolean showUp
           
private  TabletInfo ti
          active tablet measures
 
Fields inherited from class spirals.data.TabletDataViewer
screen, tabletData
 
Constructor Summary
SimpleTabletDataViewer(javax.swing.JPanel screen, TabletData tabletData, boolean showUp)
          creates new data viewer for specified panel
 
Method Summary
 boolean getDetail()
          is view zoomed?
 void paint(java.awt.Graphics g)
          painting procedure Method paints data to canvas specified by g param.
 void setDetail(boolean detail)
          zoom or unzoom view
 void setShowUp(boolean showUp)
           
 void setTabletInfo(TabletInfo tabletInfo)
          sets new tablet measures
 
Methods inherited from class spirals.data.TabletDataViewer
repaint, setTabletData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ti

private TabletInfo ti
active tablet measures


border

private int border
number of pixels between active area and border


detail

private boolean detail
zoom


showUp

private boolean showUp
Constructor Detail

SimpleTabletDataViewer

public SimpleTabletDataViewer(javax.swing.JPanel screen,
                              TabletData tabletData,
                              boolean showUp)
creates new data viewer for specified panel

Parameters:
screen - panel to draw on
tabletData - data to draw
Method Detail

paint

public void paint(java.awt.Graphics g)
painting procedure

Method paints data to canvas specified by g param. It preserves aspect ratio of x and y axis. When detail is set to true, it zoom the drawing across entire viewport, still preserve aspect ratio.

Specified by:
paint in class TabletDataViewer
Parameters:
g - where to draw

setDetail

public void setDetail(boolean detail)
zoom or unzoom view


getDetail

public boolean getDetail()
is view zoomed?


setShowUp

public void setShowUp(boolean showUp)

setTabletInfo

public void setTabletInfo(TabletInfo tabletInfo)
sets new tablet measures


Parkinson Disease Database