public class BasicTreeAttributes extends java.lang.Object implements TreeAttributes
TreeAttributes
set.Modifier and Type | Field and Description |
---|---|
protected java.awt.Color |
checkBoxColor1 |
protected java.awt.Color |
checkBoxColor2 |
protected java.awt.Font |
descriptionFont |
protected java.awt.Font |
font |
protected java.awt.Dimension |
iconSize |
protected int |
iconSpace |
protected boolean |
rootVisible |
protected int |
rowSpacing |
protected java.awt.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(java.lang.Object o) |
java.awt.Color[] |
getCheckBoxColor()
Get the color of filled checkboxes that indicate if nodes are selected.
|
java.awt.Color |
getColor()
Get the color of the text in the tree.
|
java.awt.Font |
getDescriptionFont()
Get the font used to render the node description.
|
java.awt.Font |
getFont()
Get the font used to render text.
|
java.awt.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(java.awt.Color color1,
java.awt.Color color2)
Set the color of filled checkboxes that indicate if a node is selected.
|
void |
setColor(java.awt.Color textColor)
Set the color of the text in the tree.
|
void |
setDescriptionFont(java.awt.Font font)
Set the font used to render the node descriptions.
|
void |
setFont(java.awt.Font font)
Set the font used to render text.
|
void |
setIconSize(java.awt.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 java.awt.Color checkBoxColor1
protected java.awt.Color checkBoxColor2
protected java.awt.Font descriptionFont
protected java.awt.Font font
protected java.awt.Dimension iconSize
protected int iconSpace
protected boolean rootVisible
protected int rowSpacing
protected java.awt.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 boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.awt.Color[] getCheckBoxColor()
getCheckBoxColor
in interface TreeAttributes
public java.awt.Color getColor()
getColor
in interface TreeAttributes
TreeAttributes.setColor(java.awt.Color)
public java.awt.Font getDescriptionFont()
getDescriptionFont
in interface TreeAttributes
public java.awt.Font getFont()
getFont
in interface TreeAttributes
TreeAttributes.setFont(java.awt.Font)
public java.awt.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 int hashCode()
hashCode
in class java.lang.Object
public boolean isRootVisible()
isRootVisible
in interface TreeAttributes
TreeAttributes.setRootVisible(boolean)
public void setCheckBoxColor(java.awt.Color color1, java.awt.Color color2)
setCheckBoxColor
in interface TreeAttributes
color1
- first color in the checkbox gradient.color2
- second color in the checkbox gradient.public void setColor(java.awt.Color textColor)
setColor
in interface TreeAttributes
textColor
- New text color.TreeAttributes.getColor()
public void setDescriptionFont(java.awt.Font font)
setDescriptionFont
in interface TreeAttributes
font
- New font for descriptions.public void setFont(java.awt.Font font)
setFont
in interface TreeAttributes
font
- New tree font.TreeAttributes.getFont()
public void setIconSize(java.awt.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()