|
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
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 inherited from class javax.swing.JLabel |
JLabel.AccessibleJLabel |
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 | |
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 Color |
gridColor
|
protected boolean |
hasFocus
Cached hasFocus and selected value. |
protected Color |
highlightColor
|
protected boolean |
isDoubleBuffered
Cached value of the double buffered state |
protected boolean |
labelEnabled
Cached value of whether the label is to be displayed |
protected Color |
lockedHandleColor
|
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 component based on the passed in cell. |
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. |
protected void |
resetAttributes()
Hook for subclassers that is invoked when the installAttributes is not called to reset all attributes to the defaults. |
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 VertexView view
protected transient boolean hasFocus
protected transient boolean selected
protected transient boolean preview
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 boolean labelEnabled
protected transient Color gradientColor
protected transient Color gridColor
protected transient Color highlightColor
protected transient Color lockedHandleColor
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.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.
protected void resetAttributes()
protected void installAttributes(CellView view)
view
- the cell view to retrieve the attribute values from.public void paint(Graphics g)
protected void paintSelectionBorder(Graphics g)
public Point2D getPerimeterPoint(VertexView view, Point2D source, Point2D p)
public void validate()
public void revalidate()
public void repaint(long tm, int x, int y, int width, int height)
public void repaint(Rectangle r)
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
public void firePropertyChange(String propertyName, byte oldValue, byte newValue)
public void firePropertyChange(String propertyName, char oldValue, char newValue)
public void firePropertyChange(String propertyName, short oldValue, short newValue)
public void firePropertyChange(String propertyName, int oldValue, int newValue)
public void firePropertyChange(String propertyName, long oldValue, long newValue)
public void firePropertyChange(String propertyName, float oldValue, float newValue)
public void firePropertyChange(String propertyName, double oldValue, double newValue)
public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
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 |