kiyut.citra 2.5

kiyut.citra.canvas.tool
Class SelectionMoveTool

java.lang.Object
  extended by kiyut.citra.canvas.tool.AbstractTool
      extended by kiyut.citra.canvas.tool.AbstractSelectionTool
          extended by kiyut.citra.canvas.tool.SelectionMoveTool
All Implemented Interfaces:
KeyListener, MouseListener, MouseMotionListener, EventListener, MouseInputListener, FXTool

public class SelectionMoveTool
extends AbstractSelectionTool

Implementation of Selection Move Tool

Author:
Kiyut

Field Summary
protected  Rectangle2D bounds
           
protected  AffineTransform canvasAt
           
protected  Cursor movedCursor
           
protected  Shape movedShape
           
protected  boolean moving
           
protected  Shape shape
           
protected  int startX
           
protected  int startY
           
protected  int tx
           
protected  int ty
           
 
Fields inherited from class kiyut.citra.canvas.tool.AbstractSelectionTool
cursor, prevCursor
 
Fields inherited from class kiyut.citra.canvas.tool.AbstractTool
canvas, enabled, listenerList
 
Constructor Summary
SelectionMoveTool()
          Creates a new instance of SelectionMoveTool
 
Method Summary
 void endTool()
           Overidden to unregister input listener.
 void mouseDragged(MouseEvent evt)
           
 void mouseMoved(MouseEvent evt)
           
 void mousePressed(MouseEvent evt)
           
 void mouseReleased(MouseEvent evt)
           
 void paint(Graphics2D g2d)
          Invoked by FXCanvas to draw tool.
 void reset()
           
 void startTool(FXCanvas canvas)
           Overidden to register input listener.
 
Methods inherited from class kiyut.citra.canvas.tool.AbstractTool
addToolListener, fireStateChanged, isEnabled, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, registerInputListener, removeToolListener, setEnabled, unregisterInputListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shape

protected Shape shape

movedShape

protected Shape movedShape

bounds

protected Rectangle2D bounds

movedCursor

protected Cursor movedCursor

moving

protected boolean moving

canvasAt

protected AffineTransform canvasAt

startX

protected int startX

startY

protected int startY

tx

protected int tx

ty

protected int ty
Constructor Detail

SelectionMoveTool

public SelectionMoveTool()
Creates a new instance of SelectionMoveTool

Method Detail

paint

public void paint(Graphics2D g2d)
Description copied from interface: FXTool
Invoked by FXCanvas to draw tool.

Specified by:
paint in interface FXTool
Overrides:
paint in class AbstractTool
Parameters:
g2d - the Graphics2D context in which to paint

startTool

public void startTool(FXCanvas canvas)
Description copied from class: AbstractSelectionTool
Overidden to register input listener. Inherited tool please do not forget to call super Overriden to set cursor

Specified by:
startTool in interface FXTool
Overrides:
startTool in class AbstractSelectionTool

endTool

public void endTool()
Description copied from class: AbstractSelectionTool
Overidden to unregister input listener. Inherited tool please do not forget to call super Overriden to unset cursor

Specified by:
endTool in interface FXTool
Overrides:
endTool in class AbstractSelectionTool

reset

public void reset()

mouseMoved

public void mouseMoved(MouseEvent evt)
Specified by:
mouseMoved in interface MouseMotionListener
Overrides:
mouseMoved in class AbstractTool

mousePressed

public void mousePressed(MouseEvent evt)
Specified by:
mousePressed in interface MouseListener
Overrides:
mousePressed in class AbstractTool

mouseDragged

public void mouseDragged(MouseEvent evt)
Specified by:
mouseDragged in interface MouseMotionListener
Overrides:
mouseDragged in class AbstractTool

mouseReleased

public void mouseReleased(MouseEvent evt)
Specified by:
mouseReleased in interface MouseListener
Overrides:
mouseReleased in class AbstractTool

kiyut.citra 2.5