public class PlotArea
extends org.eclipse.draw2d.Figure
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
BACKGROUND_COLOR |
|
static int |
BUTTON1 |
Value of left click mouse button event which is equal to 1
|
static int |
BUTTON2 |
Value of middle click / mousewheel button event which is equal to 2
|
Constructor | Description |
---|---|
PlotArea(IXYGraph xyGraph) |
Construct a plot area for the given graph with black foreground
and white background
|
PlotArea(IXYGraph xyGraph,
org.eclipse.swt.graphics.Color foreground,
org.eclipse.swt.graphics.Color background) |
Construct a plot area for the given graph with given foreground and
background colors
|
Modifier and Type | Method | Description |
---|---|---|
void |
addAnnotation(Annotation annotation) |
Add an annotation to the plot area.
|
void |
addAuxilliaryClickListener(org.eclipse.draw2d.MouseListener auxilliaryClickListener) |
|
void |
addAuxilliaryMotionListener(org.eclipse.draw2d.MouseMotionListener auxilliaryMotionListener) |
|
void |
addGrid(Grid grid) |
Add a grid to the plot area.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
|
void |
addPropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener) |
|
void |
addTrace(Trace trace) |
Add a trace to the plot area.
|
void |
fireMouseDoubleClicked(org.eclipse.draw2d.MouseEvent me) |
|
void |
fireMouseDragged(org.eclipse.draw2d.MouseEvent me) |
|
void |
fireMouseEntered(org.eclipse.draw2d.MouseEvent me) |
|
void |
fireMouseExited(org.eclipse.draw2d.MouseEvent me) |
|
void |
fireMouseHover(org.eclipse.draw2d.MouseEvent me) |
|
void |
fireMouseMoved(org.eclipse.draw2d.MouseEvent me) |
|
void |
fireMousePressed(org.eclipse.draw2d.MouseEvent me) |
|
void |
fireMouseReleased(org.eclipse.draw2d.MouseEvent me) |
|
java.util.List<Annotation> |
getAnnotationList() |
|
java.util.List<Trace> |
getTraceList() |
|
IXYGraph |
getXYGraph() |
|
ZoomType |
getZoomType() |
|
boolean |
isShowBorder() |
|
boolean |
removeAnnotation(Annotation annotation) |
Remove a annotation from the plot area.
|
void |
removeAuxilliaryClickListener(org.eclipse.draw2d.MouseListener auxilliaryClickListener) |
|
void |
removeAuxilliaryMotionListener(org.eclipse.draw2d.MouseMotionListener auxilliaryMotionListener) |
|
boolean |
removeGrid(Grid grid) |
Remove a grid from the plot area.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
|
void |
removePropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener) |
|
boolean |
removeTrace(Trace trace) |
Remove a trace from the plot area.
|
void |
setBackgroundColor(org.eclipse.swt.graphics.Color bg) |
|
void |
setShowBorder(boolean showBorder) |
|
void |
setZoomType(ZoomType zoomType) |
|
void |
zoomInOut(boolean horizontally,
boolean vertically,
int mouseX,
int mouseY,
double factor) |
Zoom 'in' or 'out' by a fixed factor
|
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addMouseListener, addMouseMotionListener, addNotify, containsPoint, containsPoint, erase, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, getLocalBackgroundColor, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isOpaque, isRequestFocusEnabled, isShowing, isVisible, paint, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeMouseListener, removeMouseMotionListener, removeNotify, repaint, repaint, repaint, requestFocus, revalidate, setBorder, setBounds, setClippingStrategy, setConstraint, setCursor, setEnabled, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate
public static final java.lang.String BACKGROUND_COLOR
public static final int BUTTON1
public static final int BUTTON2
public PlotArea(IXYGraph xyGraph)
xyGraph
- public PlotArea(IXYGraph xyGraph, org.eclipse.swt.graphics.Color foreground, org.eclipse.swt.graphics.Color background)
xyGraph
- foreground
- color for foreground, can be null to inherit parent's colorbackground
- color for background, can be null to inherit parent's colorpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in class org.eclipse.draw2d.Figure
public void addPropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in class org.eclipse.draw2d.Figure
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in class org.eclipse.draw2d.Figure
public void removePropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in class org.eclipse.draw2d.Figure
public void setBackgroundColor(org.eclipse.swt.graphics.Color bg)
setBackgroundColor
in class org.eclipse.draw2d.Figure
public void addTrace(Trace trace)
trace
- the trace to be added.public boolean removeTrace(Trace trace)
trace
- public void addGrid(Grid grid)
grid
- the grid to be added.public boolean removeGrid(Grid grid)
grid
- the grid to be removed.public void addAnnotation(Annotation annotation)
annotation
- the annotation to be added.public boolean removeAnnotation(Annotation annotation)
annotation
- the annotation to be removed.public void setShowBorder(boolean showBorder)
showBorder
- the showBorder to setpublic boolean isShowBorder()
public void setZoomType(ZoomType zoomType)
zoomType
- the zoomType to setpublic ZoomType getZoomType()
public IXYGraph getXYGraph()
public void zoomInOut(boolean horizontally, boolean vertically, int mouseX, int mouseY, double factor)
horizontally
- along x axes?vertically
- along y axes?mouseX
- absolute X location of the mouse cursormouseY
- absolute Y location of the mouse cursorfactor
- Zoom factor. Positive to zoom 'in', negative 'out'.public java.util.List<Trace> getTraceList()
public java.util.List<Annotation> getAnnotationList()
public void addAuxilliaryMotionListener(org.eclipse.draw2d.MouseMotionListener auxilliaryMotionListener)
public void removeAuxilliaryClickListener(org.eclipse.draw2d.MouseListener auxilliaryClickListener)
public void removeAuxilliaryMotionListener(org.eclipse.draw2d.MouseMotionListener auxilliaryMotionListener)
public void addAuxilliaryClickListener(org.eclipse.draw2d.MouseListener auxilliaryClickListener)
public void fireMouseReleased(org.eclipse.draw2d.MouseEvent me)
public void fireMouseDoubleClicked(org.eclipse.draw2d.MouseEvent me)
public void fireMousePressed(org.eclipse.draw2d.MouseEvent me)
public void fireMouseMoved(org.eclipse.draw2d.MouseEvent me)
public void fireMouseHover(org.eclipse.draw2d.MouseEvent me)
public void fireMouseEntered(org.eclipse.draw2d.MouseEvent me)
public void fireMouseExited(org.eclipse.draw2d.MouseEvent me)
public void fireMouseDragged(org.eclipse.draw2d.MouseEvent me)