Package swingtree
Enum Class UI.Side
- All Implemented Interfaces:
Serializable,Comparable<UI.Side>,Constable,UIEnum<UI.Side>
- Enclosing class:
UI
Names one of the four edges of a component:
TOP, LEFT,
BOTTOM or RIGHT. Every JComponent is a rectangle, so
those four are all there are. Pass one to
UIForTabbedPane.withTabPlacementAt(swingtree.UI.Side) or to the tabbed pane
factory method UIFactoryMethods.tabbedPane(swingtree.UI.Side) to say where the tabs go,
or to UILayoutConstants.DOCK(swingtree.UI.Side) to dock a child component
against one edge of a MigLayout panel.
An edge is a line, and axis() names the axis it runs along: the top and
the bottom edge are horizontal lines, the left and the right edge vertical ones.
opposite() names the edge facing this one across the component, and
toPlacement() turns the edge into the point at the middle of it, for the
parts of the API which place things by UI.Placement.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionaxis()Returns the axis the line of this edge runs along, which is also the axis a tab strip, a tool bar or a divider docked to this edge is laid out on.opposite()Returns the side facing this one across the component, which is the side to move something to when the user asks for it to sit on the other side.Returns the point at the middle of this side, which is how a side is handed to the parts of the API that place things byUI.Placement, such asImageConf.placement(Placement).static UI.SideReturns the enum constant of this class with the specified name.static UI.Side[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TOP
The top edge, which is a horizontal line. -
LEFT
The left edge, which is a vertical line. -
BOTTOM
The bottom edge, which is a horizontal line. -
RIGHT
The right edge, which is a vertical line.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
opposite
Returns the side facing this one across the component, which is the side to move something to when the user asks for it to sit on the other side. -
axis
Returns the axis the line of this edge runs along, which is also the axis a tab strip, a tool bar or a divider docked to this edge is laid out on. Tabs docked to the top sit in a row, tabs docked to the left stack downwards.- Returns:
UI.Axis.HORIZONTALforTOPandBOTTOM,UI.Axis.VERTICALforLEFTandRIGHT.
-
toPlacement
Returns the point at the middle of this side, which is how a side is handed to the parts of the API that place things byUI.Placement, such asImageConf.placement(Placement).- Returns:
UI.Placement.TOP,UI.Placement.LEFT,UI.Placement.BOTTOMorUI.Placement.RIGHT.
-