|
||||||||||
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 JGraph |
graph
Cache the current graph for drawing. |
protected boolean |
hasFocus
Cached hasFocus and selected value. |
protected boolean |
hideGroups
Use this flag to control if groups should appear transparent. |
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. |
|
VertexRenderer(boolean hideGroups)
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. |
Point |
getPerimeterPoint(VertexView view,
Point source,
Point 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. |
boolean |
isHideGroups()
Returns the hideGroups. |
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 |
setHideGroups(boolean hideGroups)
Sets the hideGroups. |
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 boolean hideGroups
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
Constructor Detail |
---|
public VertexRenderer()
public VertexRenderer(boolean hideGroups)
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.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.
protected void installAttributes(CellView view)
view
- to retrieve the attribute values from.public void paint(Graphics g)
paint
in class JComponent
protected void paintSelectionBorder(Graphics g)
public Point getPerimeterPoint(VertexView view, Point source, Point 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 boolean isHideGroups()
public void setHideGroups(boolean hideGroups)
hideGroups
- The hideGroups to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |