public abstract class ElementRenderer extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
hadEvents
Allow to know if an event began or ended.
|
protected Color |
textColor |
protected Font |
textFont |
protected int |
textSize |
Constructor and Description |
---|
ElementRenderer()
New swing element renderer for the given style group.
|
Modifier and Type | Method and Description |
---|---|
protected void |
configureText(StyleGroup group,
Camera camera) |
protected abstract void |
elementInvisible(StyleGroup group,
Graphics2D g,
Camera camera,
GraphicElement element)
Called during rendering in place of
renderElement(StyleGroup, Graphics2D, Camera, GraphicElement)
to signal that the given element is not inside the view. |
protected Color |
interpolateColor(StyleGroup group,
GraphicElement element) |
protected abstract void |
pushDynStyle(StyleGroup group,
Graphics2D g,
Camera camera,
GraphicElement element)
Called before the rendering of elements on dynamic styles.
|
protected abstract void |
pushStyle(StyleGroup group,
Graphics2D g,
Camera camera)
Called before the rendering of bulk and event elements.
|
void |
render(StyleGroup group,
Graphics2D g,
Camera camera)
Render all the (visible) elements of the group.
|
protected abstract void |
renderElement(StyleGroup group,
Graphics2D g,
Camera camera,
GraphicElement element)
Render a single element knowing the style is already prepared.
|
protected void |
renderText(StyleGroup group,
Graphics2D g,
Camera camera,
GraphicElement element) |
protected abstract void |
setupRenderingPass(StyleGroup group,
Graphics2D g,
Camera camera)
Called before the whole rendering pass for all elements.
|
protected boolean hadEvents
protected int textSize
public ElementRenderer()
public void render(StyleGroup group, Graphics2D g, Camera camera)
protected abstract void setupRenderingPass(StyleGroup group, Graphics2D g, Camera camera)
g
- The Swing graphics.camera
- The camera.protected abstract void pushStyle(StyleGroup group, Graphics2D g, Camera camera)
g
- The Swing graphics.camera
- The camera.protected abstract void pushDynStyle(StyleGroup group, Graphics2D g, Camera camera, GraphicElement element)
g
- The Swing graphics.camera
- The camera.element
- The graphic element concerned by the dynamic style change.protected abstract void renderElement(StyleGroup group, Graphics2D g, Camera camera, GraphicElement element)
g
- The Swing graphics.camera
- The camera.element
- The element to render.protected abstract void elementInvisible(StyleGroup group, Graphics2D g, Camera camera, GraphicElement element)
renderElement(StyleGroup, Graphics2D, Camera, 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.g
- The Swing graphics.camera
- The camera.element
- The element to render.protected void configureText(StyleGroup group, Camera camera)
protected void renderText(StyleGroup group, Graphics2D g, Camera camera, GraphicElement element)
protected Color interpolateColor(StyleGroup group, GraphicElement element)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses