org.crosswire.common.swing.desktop
Enum LayoutType

java.lang.Object
  extended by java.lang.Enum<LayoutType>
      extended by org.crosswire.common.swing.desktop.LayoutType
All Implemented Interfaces:
Serializable, Comparable<LayoutType>

public enum LayoutType
extends Enum<LayoutType>

Types of ViewLayouts. Currently there are two types of desktop layouts:

Author:
Joe Walker [joe at eireneh dot com], DM Smith [dmsmith555 at yahoo dot com]
See Also:
for license details.
The copyright to this program is held by it's authors.

Enum Constant Summary
MDI
          Multiple Document View
TDI
          Tabbed View
 
Field Summary
private  AbstractViewLayout layout
          The actual layout
 
Method Summary
abstract  AbstractViewLayout createLayout()
          Create the appropriate kind of view layout
static LayoutType fromInteger(int ordinal)
          Lookup method by ordinal value
static LayoutType fromString(String name)
          Lookup method to convert from a String
 AbstractViewLayout getLayout()
          Return the layout
 int toInteger()
          Get an integer representation for this LayoutType
static LayoutType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LayoutType[] 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

TDI

public static final LayoutType TDI
Tabbed View


MDI

public static final LayoutType MDI
Multiple Document View

Field Detail

layout

private transient AbstractViewLayout layout
The actual layout

Method Detail

values

public static LayoutType[] 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 (LayoutType c : LayoutType.values())
    System.out.println(c);

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

valueOf

public static LayoutType 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

getLayout

public AbstractViewLayout getLayout()
Return the layout

Returns:
the layout

createLayout

public abstract AbstractViewLayout createLayout()
Create the appropriate kind of view layout

Returns:
the created view layout

toInteger

public int toInteger()
Get an integer representation for this LayoutType


fromString

public static LayoutType fromString(String name)
Lookup method to convert from a String


fromInteger

public static LayoutType fromInteger(int ordinal)
Lookup method by ordinal value


Copyright ยจ 2003-2013