Enum-Klasse Orientation
- Alle implementierten Schnittstellen:
Serializable,Comparable<Orientation>,java.lang.constant.Constable
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
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum-Konstanten - Übersicht
Enum-Konstanten -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic OrientationfindOrientation(String value) Tries to match the given string value with anOrientationinstance.static OrientationgetOrientation(String value) Transforms the given string value into an instance of this enumeration class.static OrientationgetOrientation(String value, Orientation defaultOrientation) Transforms the given string value into an instance of this enumeration class, using the defaultOrientationif the string value is null.static OrientationGibt die Enum-Konstante dieser Klasse mit dem angegebenen Namen zurück.static Orientation[]values()Gibt ein Array mit den Konstanten dieser Enum-Klasse in der Reihenfolge ihrer Deklaration zurück.
-
Enum-Konstanten - Details
-
HORIZONTAL
Horizontal orientation. -
VERTICAL
Vertical orientation.
-
-
Methodendetails
-
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
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ältNullPointerException- wenn das Argument nicht angegeben wird
-
findOrientation
Tries to match the given string value with anOrientationinstance. 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 correspondingOrientationinstance 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
Orientationinstance 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 defaultOrientationif the string value is null. This method tries to find a match for the given string. If this is successful, the matchingOrientationinstance is returned. Otherwise, an exception is thrown. If the passed in string is null and a defaultOrientationis provided, then this default value is returned. If the defaultOrientationis null, null input also leads to an exception.- Parameter:
value- the value to be searched (case does not matter)defaultOrientation- the defaultOrientationto be returned for null strings- Gibt zurück:
- the found
Orientation - Löst aus:
FormBuilderException- if no match is found
-
getOrientation
Transforms the given string value into an instance of this enumeration class. This method is basically the same as calling the overloadedgetOrientation(String, Orientation)method with a defaultOrientationof 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
-