Class RadianceTitlePaneUtilities
java.lang.Object
org.pushingpixels.radiance.theming.internal.utils.RadianceTitlePaneUtilities
Various utility functions for title panes. This class is for internal use only.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enumerates the types of children components of title panes. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Client property to mark every child to be either leading or trailing. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
areTitlePaneControlButtonsOnRight
(JRootPane rootPane) getTitlePaneControlButtonKind
(JRootPane rootPane) static Rectangle
getTitlePaneTextRectangle
(JComponent titlePane, Component rootComponent) Computes the rectangle of the title text in the specified title pane.static void
Marks the specified child component with the specified extra component kind.
-
Field Details
-
EXTRA_COMPONENT_KIND
Client property to mark every child to be either leading or trailing. The value must be one ofRadianceTitlePaneUtilities.ExtraComponentKind
.- See Also:
-
-
Constructor Details
-
RadianceTitlePaneUtilities
public RadianceTitlePaneUtilities()
-
-
Method Details
-
getTitlePaneControlButtonKind
public static RadianceTitlePaneUtilities.ExtraComponentKind getTitlePaneControlButtonKind(JRootPane rootPane) -
getTitleTextHorizontalGravity
-
getTitleIconHorizontalGravity
-
getTitleControlButtonGroupHorizontalGravity
public static RadianceThemingSlices.HorizontalGravity getTitleControlButtonGroupHorizontalGravity(JRootPane rootPane) -
getTitleControlButtonGroupVerticalGravity
public static RadianceThemingSlices.VerticalGravity getTitleControlButtonGroupVerticalGravity(JRootPane rootPane) -
areTitlePaneControlButtonsOnRight
-
getTitlePaneTextGravity
-
getTitlePaneIconGravity
-
markTitlePaneExtraComponent
public static void markTitlePaneExtraComponent(JComponent comp, RadianceTitlePaneUtilities.ExtraComponentKind kind) Marks the specified child component with the specified extra component kind.- Parameters:
comp
- Child component.kind
- Extra kind.- See Also:
-
getTitlePaneTextRectangle
Computes the rectangle of the title text in the specified title pane. This method looks at all the children components of the title pane, grouping them by leading and trailing (based onEXTRA_COMPONENT_KIND
client property). The title text rectangle is the space between the leading group and the trailing group.- Returns:
- Rectangle of the title text.
- Throws:
IllegalStateException
- If at least one child component of this title pane is not marked with theEXTRA_COMPONENT_KIND
client property.- See Also:
-