wt.clients.beans.graph
Class DefaultGraphViewCellRenderer

java.lang.Object
  extended byjava.awt.Component
      extended bywt.clients.beans.graph.AbstractGraphViewRenderer
          extended bywt.clients.beans.graph.DefaultGraphViewCellRenderer
All Implemented Interfaces:
GraphViewCellRenderer, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
MonitorCellRenderer

public class DefaultGraphViewCellRenderer
extends AbstractGraphViewRenderer
implements GraphViewCellRenderer, Serializable

Befoire using this operation, you should set the Node nd the selection mode to the one that you need in order to be able to get the bounding box.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
private  Color background
           
private static String CLASSNAME
           
 Font f
           
 FontMetrics fm
           
private  GraphNode graphNode
           
private static String RESOURCE
           
private static String versionID
           
 
Fields inherited from class wt.clients.beans.graph.AbstractGraphViewRenderer
FONT_SIZE, GRAPH_VIEW, ICON_HEIGHT, ICON_WIDTH, MARGIN, PAD_HEIGHT, PAD_WIDTH
 
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
DefaultGraphViewCellRenderer()
           
 
Method Summary
 Color getBackground()
          Gets the value of the attribute: background;
 GraphNode getGraphNode()
          Gets the value of the attribute: graphNode;
 Component getGraphViewCellRendererComponent(DefaultGraphView pGraphView, GraphNode pNode)
           
 Point getLocation()
           
 Polygon getSelectionZone()
           
 void paint(Graphics g)
           
 void setBackground(Color a_Background)
          Sets the value of the attribute: background;
 void setGraphNode(GraphNode a_GraphNode)
          Sets the value of the attribute: graphNode;
 void setNode(GraphNode pNode)
           
 
Methods inherited from class wt.clients.beans.graph.AbstractGraphViewRenderer
getGraphView, setGraphView
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, 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, getAccessibleContext, getAlignmentX, getAlignmentY, 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, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, 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, paramString, 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, setFont, 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

CLASSNAME

private static final String CLASSNAME

versionID

private static final String versionID
See Also:
Constant Field Values

graphNode

private GraphNode graphNode

background

private Color background

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

f

public Font f

fm

public FontMetrics fm
Constructor Detail

DefaultGraphViewCellRenderer

public DefaultGraphViewCellRenderer()
Method Detail

getGraphNode

public GraphNode getGraphNode()
Gets the value of the attribute: graphNode;

Returns:
GraphNode

setGraphNode

public void setGraphNode(GraphNode a_GraphNode)
                  throws WTPropertyVetoException
Sets the value of the attribute: graphNode;

Parameters:
a_GraphNode -
Throws:
WTPropertyVetoException

getBackground

public Color getBackground()
Gets the value of the attribute: background;

Returns:
Color

setBackground

public void setBackground(Color a_Background)
Sets the value of the attribute: background;

Parameters:
a_Background -

paint

public void paint(Graphics g)
Parameters:
g -

getLocation

public Point getLocation()
Returns:
Point

setNode

public void setNode(GraphNode pNode)
Parameters:
pNode -

getGraphViewCellRendererComponent

public Component getGraphViewCellRendererComponent(DefaultGraphView pGraphView,
                                                   GraphNode pNode)
Specified by:
getGraphViewCellRendererComponent in interface GraphViewCellRenderer
Parameters:
pGraphView -
pNode -
Returns:
Component

getSelectionZone

public Polygon getSelectionZone()
Specified by:
getSelectionZone in interface GraphViewCellRenderer
Returns:
Polygon