public class WiredPlot extends JPanel implements RecordPlot, org.freehep.swing.popup.HasPopupItems, org.freehep.xml.io.XMLIO
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
WiredPlot(GraphicsPanel graphicsPanel)
Creates a plot without a record.
|
WiredPlot(String name,
GraphicsPanel graphicsPanel)
Creates a plot with default GraphicsMode.
|
WiredPlot(String name,
GraphicsPanel graphicsPanel,
boolean supportUndo)
Creates a plot with given parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener a)
Adds a change listener
|
void |
beginUpdate()
If multiple edits need to count as one major update, call this method to
start a compound edit.
|
RecordPlot |
copy(String name,
Object record,
boolean supportUndo)
Returns a copy of this plot, attached to the given objects, from the
given parameters.
|
void |
drawShape(Shape shape)
Draws the shape for feedback/interactivity purposes
|
void |
endUpdate()
If multiple edits need to count as one major update, call this method to
end a compound edit.
|
GraphicsPanel |
getGraphicsPanel()
Returns the associated Graphics Panel.
|
InteractionHandler |
getInteractionHandler()
Return the current interaction handler.
|
String |
getName()
Returns the name of the plot.
|
Object |
getRecord()
Returns current record object.
|
UndoableEditSupport |
getUndoableEditSupport()
Returns the undo support object, or null if undo was not switched on.
|
JPopupMenu |
modifyPopupMenu(JPopupMenu menu,
Component source,
Point p) |
void |
paint(Graphics g) |
void |
postEdit(org.freehep.swing.undo.DoableEdit edit)
Handles an doable edit, please use postEdit(WiredEdit).
|
void |
postEdit(UndoableEdit edit)
Handles an undoable edit, please use postEdit(WiredEdit).
|
void |
postEdit(WiredCompoundEdit edit)
Handles a Wired Compound Edit.
|
void |
postEdit(WiredEdit edit)
Handles a Wired Edit.
|
void |
removeChangeListener(ChangeListener r)
Removbes a change listener
|
void |
repaint()
Repaint the plot
|
boolean |
requestFocusInWindow()
Requests focus in plot
|
void |
restore(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl) |
void |
save(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl) |
void |
setBounds(int x,
int y,
int width,
int height) |
void |
setInteractionHandler(InteractionHandler interactionHandler)
Sets interaction handler on this plot.
|
void |
setRecord(Object record)
Sets record to be displayed by this plot.
|
void |
setSelected(boolean selected)
Called when this plot is selected or deselected.
|
boolean |
supports(InteractionHandler interactionHandler)
Returns true if this plot (and its projection) supports the specified interaction handler.
|
boolean |
supports(UndoableEdit edit)
Returns true if given edit is supported, which may depend on the current
graphics panel.
|
String |
toString() |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, 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, 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
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, transferFocusDownCycle, validate, validateTree
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, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
public WiredPlot(GraphicsPanel graphicsPanel)
public WiredPlot(String name, GraphicsPanel graphicsPanel)
public WiredPlot(String name, GraphicsPanel graphicsPanel, boolean supportUndo)
public RecordPlot copy(String name, Object record, boolean supportUndo)
copy
in interface RecordPlot
public void setInteractionHandler(InteractionHandler interactionHandler)
setInteractionHandler
in interface RecordPlot
public void setSelected(boolean selected)
setSelected
in interface RecordPlot
public void setRecord(Object record)
setRecord
in interface RecordPlot
public void addChangeListener(ChangeListener a)
RecordPlot
addChangeListener
in interface RecordPlot
public void removeChangeListener(ChangeListener r)
RecordPlot
removeChangeListener
in interface RecordPlot
public String getName()
getName
in interface RecordPlot
getName
in class Component
public GraphicsPanel getGraphicsPanel()
getGraphicsPanel
in interface RecordPlot
public InteractionHandler getInteractionHandler()
getInteractionHandler
in interface RecordPlot
public UndoableEditSupport getUndoableEditSupport()
getUndoableEditSupport
in interface RecordPlot
public Object getRecord()
getRecord
in interface RecordPlot
public boolean supports(InteractionHandler interactionHandler)
supports
in interface RecordPlot
public boolean requestFocusInWindow()
RecordPlot
requestFocusInWindow
in interface RecordPlot
requestFocusInWindow
in class JComponent
public void repaint()
RecordPlot
repaint
in interface RecordPlot
repaint
in class Component
public void setBounds(int x, int y, int width, int height)
public boolean supports(UndoableEdit edit)
supports
in interface org.freehep.swing.undo.UndoableEditProcessor
public void postEdit(UndoableEdit edit)
postEdit
in interface org.freehep.swing.undo.UndoableEditProcessor
public void postEdit(org.freehep.swing.undo.DoableEdit edit)
public void postEdit(WiredEdit edit)
public void postEdit(WiredCompoundEdit edit)
public void beginUpdate()
beginUpdate
in interface org.freehep.swing.undo.UndoableEditProcessor
public void endUpdate()
endUpdate
in interface org.freehep.swing.undo.UndoableEditProcessor
public void drawShape(Shape shape)
RecordPlot
drawShape
in interface RecordPlot
public void paint(Graphics g)
paint
in class JComponent
public JPopupMenu modifyPopupMenu(JPopupMenu menu, Component source, Point p)
modifyPopupMenu
in interface org.freehep.swing.popup.HasPopupItems
public void save(org.freehep.xml.io.XMLIOManager xmlioManager, org.jdom.Element nodeEl)
save
in interface org.freehep.xml.io.XMLIO
public void restore(org.freehep.xml.io.XMLIOManager xmlioManager, org.jdom.Element nodeEl)
restore
in interface org.freehep.xml.io.XMLIO
Copyright © 1996-2014 FreeHEP. All Rights Reserved.