org.jhotdraw.draw.handle
Class ResizeHandleKit

java.lang.Object
  extended by org.jhotdraw.draw.handle.ResizeHandleKit

public class ResizeHandleKit
extends java.lang.Object

A set of utility methods to create handles which resize a Figure by using its setBounds method, if the Figure is transformable.

Version:
$Id: ResizeHandleKit.java 604 2010-01-09 12:00:29Z rawcoder $
Author:
Werner Randelshofer

Nested Class Summary
private static class ResizeHandleKit.EastHandle
           
private static class ResizeHandleKit.NorthEastHandle
           
private static class ResizeHandleKit.NorthHandle
           
private static class ResizeHandleKit.NorthWestHandle
           
private static class ResizeHandleKit.ResizeHandle
           
private static class ResizeHandleKit.SouthEastHandle
           
private static class ResizeHandleKit.SouthHandle
           
private static class ResizeHandleKit.SouthWestHandle
           
private static class ResizeHandleKit.WestHandle
           
 
Field Summary
private static boolean DEBUG
           
 
Constructor Summary
ResizeHandleKit()
          Creates a new instance.
 
Method Summary
static void addCornerResizeHandles(Figure f, java.util.Collection<Handle> handles)
          Creates handles for each corner of a figure and adds them to the provided collection.
static void addEdgeResizeHandles(Figure f, java.util.Collection<Handle> handles)
          Fills the given Vector with handles at each the north, south, east, and west of the figure.
static void addResizeHandles(Figure f, java.util.Collection<Handle> handles)
          Fills the given Vector with handles at each the north, south, east, and west of the figure.
static Handle east(Figure owner)
           
static Handle north(Figure owner)
           
static Handle northEast(Figure owner)
           
static Handle northWest(Figure owner)
           
static Handle south(Figure owner)
           
static Handle southEast(Figure owner)
           
static Handle southWest(Figure owner)
           
static Handle west(Figure owner)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values
Constructor Detail

ResizeHandleKit

public ResizeHandleKit()
Creates a new instance.

Method Detail

addCornerResizeHandles

public static void addCornerResizeHandles(Figure f,
                                          java.util.Collection<Handle> handles)
Creates handles for each corner of a figure and adds them to the provided collection.


addEdgeResizeHandles

public static void addEdgeResizeHandles(Figure f,
                                        java.util.Collection<Handle> handles)
Fills the given Vector with handles at each the north, south, east, and west of the figure.


addResizeHandles

public static void addResizeHandles(Figure f,
                                    java.util.Collection<Handle> handles)
Fills the given Vector with handles at each the north, south, east, and west of the figure.


south

public static Handle south(Figure owner)

southEast

public static Handle southEast(Figure owner)

southWest

public static Handle southWest(Figure owner)

north

public static Handle north(Figure owner)

northEast

public static Handle northEast(Figure owner)

northWest

public static Handle northWest(Figure owner)

east

public static Handle east(Figure owner)

west

public static Handle west(Figure owner)