|
||||||||||
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
public abstract class DasCanvasComponent
Nested Class Summary | |
---|---|
protected static class |
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 DasMouseInputAdapter |
mouseAdapter
|
static javax.swing.Action |
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, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
DasCanvasComponent()
constructs a DasCanvasComponent, creating the DasMouseInputAdapter for it and assigning a default name to it. |
Method Summary | |
---|---|
boolean |
acceptContext(int x,
int y)
returns true if the component is suitable context for the point. |
void |
addMouseModule(MouseModule module)
Add the MouseModule to the list of MouseModules attached to the component via the DasMouseInputAdapter. |
protected java.awt.AWTEvent |
coalesceEvents(java.awt.AWTEvent existingEvent,
java.awt.AWTEvent newEvent)
Potentially coalesce an event being posted with an existing event. |
javax.swing.Action[] |
getActions()
|
java.awt.Shape |
getActiveRegion()
returns the active region of the canvas component, which is not necessarily the bounds. |
DasCanvas |
getCanvas()
get the DasCanvas which contains this DasCanvasComponent. |
DasColumn |
getColumn()
accessor for the DasColumn used for positioning the component. |
DasMouseInputAdapter |
getDasMouseInputAdapter()
Getter for property dasMouseInputAdapter, the DasMouseInputAdapter handling mouse input for the component. |
java.lang.String |
getDasName()
Get the String identifier for the component which identifies the component within the application. |
double |
getEmSize()
convenient method intended to encourage use of em's. |
java.awt.Font |
getFont()
|
DasMouseInputAdapter |
getMouseAdapter()
Deprecated. use getDasMouseInputAdapter instead |
DasRow |
getRow()
accessor for the DasRow used for positioning the component. |
protected void |
installComponent()
|
protected void |
processDasUpdateEvent(DasUpdateEvent e)
|
protected void |
processEvent(java.awt.AWTEvent e)
Processes events occurring on this component. |
void |
removeMouseModule(MouseModule module)
Remove the MouseModule from the list of MouseModules attached to the component via the DasMouseInputAdapter. |
void |
resize()
Called by the DasCanvas layout manager to request this component to set its bounds. |
void |
setBounds(int x,
int y,
int width,
int height)
|
void |
setBounds(java.awt.Rectangle r)
|
void |
setColumn(DasColumn c)
set the DasColumn for positioning the component horizontally. |
void |
setDasMouseInputAdapter(DasMouseInputAdapter dasMouseInputAdapter)
Setter for property dasMouseInputAdapter. |
void |
setDasName(java.lang.String name)
Set the String identifier for the component which identifies the component within the application. |
void |
setRow(DasRow r)
set the DasRow for positioning the component vertically. |
void |
showProperties()
popup the PropertyEditor for editing the state of this component. |
java.lang.String |
toString()
|
protected void |
uninstallComponent()
|
void |
update()
posts an update event on the SystemEventQueue, indicating that work needs to be done to get the get the component back into a valid state. |
protected void |
updateImmediately()
This method is called when a DasUpdateEvent is processed. |
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, paintComponent, 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, setVisible, 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, 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 final javax.swing.Action PROPERTIES_ACTION
protected DasMouseInputAdapter mouseAdapter
Constructor Detail |
---|
public DasCanvasComponent()
Method Detail |
---|
public void addMouseModule(MouseModule module)
public void removeMouseModule(MouseModule module)
public DasRow getRow()
public DasColumn getColumn()
public void resize()
public void setBounds(int x, int y, int width, int height)
setBounds
in class java.awt.Component
public void setBounds(java.awt.Rectangle r)
setBounds
in class java.awt.Component
public void setRow(DasRow r)
public void setColumn(DasColumn c)
public void showProperties()
public java.lang.String toString()
toString
in class java.awt.Component
protected void updateImmediately()
public void update()
protected 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 java.awt.Container
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)
,
processDasUpdateEvent(org.das2.event.DasUpdateEvent)
protected void processDasUpdateEvent(DasUpdateEvent e)
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 java.awt.Component
existingEvent
- the event already on the EventQueue
newEvent
- the event being posted to the
EventQueue
null
indicating that no
coalescing was doneprotected void installComponent()
protected void uninstallComponent()
public java.awt.Font getFont()
getFont
in interface java.awt.MenuContainer
getFont
in class java.awt.Component
public double getEmSize()
public DasCanvas getCanvas()
public java.lang.String getDasName()
public void setDasName(java.lang.String name) throws DasNameException
name
- unique String identifying the component within
the application.
DasNameException
public java.awt.Shape getActiveRegion()
public boolean acceptContext(int x, int y)
x
- y
-
public DasMouseInputAdapter getMouseAdapter()
public javax.swing.Action[] getActions()
public DasMouseInputAdapter getDasMouseInputAdapter()
public void setDasMouseInputAdapter(DasMouseInputAdapter dasMouseInputAdapter)
dasMouseInputAdapter
- New value of property dasMouseInputAdapter.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |