net.sf.latexdraw.glib.handlers
Class RotationHandler
java.lang.Object
net.sf.latexdraw.glib.handlers.Handler<java.awt.geom.Path2D>
net.sf.latexdraw.glib.handlers.RotationHandler
- All Implemented Interfaces:
- IHandler, Pickable
public class RotationHandler
- extends Handler<java.awt.geom.Path2D>
Defines a handler that rotates a shape.
This file is part of LaTeXDraw
Copyright (c) 2005-2012 Arnaud BLOUIN
LaTeXDraw is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LaTeXDraw is distributed without any warranty; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
08/28/11
- Version:
- 3.0
- Author:
- Arnaud BLOUIN
Field Summary |
private java.awt.geom.Arc2D |
arc
|
static java.awt.BasicStroke |
STROKE
|
Method Summary |
boolean |
contains(double x,
double y)
Tests if the given point is into the pickable object. |
void |
paint(java.awt.Graphics2D g)
paint the handler. |
protected void |
updateShape()
Updates the Java2D shape of the handler. |
Methods inherited from class net.sf.latexdraw.glib.handlers.Handler |
getCentre, getColour, getOpacity, getPicker, getSize, getX, getY, setOpacity, setPoint, setSize, toString, update, updateFromShape |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
STROKE
public static final java.awt.BasicStroke STROKE
arc
private java.awt.geom.Arc2D arc
RotationHandler
public RotationHandler()
- The constructor by default.
updateShape
protected void updateShape()
- Description copied from class:
Handler
- Updates the Java2D shape of the handler.
- Specified by:
updateShape
in class Handler<java.awt.geom.Path2D>
paint
public void paint(java.awt.Graphics2D g)
- Description copied from class:
Handler
- paint the handler.
- Specified by:
paint
in interface IHandler
- Overrides:
paint
in class Handler<java.awt.geom.Path2D>
- Parameters:
g
- The object into which objects are painted.
contains
public boolean contains(double x,
double y)
- Description copied from interface:
Pickable
- Tests if the given point is into the pickable object.
- Specified by:
contains
in interface Pickable
- Overrides:
contains
in class Handler<java.awt.geom.Path2D>
- Parameters:
x
- The x-coordinate of the point to test.y
- The y-coordinate of the point to test.
- Returns:
- True if the given point is into the pickable object.