Package com.ribs
Class RUBorders
java.lang.Object
com.ribs.RUBorders
A class to help manage and archive borders.
Would be nice if border archival supported multiple
Would also be nice to archive more border specific attributes, like EmptyBorder insets
and LineBorder color and thickness (again, only useful with new border inspector UI).
Might also be nice to do "Border was explicitly overridden by Ribs" trick with borders, like we do with
foreground/background (with reset button). This might make it viable to offer border editing to all components.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Border
fromXML
(JComponent aComponent, RXElement anElement) Border XML unarchival.static Border
Returns the given border, or if border is TitledBorder, the titled inner border.static String
Returns the title of a given border (if it's a titled border).static Font
getTitleFont
(Border aBorder) Returns the title font of the given border (if it's a TitledBorder).static boolean
Returns whether a border is effectively not there (either null or an EmptyBorder with no margin).static Border
Sets the title of a given border (if it's a titled border).static void
setTitleFont
(Border aBorder, Font aFont) Sets the title font of the given border (if it's a TitledBorder).static RXElement
Border XML archival.
-
Constructor Details
-
RUBorders
public RUBorders()
-
-
Method Details
-
getTitle
Returns the title of a given border (if it's a titled border). -
setTitle
Sets the title of a given border (if it's a titled border). -
getTitleFont
Returns the title font of the given border (if it's a TitledBorder). -
setTitleFont
Sets the title font of the given border (if it's a TitledBorder). -
getBorder
Returns the given border, or if border is TitledBorder, the titled inner border. -
isEmpty
Returns whether a border is effectively not there (either null or an EmptyBorder with no margin). -
toXML
Border XML archival. -
fromXML
Border XML unarchival.- Parameters:
aComponent
- the component that borders will be set onanElement
- the xml node that may (or may not) have a border element in
-