|
|||||||||
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 | +--adm.CCartesian
CCartesian is a container widget that holds 1 to 2 traces. It does not
implement DeviceListener but receives a trace event from each trace when
the new data point is available. The traces in the cartesian plot share
one common x-axis (first trace) but not the y-axis. The first trace has
a the left side y-axis and the second trace has the right side y-axis.
Each trace can have different x-axis range style, y-axis range style,
trace style and trace color.
If connected device - property pair contains array of data, the new data
points will be plotted and the old points will be erased for each update.
Otherwise the specified maximum number of update points (default of 30)
will be plotted in the chart. When the next data point is received, the
oldest point will be erased from the graph if there is more than maximum
number of the data. This number can be reset using setMaxPoint method.
The cartesian may have a title if setTitle is called.
Each trace in the plot is defined in the CTrace class. It connects to
two device/properties with a simultaneous data update. One is the value
of the x-axis and another is the y-axis. Time stamps are used to trigger
the trace event. This means that only a data pair with the same time
stamp will be sent to CCartesian and plotted on the chart. CTrace defines
many trace properties. You may specify one of three axes (x-axis or y-axis)
range styles, RANGE_AUTO, RANGE_STATIC, RANGE_FROM_PROPRTY with
setRangeStyle. The default range style for all axes are RANGE_FROM_PROPRTY.
Call setTraceColor method to reset the default trace color (green) and
setTraceStyle to select STYLE_POINT or STYLE_LINE (default) as the trace
style. CTrace class also provides setX(Y)DisplayLo(Hi) methods to specify
the display range. When any of these methods is called, the range style
for that axis will be forced to RANGE_STATIC. If the range style is set
to RANGE_STATIC and range low and/or range high are not set, the default
display range (0 for low and 100 for high) will be used.
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Fields inherited from interface adm.CConstants |
ALIGN_CENTER,
ALIGN_LEFT,
ALIGN_RIGHT,
AXIS_BOTTOM,
AXIS_LEFT,
AXIS_RIGHT,
AXIS_STYLE_LINEAR,
AXIS_STYLE_LOG10,
AXIS_TOP,
CLASS_QUERY,
CLRMOD_ALARM,
CLRMOD_STATIC,
COLUMN,
DEVICE_QUERY,
DIR_DOWN,
DIR_LEFT,
DIR_RIGHT,
DIR_UP,
FILL_FROM_CENTER,
FILL_FROM_EDGE,
FRMT_AUTO,
FRMT_FLOAT,
FRMT_HEX,
FRMT_INTEGER,
FRMT_OCTAL,
FRMT_SCIENTIFIC,
HORIZONTAL,
LABEL_ALL,
LABEL_AXIS,
LABEL_NONE,
LABEL_VALUE,
PROPERTY_QUERY,
RANGE_AUTO,
RANGE_FROM_PROPERTY,
RANGE_STATIC,
ROW,
STYLE_FILLUNDER,
STYLE_LINE,
STYLE_POINT,
VERTICAL |
Constructor Summary | |
CCartesian()
Null Constructor |
|
CCartesian(CTrace trace)
Constructor with parameters |
|
CCartesian(CTrace trace1,
CTrace trace2)
Constructor with parameters |
Method Summary | |
java.awt.Component |
add(CTrace trace)
Overwrite container's add method for Viual tools |
void |
addTrace(CTrace trace)
Add trace to the cartesian plot. |
int |
getMaxPoint()
Return max point shown in the plot |
java.lang.String |
getTitle()
Return the title string. |
void |
paint(java.awt.Graphics g)
|
void |
setBounds(int x,
int y,
int w,
int h)
Over write the parant setBounds method to force draw the background again when user resize the widget |
void |
setMaxPoint(int num)
Set up max data point shown in the plot. |
void |
setSize(int w,
int h)
Over write the parant setSize method to force draw the background again when user resize the widget |
void |
setTitle(java.lang.String aTitle)
Set up the title string appear on the top of the plot. |
void |
setTrace(int which,
CTrace newTrace)
Add a new trace to plot. |
void |
update(java.awt.Graphics g)
Over write the Canvas.update to only call this.paint (this is necessary since the Canvas.update will erase the background) |
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,
paintComponents,
preferredSize,
print,
printComponents,
remove,
remove,
removeAll,
removeContainerListener,
removeNotify,
setCursor,
setFont,
setLayout,
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,
getLocale,
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,
setComponentOrientation,
setDropTarget,
setEnabled,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
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 CCartesian()
public CCartesian(CTrace trace)
public CCartesian(CTrace trace1, CTrace trace2)
Method Detail |
public void setTrace(int which, CTrace newTrace)
public void addTrace(CTrace trace)
public java.awt.Component add(CTrace trace)
public void setTitle(java.lang.String aTitle)
public java.lang.String getTitle()
public void setMaxPoint(int num)
public int getMaxPoint()
public void setBounds(int x, int y, int w, int h)
public void setSize(int w, int h)
public final void update(java.awt.Graphics g)
public void paint(java.awt.Graphics g)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |