|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
org.das2.graph.DasCanvasComponent
org.das2.graph.DasPlot
public class DasPlot
Nested Class Summary | |
---|---|
protected class |
DasPlot.RebinListener
|
Nested classes/interfaces inherited from class org.das2.graph.DasCanvasComponent |
---|
DasCanvasComponent.CanvasComponentAction |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected DataSet |
Data
|
protected DataSetDescriptor |
dataSetDescriptor
|
javax.swing.Action |
DUMP_TO_FILE_ACTION
|
static int |
ERROR
|
protected Renderer |
focusRenderer
returns the Renderer with the current focus. |
protected boolean |
gridOver
|
static int |
INFO
|
protected java.lang.String |
offsetTime
|
protected boolean |
overSize
|
protected java.lang.String |
plotTitle
|
static java.lang.String |
PROP_DRAWGRID
|
static java.lang.String |
PROP_DRAWMINORGRID
|
static java.lang.String |
PROP_FOCUSRENDERER
|
static java.lang.String |
PROP_GRIDOVER
|
static java.lang.String |
PROP_OVERSIZE
|
static java.lang.String |
PROP_TITLE
|
protected double[] |
psym_x
|
protected double[] |
psym_y
|
protected DasPlot.RebinListener |
rebinListener
|
protected java.beans.PropertyChangeListener |
ticksListener
|
static int |
WARNING
|
Fields inherited from class org.das2.graph.DasCanvasComponent |
---|
mouseAdapter, PROPERTIES_ACTION |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
DasPlot(DasAxis xAxis,
DasAxis yAxis)
|
Method Summary | |
---|---|
void |
addRenderer(Renderer rend)
|
void |
addToLegend(Renderer renderer,
javax.swing.ImageIcon icon,
int pos,
java.lang.String message)
|
protected java.awt.AWTEvent |
coalesceEvents(java.awt.AWTEvent existingEvent,
java.awt.AWTEvent newEvent)
Potentially coalesce an event being posted with an existing event. |
static DasPlot |
createDummyPlot()
|
static DasPlot |
createNamedPlot(java.lang.String name)
|
static DasPlot |
createPlot(DatumRange xrange,
DatumRange yrange)
|
protected void |
drawContent(java.awt.Graphics2D g)
|
int |
findRendererAt(int x,
int y)
return the index of the renderer at canvas location (x,y), or -1 if no renderer is found at the position. |
java.awt.Shape |
getActiveRegion()
returns the active region of the canvas component, which is not necessarily the bounds. |
protected java.awt.geom.AffineTransform |
getAffineTransform(DasAxis xAxis,
DasAxis yAxis)
|
protected java.awt.Rectangle |
getCacheImageBounds()
returns the position of the cacheImage in the canvas frame of reference. |
DataSet |
getConsumedDataSet()
|
DataSet |
getData()
|
DataSet |
getDataSet()
|
DataSetDescriptor |
getDataSetDescriptor()
Getter for property dataSetDescriptor. |
org.w3c.dom.Element |
getDOMElement(org.w3c.dom.Document document)
|
Renderer |
getFocusRenderer()
|
Renderer |
getRenderer(int index)
|
Renderer[] |
getRenderers()
|
java.lang.String |
getTitle()
Returns the title of this plot. |
DasAxis |
getXAxis()
|
DasAxis |
getYAxis()
|
protected void |
installComponent()
|
protected void |
invalidateCacheImage()
|
boolean |
isDrawGrid()
Getter for property drawGrid. |
boolean |
isDrawMinorGrid()
Get the value of drawMinorGrid |
boolean |
isGridOver()
|
boolean |
isOverSize()
|
boolean |
isPreviewEnabled()
|
protected void |
paintComponent(java.awt.Graphics graphics1)
|
void |
postException(Renderer renderer,
java.lang.Exception exception)
notify user of an exception, in the context of the plot. |
void |
postMessage(Renderer renderer,
java.lang.String message,
int messageType,
Datum x,
Datum y)
Notify user of an exception, in the context of the plot. |
protected void |
processEvent(java.awt.AWTEvent e)
Processes events occurring on this component. |
static DasPlot |
processPlotElement(org.w3c.dom.Element element,
FormBase form)
|
void |
removeRenderer(Renderer rend)
|
void |
repaint()
|
void |
resize()
Called by the DasCanvas layout manager to request this component to set its bounds. |
void |
setData(DataSet ds)
|
void |
setDataSetDescriptor(DataSetDescriptor dataSetDescriptor)
Setter for property dataSetDescriptor. |
void |
setDrawGrid(boolean drawGrid)
Setter for property drawGrid. |
void |
setDrawMinorGrid(boolean newdrawMinorGrid)
Set the value of drawMinorGrid |
void |
setFocusRenderer(Renderer focusRenderer)
|
void |
setGridOver(boolean gridOver)
|
void |
setOverSize(boolean overSize)
|
void |
setPreviewEnabled(boolean preview)
|
void |
setTitle(java.lang.String t)
Sets the title which will be displayed above this plot. |
void |
setVisible(boolean visible)
|
void |
setXAxis(DasAxis xAxis)
|
void |
setYAxis(DasAxis yAxis)
Attaches a new axis to the plot. |
protected void |
uninstallComponent()
|
protected void |
updateImmediately()
This method is called when a DasUpdateEvent is processed. |
Methods inherited from class org.das2.graph.DasCanvasComponent |
---|
acceptContext, addMouseModule, getActions, getCanvas, getColumn, getDasMouseInputAdapter, getDasName, getEmSize, getFont, getMouseAdapter, getRow, processDasUpdateEvent, removeMouseModule, setBounds, setBounds, setColumn, setDasMouseInputAdapter, setDasName, setRow, showProperties, toString, update |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, resize, resize, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String PROP_TITLE
protected DataSetDescriptor dataSetDescriptor
protected DataSet Data
protected java.lang.String offsetTime
protected java.lang.String plotTitle
protected double[] psym_x
protected double[] psym_y
protected DasPlot.RebinListener rebinListener
protected java.beans.PropertyChangeListener ticksListener
protected Renderer focusRenderer
public static final java.lang.String PROP_FOCUSRENDERER
public javax.swing.Action DUMP_TO_FILE_ACTION
public static final int INFO
public static final int WARNING
public static final int ERROR
public static final java.lang.String PROP_DRAWGRID
public static final java.lang.String PROP_DRAWMINORGRID
protected boolean gridOver
public static final java.lang.String PROP_GRIDOVER
protected boolean overSize
public static final java.lang.String PROP_OVERSIZE
Constructor Detail |
---|
public DasPlot(DasAxis xAxis, DasAxis yAxis)
Method Detail |
---|
public Renderer getFocusRenderer()
public void setFocusRenderer(Renderer focusRenderer)
public int findRendererAt(int x, int y)
public DataSet getDataSet()
public DataSet getConsumedDataSet()
getConsumedDataSet
in interface DataSetConsumer
public DataSet getData()
public void setXAxis(DasAxis xAxis)
public void setYAxis(DasAxis yAxis)
protected void updateImmediately()
DasCanvasComponent
updateImmediately
in class DasCanvasComponent
protected java.awt.geom.AffineTransform getAffineTransform(DasAxis xAxis, DasAxis yAxis)
protected void paintComponent(java.awt.Graphics graphics1)
paintComponent
in class javax.swing.JComponent
public void postMessage(Renderer renderer, java.lang.String message, int messageType, Datum x, Datum y)
renderer
- identifies the renderer posting the exceptiontext
- the text to be displayed, may contain granny text.messageType
- DasPlot.INFORMATION_MESSAGE, DasPlot.WARNING_MESSAGE, or DasPlot.ERROR_MESSAGE.x
- if non-null, the location on the x axis giving context for the text.y
- if non-null, the location on the y axis giving context for the text.public void postException(Renderer renderer, java.lang.Exception exception)
public void addToLegend(Renderer renderer, javax.swing.ImageIcon icon, int pos, java.lang.String message)
renderer
- identifies the renderer adding to the legendicon
- if non-null, an icon to use. If null, the renderer's icon is used.pos
- integer order parameter, and also identifies item.message
- String message to display.protected void drawContent(java.awt.Graphics2D g)
public void resize()
DasCanvasComponent
resize
in class DasCanvasComponent
public void setTitle(java.lang.String t)
t
- The new title for this plot.public java.lang.String getTitle()
setTitle(String)
public DasAxis getXAxis()
public DasAxis getYAxis()
public DataSetDescriptor getDataSetDescriptor()
public void setDataSetDescriptor(DataSetDescriptor dataSetDescriptor)
dataSetDescriptor
- New value of property dataSetDescriptor.public void setData(DataSet ds)
protected void installComponent()
installComponent
in class DasCanvasComponent
protected void uninstallComponent()
uninstallComponent
in class DasCanvasComponent
public void addRenderer(Renderer rend)
public void removeRenderer(Renderer rend)
public static DasPlot createDummyPlot()
public static DasPlot createPlot(DatumRange xrange, DatumRange yrange)
public Renderer getRenderer(int index)
public Renderer[] getRenderers()
public static DasPlot processPlotElement(org.w3c.dom.Element element, FormBase form) throws DasPropertyException, DasNameException, DasException, java.text.ParseException
DasPropertyException
DasNameException
DasException
java.text.ParseException
public org.w3c.dom.Element getDOMElement(org.w3c.dom.Document document)
public static DasPlot createNamedPlot(java.lang.String name)
public java.awt.Shape getActiveRegion()
DasCanvasComponent
getActiveRegion
in class DasCanvasComponent
protected java.awt.AWTEvent coalesceEvents(java.awt.AWTEvent existingEvent, java.awt.AWTEvent newEvent)
EventQueue.postEvent
if an event with the same ID as the event to be posted is found in
the queue (both events must have this component as their source).
This method either returns a coalesced event which replaces
the existing event (and the new event is then discarded), or
null
to indicate that no combining should be done
(add the second event to the end of the queue). Either event
parameter may be modified and returned, as the other one is discarded
unless null
is returned.
This implementation of coalesceEvents
coalesces
DasUpdateEvent
s, returning the existingEvent parameter
coalesceEvents
in class DasCanvasComponent
existingEvent
- the event already on the EventQueue
newEvent
- the event being posted to the
EventQueue
null
indicating that no
coalescing was doneprotected void processEvent(java.awt.AWTEvent e)
process<event type>Event
method for the given class of event.
Note that if the event parameter is null
the behavior is unspecified and may result in an
exception.
processEvent
in class DasCanvasComponent
e
- the eventComponent.processComponentEvent(java.awt.event.ComponentEvent)
,
Component.processFocusEvent(java.awt.event.FocusEvent)
,
Component.processKeyEvent(java.awt.event.KeyEvent)
,
Component.processMouseEvent(java.awt.event.MouseEvent)
,
Component.processMouseMotionEvent(java.awt.event.MouseEvent)
,
Component.processInputMethodEvent(java.awt.event.InputMethodEvent)
,
Component.processHierarchyEvent(java.awt.event.HierarchyEvent)
,
Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent)
,
DasCanvasComponent.processDasUpdateEvent(org.das2.event.DasUpdateEvent)
public void repaint()
repaint
in class java.awt.Component
protected void invalidateCacheImage()
public boolean isDrawGrid()
public void setDrawGrid(boolean drawGrid)
drawGrid
- New value of property drawGrid.public boolean isDrawMinorGrid()
public void setDrawMinorGrid(boolean newdrawMinorGrid)
newdrawMinorGrid
- new value of drawMinorGridpublic boolean isGridOver()
public void setGridOver(boolean gridOver)
public void setPreviewEnabled(boolean preview)
public boolean isPreviewEnabled()
public void setVisible(boolean visible)
setVisible
in class javax.swing.JComponent
public boolean isOverSize()
public void setOverSize(boolean overSize)
protected java.awt.Rectangle getCacheImageBounds()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |