|
||||||||||
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
org.jgraph.graph.EdgeRenderer
public class EdgeRenderer
This renderer displays entries that implement the CellView interface and supports the following attributes:
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected int |
beginDeco
Painting attributes of the current edgeview |
protected boolean |
beginFill
Boolean attributes of the current edgeview. |
protected int |
beginSize
Painting attributes of the current edgeview |
protected Color |
borderColor
Color attributes of the current edgeview. |
protected Color |
defaultBackground
Color attributes of the current edgeview. |
protected Color |
defaultForeground
Color attributes of the current edgeview. |
protected int |
endDeco
Painting attributes of the current edgeview |
protected boolean |
endFill
Boolean attributes of the current edgeview. |
protected int |
endSize
Painting attributes of the current edgeview |
protected boolean |
focus
Boolean attributes of the current edgeview. |
protected Color |
fontColor
Color attributes of the current edgeview. |
protected Graphics |
fontGraphics
Static Graphics used for Font Metrics |
protected JGraph |
graph
Cache the current graph for drawing |
protected boolean |
labelBorder
Boolean attributes of the current edgeview. |
protected float[] |
lineDash
Contains the current dash pattern. |
protected int |
lineStyle
Painting attributes of the current edgeview |
protected float |
lineWidth
Width of the current edge view |
protected FontMetrics |
metrics
Reference to the font metrics of the above |
protected boolean |
opaque
Boolean attributes of the current edgeview. |
protected boolean |
preview
Boolean attributes of the current edgeview. |
protected boolean |
selected
Boolean attributes of the current edgeview. |
protected EdgeView |
view
Cache the current edgeview for drawing |
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 | |
---|---|
EdgeRenderer()
Constructs a renderer that may be used to render edges. |
Method Summary | |
---|---|
protected Shape |
createLineEnd(int size,
int style,
Point src,
Point dst)
Paint the current view's direction. |
protected Shape |
createShape()
Returns the shape that represents the current edge in the context of the current graph. |
void |
firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
Overridden for performance reasons. |
void |
firePropertyChange(String propertyName,
byte oldValue,
byte newValue)
Overridden for performance reasons. |
void |
firePropertyChange(String propertyName,
char oldValue,
char newValue)
Overridden for performance reasons. |
void |
firePropertyChange(String propertyName,
double oldValue,
double newValue)
Overridden for performance reasons. |
void |
firePropertyChange(String propertyName,
float oldValue,
float newValue)
Overridden for performance reasons. |
void |
firePropertyChange(String propertyName,
int oldValue,
int newValue)
Overridden for performance reasons. |
void |
firePropertyChange(String propertyName,
long oldValue,
long newValue)
Overridden for performance reasons. |
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Overridden for performance reasons. |
void |
firePropertyChange(String propertyName,
short oldValue,
short newValue)
Overridden for performance reasons. |
Rectangle |
getBounds(CellView value)
Returns the bounds of the edge shape. |
Rectangle |
getLabelBounds(EdgeView view)
Returns the label bounds of the specified view in the given graph. |
Point |
getLabelPosition(EdgeView view)
Returns the label position of the specified view in the given graph. |
Dimension |
getLabelSize(EdgeView view)
Returns the label size of the specified view in the given graph. |
Rectangle |
getPaintBounds(EdgeView view)
Returns the bounds of the edge shape without label |
Component |
getRendererComponent(JGraph graph,
CellView view,
boolean sel,
boolean focus,
boolean preview)
Configure and return the renderer based on the passed in components. |
protected void |
installAttributes(CellView view)
Installs the attributes of specified cell in this renderer instance. |
boolean |
intersects(Graphics g,
CellView value,
Rectangle r)
Returns true if the edge shape intersects the given rectangle. |
protected boolean |
isFillable(int decoration)
|
void |
paint(Graphics g)
Paint the renderer. |
protected void |
paintLabel(Graphics g,
String label)
Paint the specified label for the current edgeview. |
void |
repaint(long tm,
int x,
int y,
int width,
int height)
Overridden for performance reasons. |
void |
repaint(Rectangle r)
Overridden for performance reasons. |
void |
revalidate()
Overridden for performance reasons. |
protected void |
translateGraphics(Graphics g)
|
void |
validate()
Overridden for performance reasons. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient Graphics fontGraphics
protected transient FontMetrics metrics
protected transient JGraph graph
protected transient EdgeView view
protected transient int beginDeco
protected transient int endDeco
protected transient int beginSize
protected transient int endSize
protected transient int lineStyle
protected transient float lineWidth
protected transient boolean labelBorder
protected transient boolean beginFill
protected transient boolean endFill
protected transient boolean focus
protected transient boolean selected
protected transient boolean preview
protected transient boolean opaque
protected transient Color borderColor
protected transient Color defaultForeground
protected transient Color defaultBackground
protected transient Color fontColor
protected transient float[] lineDash
Constructor Detail |
---|
public EdgeRenderer()
Method Detail |
---|
public Component getRendererComponent(JGraph graph, CellView view, boolean sel, boolean focus, boolean preview)
convertValueToString
.
getRendererComponent
in interface CellViewRenderer
graph
- the graph that that defines the rendering context.view
- the object that should be rendered.sel
- whether the object is selected.focus
- whether the object has the focus.preview
- whether we are drawing a preview.
public boolean intersects(Graphics g, CellView value, Rectangle r)
public Rectangle getBounds(CellView value)
public Rectangle getLabelBounds(EdgeView view)
public Point getLabelPosition(EdgeView view)
public Dimension getLabelSize(EdgeView view)
protected void installAttributes(CellView view)
view
- to retrieve the attribute values from.protected boolean isFillable(int decoration)
public Rectangle getPaintBounds(EdgeView view)
public void paint(Graphics g)
paint
in class JComponent
protected void translateGraphics(Graphics g)
protected void paintLabel(Graphics g, String label)
protected Shape createShape()
protected Shape createLineEnd(int size, int style, Point src, Point dst)
public void validate()
validate
in class Container
public void revalidate()
revalidate
in class JComponent
public void repaint(long tm, int x, int y, int width, int height)
repaint
in class JComponent
public void repaint(Rectangle r)
repaint
in class JComponent
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, byte oldValue, byte newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, char oldValue, char newValue)
firePropertyChange
in class JComponent
public void firePropertyChange(String propertyName, short oldValue, short newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, int oldValue, int newValue)
firePropertyChange
in class JComponent
public void firePropertyChange(String propertyName, long oldValue, long newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, float oldValue, float newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, double oldValue, double newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
firePropertyChange
in class JComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |