kiyut.citra 3.7

kiyut.citra.canvas.tool
Class SelectionRotateTool

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

public class SelectionRotateTool
extends AbstractSelectionTool

Implementation of Selection Rotate Tool

Author:
Kiyut

Nested Class Summary
 class SelectionRotateTool.Anchor
           
 
Field Summary
protected  SelectionRotateTool.Anchor anchor
           
protected  Rectangle2D bounds
           
protected  AffineTransform canvasAt
           
protected  double origAngle
           
protected  Cursor rotateCursor
           
protected  Shape rotatedShape
           
protected  boolean rotating
           
protected  Shape shape
           
 
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
SelectionRotateTool()
          Creates a new instance of SelectionRotateTool
 
Method Summary
protected  AffineTransform createTransform()
          Return rotate transform
 void endTool()
           Overidden to unregister input listener.
 void mouseDragged(MouseEvent evt)
           
 void mousePressed(MouseEvent evt)
           
 void mouseReleased(MouseEvent evt)
           
 void paint(Graphics2D g2d)
          this methods do nothing
 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, mouseMoved, 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

rotatedShape

protected Shape rotatedShape

bounds

protected Rectangle2D bounds

rotateCursor

protected Cursor rotateCursor

rotating

protected boolean rotating

anchor

protected SelectionRotateTool.Anchor anchor

origAngle

protected double origAngle

canvasAt

protected AffineTransform canvasAt
Constructor Detail

SelectionRotateTool

public SelectionRotateTool()
Creates a new instance of SelectionRotateTool

Method Detail

paint

public void paint(Graphics2D g2d)
Description copied from class: AbstractTool
this methods do nothing

Specified by:
paint in interface FXTool
Overrides:
paint in class AbstractTool
Parameters:
g2d - Graphics2D

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()

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

createTransform

protected AffineTransform createTransform()
Return rotate transform

Returns:
rotate transform

kiyut.citra 3.7