|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
project35.desktopDeployment.TreeNodeRenderer
public class TreeNodeRenderer
Renders project35 tree nodes. Returns a new instance of DefaultTreeCellRenderer. Alignment is set to left aligned. Icons and text color are determined from the UIManager.
Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JLabel |
|---|
JLabel.AccessibleJLabel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected ImageIcon |
changedClosedIcon
|
protected ImageIcon |
changedLeafIcon
|
protected ImageIcon |
changedOpenIcon
|
protected ImageIcon |
closedIcon
|
protected boolean |
hasFocus
True if has focus. |
protected ImageIcon |
leafIcon
|
protected ImageIcon |
openIcon
|
protected boolean |
selected
Is the value currently selected. |
| Fields inherited from class javax.swing.JLabel |
|---|
labelFor |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
TreeNodeRenderer(Project35UIFactory project35UIFactory)
|
|
TreeNodeRenderer(Project35UIFactory project35UIFactory,
String name)
|
|
| Method Summary | |
|---|---|
void |
determineTextColour()
|
void |
firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
|
void |
firePropertyChange(String propertyName,
byte oldValue,
byte newValue)
|
void |
firePropertyChange(String propertyName,
char oldValue,
char newValue)
|
void |
firePropertyChange(String propertyName,
double oldValue,
double newValue)
|
void |
firePropertyChange(String propertyName,
float oldValue,
float newValue)
|
void |
firePropertyChange(String propertyName,
int oldValue,
int newValue)
|
void |
firePropertyChange(String propertyName,
long oldValue,
long newValue)
|
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
|
void |
firePropertyChange(String propertyName,
short oldValue,
short newValue)
|
Icon |
getClosedIcon()
Returns the icon used to represent non-leaf nodes that are not expanded. |
Icon |
getDefaultClosedIcon()
Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are not expanded. |
Icon |
getDefaultLeafIcon()
Returns the default icon, for the current laf, that is used to represent leaf nodes. |
Icon |
getDefaultOpenIcon()
Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are expanded. |
Icon |
getLeafIcon()
Returns the icon used to represent leaf nodes. |
Icon |
getOpenIcon()
Returns the icon used to represent non-leaf nodes that are expanded. |
Dimension |
getPreferredSize()
|
Component |
getTreeCellRendererComponent(JTree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
|
void |
paint(Graphics graphics)
Paints the value. |
void |
repaint(long tm,
int x,
int y,
int width,
int height)
|
void |
repaint(Rectangle r)
|
void |
revalidate()
|
void |
setBackground(Color color)
|
void |
setChanged(boolean isChanged)
|
void |
setClosedIcon(ImageIcon newIcon)
Sets the icon used to represent non-leaf nodes that are not expanded. |
void |
setFont(Font font)
|
void |
setLeafIcon(ImageIcon newIcon)
Sets the icon used to represent leaf nodes. |
void |
setOpenIcon(ImageIcon newIcon)
Sets the icon used to represent non-leaf nodes that are expanded. |
void |
setSelected(boolean isSelected)
sets selected. |
void |
setShowComments(boolean hasComments)
|
void |
setShowDeleted(boolean showDeleted)
set show deleted. |
void |
setShowError(boolean showError)
sets show error. |
void |
setShowReference(boolean showReference)
|
void |
setShowSearchResult(boolean showSearchResult)
|
void |
validate()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean selected
protected boolean hasFocus
protected transient ImageIcon changedClosedIcon
protected transient ImageIcon closedIcon
protected transient ImageIcon changedOpenIcon
protected transient ImageIcon openIcon
protected transient ImageIcon changedLeafIcon
protected transient ImageIcon leafIcon
| Constructor Detail |
|---|
public TreeNodeRenderer(Project35UIFactory project35UIFactory,
String name)
public TreeNodeRenderer(Project35UIFactory project35UIFactory)
| Method Detail |
|---|
public Icon getLeafIcon()
public Icon getDefaultOpenIcon()
public Icon getDefaultClosedIcon()
public Icon getDefaultLeafIcon()
public Icon getOpenIcon()
public Icon getClosedIcon()
public void setOpenIcon(ImageIcon newIcon)
public void setClosedIcon(ImageIcon newIcon)
public void setLeafIcon(ImageIcon newIcon)
public void setFont(Font font)
setFont in class JComponentpublic void setBackground(Color color)
setBackground in class JComponentpublic void setSelected(boolean isSelected)
isSelected - true if the node is selected; otherwise falsepublic void setShowComments(boolean hasComments)
public void setShowError(boolean showError)
showError - true if node should appear with an error. Otherwise
false.public void setShowDeleted(boolean showDeleted)
public void setShowSearchResult(boolean showSearchResult)
public void setChanged(boolean isChanged)
public void setShowReference(boolean showReference)
public Component getTreeCellRendererComponent(JTree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
getTreeCellRendererComponent in interface TreeCellRendererpublic void determineTextColour()
public void paint(Graphics graphics)
paint in class JComponentpublic Dimension getPreferredSize()
getPreferredSize in class JComponentpublic void validate()
validate in class Containerpublic void revalidate()
revalidate in class JComponent
public void repaint(long tm,
int x,
int y,
int width,
int height)
repaint in class JComponentpublic void repaint(Rectangle r)
repaint in class JComponent
protected void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
firePropertyChange in class Component
public void firePropertyChange(String propertyName,
byte oldValue,
byte newValue)
firePropertyChange in class Component
public void firePropertyChange(String propertyName,
char oldValue,
char newValue)
firePropertyChange in class JComponent
public void firePropertyChange(String propertyName,
short oldValue,
short newValue)
firePropertyChange in class Component
public void firePropertyChange(String propertyName,
int oldValue,
int newValue)
firePropertyChange in class JComponent
public void firePropertyChange(String propertyName,
long oldValue,
long newValue)
firePropertyChange in class Component
public void firePropertyChange(String propertyName,
float oldValue,
float newValue)
firePropertyChange in class Component
public void firePropertyChange(String propertyName,
double oldValue,
double newValue)
firePropertyChange in class Component
public void firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
firePropertyChange in class JComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||