Class RadianceTitlePaneUtilities
- java.lang.Object
-
- org.pushingpixels.radiance.theming.internal.utils.RadianceTitlePaneUtilities
-
public class RadianceTitlePaneUtilities extends java.lang.Object
Various utility functions for title panes. This class is for internal use only.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RadianceTitlePaneUtilities.ExtraComponentKind
Enumerates the types of children components of title panes.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EXTRA_COMPONENT_KIND
Client property to mark every child to be either leading or trailing.
-
Constructor Summary
Constructors Constructor Description RadianceTitlePaneUtilities()
-
Method Summary
-
-
-
Field Detail
-
EXTRA_COMPONENT_KIND
public static final java.lang.String EXTRA_COMPONENT_KIND
Client property to mark every child to be either leading or trailing. The value must be one ofRadianceTitlePaneUtilities.ExtraComponentKind
.
-
-
Method Detail
-
getTitlePaneControlButtonKind
public static RadianceTitlePaneUtilities.ExtraComponentKind getTitlePaneControlButtonKind(javax.swing.JRootPane rootPane)
-
getTitleTextHorizontalGravity
public static RadianceThemingSlices.HorizontalGravity getTitleTextHorizontalGravity()
-
getTitleIconHorizontalGravity
public static RadianceThemingSlices.TitleIconHorizontalGravity getTitleIconHorizontalGravity()
-
getTitleControlButtonGroupHorizontalGravity
public static RadianceThemingSlices.HorizontalGravity getTitleControlButtonGroupHorizontalGravity(javax.swing.JRootPane rootPane)
-
getTitleControlButtonGroupVerticalGravity
public static RadianceThemingSlices.VerticalGravity getTitleControlButtonGroupVerticalGravity(javax.swing.JRootPane rootPane)
-
areTitlePaneControlButtonsOnRight
public static boolean areTitlePaneControlButtonsOnRight(javax.swing.JRootPane rootPane)
-
getTitlePaneTextGravity
public static RadianceThemingSlices.HorizontalGravity getTitlePaneTextGravity()
-
getTitlePaneIconGravity
public static RadianceThemingSlices.TitleIconHorizontalGravity getTitlePaneIconGravity()
-
markTitlePaneExtraComponent
public static void markTitlePaneExtraComponent(javax.swing.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:
EXTRA_COMPONENT_KIND
-
getTitlePaneTextRectangle
public static java.awt.Rectangle getTitlePaneTextRectangle(javax.swing.JComponent titlePane, java.awt.Component rootComponent)
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:
java.lang.IllegalStateException
- If at least one child component of this title pane is not marked with theEXTRA_COMPONENT_KIND
client property.- See Also:
markTitlePaneExtraComponent(JComponent, ExtraComponentKind)
,EXTRA_COMPONENT_KIND
-
-