|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.event.KeyAdapter
jpicedt.graphic.toolkit.MouseTool
jpicedt.graphic.toolkit.MoveTool
public class MoveTool
A MouseTool used to translate a target Element by a given vector.
Field Summary |
---|
Fields inherited from class jpicedt.graphic.toolkit.MouseTool |
---|
lastMouseEvent, mouseOutside |
Constructor Summary | |
---|---|
MoveTool(EditorKit kit,
Element target)
|
Method Summary | |
---|---|
void |
mouseDragged(PEMouseEvent e)
set the 2nd pt of the translation vector and translate the target |
void |
mouseMoved(PEMouseEvent e)
set the cursor |
void |
mousePressed(PEMouseEvent e)
set the first point of the translation vector |
void |
mouseReleased(PEMouseEvent e)
this default implementation simply stores the given mouse-event in lastMouseEvent field |
void |
paint(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D allocation,
double scale)
Allow the tool to paint shapes that are specific to this tool. |
Methods inherited from class jpicedt.graphic.toolkit.MouseTool |
---|
flush, getLastMouseEvent, init, keyPressed, keyReleased, mouseClicked, mouseEntered, mouseExited, processKeyEvent |
Methods inherited from class java.awt.event.KeyAdapter |
---|
keyTyped |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MoveTool(EditorKit kit, Element target)
kit
- the EditorKit this mouse-tool is to registered with.target
- the target Element to be movedMethod Detail |
---|
public void mousePressed(PEMouseEvent e)
mousePressed
in interface PEMouseInputListener
mousePressed
in class MouseTool
public void mouseDragged(PEMouseEvent e)
mouseDragged
in interface PEMouseInputListener
mouseDragged
in class MouseTool
public void mouseReleased(PEMouseEvent e)
MouseTool
mouseReleased
in interface PEMouseInputListener
mouseReleased
in class MouseTool
public void mouseMoved(PEMouseEvent e)
mouseMoved
in interface PEMouseInputListener
mouseMoved
in class MouseTool
public void paint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D allocation, double scale)
paint
in class MouseTool
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |