public class BasicTreeAttributes extends Object implements TreeAttributes
TreeAttributes set.| Modifier and Type | Field and Description |
|---|---|
protected Color |
checkBoxColor1 |
protected Color |
checkBoxColor2 |
protected Font |
descriptionFont |
protected Font |
font |
protected Dimension |
iconSize |
protected int |
iconSpace |
protected boolean |
rootVisible |
protected int |
rowSpacing |
protected Color |
textColor |
| Constructor and Description |
|---|
BasicTreeAttributes() |
BasicTreeAttributes(TreeAttributes attributes)
Create a new attributes object with the same configuration as an existing attributes object.
|
| Modifier and Type | Method and Description |
|---|---|
BasicTreeAttributes |
copy()
Returns a new TreeAttributes instance of the same type as this TreeAttributes, who's properties are
configured exactly as this TreeAttributes.
|
void |
copy(TreeAttributes attributes)
Copies the specified TreeAttributes' properties into this object's properties.
|
boolean |
equals(Object o) |
Color[] |
getCheckBoxColor()
Get the color of filled checkboxes that indicate if nodes are selected.
|
Color |
getColor()
Get the color of the text in the tree.
|
Font |
getDescriptionFont()
Get the font used to render the node description.
|
Font |
getFont()
Get the font used to render text.
|
Dimension |
getIconSize()
Get the size of each icon in the tree.
|
int |
getIconSpace()
Get the amount of space, in pixels, to leave between an icon in the tree and surrounding text and shapes.
|
int |
getRowSpacing()
Get the space, in pixels, to leave between rows in the tree.
|
int |
hashCode() |
boolean |
isRootVisible()
Should be root node be drawn?
|
void |
setCheckBoxColor(Color color1,
Color color2)
Set the color of filled checkboxes that indicate if a node is selected.
|
void |
setColor(Color textColor)
Set the color of the text in the tree.
|
void |
setDescriptionFont(Font font)
Set the font used to render the node descriptions.
|
void |
setFont(Font font)
Set the font used to render text.
|
void |
setIconSize(Dimension iconSize)
Set the size of each icon in the tree.
|
void |
setIconSpace(int iconSpace)
Set the amount of space, in pixels, to leave between an icon in the tree and surrounding text and shapes.
|
void |
setRootVisible(boolean visible)
Set the root node to visibile or not visible.
|
void |
setRowSpacing(int spacing)
Set the space, in pixels, to leave between rows in the tree.
|
protected Color checkBoxColor1
protected Color checkBoxColor2
protected Font descriptionFont
protected Font font
protected Dimension iconSize
protected int iconSpace
protected boolean rootVisible
protected int rowSpacing
protected Color textColor
public BasicTreeAttributes()
public BasicTreeAttributes(TreeAttributes attributes)
attributes - Object to copy configuration from.public BasicTreeAttributes copy()
copy in interface TreeAttributespublic void copy(TreeAttributes attributes)
copy in interface TreeAttributesattributes - the attributes to copy.public Color[] getCheckBoxColor()
getCheckBoxColor in interface TreeAttributespublic Color getColor()
getColor in interface TreeAttributesTreeAttributes.setColor(java.awt.Color)public Font getDescriptionFont()
getDescriptionFont in interface TreeAttributespublic Font getFont()
getFont in interface TreeAttributesTreeAttributes.setFont(java.awt.Font)public Dimension getIconSize()
getIconSize in interface TreeAttributesTreeAttributes.setIconSize(java.awt.Dimension)public int getIconSpace()
getIconSpace in interface TreeAttributesTreeAttributes.setIconSpace(int)public int getRowSpacing()
getRowSpacing in interface TreeAttributesTreeAttributes.setRowSpacing(int)public boolean isRootVisible()
isRootVisible in interface TreeAttributesTreeAttributes.setRootVisible(boolean)public void setCheckBoxColor(Color color1, Color color2)
setCheckBoxColor in interface TreeAttributescolor1 - first color in the checkbox gradient.color2 - second color in the checkbox gradient.public void setColor(Color textColor)
setColor in interface TreeAttributestextColor - New text color.TreeAttributes.getColor()public void setDescriptionFont(Font font)
setDescriptionFont in interface TreeAttributesfont - New font for descriptions.public void setFont(Font font)
setFont in interface TreeAttributesfont - New tree font.TreeAttributes.getFont()public void setIconSize(Dimension iconSize)
setIconSize in interface TreeAttributesiconSize - New size.TreeAttributes.getIconSize()public void setIconSpace(int iconSpace)
setIconSpace in interface TreeAttributesiconSpace - Icon space in pixels.TreeAttributes.getIconSpace()public void setRootVisible(boolean visible)
setRootVisible in interface TreeAttributesvisible - True if the root node should be drawn.TreeAttributes.isRootVisible()public void setRowSpacing(int spacing)
setRowSpacing in interface TreeAttributesspacing - Row spacing.TreeAttributes.getRowSpacing()