net.sf.latexdraw.glib.handlers
Class ScaleHandler

java.lang.Object
  extended by net.sf.latexdraw.glib.handlers.Handler<java.awt.geom.Path2D>
      extended by net.sf.latexdraw.glib.handlers.ScaleHandler
All Implemented Interfaces:
IHandler, Pickable

public class ScaleHandler
extends Handler<java.awt.geom.Path2D>

Defines a handler that scales 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
protected  IShape.Position position
          The position of the possible scalings.
 
Fields inherited from class net.sf.latexdraw.glib.handlers.Handler
colour, opacity, point, shape, size
 
Fields inherited from interface net.sf.latexdraw.glib.handlers.IHandler
DEFAULT_SIZE
 
Constructor Summary
ScaleHandler(IShape.Position position)
          The constructor by default.
 
Method Summary
 IShape.Position getPosition()
           
 void updateFromShape(java.awt.Shape sh)
          Updates the handler using the given shape.
protected  void updateShape()
          Updates the Java2D shape of the handler.
 
Methods inherited from class net.sf.latexdraw.glib.handlers.Handler
contains, getCentre, getColour, getOpacity, getPicker, getSize, getX, getY, paint, setOpacity, setPoint, setSize, toString, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

position

protected IShape.Position position
The position of the possible scalings.

Constructor Detail

ScaleHandler

public ScaleHandler(IShape.Position position)
The constructor by default.

Parameters:
position - The position of the handler.
See Also:
IShape.Position
Method Detail

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>

getPosition

public IShape.Position getPosition()
Returns:
The position of the handler.
Since:
3.0

updateFromShape

public void updateFromShape(java.awt.Shape sh)
Description copied from interface: IHandler
Updates the handler using the given shape.

Specified by:
updateFromShape in interface IHandler
Overrides:
updateFromShape in class Handler<java.awt.geom.Path2D>
Parameters:
sh - The shape used to updated the handler.