public enum Alignment extends Enum<Alignment> implements SimpleDatatype<String>
HorizontalAlignment
,
VerticalAlignment
Enum Constant and Description |
---|
BOTTOM
the component will be located at the bottom and horizontally centered.
|
BOTTOM_LEFT
the component will be located at the right and vertically centered.
|
BOTTOM_RIGHT
the component will be located at the right and vertically centered.
|
CENTER
the component will be horizontally and vertically centered.
|
LEFT
the component will be located at the left and vertically centered.
|
RIGHT
the component will be located at the right and vertically centered.
|
TOP
the component will be located at the top and horizontally centered.
|
TOP_LEFT
the component will be located at the right and vertically centered.
|
TOP_RIGHT
the component will be located at the right and vertically centered.
|
Modifier and Type | Field and Description |
---|---|
private String |
title |
private String |
value |
Modifier and Type | Method and Description |
---|---|
static Alignment |
fromDirection(Direction direction)
This is the inverse operation for
toDirection() . |
static Alignment |
fromValue(String value)
|
HorizontalAlignment |
getHorizontalAlignment()
This method gets the horizontal part of the alignment.
|
abstract Alignment |
getMirrored()
This method gets the inverse alignment.
|
Alignment |
getPart(Orientation orientation)
This method extracts the
horizontal or vertical part of
this alignment. |
String |
getValue()
This method returns the raw value of this datatype.
|
VerticalAlignment |
getVerticalAlignment()
This method gets the vertical part of the alignment.
|
Direction |
toDirection() |
String |
toString()
|
static Alignment |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Alignment[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Alignment CENTER
___
_*_
___
public static final Alignment TOP
_*_
___
___
public static final Alignment BOTTOM
___
___
_*_
public static final Alignment LEFT
___
*__
___
public static final Alignment RIGHT
___
__*
___
public static final Alignment TOP_LEFT
*__
___
___
public static final Alignment TOP_RIGHT
__*
___
___
public static final Alignment BOTTOM_LEFT
___
___
*__
public static final Alignment BOTTOM_RIGHT
___
___
__*
public static Alignment[] values()
for (Alignment c : Alignment.values()) System.out.println(c);
public static Alignment valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getValue()
SimpleDatatype
String
, Character
, Boolean
, any type of Number
, any type of java.time.LocalDate
, etc.).getValue
in interface AttributeReadValue<String>
getValue
in interface SimpleDatatype<String>
public String toString()
Datatype
String
representation of this Datatype
. While the general contract of
Object.toString()
is very weak and mainly used for debugging, the contract here is very strong. The
returned String
has to be suitable for end-users and official output to any kind of sink. NlsMessage
for
this purpose and implement NlsObject
if you want to support I18N/L10N.public HorizontalAlignment getHorizontalAlignment()
HorizontalAlignment
.public VerticalAlignment getVerticalAlignment()
VerticalAlignment
.public Alignment getPart(Orientation orientation)
horizontal
or vertical
part of
this alignment.orientation
- is the Orientation
of the requested part.getHorizontalAlignment()
if orientation is Orientation.HORIZONTAL
,
getVerticalAlignment()
otherwise.public abstract Alignment getMirrored()
BOTTOM_RIGHT
for TOP_LEFT
. Returns itself if CENTER
.public Direction toDirection()
Copyright © 2001–2016 mmm-Team. All rights reserved.