Enum-Klasse Orientation

java.lang.Object
java.lang.Enum<Orientation>
net.sf.jguiraffe.gui.builder.components.Orientation
Alle implementierten Schnittstellen:
Serializable, Comparable<Orientation>, java.lang.constant.Constable

public enum Orientation extends Enum<Orientation>

An enumeration class that defines allowed values for the orientation of components.

A couple of components can have either horizontal or vertical orientation, for instance sliders or splitters. This enumeration class defines the allowed values for orientation attributes and provides methods for checking them or converting them to Orientation instances.

Version:
$Id: Orientation.java 205 2012-01-29 18:29:57Z oheger $
Autor:
Oliver Heger
  • Enum-Konstanten - Details

    • HORIZONTAL

      public static final Orientation HORIZONTAL
      Horizontal orientation.
    • VERTICAL

      public static final Orientation VERTICAL
      Vertical orientation.
  • Methodendetails

    • values

      public static Orientation[] values()
      Gibt ein Array mit den Konstanten dieser Enum-Klasse in der Reihenfolge ihrer Deklaration zurück.
      Gibt zurück:
      ein Array mit den Konstanten dieser Enum-Klasse in der Reihenfolge ihrer Deklaration
    • valueOf

      public static Orientation valueOf(String name)
      Gibt die Enum-Konstante dieser Klasse mit dem angegebenen Namen zurück. Die Zeichenfolge muss exakt mit einer ID übereinstimmen, mit der eine Enum-Konstante in dieser Klasse deklariert wird. (Zusätzliche Leerzeichen sind nicht zulässig.)
      Parameter:
      name - Name der zurückzugebenden Enumerationskonstante.
      Gibt zurück:
      Enumerationskonstante mit dem angegebenen Namen
      Löst aus:
      IllegalArgumentException - wenn diese Enum-Klasse keine Konstante mit dem angegebenen Namen enthält
      NullPointerException - wenn das Argument nicht angegeben wird
    • findOrientation

      public static Orientation findOrientation(String value)
      Tries to match the given string value with an Orientation instance. This method checks whether the passed in string corresponds to the name of an enumeration literal (case does not matter when doing the comparison). If a match is found, the corresponding Orientation instance is returned. Otherwise, the result of this method is null.
      Parameter:
      value - the value to be searched (case does not matter)
      Gibt zurück:
      the corresponding Orientation instance or null
    • getOrientation

      public static Orientation getOrientation(String value, Orientation defaultOrientation) throws FormBuilderException
      Transforms the given string value into an instance of this enumeration class, using the default Orientation if the string value is null. This method tries to find a match for the given string. If this is successful, the matching Orientation instance is returned. Otherwise, an exception is thrown. If the passed in string is null and a default Orientation is provided, then this default value is returned. If the default Orientation is null, null input also leads to an exception.
      Parameter:
      value - the value to be searched (case does not matter)
      defaultOrientation - the default Orientation to be returned for null strings
      Gibt zurück:
      the found Orientation
      Löst aus:
      FormBuilderException - if no match is found
    • getOrientation

      public static Orientation getOrientation(String value) throws FormBuilderException
      Transforms the given string value into an instance of this enumeration class. This method is basically the same as calling the overloaded getOrientation(String, Orientation) method with a default Orientation of null; i.e. null input also causes an exception.
      Parameter:
      value - the value to be searched (case does not matter)
      Gibt zurück:
      the found Orientation
      Löst aus:
      FormBuilderException - if no match is found