com.horstmann.violet
Class BentStyle

java.lang.Object
  extended by com.horstmann.violet.framework.SerializableEnumeration
      extended by com.horstmann.violet.BentStyle
All Implemented Interfaces:
java.io.Serializable

public class BentStyle
extends SerializableEnumeration

A style for a segmented line that indicates the number and sequence of bends.

See Also:
Serialized Form

Field Summary
static BentStyle HV
           
static BentStyle HVH
           
static BentStyle STRAIGHT
           
static BentStyle VH
           
static BentStyle VHV
           
 
Method Summary
 java.util.ArrayList getPath(java.awt.geom.Rectangle2D start, java.awt.geom.Rectangle2D end)
          Gets the points at which a line joining two rectangles is bent according to this bent style.
 
Methods inherited from class com.horstmann.violet.framework.SerializableEnumeration
toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STRAIGHT

public static final BentStyle STRAIGHT

HV

public static final BentStyle HV

VH

public static final BentStyle VH

HVH

public static final BentStyle HVH

VHV

public static final BentStyle VHV
Method Detail

getPath

public java.util.ArrayList getPath(java.awt.geom.Rectangle2D start,
                                   java.awt.geom.Rectangle2D end)
Gets the points at which a line joining two rectangles is bent according to this bent style.

Parameters:
start - the starting rectangle
end - the ending rectangle
Returns:
an array list of points at which to bend the segmented line joining the two rectangles