|
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--vipratech.awt.VPanel | +--vipratech.beans.standardbeans.HorizontalChartRecorder
The HorizontalChartRecorder.class provides a GUI component that functions as a "chart recorder" or "oscilloscope screen" display. The chart recorder simulates a static pen drawing on a moving chart, the oscillosope simulates a moving trace on a static screen.
The TIMING of this bean is controlled by an instance of a vipratech.beans.Clock object that sends a signal to the chart recorder each second of SIMULATION time. The designer must decide at design time how many milliseconds of COMPUTER TIME represent 1 second of SIMULATION TIME. For example, a designer might use 50ms to represent 1 second in a a simulation. If this value is chosen, the designer must pass 50 as an argument to the setMillisecsPerSec(int millisecsPerSec) method.
The chart or trace MOVEMENT is controlled by the pixelsPerSec variable. This is the number or fraction of pixels moved in one second of SIMULATION time. The default value is 1px per second of simulation time.
This bean can recieve two property change events to draw two traces each scaled against different axis. Y1 values are scaled against the left axis, Y2 values against the right. Property change events are linked to public void channel1(PropertyEvent e) and public void channel1(PropertyEvent e) respectively.
vipratech.beans.SimpleDataSource is an example of a data source bean that can be wired up to this bean at desing time. See the source code of vipratech.beans.SimpleDataSource for an example of how to wire a bean to this chart recorder.
HorizontalChartPaper
,
Clock
,
SimpleDataSource
, Serialized FormFields inherited from class vipratech.awt.VPanel |
fm |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
HorizontalChartRecorder()
Constructor |
Method Summary | |
void |
channel1(java.beans.PropertyChangeEvent event)
Method to receive property change events to the y1 axis |
void |
channel2(java.beans.PropertyChangeEvent event)
Method to receive property change events to the y2 axis |
java.lang.Object |
clone()
Method to clone the Object |
void |
destroy()
Cleans up thread, paper and clock. |
java.awt.Color |
getColorY1()
Returns the color for y1 data. |
java.awt.Color |
getColorY2()
Returns the color for y2 data. |
java.util.Locale |
getLocale()
Returns the locale for this component. |
float |
getMaxY1()
Returns the maximum value of the left hand y-axis. |
float |
getMaxY2()
Returns the maximum value of the right hand y-axis. |
int |
getMillisecsPerSec()
Returns the number of milliseconds of USER time that represent one SIMULATION second. |
float |
getMinY1()
Returns the minimum value of the left hand y-axis. |
float |
getMinY2()
Returns the minimum value of the right hand y-axis. |
HorizontalChartPaper |
getPaper()
Returns the panel with the paer for printing |
float |
getPixelsPerSec()
Returns the number of pixels that the chart paper scrolls in one SIMULATION second. |
int |
getPlaces1()
Returns the number of decimal places for the left axes. |
int |
getPlaces2()
Returns the number of decimal places for the right axis. |
boolean |
getScreen()
Sets the display to screen style. |
boolean |
getSimulationTimeVisible()
Returns toggle state of time display. |
java.lang.String |
getUnitY1()
Gets the left hand unit for the chart. |
java.lang.String |
getUnitY2()
Gets the right hand unit for the chart. |
void |
initialize()
Initialises the chart paper and vectors for holding datapoints. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Method to receive property change events. |
void |
reset()
Resets all variables back to zero. |
void |
run()
Moves the chart paper one px for each pause. |
void |
setColorY1(java.awt.Color colorY1)
Sets the color for y1 data. |
void |
setColorY2(java.awt.Color colorY2)
Sets the color for 2 data. |
void |
setLocale(java.util.Locale locale)
Sets the locale for this component. |
void |
setMaxY1(float maxY1)
Sets the maximum value of the left hand y-axis. |
void |
setMaxY2(float maxY2)
Sets the maximum value of the right hand y-axis. |
void |
setMillisecsPerSec(int millisecsPerSec)
Sets the number of milliseconds of USER time that represent one SIMULATION second. |
void |
setMinY1(float minY1)
Sets the minimum value of the left hand y-axis. |
void |
setMinY2(float minY2)
Sets the minimum value of the right hand y-axis. |
void |
setPixelsPerSec(float pixelsPerSec)
Sets the number of pixels that the chart paper scrolls in one SIMULATION second. |
void |
setPlaces1(int places1)
Sets the number of decimal places for the left axes. |
void |
setPlaces2(int places2)
Sets the number of decimal places for the right axis. |
void |
setScreen(boolean screen)
Toggles the display between screen and chart paper style. |
void |
setSimulationTimeVisible(boolean simulationTimeVisible)
Toggle time display on/off. |
void |
setTitle(java.lang.String title)
Sets the title for the chart. |
void |
setUnitY1(java.lang.String unitY1)
Sets the left hand unit for the chart. |
void |
setUnitY2(java.lang.String unitY2)
Sets the right hand unit for the chart. |
void |
start()
Starts the paper movement and the clock. |
void |
stop()
Stops the paper movement and the clock. |
void |
upDateTimeLabel(int simulationTime)
Updates the time display label |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getInsets,
getLayout,
getMaximumSize,
getMinimumSize,
getPreferredSize,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paint,
paintComponents,
preferredSize,
print,
printComponents,
remove,
remove,
removeAll,
removeContainerListener,
removeNotify,
setFont,
setLayout,
update,
validate |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
contains,
contains,
createImage,
createImage,
disable,
dispatchEvent,
enable,
enable,
enableInputMethods,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
printAll,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setForeground,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public HorizontalChartRecorder()
Method Detail |
public final void upDateTimeLabel(int simulationTime)
public final void initialize()
public final void start()
public final void stop()
public final void run()
public final void propertyChange(java.beans.PropertyChangeEvent event)
public final void channel1(java.beans.PropertyChangeEvent event)
public final void channel2(java.beans.PropertyChangeEvent event)
public final void reset()
public final void destroy()
public final void setPixelsPerSec(float pixelsPerSec)
public final float getPixelsPerSec()
public final void setMillisecsPerSec(int millisecsPerSec)
public final int getMillisecsPerSec()
public final void setMaxY1(float maxY1)
public final float getMaxY1()
public final void setMaxY2(float maxY2)
public final float getMaxY2()
public final void setMinY1(float minY1)
public final float getMinY1()
public final void setMinY2(float minY2)
public final float getMinY2()
public final void setSimulationTimeVisible(boolean simulationTimeVisible)
public final boolean getSimulationTimeVisible()
public final void setTitle(java.lang.String title)
public final void setUnitY1(java.lang.String unitY1)
public java.lang.String getUnitY1()
public java.lang.String getUnitY2()
public final void setUnitY2(java.lang.String unitY2)
public void setLocale(java.util.Locale locale)
public java.util.Locale getLocale()
public void setPlaces1(int places1)
public int getPlaces1()
public void setPlaces2(int places2)
public int getPlaces2()
public void setScreen(boolean screen)
public boolean getScreen()
public final void setColorY1(java.awt.Color colorY1)
public final java.awt.Color getColorY1()
public final void setColorY2(java.awt.Color colorY2)
public final java.awt.Color getColorY2()
public java.lang.Object clone()
public HorizontalChartPaper getPaper()
|
dathe@chemie.uni-leipzig.de" | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |