ElegantJ Trees Java API Specification v1.1

com.elegantj.awt.tree
Class DefaultAWTTreeCellRenderer

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Label
          extended bycom.elegantj.awt.tree.DefaultAWTTreeCellRenderer
All Implemented Interfaces:
javax.accessibility.Accessible, AWTTreeCellRenderer, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class DefaultAWTTreeCellRenderer
extends java.awt.Label
implements AWTTreeCellRenderer

DefaultAWTTreeCellRenderer is the awt textfield which provides the cell renderer for the AWTTree which Implements AWTTreeCellRenderer

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Label
java.awt.Label.AccessibleAWTLabel
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  java.awt.Color backgroundNonSelectionColor
           
protected  java.awt.Color backgroundSelectionColor
           
protected  java.awt.Color borderSelectionColor
           
protected  boolean hasFocus
           
protected  boolean selected
           
protected  java.awt.Color textNonSelectionColor
           
protected  java.awt.Color textSelectionColor
           
 
Fields inherited from class java.awt.Label
CENTER, LEFT, RIGHT
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DefaultAWTTreeCellRenderer()
          Constructs the DefaultAWTTreeCellRenderer
 
Method Summary
 java.awt.Component getAWTTreeCellRendererComponent(AWTTree tree, java.lang.Object value, boolean sel, boolean expanded, boolean leaf, AWTTreeNode node, boolean hasFocus)
          Returns the component -- cell renderer for the AWTTree
 java.awt.Color getBackgroundNonSelectionColor()
          Returns the non selection background
 java.awt.Color getBackgroundSelectionColor()
          Returns the selection background
 java.awt.Color getBorderSelectionColor()
          Returns the border selection color
 java.awt.Image getImageIcon(AWTTree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf, AWTTreeNode node, boolean hasFocus)
          Returns the image icon for the specified node
 java.awt.Dimension getPreferredSize()
          Returns the preferred size
 java.awt.Color getTextNonSelectionColor()
          Returns the text non selection color
 java.awt.Color getTextSelectionColor()
          Returns the text selection color
 java.lang.Object getValue()
          Returns the value of the cell renderer
 void paint(java.awt.Graphics g)
          Overriden the paint method
 void setBackground(java.awt.Color color)
          Sets the background for the cell renderer
 void setBackgroundNonSelectionColor(java.awt.Color newColor)
          Sets the non selection background
 void setBackgroundSelectionColor(java.awt.Color newColor)
          Sets the selection background
 void setBorderSelectionColor(java.awt.Color color)
          Sets the border selection color
 void setFont(java.awt.Font font)
          Sets the font for the cell renderer
 void setTextNonSelectionColor(java.awt.Color newColor)
          Sets the text non selection color
 void setTextSelectionColor(java.awt.Color newColor)
          Sets the text selection color
 void setValue(java.lang.Object value)
          Sets the value for the cell renderer
 
Methods inherited from class java.awt.Label
addNotify, getAccessibleContext, getAlignment, getText, paramString, setAlignment, setText
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

selected

protected boolean selected

hasFocus

protected boolean hasFocus

textSelectionColor

protected java.awt.Color textSelectionColor

textNonSelectionColor

protected java.awt.Color textNonSelectionColor

backgroundSelectionColor

protected java.awt.Color backgroundSelectionColor

backgroundNonSelectionColor

protected java.awt.Color backgroundNonSelectionColor

borderSelectionColor

protected java.awt.Color borderSelectionColor
Constructor Detail

DefaultAWTTreeCellRenderer

public DefaultAWTTreeCellRenderer()
Constructs the DefaultAWTTreeCellRenderer

Method Detail

setTextSelectionColor

public void setTextSelectionColor(java.awt.Color newColor)
Sets the text selection color

Parameters:
newColor - The text selection color

getTextSelectionColor

public java.awt.Color getTextSelectionColor()
Returns the text selection color

Returns:
The text selection color

setTextNonSelectionColor

public void setTextNonSelectionColor(java.awt.Color newColor)
Sets the text non selection color

Parameters:
newColor - The text non selection color

getTextNonSelectionColor

public java.awt.Color getTextNonSelectionColor()
Returns the text non selection color

Returns:
The text non selection color

setBackgroundSelectionColor

public void setBackgroundSelectionColor(java.awt.Color newColor)
Sets the selection background

Parameters:
newColor - The selection background

getBackgroundSelectionColor

public java.awt.Color getBackgroundSelectionColor()
Returns the selection background

Returns:
The selection background

setBackgroundNonSelectionColor

public void setBackgroundNonSelectionColor(java.awt.Color newColor)
Sets the non selection background

Parameters:
newColor - The non selection background

getBackgroundNonSelectionColor

public java.awt.Color getBackgroundNonSelectionColor()
Returns the non selection background

Returns:
The non selection background

setBorderSelectionColor

public void setBorderSelectionColor(java.awt.Color color)
Sets the border selection color


getBorderSelectionColor

public java.awt.Color getBorderSelectionColor()
Returns the border selection color

Returns:
The border selection color

setFont

public void setFont(java.awt.Font font)
Sets the font for the cell renderer

Parameters:
font - The font for the cell renderer

setBackground

public void setBackground(java.awt.Color color)
Sets the background for the cell renderer

Parameters:
color - The background for the cell renderer

getAWTTreeCellRendererComponent

public java.awt.Component getAWTTreeCellRendererComponent(AWTTree tree,
                                                          java.lang.Object value,
                                                          boolean sel,
                                                          boolean expanded,
                                                          boolean leaf,
                                                          AWTTreeNode node,
                                                          boolean hasFocus)
Returns the component -- cell renderer for the AWTTree

Specified by:
getAWTTreeCellRendererComponent in interface AWTTreeCellRenderer
Parameters:
tree - The AWTTree
value - The value
sel - wheather node is selected or not
expanded - wheather node is expanded or not
leaf - wheather node is leaf or not
node - The AWTTreeNode
hasFocus - wheather node has focus or not
Returns:
The cell renderer for the AWTTree

getImageIcon

public java.awt.Image getImageIcon(AWTTree tree,
                                   java.lang.Object value,
                                   boolean selected,
                                   boolean expanded,
                                   boolean leaf,
                                   AWTTreeNode node,
                                   boolean hasFocus)
Returns the image icon for the specified node

Specified by:
getImageIcon in interface AWTTreeCellRenderer
Parameters:
tree - The AWTTree
value - The user obejct of the node
selected - wheather node is selected or not
expanded - wheather node is expanded or not
leaf - wheather node is leaf or not
node - The AWTTreeNode
hasFocus - wheather node has focus or not
Returns:
The image icon for the specified node

setValue

public void setValue(java.lang.Object value)
Sets the value for the cell renderer

Specified by:
setValue in interface AWTTreeCellRenderer
Parameters:
value - The value for the cell renderer

getValue

public java.lang.Object getValue()
Returns the value of the cell renderer

Specified by:
getValue in interface AWTTreeCellRenderer
Returns:
The value of the cell renderer

paint

public void paint(java.awt.Graphics g)
Overriden the paint method


getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the preferred size

Returns:
The preferred size

ElegantJ Trees Java API Specification v1.1

Submit a bug or feature

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjbeans.com
All Rights Reserved.