|
|||||||||||
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
javax.swing.tree.DefaultTreeCellRenderer
byucc.jhdl.apps.Viewers.NewTreeBrowser.TreeBrowserCellRenderer
Nested Class Summary |
Nested classes inherited from class javax.swing.JLabel |
javax.swing.JLabel.AccessibleJLabel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
java.awt.image.BufferedImage |
_clBuf
|
javax.swing.ImageIcon[] |
_clImage
|
java.awt.image.BufferedImage |
_memBuf
|
javax.swing.ImageIcon[] |
_memImage
|
java.awt.image.BufferedImage |
_structBuf
|
javax.swing.ImageIcon[] |
_structImage
|
java.awt.image.BufferedImage |
_tbBuf
|
javax.swing.ImageIcon |
_tbImage
|
static java.awt.Color |
BACKGROUND_COLOR
|
static java.lang.String |
CL_ICON_FILE
Source image for a combinational logic icon. |
static java.awt.Color |
DEFAULT_BACKGROUND_COLOR
|
static java.awt.Font |
DEFAULT_FONT
|
static java.awt.Color |
FOREGROUND_COLOR
The color for printing names of cells that are being power-logged. |
static boolean |
HIGHLIGHT_LEAFS
|
static java.lang.String |
MEM_ICON_FILE
Source image for a memory cell icon. |
static java.awt.Color |
SELECTION_COLOR
|
static java.lang.String |
STRUCT_ICON_FILE
Source image for a structural cell icon. |
static java.lang.String |
TB_ICON_FILE
Source image for a test bench cell icon. |
static boolean |
VIEW_FULL_NAME
|
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 | |
TreeBrowserCellRenderer()
|
Method Summary | |
static int |
colorRedToBlue(int i,
int steps)
Simply utility for computing RGB values for a blue-to-red gradient. |
static int |
colorRedToWhite(int i,
int steps)
Simply utility for computing RGB values for a white-to-red gradient. |
static java.awt.image.BufferedImage |
getBufferedImageAsResourceStream(java.lang.Class cls,
java.lang.String file)
Utility for loading an image from the classpath, rather from an absolute filepath. |
java.awt.Component |
getTreeCellRendererComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean sel,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
Returns a Component for rendering the tree node for the given object. |
java.awt.Component |
getTreeCellRendererComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean sel,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus,
boolean overRide)
Returns a Component for rendering the tree node for the given object. |
static java.awt.image.BufferedImage |
renderColorDerivative(java.awt.image.BufferedImage base_image,
int original_fill,
int replacement)
Creates a series of icons based on a source image, with varying colorings. |
static java.awt.image.BufferedImage[] |
renderColorDerivatives(java.awt.image.BufferedImage base_image,
int original_fill,
int steps)
Creates a series of icons based on a source image, with varying colorings. |
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, paint, 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, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, 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 |
public static final java.lang.String CL_ICON_FILE
public static final java.lang.String TB_ICON_FILE
public static final java.lang.String STRUCT_ICON_FILE
public static final java.lang.String MEM_ICON_FILE
public javax.swing.ImageIcon[] _clImage
public javax.swing.ImageIcon _tbImage
public javax.swing.ImageIcon[] _structImage
public javax.swing.ImageIcon[] _memImage
public java.awt.image.BufferedImage _clBuf
public java.awt.image.BufferedImage _tbBuf
public java.awt.image.BufferedImage _structBuf
public java.awt.image.BufferedImage _memBuf
public static final java.awt.Color FOREGROUND_COLOR
public static final java.awt.Color DEFAULT_BACKGROUND_COLOR
public static final java.awt.Color BACKGROUND_COLOR
public static final java.awt.Color SELECTION_COLOR
public static final java.awt.Font DEFAULT_FONT
public static boolean VIEW_FULL_NAME
public static boolean HIGHLIGHT_LEAFS
Constructor Detail |
public TreeBrowserCellRenderer()
Method Detail |
public java.awt.Component getTreeCellRendererComponent(javax.swing.JTree tree, java.lang.Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)
Component
for rendering the tree node for the given object.
tree
- Tree in which this node resides.value
- Object (AbstractPowerNode
) which represents the node.sel
- true if the node is currently selected.expanded
- true if the node is currently expanded.leaf
- true if the node is a leaf.row
- The row in the tree occupied by this node.hasFocus
- true if the tree currently has focus
public java.awt.Component getTreeCellRendererComponent(javax.swing.JTree tree, java.lang.Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus, boolean overRide)
Component
for rendering the tree node for the given object.
tree
- Tree in which this node resides.value
- Object (AbstractPowerNode
) which represents the node.sel
- true if the node is currently selected.expanded
- true if the node is currently expanded.leaf
- true if the node is a leaf.row
- The row in the tree occupied by this node.hasFocus
- true if the tree currently has focus
public static int colorRedToBlue(int i, int steps)
i
- The index in the color series to be created.steps
- The total number of colors in the series.
public static int colorRedToWhite(int i, int steps)
i
- The index in the color series to be created.steps
- The total number of colors in the series.
public static java.awt.image.BufferedImage renderColorDerivative(java.awt.image.BufferedImage base_image, int original_fill, int replacement)
base_image
- The source image.original_fill
- The "tag" color to be replaced.
public static java.awt.image.BufferedImage[] renderColorDerivatives(java.awt.image.BufferedImage base_image, int original_fill, int steps)
base_image
- The source image.original_fill
- The "tag" color to be replaced.steps
- The number of derivative images to be created.
public static java.awt.image.BufferedImage getBufferedImageAsResourceStream(java.lang.Class cls, java.lang.String file)
cls
- The class of the caller (gives the relative class path).file
- The name of the image file to be loaded.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |