Package swingtree
Enum Class UI.ComponentBoundary
- All Implemented Interfaces:
Serializable,Comparable<UI.ComponentBoundary>,Constable,UIEnum<UI.ComponentBoundary>
- Enclosing class:
UI
@Immutable
public static enum UI.ComponentBoundary
extends Enum<UI.ComponentBoundary>
implements UIEnum<UI.ComponentBoundary>
Names one of the infinitely thin lines at which the box model (margin|border|padding)
of a styled component steps from one layer into the next, whereas a
Here's a brief explanation of each enum entry:
UI.ComponentArea names a whole region lying between two such lines.
A style can anchor a gradient to a boundary through
GradientConf.boundary(ComponentBoundary), and place an image or a text
against one through ImageConf.placementBoundary(ComponentBoundary).Here's a brief explanation of each enum entry:
OUTER_TO_EXTERIOR- The outer edge of the whole component, which is where its margin starts.EXTERIOR_TO_BORDER- The line after the margin and before the border, which tightly wraps the entireUI.ComponentArea.BODY.BORDER_TO_INTERIOR- The line after the border and before the padding, which is the outer edge of theUI.ComponentArea.INTERIOR.INTERIOR_TO_CONTENT- The line after the padding, where the content of the component begins, like for example the contents of aJPanelorJScrollPane.CENTER_TO_CONTENT- The center point of the component, which is a point rather than a line.
OUTER_TO_EXTERIOR, EXTERIOR_TO_BORDER and BORDER_TO_INTERIOR
each wrap a whole UI.ComponentArea, which wrappedArea() returns.
The other two lie inside the interior and wrap no named area.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe line after the border and before the padding.The center point of the component, which is a point rather than a line.The line after the margin and before the border.The line after the padding, and the innermost boundary of the component: it is where the content of the component begins, like for example the contents of aJPanelorJScrollPane.The outer edge of the whole component, which is where its margin starts. -
Method Summary
Modifier and TypeMethodDescriptionstatic UI.ComponentBoundaryReturns the enum constant of this class with the specified name.static UI.ComponentBoundary[]values()Returns an array containing the constants of this enum class, in the order they are declared.Returns theUI.ComponentAreathis boundary tightly wraps, so that the two enums describing one box model cannot drift apart:OUTER_TO_EXTERIORwrapsUI.ComponentArea.ALL,EXTERIOR_TO_BORDERwrapsUI.ComponentArea.BODYandBORDER_TO_INTERIORwrapsUI.ComponentArea.INTERIOR.
-
Enum Constant Details
-
OUTER_TO_EXTERIOR
The outer edge of the whole component, which is where its margin starts. This tightly wraps the entireUI.ComponentArea.ALL. -
EXTERIOR_TO_BORDER
The line after the margin and before the border. This tightly wraps the entireUI.ComponentArea.BODY. -
BORDER_TO_INTERIOR
The line after the border and before the padding. This tightly wraps the entireUI.ComponentArea.INTERIOR. -
INTERIOR_TO_CONTENT
The line after the padding, and the innermost boundary of the component: it is where the content of the component begins, like for example the contents of aJPanelorJScrollPane. -
CENTER_TO_CONTENT
The center point of the component, which is a point rather than a 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
-
wrappedArea
Returns theUI.ComponentAreathis boundary tightly wraps, so that the two enums describing one box model cannot drift apart:OUTER_TO_EXTERIORwrapsUI.ComponentArea.ALL,EXTERIOR_TO_BORDERwrapsUI.ComponentArea.BODYandBORDER_TO_INTERIORwrapsUI.ComponentArea.INTERIOR. Each of those three areas returns this same boundary fromUI.ComponentArea.outerBoundary().- Returns:
- The wrapped area, and an empty
OptionalforINTERIOR_TO_CONTENTandCENTER_TO_CONTENT, which enclose the content rather than a named area.
-