fipaos.platform.dfgui.swing
Class DFGUIFrame.DFGUIRenderer

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
                          |
                          +--javax.swing.tree.DefaultTreeCellRenderer
                                |
                                +--fipaos.platform.dfgui.swing.DFGUIFrame.DFGUIRenderer

class DFGUIFrame.DFGUIRenderer
extends DefaultTreeCellRenderer

Internal class for rendering, mainly choosing the icons.

See Also: DefaultTreeCellRenderer

Inner classes inherited from class javax.swing.JLabel
JLabel.AccessibleJLabel

Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent

Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer

Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent

Fields inherited from class javax.swing.JComponent
WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_WINDOW, UNDEFINED_CONDITION, TOOL_TIP_TEXT_KEY

Fields inherited from class java.awt.Component
TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT

Constructor Summary
DFGUIFrame.DFGUIRenderer()
          Constructor that sets the selection colour to customised one.

Method Summary
 DimensiongetPreferredSize()
          If the preferredSize has been set to a non-null value just returns it.
 java.awt.ComponentgetTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)
          This method returns the Component with correct icon and text to represent the tree node.

Methods inherited from class javax.swing.tree.DefaultTreeCellRenderer
getDefaultOpenIcon, getDefaultClosedIcon, getDefaultLeafIcon, setOpenIcon, getOpenIcon, setClosedIcon, getClosedIcon, setLeafIcon, getLeafIcon, setTextSelectionColor, getTextSelectionColor, setTextNonSelectionColor, getTextNonSelectionColor, setBackgroundSelectionColor, getBackgroundSelectionColor, setBackgroundNonSelectionColor, getBackgroundNonSelectionColor, setBorderSelectionColor, getBorderSelectionColor, setFont, setBackground, paint, validate, revalidate, repaint, repaint, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange

Methods inherited from class javax.swing.JLabel
getUI, setUI, updateUI, getUIClassID, getText, setText, getIcon, setIcon, getDisabledIcon, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, getDisplayedMnemonic, getIconTextGap, setIconTextGap, getVerticalAlignment, setVerticalAlignment, getHorizontalAlignment, setHorizontalAlignment, getVerticalTextPosition, setVerticalTextPosition, getHorizontalTextPosition, setHorizontalTextPosition, imageUpdate, getLabelFor, setLabelFor, getAccessibleContext

Methods inherited from class javax.swing.JComponent
update, printAll, print, isPaintingTile, isFocusCycleRoot, isManagingFocus, setNextFocusableComponent, getNextFocusableComponent, setRequestFocusEnabled, isRequestFocusEnabled, requestFocus, grabFocus, setVerifyInputWhenFocusTarget, getVerifyInputWhenFocusTarget, setPreferredSize, setMaximumSize, getMaximumSize, setMinimumSize, getMinimumSize, isMinimumSizeSet, isPreferredSizeSet, isMaximumSizeSet, contains, setBorder, getBorder, getInsets, getInsets, getAlignmentY, setAlignmentY, getAlignmentX, setAlignmentX, setInputVerifier, getInputVerifier, getGraphics, setDebugGraphicsOptions, getDebugGraphicsOptions, registerKeyboardAction, registerKeyboardAction, unregisterKeyboardAction, getRegisteredKeyStrokes, getConditionForKeyStroke, getActionForKeyStroke, resetKeyboardActions, setInputMap, getInputMap, getInputMap, setActionMap, getActionMap, requestDefaultFocus, setVisible, hide, setEnabled, setForeground, isFocusTraversable, setToolTipText, getToolTipText, getToolTipText, getToolTipLocation, createToolTip, scrollRectToVisible, setAutoscrolls, getAutoscrolls, enable, disable, getClientProperty, putClientProperty, isLightweightComponent, reshape, getBounds, getSize, getLocation, getX, getY, getWidth, getHeight, hasFocus, isOpaque, setOpaque, computeVisibleRect, getVisibleRect, addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener, addVetoableChangeListener, removeVetoableChangeListener, getTopLevelAncestor, addAncestorListener, removeAncestorListener, getListeners, addNotify, removeNotify, isValidateRoot, isOptimizedDrawingEnabled, paintImmediately, paintImmediately, setDoubleBuffered, isDoubleBuffered, getRootPane

Methods inherited from class java.awt.Container
getComponentCount, countComponents, getComponent, getComponents, insets, add, add, add, add, add, remove, remove, removeAll, getLayout, setLayout, doLayout, layout, invalidate, preferredSize, minimumSize, paintComponents, printComponents, addContainerListener, removeContainerListener, deliverEvent, getComponentAt, locate, getComponentAt, findComponentAt, findComponentAt, isAncestorOf, list, list

Methods inherited from class java.awt.Component
getName, setName, getParent, getPeer, setDropTarget, getDropTarget, getGraphicsConfiguration, getTreeLock, getToolkit, isValid, isDisplayable, isVisible, isShowing, isEnabled, enable, enableInputMethods, show, show, getForeground, getBackground, getFont, getLocale, setLocale, getColorModel, getLocation, getLocationOnScreen, location, setLocation, move, setLocation, getSize, size, setSize, resize, setSize, resize, getBounds, bounds, setBounds, setBounds, isLightweight, getFontMetrics, setCursor, getCursor, paintAll, repaint, repaint, repaint, createImage, createImage, prepareImage, prepareImage, checkImage, checkImage, inside, contains, dispatchEvent, postEvent, addComponentListener, removeComponentListener, addFocusListener, removeFocusListener, addHierarchyListener, removeHierarchyListener, addHierarchyBoundsListener, removeHierarchyBoundsListener, addKeyListener, removeKeyListener, addMouseListener, removeMouseListener, addMouseMotionListener, removeMouseMotionListener, addInputMethodListener, removeInputMethodListener, getInputMethodRequests, getInputContext, handleEvent, mouseDown, mouseDrag, mouseUp, mouseMove, mouseEnter, mouseExit, keyDown, keyUp, action, gotFocus, lostFocus, transferFocus, nextFocus, add, remove, toString, list, list, list, setComponentOrientation, getComponentOrientation

Methods inherited from class java.lang.Object
getClass, hashCode, equals, notify, notifyAll, wait, wait, wait

Constructor Detail

DFGUIFrame.DFGUIRenderer

public DFGUIFrame.DFGUIRenderer()
Constructor that sets the selection colour to customised one.
Method Detail

getPreferredSize

public Dimension getPreferredSize()
If the preferredSize has been set to a non-null value just returns it. If the UI delegate's getPreferredSize() method returns a non null value then return that; otherwise defer to the component's layout manager.
Returns: the value of the preferredSize property
See Also:
javax.swing.JComponent.setPreferredSize(java.awt.Dimension)

getTreeCellRendererComponent

public java.awt.Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)
This method returns the Component with correct icon and text to represent the tree node.
Parameters:
tree - the JTree this render is attached to
value - text in the label
sel - is the component selected
expanded - is the node expanded
leaf - is the node leaf
row - row number for this component
hasFocus - focus
Returns: the rendered component, in this case a JLabel (subclass of component)