Package com.metsci.glimpse.core.plot
Class SimplePlot2D
- java.lang.Object
-
- com.metsci.glimpse.core.layout.GlimpseLayout
-
- com.metsci.glimpse.core.layout.GlimpseAxisLayout2D
-
- com.metsci.glimpse.core.plot.Plot2D
-
- com.metsci.glimpse.core.plot.SimplePlot2D
-
- All Implemented Interfaces:
GlimpseTarget,GlimpseKeyListener,Keyable,GlimpseMouseListener,GlimpseMouseMotionListener,GlimpseMouseWheelListener,Mouseable,GlimpsePainter
- Direct Known Subclasses:
ColorAxisPlot2D
public class SimplePlot2D extends Plot2D
Identical in structure toPlot2D, but also provides a pre-selected set of common plot elements including:- a solid color background to the plot
- a simple line border around the plotting area
- vertical and horizontal grid lines which match the axis tick marks
- a crosshair which follows the mouse position
- Author:
- ulman
-
-
Field Summary
-
Fields inherited from class com.metsci.glimpse.core.plot.Plot2D
BACKGROUND_LAYER, DATA_LAYER, FOREGROUND_LAYER
-
-
Constructor Summary
Constructors Constructor Description SimplePlot2D()SimplePlot2D(String name)
-
Method Summary
-
Methods inherited from class com.metsci.glimpse.core.plot.Plot2D
addAxisListener, addGlimpseKeyListener, addGlimpseMouseAllListener, addGlimpseMouseListener, addGlimpseMouseMotionListener, addGlimpseMouseWheelListener, getAxis, getAxisPainterX, getAxisPainterY, getAxisPainterZ, getAxisX, getAxisY, getAxisZ, getLabelHandlerX, getLabelHandlerY, getLabelHandlerZ, getLayoutCenter, getLayoutManager, getLayoutTitle, getLayoutX, getLayoutY, getLayoutZ, getTargetStackCenter, getTargetStackTitle, getTargetStackX, getTargetStackY, getTargetStackZ, lockAspectRatioXY, lockMaxX, lockMaxY, lockMaxZ, lockMinX, lockMinY, lockMinZ, removeGlimpseKeyListener, removeGlimpseMouseAllListener, removeGlimpseMouseListener, removeGlimpseMouseMotionListener, removeGlimpseMouseWheelListener, setAbsoluteMaxX, setAbsoluteMaxY, setAbsoluteMaxZ, setAbsoluteMinX, setAbsoluteMinY, setAbsoluteMinZ, setAxisColor, setAxisFont, setAxisFont, setAxisLabelColor, setAxisLabelX, setAxisLabelX, setAxisLabelX, setAxisLabelY, setAxisLabelY, setAxisLabelY, setAxisLabelZ, setAxisLabelZ, setAxisLabelZ, setAxisSizeX, setAxisSizeY, setAxisSizeZ, setBorderSize, setMarkerWidthX, setMarkerWidthY, setMarkerWidthZ, setMaxX, setMaxY, setMaxZ, setMinorTickCount, setMinorTickCountX, setMinorTickCountY, setMinorTickCountZ, setMinX, setMinY, setMinZ, setSelectionSize, setShowAxisMarkerX, setShowAxisMarkerY, setShowAxisMarkerZ, setShowMinorTicks, setShowMinorTicksX, setShowMinorTicksY, setShowMinorTicksZ, setTickColor, setTickLabelColor, setTickSize, setTickSpacingX, setTickSpacingY, setTickSpacingZ, setTitle, setTitleColor, setTitleFont, setTitleFont, setTitleHeight, setUpdateModeXY, setUpdateModeZ, showTitle, unlockMaxX, unlockMaxY, unlockMaxZ, unlockMinX, unlockMinY, unlockMinZ, validate
-
Methods inherited from class com.metsci.glimpse.core.layout.GlimpseAxisLayout2D
clearCache, getAxis, getAxis, getAxis, getAxisFactory, isAxisFactorySet, isAxisSet, setAxis, setAxis, setAxis, setAxisFactory
-
Methods inherited from class com.metsci.glimpse.core.layout.GlimpseLayout
addLayout, addLayout, addLayout, addLayout, addLayout, dispose, getGlimpseKeyListeners, getGlimpseMouseListeners, getGlimpseMouseMotionListeners, getGlimpseMouseWheelListeners, getLock, getName, getTargetBounds, getTargetChildren, invalidateLayout, isDisposed, isEventConsumer, isEventGenerator, isVisible, keyPressed, keyReleased, layoutTo, layoutTo, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, paintTo, removeAll, removeAllGlimpseListeners, removeAllLayouts, removeLayout, removeLayoutByKey, removePainterByKey, setEventConsumer, setEventGenerator, setLayoutData, setLayoutManager, setLookAndFeel, setName, setVisible, setZOrder
-
-
-
-
Constructor Detail
-
SimplePlot2D
public SimplePlot2D()
-
SimplePlot2D
public SimplePlot2D(String name)
-
-
Method Detail
-
addPainterBackground
public void addPainterBackground(GlimpsePainter painter)
-
addPainterForeground
public void addPainterForeground(GlimpsePainter painter)
-
setZOrder
public void setZOrder(GlimpsePainter painter, int zOrder)
Description copied from class:GlimpseLayoutSets the relative ordering constant for this painter. Painters with low z order will be painter first (in the back) and those with high z order will be painted last (in the front).
The value itself has no meaning; it is relative to the z orders of the other painters in the GlimpseLayout. For
com.metsci.glimpse.layout.com.metsciGlimpseLayoutinstances, the z order also affects the order in which mouse events are delivered to overlapping components.The z order is set to 0 by default. GlimpsePainters with the same z order are painted in the order they were added to the GlimpseLayout. This means the first painters added will be obscured by later painters.
- Overrides:
setZOrderin classGlimpseLayout
-
addPainter
public void addPainter(GlimpsePainter painter)
- Overrides:
addPainterin classGlimpseLayout
-
addPainter
public void addPainter(GlimpsePainter painter, GlimpsePainterCallback callback)
- Overrides:
addPainterin classGlimpseLayout
-
addPainter
public void addPainter(GlimpsePainter painter, int zOrder)
- Overrides:
addPainterin classGlimpseLayout
-
addPainter
public void addPainter(GlimpsePainter painter, GlimpsePainterCallback callback, int zOrder)
- Overrides:
addPainterin classGlimpseLayout
-
addPainter
public void addPainter(Object key, GlimpsePainter painter, int zOrder)
- Overrides:
addPainterin classGlimpseLayout
-
addPainter
public void addPainter(Object key, GlimpsePainter painter, GlimpsePainterCallback callback, int zOrder)
- Overrides:
addPainterin classGlimpseLayout
-
getLayoutByKey
public GlimpseLayout getLayoutByKey(Object key)
- Overrides:
getLayoutByKeyin classGlimpseLayout
-
getPainterByKey
public GlimpsePainter getPainterByKey(Object key)
- Overrides:
getPainterByKeyin classGlimpseLayout
-
removePainter
public void removePainter(GlimpsePainter painter)
- Overrides:
removePainterin classGlimpseLayout
-
setPlotBackgroundColor
public void setPlotBackgroundColor(float[] color)
-
setBackgroundColor
public void setBackgroundColor(float[] color)
- Overrides:
setBackgroundColorin classPlot2D
-
getCrosshairPainter
public CrosshairPainter getCrosshairPainter()
-
getBorderPainter
public BorderPainter getBorderPainter()
-
getGridPainter
public GridPainter getGridPainter()
-
-