org.jgraph.graph.EdgeRenderer Class Reference

Inheritance diagram for org.jgraph.graph.EdgeRenderer:

org.jgraph.graph.CellViewRenderer List of all members.

Public Member Functions

 EdgeRenderer ()
Component getRendererComponent (JGraph graph, CellView view, boolean sel, boolean focus, boolean preview)
boolean intersects (JGraph graph, CellView value, Rectangle rect)
Rectangle2D getBounds (CellView value)
Rectangle2D getLabelBounds (JGraph paintingContext, EdgeView view)
Rectangle2D getExtraLabelBounds (JGraph paintingContext, EdgeView view, int index)
Rectangle2D getLabelBounds (Point2D p, Dimension d, String label)
Point2D getLabelPosition (EdgeView view)
Point2D getExtraLabelPosition (EdgeView view, int index)
Dimension getExtraLabelSize (JGraph paintingContext, EdgeView view, int index)
Dimension getLabelSize (EdgeView view, String label)
Rectangle2D getPaintBounds (EdgeView view)
void paint (Graphics g)
Color getGradientColor ()
void setGradientColor (Color gradientColor)
void validate ()
void revalidate ()
void repaint (long tm, int x, int y, int width, int height)
void repaint (Rectangle r)
void firePropertyChange (String propertyName, byte oldValue, byte newValue)
void firePropertyChange (String propertyName, char oldValue, char newValue)
void firePropertyChange (String propertyName, short oldValue, short newValue)
void firePropertyChange (String propertyName, int oldValue, int newValue)
void firePropertyChange (String propertyName, long oldValue, long newValue)
void firePropertyChange (String propertyName, float oldValue, float newValue)
void firePropertyChange (String propertyName, double oldValue, double newValue)
void firePropertyChange (String propertyName, boolean oldValue, boolean newValue)

Public Attributes

boolean simpleExtraLabels = true
Font extraLabelFont = null

Protected Member Functions

Point2D getLabelPosition (Point2D pos)
void installAttributes (CellView view)
boolean isFillable (int decoration)
void paintSelectionBorder (Graphics g)
void translateGraphics (Graphics g)
void paintLabel (Graphics g, String label, Point2D p, boolean mainLabel)
Shape createShape ()
Shape createLineEnd (int size, int style, Point2D src, Point2D dst)
void firePropertyChange (String propertyName, Object oldValue, Object newValue)

Protected Attributes

transient FontMetrics metrics
transient JGraph graph
transient EdgeView view
transient int beginDeco
transient int endDeco
transient int beginSize
transient int endSize
transient int lineStyle
transient float lineWidth
transient boolean labelBorder
transient boolean beginFill
transient boolean endFill
transient boolean focus
transient boolean selected
transient boolean preview
transient boolean opaque
transient boolean childrenSelected
transient boolean labelTransformEnabled
transient Color borderColor
transient Color defaultForeground
transient Color defaultBackground
transient Color fontColor
transient float[] lineDash
transient float dashOffset = 0.0f
transient Color gradientColor = null
Bezier bezier
Spline2D spline

Static Protected Attributes

static transient Graphics fontGraphics

Package Functions

void setView (CellView value)

Static Package Functions

 [static initializer]

Private Member Functions

boolean isLabelTransformEnabled ()
boolean isLabelTransform (String label)
double getLabelAngle (String label)

Detailed Description

This renderer displays entries that implement the CellView interface.

Version:
1.0 1/1/02
Author:
Gaudenz Alder


Constructor & Destructor Documentation

org.jgraph.graph.EdgeRenderer.EdgeRenderer  ) 
 

Constructs a renderer that may be used to render edges.


Member Function Documentation

org.jgraph.graph.EdgeRenderer.[static initializer]  )  [static, package]
 

Shape org.jgraph.graph.EdgeRenderer.createLineEnd int  size,
int  style,
Point2D  src,
Point2D  dst
[protected]
 

Paint the current view's direction. Sets tmpPoint as a side-effect such that the invoking method can use it to determine the connection point to this decoration.

Shape org.jgraph.graph.EdgeRenderer.createShape  )  [protected]
 

Returns the shape that represents the current edge in the context of the current graph. This method sets the global beginShape, lineShape and endShape variables as a side-effect.

void org.jgraph.graph.EdgeRenderer.firePropertyChange String  propertyName,
boolean  oldValue,
boolean  newValue
 

Overridden for performance reasons. See the Implementation Note for more information.

void org.jgraph.graph.EdgeRenderer.firePropertyChange String  propertyName,
double  oldValue,
double  newValue
 

Overridden for performance reasons. See the Implementation Note for more information.

void org.jgraph.graph.EdgeRenderer.firePropertyChange String  propertyName,
float  oldValue,
float  newValue
 

Overridden for performance reasons. See the Implementation Note for more information.

void org.jgraph.graph.EdgeRenderer.firePropertyChange String  propertyName,
long  oldValue,
long  newValue
 

Overridden for performance reasons. See the Implementation Note for more information.

void org.jgraph.graph.EdgeRenderer.firePropertyChange String  propertyName,
int  oldValue,
int  newValue
 

Overridden for performance reasons. See the Implementation Note for more information.

void org.jgraph.graph.EdgeRenderer.firePropertyChange String  propertyName,
short  oldValue,
short  newValue
 

Overridden for performance reasons. See the Implementation Note for more information.

void org.jgraph.graph.EdgeRenderer.firePropertyChange String  propertyName,
char  oldValue,
char  newValue
 

Overridden for performance reasons. See the Implementation Note for more information.

void org.jgraph.graph.EdgeRenderer.firePropertyChange String  propertyName,
byte  oldValue,
byte  newValue
 

Overridden for performance reasons. See the Implementation Note for more information.

void org.jgraph.graph.EdgeRenderer.firePropertyChange String  propertyName,
Object  oldValue,
Object  newValue
[protected]
 

Overridden for performance reasons. See the Implementation Note for more information.

Rectangle2D org.jgraph.graph.EdgeRenderer.getBounds CellView  value  ) 
 

Returns the bounds of the edge shape.

Rectangle2D org.jgraph.graph.EdgeRenderer.getExtraLabelBounds JGraph  paintingContext,
EdgeView  view,
int  index
 

Returns the label bounds of the specified view in the given graph. Note: The index is the position of the String object for the label in the extra labels array of the view.

Point2D org.jgraph.graph.EdgeRenderer.getExtraLabelPosition EdgeView  view,
int  index
 

Returns the label position of the specified view in the given graph.

Dimension org.jgraph.graph.EdgeRenderer.getExtraLabelSize JGraph  paintingContext,
EdgeView  view,
int  index
 

Returns the label size of the specified view in the given graph.

Color org.jgraph.graph.EdgeRenderer.getGradientColor  ) 
 

Returns:
Returns the gradientColor.

double org.jgraph.graph.EdgeRenderer.getLabelAngle String  label  )  [private]
 

Calculates the angle at which graphics should be rotated to paint label along the edge. Before calling this method always check that transform should be applied using }

Returns:
the value of the angle, 0 if the angle is zero or can't be calculated

Rectangle2D org.jgraph.graph.EdgeRenderer.getLabelBounds Point2D  p,
Dimension  d,
String  label
 

Returns the label bounds of the specified view in the given graph.

Rectangle2D org.jgraph.graph.EdgeRenderer.getLabelBounds JGraph  paintingContext,
EdgeView  view
 

Returns the label bounds of the specified view in the given graph.

Point2D org.jgraph.graph.EdgeRenderer.getLabelPosition Point2D  pos  )  [protected]
 

Returns the label position of the specified view in the given graph.

Point2D org.jgraph.graph.EdgeRenderer.getLabelPosition EdgeView  view  ) 
 

Returns the label position of the specified view in the given graph.

Dimension org.jgraph.graph.EdgeRenderer.getLabelSize EdgeView  view,
String  label
 

Returns the label size of the specified view in the given graph.

Rectangle2D org.jgraph.graph.EdgeRenderer.getPaintBounds EdgeView  view  ) 
 

Returns the bounds of the edge shape without label

Component org.jgraph.graph.EdgeRenderer.getRendererComponent JGraph  graph,
CellView  view,
boolean  sel,
boolean  focus,
boolean  preview
 

Configure and return the renderer based on the passed in components. The value is typically set from messaging the graph with convertValueToString.

Parameters:
graph the graph that that defines the rendering context.
view the cell view that should be rendered.
sel whether the object is selected.
focus whether the object has the focus.
preview whether we are drawing a preview.
Returns:
the component used to render the value.

Implements org.jgraph.graph.CellViewRenderer.

void org.jgraph.graph.EdgeRenderer.installAttributes CellView  view  )  [protected]
 

Installs the attributes of specified cell in this renderer instance. This means, retrieve every published key from the cells hashtable and set global variables or superclass properties accordingly.

Parameters:
view the cell view to retrieve the attribute values from.

boolean org.jgraph.graph.EdgeRenderer.intersects JGraph  graph,
CellView  value,
Rectangle  rect
 

Returns true if the edge shape intersects the given rectangle.

boolean org.jgraph.graph.EdgeRenderer.isFillable int  decoration  )  [protected]
 

boolean org.jgraph.graph.EdgeRenderer.isLabelTransform String  label  )  [private]
 

Estimates whether the transform for label should be applied. With the transform, the label will be painted along the edge. To apply transform, rotate graphics by the angle returned from getLabelAngle

Returns:
true, if transform can be applied, false otherwise

boolean org.jgraph.graph.EdgeRenderer.isLabelTransformEnabled  )  [private]
 

void org.jgraph.graph.EdgeRenderer.paint Graphics  g  ) 
 

Paint the renderer.

void org.jgraph.graph.EdgeRenderer.paintLabel Graphics  g,
String  label,
Point2D  p,
boolean  mainLabel
[protected]
 

Paint the specified label for the current edgeview.

void org.jgraph.graph.EdgeRenderer.paintSelectionBorder Graphics  g  )  [protected]
 

Provided for subclassers to paint a selection border.

void org.jgraph.graph.EdgeRenderer.repaint Rectangle  r  ) 
 

Overridden for performance reasons. See the Implementation Note for more information.

void org.jgraph.graph.EdgeRenderer.repaint long  tm,
int  x,
int  y,
int  width,
int  height
 

Overridden for performance reasons. See the Implementation Note for more information.

void org.jgraph.graph.EdgeRenderer.revalidate  ) 
 

Overridden for performance reasons. See the Implementation Note for more information.

void org.jgraph.graph.EdgeRenderer.setGradientColor Color  gradientColor  ) 
 

Parameters:
gradientColor The gradientColor to set.

void org.jgraph.graph.EdgeRenderer.setView CellView  value  )  [package]
 

Sets view to work with, caching necessary values until the next call of this method or until some other methods with explicitly specified different view

void org.jgraph.graph.EdgeRenderer.translateGraphics Graphics  g  )  [protected]
 

void org.jgraph.graph.EdgeRenderer.validate  ) 
 

Overridden for performance reasons. See the Implementation Note for more information.


Member Data Documentation

transient int org.jgraph.graph.EdgeRenderer.beginDeco [protected]
 

Painting attributes of the current edgeview

transient boolean org.jgraph.graph.EdgeRenderer.beginFill [protected]
 

transient int org.jgraph.graph.EdgeRenderer.beginSize [protected]
 

Bezier org.jgraph.graph.EdgeRenderer.bezier [protected]
 

transient Color org.jgraph.graph.EdgeRenderer.borderColor [protected]
 

Color attributes of the current edgeview. This components foreground is set to the edgecolor, the fontColor is in an extra variable. If the fontColor is null, the current foreground is used. The default background instead is used for text and is not visible if the label is not visible or if opaque is true.

transient boolean org.jgraph.graph.EdgeRenderer.childrenSelected [protected]
 

transient float org.jgraph.graph.EdgeRenderer.dashOffset = 0.0f [protected]
 

Contains the current dash offset. Null means no offset.

transient Color org.jgraph.graph.EdgeRenderer.defaultBackground [protected]
 

transient Color org.jgraph.graph.EdgeRenderer.defaultForeground [protected]
 

transient int org.jgraph.graph.EdgeRenderer.endDeco [protected]
 

transient boolean org.jgraph.graph.EdgeRenderer.endFill [protected]
 

transient int org.jgraph.graph.EdgeRenderer.endSize [protected]
 

Font org.jgraph.graph.EdgeRenderer.extraLabelFont = null
 

Override this if you want the extra labels to appear in a special fontJ

transient boolean org.jgraph.graph.EdgeRenderer.focus [protected]
 

transient Color org.jgraph.graph.EdgeRenderer.fontColor [protected]
 

transient Graphics org.jgraph.graph.EdgeRenderer.fontGraphics [static, protected]
 

Static Graphics used for Font Metrics

transient Color org.jgraph.graph.EdgeRenderer.gradientColor = null [protected]
 

The gradient color of the edge

transient JGraph org.jgraph.graph.EdgeRenderer.graph [protected]
 

Cache the current graph for drawing

transient boolean org.jgraph.graph.EdgeRenderer.labelBorder [protected]
 

Boolean attributes of the current edgeview. Fill flags are checked for valid decorations.

transient boolean org.jgraph.graph.EdgeRenderer.labelTransformEnabled [protected]
 

transient float [] org.jgraph.graph.EdgeRenderer.lineDash [protected]
 

Contains the current dash pattern. Null means no pattern.

transient int org.jgraph.graph.EdgeRenderer.lineStyle [protected]
 

transient float org.jgraph.graph.EdgeRenderer.lineWidth [protected]
 

Width of the current edge view

transient FontMetrics org.jgraph.graph.EdgeRenderer.metrics [protected]
 

Reference to the font metrics of the above

transient boolean org.jgraph.graph.EdgeRenderer.opaque [protected]
 

transient boolean org.jgraph.graph.EdgeRenderer.preview [protected]
 

transient boolean org.jgraph.graph.EdgeRenderer.selected [protected]
 

boolean org.jgraph.graph.EdgeRenderer.simpleExtraLabels = true
 

A switch for painting the extra labels

Spline2D org.jgraph.graph.EdgeRenderer.spline [protected]
 

transient EdgeView org.jgraph.graph.EdgeRenderer.view [protected]
 

Cache the current edgeview for drawing


The documentation for this class was generated from the following file:
Generated on Sun May 28 19:13:15 2006 for Digimod by  doxygen 1.4.6-NO