|
JGraph |
|||||||||
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
javax.swing.JLabel
org.jgraph.graph.VertexRenderer
public class VertexRenderer
This renderer displays entries that implement the CellView interface and supports the following attributes. If the cell view is not a leaf, this object is only visible if it is selected.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JLabel |
---|
JLabel.AccessibleJLabel |
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 Color |
bordercolor
Cached default foreground and default background. |
protected int |
borderWidth
Cached borderwidth. |
protected boolean |
childrenSelected
Cached hasFocus and selected value. |
protected Color |
defaultBackground
Cached default foreground and default background. |
protected Color |
defaultForeground
Cached default foreground and default background. |
protected Color |
gradientColor
|
protected JGraph |
graph
Cache the current graph for drawing. |
protected boolean |
hasFocus
Cached hasFocus and selected value. |
protected boolean |
isDoubleBuffered
Cached value of the double buffered state |
protected boolean |
opaque
Cached hasFocus and selected value. |
protected boolean |
preview
Cached hasFocus and selected value. |
protected boolean |
selected
Cached hasFocus and selected value. |
protected VertexView |
view
Cache the current shape for drawing. |
Fields inherited from class javax.swing.JLabel |
---|
labelFor |
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 javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
VertexRenderer()
Constructs a renderer that may be used to render vertices. |
Method Summary | |
---|---|
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. |
Color |
getGradientColor()
|
Point2D |
getPerimeterPoint(VertexView view,
Point2D source,
Point2D p)
Returns the intersection of the bounding rectangle and the straight line between the source and the specified point p. |
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)
Install the attributes of specified cell in this renderer instance. |
void |
paint(Graphics g)
Paint the renderer. |
protected void |
paintSelectionBorder(Graphics g)
Provided for subclassers to paint a selection border. |
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. |
void |
setGradientColor(Color gradientColor)
|
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 JGraph graph
protected transient VertexView view
protected transient boolean hasFocus
protected transient boolean selected
protected transient boolean preview
protected transient boolean opaque
protected transient boolean childrenSelected
protected transient Color defaultForeground
protected transient Color defaultBackground
protected transient Color bordercolor
protected transient int borderWidth
protected transient boolean isDoubleBuffered
protected transient Color gradientColor
Constructor Detail |
---|
public VertexRenderer()
Method Detail |
---|
public Component getRendererComponent(JGraph graph, CellView view, boolean sel, boolean focus, boolean preview)
convertValueToString
.
We recommend you check the value's class and throw an
illegal argument exception if it's not correct.
getRendererComponent
in interface CellViewRenderer
graph
- the graph that that defines the rendering context.value
- the object that should be rendered.selected
- whether the object is selected.hasFocus
- whether the object has the focus.isPreview
- whether we are drawing a preview.
protected void installAttributes(CellView view)
cell
- to retrieve the attribute values from.public void paint(Graphics g)
paint
in class JComponent
protected void paintSelectionBorder(Graphics g)
public Point2D getPerimeterPoint(VertexView view, Point2D source, Point2D p)
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
public Color getGradientColor()
public void setGradientColor(Color gradientColor)
gradientColor
- The gradientColor to set.
|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |