org.jppf.ui.treetable
Class AbstractTreeCellRenderer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JLabel
                  extended by javax.swing.tree.DefaultTreeCellRenderer
                      extended by org.jppf.ui.treetable.AbstractTreeCellRenderer
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants, TreeCellRenderer
Direct Known Subclasses:
JobRenderer, NodeRenderer

public abstract class AbstractTreeCellRenderer
extends DefaultTreeCellRenderer

Renderer used to render the tree nodes in the node data panel.

Author:
Laurent Cohen
See Also:
Serialized Form

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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected static Color ACTIVE_COLOR
          Highlighting color for active driver connections.
protected  Font boldFont
          The default bold font.
protected  Font boldItalicFont
          The default bold and italic font.
protected static Color DEFAULT_FOREGROUND
          Default foreground color.
protected  Color defaultNonSelectionBackground
          Default non-selection background.
protected  Color defaultSelectionBackground
          Default non-selection background.
protected static Color DIMMED_FOREGROUND
          Default foreground color.
protected static String DRIVER_ICON
          Path to the icon used for a driver.
protected static String DRIVER_INACTIVE_ICON
          Path to the icon used for an inactive driver connection.
protected static Color INACTIVE_COLOR
          Highlighting color for non-selected inactive driver connections.
protected static Color INACTIVE_SELECTION_COLOR
          Highlighting color for selected inactive driver connections.
protected  Font italicFont
          The default italic font.
protected static String JOB_ICON
          Path to the icon used for a job.
protected static String NODE_ICON
          Path to the icon used for a node.
protected  Font plainFont
          The default plain font.
protected static String RESOURCES
          Path to the location of the icon files.
protected static Color SUSPENDED_COLOR
          Highlighting color for non-selected suspended jobs.
 
Fields inherited from class javax.swing.tree.DefaultTreeCellRenderer
backgroundNonSelectionColor, backgroundSelectionColor, borderSelectionColor, closedIcon, hasFocus, leafIcon, openIcon, selected, textNonSelectionColor, textSelectionColor
 
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
AbstractTreeCellRenderer()
          Default constructor.
 
Method Summary
 Font getBoldFont(Font font)
          Get the default bold font.
 Font getBoldItalicFont(Font font)
          Get the default bold and italic font.
 Font getItalicFont(Font font)
          Get the default italic font.
 Font getPlainFont(Font font)
          Get the default plain font.
 
Methods inherited from class javax.swing.tree.DefaultTreeCellRenderer
firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundNonSelectionColor, getBackgroundSelectionColor, getBorderSelectionColor, getClosedIcon, getDefaultClosedIcon, getDefaultLeafIcon, getDefaultOpenIcon, getFont, getLeafIcon, getOpenIcon, getPreferredSize, getTextNonSelectionColor, getTextSelectionColor, getTreeCellRendererComponent, invalidate, paint, repaint, repaint, repaint, revalidate, setBackground, setBackgroundNonSelectionColor, setBackgroundSelectionColor, setBorderSelectionColor, setClosedIcon, setFont, setLeafIcon, setOpenIcon, setTextNonSelectionColor, setTextSelectionColor, validate
 
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCES

protected static final String RESOURCES
Path to the location of the icon files.

See Also:
Constant Field Values

DRIVER_ICON

protected static final String DRIVER_ICON
Path to the icon used for a driver.

See Also:
Constant Field Values

DRIVER_INACTIVE_ICON

protected static final String DRIVER_INACTIVE_ICON
Path to the icon used for an inactive driver connection.

See Also:
Constant Field Values

NODE_ICON

protected static final String NODE_ICON
Path to the icon used for a node.

See Also:
Constant Field Values

JOB_ICON

protected static final String JOB_ICON
Path to the icon used for a job.

See Also:
Constant Field Values

ACTIVE_COLOR

protected static final Color ACTIVE_COLOR
Highlighting color for active driver connections.


INACTIVE_COLOR

protected static final Color INACTIVE_COLOR
Highlighting color for non-selected inactive driver connections.


INACTIVE_SELECTION_COLOR

protected static final Color INACTIVE_SELECTION_COLOR
Highlighting color for selected inactive driver connections.


SUSPENDED_COLOR

protected static final Color SUSPENDED_COLOR
Highlighting color for non-selected suspended jobs.


DEFAULT_FOREGROUND

protected static final Color DEFAULT_FOREGROUND
Default foreground color.


DIMMED_FOREGROUND

protected static final Color DIMMED_FOREGROUND
Default foreground color.


defaultNonSelectionBackground

protected Color defaultNonSelectionBackground
Default non-selection background.


defaultSelectionBackground

protected Color defaultSelectionBackground
Default non-selection background.


plainFont

protected Font plainFont
The default plain font.


italicFont

protected Font italicFont
The default italic font.


boldFont

protected Font boldFont
The default bold font.


boldItalicFont

protected Font boldItalicFont
The default bold and italic font.

Constructor Detail

AbstractTreeCellRenderer

public AbstractTreeCellRenderer()
Default constructor.

Method Detail

getPlainFont

public Font getPlainFont(Font font)
Get the default plain font.

Parameters:
font - the font to base the result on.
Returns:
a Font instance.

getItalicFont

public Font getItalicFont(Font font)
Get the default italic font.

Parameters:
font - the font to base the result on.
Returns:
a Font instance.

getBoldFont

public Font getBoldFont(Font font)
Get the default bold font.

Parameters:
font - the font to base the result on.
Returns:
a Font instance.

getBoldItalicFont

public Font getBoldItalicFont(Font font)
Get the default bold and italic font.

Parameters:
font - the font to base the result on.
Returns:
a Font instance.


Copyright © 2005-2010 JPPF Team.