This renderer displays entries that implement the CellView interface and
supports the following attributes:
GraphConstants.OFFSET GraphConstants.ABSOLUTE graphBackground
protected Color graphBackground
Cache the current graph background.
hasFocus
protected boolean hasFocus
Cached hasFocus and selected value.
preview
protected boolean preview
Cached hasFocus and selected value.
selected
protected boolean selected
Cached hasFocus and selected value.
view
protected PortView view
Cache the current edgeview for drawing.
xorEnabled
protected boolean xorEnabled
Cached hasFocus and selected value.
firePropertyChange
protected void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
firePropertyChange
public void firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
firePropertyChange
public void firePropertyChange(String propertyName,
byte oldValue,
byte newValue)
firePropertyChange
public void firePropertyChange(String propertyName,
char oldValue,
char newValue)
firePropertyChange
public void firePropertyChange(String propertyName,
double oldValue,
double newValue)
firePropertyChange
public void firePropertyChange(String propertyName,
float oldValue,
float newValue)
firePropertyChange
public void firePropertyChange(String propertyName,
int oldValue,
int newValue)
firePropertyChange
public void firePropertyChange(String propertyName,
long oldValue,
long newValue)
firePropertyChange
public void firePropertyChange(String propertyName,
short oldValue,
short newValue)
getRendererComponent
public Component 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
.
- 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.
- the component used to render the value.
paint
public void paint(Graphics g)
Paint the renderer. Overrides superclass paint to add specific painting.
Note: The preview flag is interpreted as "highlight" in this context.
(This is used to highlight the port if the mouse is over it.)
repaint
public void repaint(Rectangle r)
repaint
public void repaint(long tm,
int x,
int y,
int width,
int height)
revalidate
public void revalidate()
validate
public void validate()