|
|||||||||
| 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
javax.swing.JPanel
spv.view.MultiplePlotWidget
public class MultiplePlotWidget
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
javax.swing.JPanel.AccessibleJPanel |
| 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 | |
|---|---|
private GraphicsCanvas[] |
canvases
|
private int |
nrows
|
private PlottableSpectrum[] |
plottables
|
private int[] |
tags
|
private int |
tile_height
|
private boolean |
tiles_fixed_aspect
|
private int |
tiles_row
|
private boolean |
x_autolog
|
private boolean |
y_autolog
|
| 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, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
MultiplePlotWidget(PlottableSpectrum[] plottables,
int[] tags,
boolean no_access)
|
|
| Method Summary | |
|---|---|
protected void |
attachDataSets(java.util.ArrayList dslist,
GraphicsCanvas canvas)
|
private void |
buildAndAttachDataSets(Plottable plottable,
GraphicsCanvas canvas)
|
void |
buildCanvases()
|
private java.util.ArrayList |
buildDataSetList(Plottable plottable)
|
void |
createHardcopy()
Prints the plot area. |
void |
dataUpdated(java.lang.Object arg)
Data was updated. |
void |
doZoom(int sense)
|
java.util.List<GraphicsCanvas> |
getCanvasList()
Returns a List with all instances of GraphicsCanvas
that exist in this instance. |
Command[] |
getCommands()
returns the array of Command instances. |
java.awt.Component |
getComponent()
|
java.lang.String[] |
getConfigurableButtonNames()
Gets the names of configurable buttons. |
javax.swing.JComponent |
getDisplayComponent()
Gets the displayable Swing JComponent where the widget lives. |
boolean |
getFromPlotStatus()
|
javax.swing.JComponent |
getJComponent()
Gets the Swing JComponent where the widget lives. |
GraphicsCanvas |
getMainCanvas()
Gets the main canvas. |
PlotStatus |
getPlotStatus()
Gets the object with the plot setup parameters. |
java.lang.Object |
getPlottedObject()
Gets the Object underlying the Plottable. |
java.awt.Dimension |
getPreferredScrollableViewportSize()
|
int |
getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
|
boolean |
getScrollableTracksViewportHeight()
|
boolean |
getScrollableTracksViewportWidth()
|
int |
getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
|
Viewport |
getViewport()
Returns a viewport. |
boolean |
isScrollable()
Returns true if the plot widget must be
displayed within a scroll pane. |
void |
lockSelections()
Locks selections. |
void |
plot()
Builds the plot. |
void |
quit()
Quits the plot widget. |
void |
removeListeners()
Remove all cursor listeners from the global cursor instance. |
void |
setCommand(Callback type,
Command command)
Stores a callback reference using the Command
interface. |
void |
setCursorArrows(boolean cursor_arrows)
Selects cursor arrows. |
void |
setCursorDashPattern(java.lang.String dash)
Sets cursor dash pattern, |
void |
setCursorLogFile(java.io.PrintWriter cursor_log)
Sets a print writer object for logging cursor activity. |
void |
setCursorText(boolean on)
Turns on/off cursor text output. |
void |
setFormattedCursor(boolean formatted)
Selects formatted or unformatted cursor text output. |
void |
setPlotStatus(PlotStatus ps)
Sets the object with the plot setup parameters. |
private void |
setSizes(PlottableSpectrum[] plottables)
|
void |
setSmallCursor(boolean small)
Selects cursor size. |
void |
setSystemCursor()
Selects no (application-controlled) cursor. |
void |
setXAutoLog(boolean auto_log)
Sets the auto log mode for the X axis. |
void |
setYAutoLog(boolean auto_log)
Sets the auto log mode for the Y axis. |
void |
unlockSelections()
Unlocks selections. |
void |
unsetCommand(Callback type)
Removes a callback reference. |
void |
unsetCommands()
Removes all callback references. |
void |
update(java.util.Observable o,
java.lang.Object arg)
|
void |
zoomReset()
Resets to default WCS. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, 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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, 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, setVisible, unregisterKeyboardAction, update |
| 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, processEvent, 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, coalesceEvents, 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, getFont, 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, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface spv.view.PlotWidget |
|---|
getSize |
| Field Detail |
|---|
private PlottableSpectrum[] plottables
private int[] tags
private GraphicsCanvas[] canvases
private int tiles_row
private int nrows
private boolean tiles_fixed_aspect
private int tile_height
private boolean x_autolog
private boolean y_autolog
| Constructor Detail |
|---|
public MultiplePlotWidget(PlottableSpectrum[] plottables,
int[] tags,
boolean no_access)
| Method Detail |
|---|
public void removeListeners()
PlotWidget
removeListeners in interface PlotWidgetpublic Command[] getCommands()
PlotWidgetCommand instances.
getCommands in interface PlotWidgetCommand instancespublic void buildCanvases()
public void plot()
throws ViewException
PlotWidget
plot in interface PlotWidgetViewException
protected void attachDataSets(java.util.ArrayList dslist,
GraphicsCanvas canvas)
private void setSizes(PlottableSpectrum[] plottables)
private void buildAndAttachDataSets(Plottable plottable,
GraphicsCanvas canvas)
private java.util.ArrayList buildDataSetList(Plottable plottable)
public boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportHeight in interface javax.swing.Scrollablepublic boolean getScrollableTracksViewportWidth()
getScrollableTracksViewportWidth in interface javax.swing.Scrollablepublic java.awt.Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize in interface javax.swing.Scrollable
public int getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
getScrollableBlockIncrement in interface javax.swing.Scrollable
public int getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
getScrollableUnitIncrement in interface javax.swing.Scrollablepublic boolean isScrollable()
PlotWidgettrue if the plot widget must be
displayed within a scroll pane.
isScrollable in interface PlotWidgettrue if the plot widget must be
displayed within a scroll panepublic java.lang.Object getPlottedObject()
PlotWidgetObject underlying the Plottable.
getPlottedObject in interface PlotWidgetpublic java.awt.Component getComponent()
public java.lang.String[] getConfigurableButtonNames()
PlotWidget
getConfigurableButtonNames in interface PlotWidgetpublic javax.swing.JComponent getJComponent()
PlotWidgetJComponent where the widget lives.
getJComponent in interface PlotWidgetpublic javax.swing.JComponent getDisplayComponent()
PlotWidgetJComponent where the widget lives.
The component returned by getJComponent may not be directly
displayable since it might be transparent. getDisplayComponent
returns a component that has a opaque background with defined color.
getDisplayComponent in interface PlotWidgetpublic void quit()
PlotWidget
quit in interface PlotWidgetpublic void createHardcopy()
PlotWidget
createHardcopy in interface PlotWidgetpublic void setCursorText(boolean on)
PlotWidget
setCursorText in interface PlotWidgeton - true to set cursor text onpublic void setCursorDashPattern(java.lang.String dash)
PlotWidget
setCursorDashPattern in interface PlotWidgetdash - the dash patternpublic void setSmallCursor(boolean small)
PlotWidget
setSmallCursor in interface PlotWidgetsmall - true to set small cursorpublic void setSystemCursor()
PlotWidget
setSystemCursor in interface PlotWidgetpublic void setCursorArrows(boolean cursor_arrows)
PlotWidget
setCursorArrows in interface PlotWidgetcursor_arrows - true to display cursor arrowspublic void setXAutoLog(boolean auto_log)
PlotWidget
setXAutoLog in interface PlotWidgetauto_log - true to enable auto logpublic void setYAutoLog(boolean auto_log)
PlotWidget
setYAutoLog in interface PlotWidgetauto_log - true to enable auto logpublic void setFormattedCursor(boolean formatted)
PlotWidget
setFormattedCursor in interface PlotWidgetformatted - true to set formatted cursor modepublic void doZoom(int sense)
doZoom in interface PlotWidgetpublic void zoomReset()
PlotWidget
zoomReset in interface PlotWidgetpublic void dataUpdated(java.lang.Object arg)
PlotWidget
dataUpdated in interface PlotWidgetarg - an argument
public void setCommand(Callback type,
Command command)
PlotWidgetCommand
interface.
setCommand in interface PlotWidgettype - the callback typecommand - the reference to the command objectpublic void unsetCommand(Callback type)
PlotWidget
unsetCommand in interface PlotWidgettype - the callback typepublic void unsetCommands()
PlotWidget
unsetCommands in interface PlotWidgetpublic Viewport getViewport()
PlotWidget
getViewport in interface PlotWidgetpublic PlotStatus getPlotStatus()
PlotWidget
getPlotStatus in interface PlotWidgetpublic void setPlotStatus(PlotStatus ps)
PlotWidget
setPlotStatus in interface PlotWidgetps - the object with the plot setup parameterspublic boolean getFromPlotStatus()
getFromPlotStatus in interface PlotWidgetpublic void setCursorLogFile(java.io.PrintWriter cursor_log)
PlotWidget
setCursorLogFile in interface PlotWidgetcursor_log - the print writer objectpublic GraphicsCanvas getMainCanvas()
PlotWidget
getMainCanvas in interface PlotWidgetpublic java.util.List<GraphicsCanvas> getCanvasList()
PlotWidgetList with all instances of GraphicsCanvas
that exist in this instance. This is used by plot widgets that support multiple
plots.
getCanvasList in interface PlotWidgetList with all instances of GraphicsCanvaspublic void lockSelections()
PlotWidget
lockSelections in interface PlotWidgetpublic void unlockSelections()
PlotWidget
unlockSelections in interface PlotWidget
public void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||