|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--gishur.gui2.DrawAtom
|
+--gishur.gui2.DrawObject
|
+--gishur.gui2.InputHandler
|
+--gishur.gui2.handler.TranslateHandler
An InputHandler to make screen translations for zoom-operations.
| Fields inherited from class gishur.gui2.DrawAtom |
BLOCK_REPAINT, MARK_RECALC, MARK_REPAINT, MARK_SIZE, REPAINT, UNBLOCK_REPAINT, USER_STATES_FIRST, USER_STATES_MASK |
| Constructor Summary | |
TranslateHandler()
Default constructor. |
|
| Method Summary | |
void |
add(Layer layer)
Adds a Layer to the list of Layers. |
Stack |
history()
Returns the history of this TranslateHandler.
|
protected void |
onConsumedEvent(java.awt.event.InputEvent e)
Processes consumed InputEvents. |
protected void |
processMouseEvent(java.awt.event.MouseEvent e)
Processes mouse events. |
protected void |
processMouseMotionEvent(java.awt.event.MouseEvent e)
Processes mouse motion events. |
protected void |
recalculate(RenderContext context,
PropertyStatusReader properties)
Forces the DrawObject to recalculate its representation.
|
void |
refresh()
Refreshes the transformation list. |
void |
remove(Layer layer)
Removes a Layer from the list of Layers. |
void |
setBackMouseButton(int button)
Sets the button to set back (default: MouseEvent.BUTTON3_MASK). |
void |
setHistory(Stack history)
Sets the history. |
void |
setLayers(List layers)
Sets the list of Layers to the given list.
|
void |
setTranslateMouseButton(int button)
Sets the button to translate with (default: MouseEvent.BUTTON1_MASK). |
void |
setVisibleMode(boolean visible)
Sets the mode of the TranslateHandler. |
boolean |
visibleMode()
|
| 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, setScreenTransformation, 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 |
| Constructor Detail |
public TranslateHandler()
| Method Detail |
public void setTranslateMouseButton(int button)
MouseEvent.BUTTON1_MASK).button - the button to translate with.public void setBackMouseButton(int button)
MouseEvent.BUTTON3_MASK).button - the button to set back.public void setVisibleMode(boolean visible)
TranslateHandler. If the
handler is in visible mode, the handler uses resize mouse
cursors and shows the connected painter; otherwise
it uses the hand cursor and remains unvisible.visible - if true, visible mode is on.public boolean visibleMode()
public void setLayers(List layers)
Layers to the given list.
The list must contain ListItems, that can
store a key and a value, as keys there must be the Layers.
All ListItems, that contain no Layer
as key will be removed.public void add(Layer layer)
Layer to the list of Layers.layer - new Layerpublic void remove(Layer layer)
Layer from the list of Layers.layer - the Layer to removepublic void refresh()
public void setHistory(Stack history)
Stack,
storing Hashtables with ScreenTransformations
as keys and their status-objects (see ScreenTransformation.saveStatus())
as values.history - the history to use.history()public Stack history()
this TranslateHandler.
The history is a Stack, storing Hashtables
with ScreenTransformations as keys and their
status-objects (see ScreenTransformation.saveStatus()) as values.
On translateing, an entry will be added to the history; on back,
an entry will be removed.setHistory(gishur.core.Stack)protected void processMouseEvent(java.awt.event.MouseEvent e)
processMouseEvent in class InputHandlere - the event.protected void processMouseMotionEvent(java.awt.event.MouseEvent e)
processMouseMotionEvent in class InputHandlere - the event.protected void onConsumedEvent(java.awt.event.InputEvent e)
InputEvents. In order to process the events
further, call InputHandler.sendEvent(java.awt.AWTEvent).onConsumedEvent in class InputHandlere - consumed InputEvent.
protected void recalculate(RenderContext context,
PropertyStatusReader properties)
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.recalculate in class InputHandlercontext - the RenderContext to useproperties - the PropertyStatusReader to use for
reading properties
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||