edu.rit.draw
Enum Drawing.Alignment

java.lang.Object
  extended by java.lang.Enum<Drawing.Alignment>
      extended by edu.rit.draw.Drawing.Alignment
All Implemented Interfaces:
Serializable, Comparable<Drawing.Alignment>
Enclosing class:
Drawing

public static enum Drawing.Alignment
extends Enum<Drawing.Alignment>

Enumeration Drawing.Alignment specifies how a Drawing's items are to be aligned within the drawing's display region.


Enum Constant Summary
CENTER
          Align the center of the drawing items to the center point of the display region, inset by the border.
EAST
          Align the east middle of the drawing items to the east middle point of the display region, inset by the border.
NONE
          No alignment.
NORTH
          Align the north middle of the drawing items to the north middle point of the display region, inset by the border.
NORTHEAST
          Align the northeast corner of the drawing items to the northeast corner point of the display region, inset by the border.
NORTHWEST
          Align the northwest corner of the drawing items to the northwest corner point of the display region, inset by the border.
SOUTH
          Align the south middle of the drawing items to the south middle point of the display region, inset by the border.
SOUTHEAST
          Align the southeast corner of the drawing items to the southeast corner point of the display region, inset by the border.
SOUTHWEST
          Align the southwest corner of the drawing items to the southwest corner point of the display region, inset by the border.
WEST
          Align the west middle of the drawing items to the west middle point of the display region, inset by the border.
 
Method Summary
static Drawing.Alignment valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Drawing.Alignment[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NONE

public static final Drawing.Alignment NONE
No alignment. Items are drawn at their own locations and are not aligned to the display region.


NORTHWEST

public static final Drawing.Alignment NORTHWEST
Align the northwest corner of the drawing items to the northwest corner point of the display region, inset by the border.


NORTH

public static final Drawing.Alignment NORTH
Align the north middle of the drawing items to the north middle point of the display region, inset by the border.


NORTHEAST

public static final Drawing.Alignment NORTHEAST
Align the northeast corner of the drawing items to the northeast corner point of the display region, inset by the border.


WEST

public static final Drawing.Alignment WEST
Align the west middle of the drawing items to the west middle point of the display region, inset by the border.


CENTER

public static final Drawing.Alignment CENTER
Align the center of the drawing items to the center point of the display region, inset by the border.


EAST

public static final Drawing.Alignment EAST
Align the east middle of the drawing items to the east middle point of the display region, inset by the border.


SOUTHWEST

public static final Drawing.Alignment SOUTHWEST
Align the southwest corner of the drawing items to the southwest corner point of the display region, inset by the border.


SOUTH

public static final Drawing.Alignment SOUTH
Align the south middle of the drawing items to the south middle point of the display region, inset by the border.


SOUTHEAST

public static final Drawing.Alignment SOUTHEAST
Align the southeast corner of the drawing items to the southeast corner point of the display region, inset by the border.

Method Detail

values

public static Drawing.Alignment[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Drawing.Alignment c : Drawing.Alignment.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Drawing.Alignment valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2005-2012 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.