gishur.graph.gui
Class NodeInputHandler
java.lang.Object
|
+--gishur.gui2.DrawAtom
|
+--gishur.gui2.DrawObject
|
+--gishur.gui2.InputHandler
|
+--gishur.graph.gui.NodeInputHandler
- public class NodeInputHandler
- extends InputHandler
- Version:
- 1.0
- Author:
- Thomas Wolf
Methods inherited from class gishur.gui2.InputHandler |
acceptConsumed, allButtons, disable, dispatchModifyEvent, enable, enabled, filterEvent, oneButton, preprocessEvent, processActionEvent, processAdjustmentEvent, processComponentEvent, processContainerEvent, processEvent, processFocusEvent, processItemEvent, processKeyEvent, processModifyEvent, processPaintEvent, processTextEvent, processWindowEvent, removeCursor, sendEvent, setAcceptConsumed, setCursor, setCursor |
Methods inherited from class gishur.gui2.DrawObject |
addDrawDependency, addPainter, blockRepaint, checkState, checkStateCleared, child, clear, clearCache, clearState, dependency, dirty, disableEvents, draw, draw, enableEvents, ensureRecalculate, findPainter, firstPainter, fullscreen, hide, hide, insert, levelMask, levelUsed, locate, makeDirty, makeDirty, next, next, nextPainter, parent, prepeareRenderContext, prev, prev, processDrawEvent, propertyReader, recalculate, remove, removeDrawDependency, repaint, screenTransformation, setFullscreen, setPaintBeforeMembers, setState, show, show, state, state, unblockRepaint, unblockRepaint, visible |
Methods inherited from class gishur.gui2.DrawAtom |
addProperties, collectHits, dispatchEvent, displayManager, drawComponent, getBounds, getLocalProperty, getProperty, getProperty, getRequiredProperty, processMessage, properties, removeProperty, sendEvent, sendMessage, setBounds, setPropertiesTo, setProperty, setProperty, setProperty, setProperty, toString, toString, toStringDetail, toTreeString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NodeInputHandler
public NodeInputHandler()
- Default constructor.
NodeInputHandler
public NodeInputHandler(DisplayGraph dgraph)
- Default constructor.
setInputMouseButton
public void setInputMouseButton(int button)
- Sets the button to input objects
(default:
MouseEvent.BUTTON1_MASK
).
- Parameters:
button
- the button to make input.
setScreenTransformation
public final void setScreenTransformation(ScreenTransformation transform)
- Sets the screen transformation for
this
NodeInputHandler
.
The transformation will be stored under the key "screen_transformation" in
this
NodeInputHandlers
properties list.
To initialize the ScreenTransformation
correctly, use this method
instead of DrawAtom.setProperty(java.lang.String, java.lang.Object)
.
- Overrides:
setScreenTransformation
in class DrawObject
- Parameters:
transform
- the new ScreenTransformation
processMouseEvent
protected void processMouseEvent(java.awt.event.MouseEvent e)
- Processes mouse events.
- Overrides:
processMouseEvent
in class InputHandler
- Parameters:
e
- the event.
processMouseMotionEvent
protected void processMouseMotionEvent(java.awt.event.MouseEvent e)
- Processes mouse motion events.
- Overrides:
processMouseMotionEvent
in class InputHandler
- Parameters:
e
- the event.
onConsumedEvent
protected void onConsumedEvent(java.awt.event.InputEvent e)
- Processes consumed
InputEvents
. In order to process the events
further, call InputHandler.sendEvent(java.awt.AWTEvent)
.
- Overrides:
onConsumedEvent
in class InputHandler
- Parameters:
e
- consumed InputEvent
.
recalculate
protected void recalculate(RenderContext context,
PropertyStatusReader properties)
- Forces the
DrawObject
to recalculate its representation.
This method will only be called, if it became dirty via a call
to the DrawObject.makeDirty(boolean)
method or something has happened, that
causes all DrawAtoms
to recalculate their
representation.
This method should only be called by the render system.
- Overrides:
recalculate
in class InputHandler
- Parameters:
context
- the RenderContext
to useproperties
- the PropertyStatusReader
to use for
reading properties