wt.clients.beans.graph
Class DefaultGraphViewLinkRenderer

java.lang.Object
  extended byjava.awt.Component
      extended bywt.clients.beans.graph.AbstractGraphViewRenderer
          extended bywt.clients.beans.graph.DefaultGraphViewLinkRenderer
All Implemented Interfaces:
GraphViewLinkRenderer, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
DefaultGraphViewSquareLinkRenderer, MonitorTimeLinkRenderer

public class DefaultGraphViewLinkRenderer
extends AbstractGraphViewRenderer
implements GraphViewLinkRenderer, Serializable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
private static String CLASSNAME
           
private  Color descriptionBackgroundColor
           
private  Point descriptionLocation
           
 Font f
           
 FontMetrics fm
           
private  Point fromPoint
           
private  GraphLink graphLink
           
private  Color lineColor
           
private  Color lineSelectedColor
           
private  int linkTotal
           
private  int[] linkX
           
private  int[] linkY
           
private static String RESOURCE
           
protected static int SELECTION_MARGIN
           
private  Point toPoint
           
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
DefaultGraphViewLinkRenderer()
           
 
Method Summary
protected  Point computePoint(Point from, Point to)
           
protected  Point fromPoint()
           
 Color getDescriptionBackgroundColor()
          Gets the value of the attribute: descriptionBackgroundColor.
 Point getDescriptionLocation()
          Gets the value of the attribute: descriptionLocation.
 Point getFromPoint()
          Gets the value of the attribute: fromPoint.
 GraphLink getGraphLink()
          Gets the value of the attribute: graphLink.
 Component getGraphViewLinkRendererComponent(DefaultGraphView pGraphView, GraphLink pLink)
           
 Color getLineColor()
          Gets the value of the attribute: lineColor.
 Color getLineSelectedColor()
          Gets the value of the attribute: lineSelectedColor.
 int getLinkTotal()
          Gets the value of the attribute: linkTotal.
 int[] getLinkX()
          Gets the value of the attribute: linkX.
 int[] getLinkY()
          Gets the value of the attribute: linkY.
 Polygon getSelectionZone()
           
 Point getToPoint()
          Gets the value of the attribute: toPoint.
 void paint(Graphics g)
           
 void paintDescription(Graphics g)
           
 void setArrowPolygon()
           
 void setDescriptionBackgroundColor(Color a_DescriptionBackgroundColor)
          Sets the value of the attribute: descriptionBackgroundColor.
 void setDescriptionLocation()
           
 void setDescriptionLocation(Point a_DescriptionLocation)
          Sets the value of the attribute: descriptionLocation.
 void setFromPoint(Point a_FromPoint)
          Sets the value of the attribute: fromPoint.
 void setGraphLink(GraphLink a_GraphLink)
          Sets the value of the attribute: graphLink.
 void setLineColor(Color a_LineColor)
          Sets the value of the attribute: lineColor.
 void setLineSelectedColor(Color a_LineSelectedColor)
          Sets the value of the attribute: lineSelectedColor.
 void setLink(GraphLink pLink)
           
 void setLinkPolygon()
           
 void setLinkTotal(int a_LinkTotal)
          Sets the value of the attribute: linkTotal.
 void setLinkX(int[] a_LinkX)
          Sets the value of the attribute: linkX.
 void setLinkY(int[] a_LinkY)
          Sets the value of the attribute: linkY.
protected  Point toPoint()
           
 
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, 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, 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, setBackground, 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

graphLink

private GraphLink graphLink

fromPoint

private Point fromPoint

toPoint

private Point toPoint

SELECTION_MARGIN

protected static final int SELECTION_MARGIN
See Also:
Constant Field Values

linkX

private int[] linkX

linkY

private int[] linkY

linkTotal

private int linkTotal

lineColor

private Color lineColor

lineSelectedColor

private Color lineSelectedColor

descriptionBackgroundColor

private Color descriptionBackgroundColor

descriptionLocation

private Point descriptionLocation

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

f

public Font f

fm

public FontMetrics fm
Constructor Detail

DefaultGraphViewLinkRenderer

public DefaultGraphViewLinkRenderer()
Method Detail

getGraphLink

public GraphLink getGraphLink()
Gets the value of the attribute: graphLink.

Returns:
GraphLink

setGraphLink

public void setGraphLink(GraphLink a_GraphLink)
                  throws WTPropertyVetoException
Sets the value of the attribute: graphLink.

Parameters:
a_GraphLink -
Throws:
WTPropertyVetoException

getFromPoint

public Point getFromPoint()
Gets the value of the attribute: fromPoint.

Returns:
Point

setFromPoint

public void setFromPoint(Point a_FromPoint)
                  throws WTPropertyVetoException
Sets the value of the attribute: fromPoint.

Parameters:
a_FromPoint -
Throws:
WTPropertyVetoException

getToPoint

public Point getToPoint()
Gets the value of the attribute: toPoint.

Returns:
Point

getLinkX

public int[] getLinkX()
Gets the value of the attribute: linkX.

Returns:
int[]

setLinkX

public void setLinkX(int[] a_LinkX)
Sets the value of the attribute: linkX.

Parameters:
a_LinkX -

getLinkY

public int[] getLinkY()
Gets the value of the attribute: linkY.

Returns:
int[]

setLinkY

public void setLinkY(int[] a_LinkY)
Sets the value of the attribute: linkY.

Parameters:
a_LinkY -

getLinkTotal

public int getLinkTotal()
Gets the value of the attribute: linkTotal.

Returns:
int

setLinkTotal

public void setLinkTotal(int a_LinkTotal)
Sets the value of the attribute: linkTotal.

Parameters:
a_LinkTotal -

getLineColor

public Color getLineColor()
Gets the value of the attribute: lineColor.

Returns:
Color

setLineColor

public void setLineColor(Color a_LineColor)
                  throws WTPropertyVetoException
Sets the value of the attribute: lineColor.

Parameters:
a_LineColor -
Throws:
WTPropertyVetoException

getLineSelectedColor

public Color getLineSelectedColor()
Gets the value of the attribute: lineSelectedColor.

Returns:
Color

setLineSelectedColor

public void setLineSelectedColor(Color a_LineSelectedColor)
                          throws WTPropertyVetoException
Sets the value of the attribute: lineSelectedColor.

Parameters:
a_LineSelectedColor -
Throws:
WTPropertyVetoException

getDescriptionBackgroundColor

public Color getDescriptionBackgroundColor()
Gets the value of the attribute: descriptionBackgroundColor.

Returns:
Color

setDescriptionBackgroundColor

public void setDescriptionBackgroundColor(Color a_DescriptionBackgroundColor)
                                   throws WTPropertyVetoException
Sets the value of the attribute: descriptionBackgroundColor.

Parameters:
a_DescriptionBackgroundColor -
Throws:
WTPropertyVetoException

getDescriptionLocation

public Point getDescriptionLocation()
Gets the value of the attribute: descriptionLocation.

Returns:
Point

setDescriptionLocation

public void setDescriptionLocation(Point a_DescriptionLocation)
Sets the value of the attribute: descriptionLocation.

Parameters:
a_DescriptionLocation -

paint

public void paint(Graphics g)
Parameters:
g -

paintDescription

public void paintDescription(Graphics g)
Parameters:
g -

setArrowPolygon

public void setArrowPolygon()

setLink

public void setLink(GraphLink pLink)
Parameters:
pLink -

toPoint

protected Point toPoint()
Returns:
Point

fromPoint

protected Point fromPoint()
Returns:
Point

computePoint

protected Point computePoint(Point from,
                             Point to)
Parameters:
from -
to -
Returns:
Point

setLinkPolygon

public void setLinkPolygon()

setDescriptionLocation

public void setDescriptionLocation()

getGraphViewLinkRendererComponent

public Component getGraphViewLinkRendererComponent(DefaultGraphView pGraphView,
                                                   GraphLink pLink)
Specified by:
getGraphViewLinkRendererComponent in interface GraphViewLinkRenderer
Parameters:
pGraphView -
pLink -
Returns:
Component

getSelectionZone

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