public class RUBorders
extends java.lang.Object
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.
Modifier and Type | Class and Description |
---|---|
static class |
RUBorders.DashedBorder |
Constructor and Description |
---|
RUBorders() |
Modifier and Type | Method and Description |
---|---|
static javax.swing.border.Border |
fromXML(javax.swing.JComponent aComponent,
RXElement anElement)
Border XML unarchival.
|
static javax.swing.border.Border |
getBorder(javax.swing.border.Border aBorder)
Returns the given border, or if border is TitledBorder, the titled inner border.
|
static java.lang.String |
getTitle(javax.swing.border.Border aBorder)
Returns the title of a given border (if it's a titled border).
|
static java.awt.Font |
getTitleFont(javax.swing.border.Border aBorder)
Returns the title font of the given border (if it's a TitledBorder).
|
static boolean |
isEmpty(javax.swing.border.Border aBorder)
Returns whether a border is effectively not there (either null or an EmptyBorder with no margin).
|
static javax.swing.border.Border |
setTitle(javax.swing.border.Border aBorder,
java.lang.String aTitle)
Sets the title of a given border (if it's a titled border).
|
static void |
setTitleFont(javax.swing.border.Border aBorder,
java.awt.Font aFont)
Sets the title font of the given border (if it's a TitledBorder).
|
static RXElement |
toXML(javax.swing.border.Border aBorder)
Border XML archival.
|
public static java.lang.String getTitle(javax.swing.border.Border aBorder)
public static javax.swing.border.Border setTitle(javax.swing.border.Border aBorder, java.lang.String aTitle)
public static java.awt.Font getTitleFont(javax.swing.border.Border aBorder)
public static void setTitleFont(javax.swing.border.Border aBorder, java.awt.Font aFont)
public static javax.swing.border.Border getBorder(javax.swing.border.Border aBorder)
public static boolean isEmpty(javax.swing.border.Border aBorder)
public static RXElement toXML(javax.swing.border.Border aBorder)
public static javax.swing.border.Border fromXML(javax.swing.JComponent aComponent, RXElement anElement)
aComponent
- the component that borders will be set onanElement
- the xml node that may (or may not) have a border element in