public class JComponentRenderer extends StyleRenderer
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object |
antialiasSetting |
protected java.util.HashMap<javax.swing.JComponent,org.graphstream.ui.swing.renderer.JComponentRenderer.ComponentElement> |
compToElement
Association between Swing components and graph elements.
|
protected int |
height
The size in PX of components.
|
protected SquareShape |
shadow
The potential shadow.
|
protected org.graphstream.ui.graphicGraph.stylesheet.Values |
size
The size of components.
|
protected int |
width
The size in PX of components.
|
group, hadEvents| Constructor and Description |
|---|
JComponentRenderer(org.graphstream.ui.graphicGraph.StyleGroup styleGroup,
SwingGraphRenderer mainRenderer) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkStyle(org.graphstream.ui.view.camera.DefaultCamera2D camera,
org.graphstream.ui.swing.renderer.JComponentRenderer.ComponentElement ce,
boolean force) |
void |
elementInvisible(Backend bck,
org.graphstream.ui.view.camera.DefaultCamera2D camera,
org.graphstream.ui.graphicGraph.GraphicElement element)
Called during rendering in place of
#renderElement(Graphics2D, DefaultCamera2D, GraphicElement)
to signal that the given element is not inside the view. |
void |
endRenderingPass(Backend bck,
org.graphstream.ui.view.camera.DefaultCamera2D camera,
boolean forShadow)
Called at the end of the rendering pass.
|
protected org.graphstream.ui.swing.renderer.JComponentRenderer.ComponentElement |
getOrEquipWithJComponent(org.graphstream.ui.graphicGraph.GraphicElement element)
Get the pair (swing component, graph element) corresponding to the given element.
|
void |
pushDynStyle(Backend bck,
org.graphstream.ui.view.camera.DefaultCamera2D camera,
org.graphstream.ui.graphicGraph.GraphicElement element)
Called before the rendering of elements on dynamic styles.
|
void |
pushStyle(Backend bck,
org.graphstream.ui.view.camera.DefaultCamera2D camera,
boolean forShadow)
Called before the rendering of bulk and event elements.
|
void |
renderElement(Backend bck,
org.graphstream.ui.view.camera.DefaultCamera2D camera,
org.graphstream.ui.graphicGraph.GraphicElement element)
Render a single element knowing the style is already prepared.
|
void |
renderShadow(Backend bck,
org.graphstream.ui.view.camera.DefaultCamera2D camera,
org.graphstream.ui.graphicGraph.GraphicElement element)
Render the shadow of the element.
|
void |
setupRenderingPass(Backend bck,
org.graphstream.ui.view.camera.DefaultCamera2D camera,
boolean forShadow)
Called before the whole rendering pass for all elements.
|
void |
unequipElement(org.graphstream.ui.graphicGraph.GraphicElement element) |
apply, render, render, renderShadowprotected org.graphstream.ui.graphicGraph.stylesheet.Values size
protected int width
protected int height
protected java.util.HashMap<javax.swing.JComponent,org.graphstream.ui.swing.renderer.JComponentRenderer.ComponentElement> compToElement
protected SquareShape shadow
protected java.lang.Object antialiasSetting
public JComponentRenderer(org.graphstream.ui.graphicGraph.StyleGroup styleGroup,
SwingGraphRenderer mainRenderer)
public void setupRenderingPass(Backend bck, org.graphstream.ui.view.camera.DefaultCamera2D camera, boolean forShadow)
StyleRenderersetupRenderingPass in class StyleRendererbck - The rendering back-end.camera - The camera.forShadow - true if we are in the shadow rendering pass.public void pushStyle(Backend bck, org.graphstream.ui.view.camera.DefaultCamera2D camera, boolean forShadow)
StyleRendererpushStyle in class StyleRendererbck - The rendering back-end.camera - The camera.forShadow - true if we are in the shadow rendering pass.public void pushDynStyle(Backend bck, org.graphstream.ui.view.camera.DefaultCamera2D camera, org.graphstream.ui.graphicGraph.GraphicElement element)
StyleRendererpushDynStyle in class StyleRendererbck - The rendering back-end.camera - The camera.element - The graphic element concerned by the dynamic style change.public void renderElement(Backend bck, org.graphstream.ui.view.camera.DefaultCamera2D camera, org.graphstream.ui.graphicGraph.GraphicElement element)
StyleRendererrenderElement in class StyleRendererbck - The rendering back-end.camera - The camera.element - The element to render.public void renderShadow(Backend bck, org.graphstream.ui.view.camera.DefaultCamera2D camera, org.graphstream.ui.graphicGraph.GraphicElement element)
StyleRendererrenderShadow in class StyleRendererbck - The rendering back-end.camera - The camera.element - The element to render.public void elementInvisible(Backend bck, org.graphstream.ui.view.camera.DefaultCamera2D camera, org.graphstream.ui.graphicGraph.GraphicElement element)
StyleRenderer#renderElement(Graphics2D, DefaultCamera2D, GraphicElement)
to signal that the given element is not inside the view. The renderElement() method will be
called as soon as the element becomes visible anew.elementInvisible in class StyleRendererbck - The rendering back-end.camera - The camera.element - The element to render.public void endRenderingPass(Backend bck, org.graphstream.ui.view.camera.DefaultCamera2D camera, boolean forShadow)
StyleRendererendRenderingPass in class StyleRendererbck - The rendering back-end.camera - The camera.forShadow - true if we are in the shadow rendering pass.public void unequipElement(org.graphstream.ui.graphicGraph.GraphicElement element)
protected org.graphstream.ui.swing.renderer.JComponentRenderer.ComponentElement getOrEquipWithJComponent(org.graphstream.ui.graphicGraph.GraphicElement element)
public void checkStyle(org.graphstream.ui.view.camera.DefaultCamera2D camera,
org.graphstream.ui.swing.renderer.JComponentRenderer.ComponentElement ce,
boolean force)