JGraphpad Pro
v6.0.5.0


com.jgraph.pad.graph
Class JGraphpadEdgeRenderer

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byorg.jgraph.graph.EdgeRenderer
                  extended bycom.jgraph.pad.graph.JGraphpadEdgeRenderer
All Implemented Interfaces:
org.jgraph.graph.CellViewRenderer, ImageObserver, MenuContainer, Serializable

public class JGraphpadEdgeRenderer
extends org.jgraph.graph.EdgeRenderer

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int INSET
          Defines the default inset to render rich text.
protected  boolean isRichText
           
static JTextPane textPane
          Holds the text pane to be used for rich text rendering.
protected  Object userObject
          Holds the user object of the current cell.
 
Fields inherited from class org.jgraph.graph.EdgeRenderer
beginDeco, beginFill, beginSize, bezier, borderColor, childrenSelected, dashOffset, defaultBackground, defaultForeground, endDeco, endFill, endSize, extraLabelFont, focus, fontColor, fontGraphics, gradientColor, graph, gridColor, highlightColor, isMoveBelowZero, labelBorder, labelTransformEnabled, LABELWIDTHBUFFER, lineDash, lineStyle, lineWidth, lockedHandleColor, metrics, opaque, preview, selected, simpleExtraLabels, spline, view
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JGraphpadEdgeRenderer()
           
 
Method Summary
static int getAngleTol()
           
 Dimension getLabelSize(org.jgraph.graph.EdgeView view, String label)
          Returns the label size of the specified view in the given graph.
 int getVerticalAlignment(Map map)
           
 void installAttributes(org.jgraph.graph.CellView view)
          Extends the parent's method to configure the renderer for displaying the specified view.
protected  void paintLabel(Graphics g, String label, Point2D p, boolean mainLabel)
          Paint the specified label for the current edgeview.
protected  void paintRichText(Graphics g, int x, int y)
          Utility method to paint the rich text content for rich text values.
 void setText(String text)
          Defines the single line of text this component will display.
 
Methods inherited from class org.jgraph.graph.EdgeRenderer
createLineEnd, createShape, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBounds, getExtraLabelBounds, getExtraLabelPosition, getExtraLabelSize, getGradientColor, getLabelBounds, getLabelBounds, getLabelPosition, getLabelPosition, getPaintBounds, getRendererComponent, intersects, isFillable, paint, paintSelectionBorder, repaint, repaint, revalidate, setGradientColor, translateGraphics, validate
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, fireVetoableChange, getAccessibleContext, 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, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, 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, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
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, getFont, 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, imageUpdate, 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

textPane

public static JTextPane textPane
Holds the text pane to be used for rich text rendering.


isRichText

protected boolean isRichText

INSET

public static int INSET
Defines the default inset to render rich text.


userObject

protected Object userObject
Holds the user object of the current cell.

Constructor Detail

JGraphpadEdgeRenderer

public JGraphpadEdgeRenderer()
Method Detail

paintRichText

protected void paintRichText(Graphics g,
                             int x,
                             int y)
Utility method to paint the rich text content for rich text values. This implementation simulates rich text vertical alignment by translating the graphics before painting the textPane.

Parameters:
g - The graphics to paint the rich text content to.

paintLabel

protected void paintLabel(Graphics g,
                          String label,
                          Point2D p,
                          boolean mainLabel)
Paint the specified label for the current edgeview.


getLabelSize

public Dimension getLabelSize(org.jgraph.graph.EdgeView view,
                              String label)
Returns the label size of the specified view in the given graph.


setText

public void setText(String text)
Defines the single line of text this component will display. If the value of text is null or empty string, nothing is displayed.

The default value of this property is null.

This is a JavaBeans bound property.

See Also:
#setVerticalTextPosition, #setHorizontalTextPosition, #setIcon

installAttributes

public void installAttributes(org.jgraph.graph.CellView view)
Extends the parent's method to configure the renderer for displaying the specified view.

Parameters:
view - The view to configure the renderer for.

getVerticalAlignment

public int getVerticalAlignment(Map map)

getAngleTol

public static int getAngleTol()

JGraphpad Pro
v6.0.5.0


Copyright (C) 2005 JGraph.com. All rights reserved.