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 TreeAttributes
public void copy(TreeAttributes attributes)
copy
in interface TreeAttributes
attributes
- the attributes to copy.public Color[] getCheckBoxColor()
getCheckBoxColor
in interface TreeAttributes
public Color getColor()
getColor
in interface TreeAttributes
TreeAttributes.setColor(java.awt.Color)
public Font getDescriptionFont()
getDescriptionFont
in interface TreeAttributes
public Font getFont()
getFont
in interface TreeAttributes
TreeAttributes.setFont(java.awt.Font)
public Dimension getIconSize()
getIconSize
in interface TreeAttributes
TreeAttributes.setIconSize(java.awt.Dimension)
public int getIconSpace()
getIconSpace
in interface TreeAttributes
TreeAttributes.setIconSpace(int)
public int getRowSpacing()
getRowSpacing
in interface TreeAttributes
TreeAttributes.setRowSpacing(int)
public boolean isRootVisible()
isRootVisible
in interface TreeAttributes
TreeAttributes.setRootVisible(boolean)
public void setCheckBoxColor(Color color1, Color color2)
setCheckBoxColor
in interface TreeAttributes
color1
- first color in the checkbox gradient.color2
- second color in the checkbox gradient.public void setColor(Color textColor)
setColor
in interface TreeAttributes
textColor
- New text color.TreeAttributes.getColor()
public void setDescriptionFont(Font font)
setDescriptionFont
in interface TreeAttributes
font
- New font for descriptions.public void setFont(Font font)
setFont
in interface TreeAttributes
font
- New tree font.TreeAttributes.getFont()
public void setIconSize(Dimension iconSize)
setIconSize
in interface TreeAttributes
iconSize
- New size.TreeAttributes.getIconSize()
public void setIconSpace(int iconSpace)
setIconSpace
in interface TreeAttributes
iconSpace
- Icon space in pixels.TreeAttributes.getIconSpace()
public void setRootVisible(boolean visible)
setRootVisible
in interface TreeAttributes
visible
- True if the root node should be drawn.TreeAttributes.isRootVisible()
public void setRowSpacing(int spacing)
setRowSpacing
in interface TreeAttributes
spacing
- Row spacing.TreeAttributes.getRowSpacing()