|
Gephi Toolkit Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gephi.preview.plugin.renderers.EdgeRenderer
public class EdgeRenderer
| Field Summary | |
|---|---|
static java.lang.String |
BEZIER_CURVENESS
|
protected float |
defaultBezierCurviness
|
protected EdgeColor |
defaultColor
|
protected boolean |
defaultEdgeCurved
|
protected int |
defaultOpacity
|
protected float |
defaultRadius
|
protected boolean |
defaultRescaleWeight
|
protected boolean |
defaultShowEdges
|
protected float |
defaultThickness
|
static java.lang.String |
EDGE_MAX_WEIGHT
|
static java.lang.String |
EDGE_MIN_WEIGHT
|
static java.lang.String |
SOURCE
|
static java.lang.String |
SOURCE_RADIUS
|
static java.lang.String |
TARGET
|
static java.lang.String |
TARGET_RADIUS
|
| Constructor Summary | |
|---|---|
EdgeRenderer()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getDisplayName()
Provides an user friendly name for the renderer. |
PreviewProperty[] |
getProperties()
Returns all associated properties for this renderer. |
boolean |
isRendererForitem(Item item,
PreviewProperties properties)
Based on properties, determine whether this renderer is
valid to render Item. |
boolean |
needsItemBuilder(ItemBuilder itemBuilder,
PreviewProperties properties)
Based on the itemBuilder class and the properties,
determine whether this renderer needs the given itemBuilder to be
executed before rendering. |
void |
preProcess(PreviewModel previewModel)
This method is called before rendering for all renderers and initializes items' additional attributes or run complex algorithms. |
void |
render(Item item,
RenderTarget target,
PreviewProperties properties)
Render item to target using the global properties
and item data. |
void |
renderCurvedEdge(Item edgeItem,
Item sourceItem,
Item targetItem,
float thickness,
java.awt.Color color,
PreviewProperties properties,
RenderTarget renderTarget)
|
void |
renderSelfLoop(Item nodeItem,
float thickness,
java.awt.Color color,
PreviewProperties properties,
RenderTarget renderTarget)
|
void |
renderStraightEdge(Item edgeItem,
Item sourceItem,
Item targetItem,
float thickness,
java.awt.Color color,
PreviewProperties properties,
RenderTarget renderTarget)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String EDGE_MIN_WEIGHT
public static final java.lang.String EDGE_MAX_WEIGHT
public static final java.lang.String BEZIER_CURVENESS
public static final java.lang.String SOURCE
public static final java.lang.String TARGET
public static final java.lang.String TARGET_RADIUS
public static final java.lang.String SOURCE_RADIUS
protected boolean defaultShowEdges
protected float defaultThickness
protected boolean defaultRescaleWeight
protected EdgeColor defaultColor
protected boolean defaultEdgeCurved
protected float defaultBezierCurviness
protected int defaultOpacity
protected float defaultRadius
| Constructor Detail |
|---|
public EdgeRenderer()
| Method Detail |
|---|
public void preProcess(PreviewModel previewModel)
Renderer
This method has access to any item using the getItems() methods
of the preview model.
No data should be stored in the renderer itself but put in items using
Item.setData(java.lang.String, java.lang.Object). Global states can
be stored in properties using
PreviewProperties.putValue(java.lang.String, java.lang.Object).
preProcess in interface RendererpreviewModel - the model to get items from
public void render(Item item,
RenderTarget target,
PreviewProperties properties)
Rendereritem to target using the global properties
and item data.
The target can be one of the default target ProcessingTarget,
SVGTarget or PDFTarget. Each target contains an access to
it's drawing canvas so the renderer can draw visual items.
render in interface Rendereritem - the item to be renderedtarget - the target to render the item onproperties - the central properties
public void renderSelfLoop(Item nodeItem,
float thickness,
java.awt.Color color,
PreviewProperties properties,
RenderTarget renderTarget)
public void renderCurvedEdge(Item edgeItem,
Item sourceItem,
Item targetItem,
float thickness,
java.awt.Color color,
PreviewProperties properties,
RenderTarget renderTarget)
public void renderStraightEdge(Item edgeItem,
Item sourceItem,
Item targetItem,
float thickness,
java.awt.Color color,
PreviewProperties properties,
RenderTarget renderTarget)
public PreviewProperty[] getProperties()
RendererPreviewProperty.createProperty() methods.
getProperties in interface Renderer
public boolean isRendererForitem(Item item,
PreviewProperties properties)
Rendererproperties, determine whether this renderer is
valid to render Item.
Additional states in properties helps to make a decision,
including:
true if the user is currently moving the canvas. Renderers
other than the node renderer usually render nothing while the user is moving
to speeds things up.
isRendererForitem in interface Rendereritem - the item to be testedproperties - the current properties
true if item can be rendered by this
renderer, false otherwise
public boolean needsItemBuilder(ItemBuilder itemBuilder,
PreviewProperties properties)
RendereritemBuilder class and the properties,
determine whether this renderer needs the given itemBuilder to be
executed before rendering.
This is used for avoiding building unnecessary items while refreshing preview.
You can simply return true if the builder builds items that this renderer renders, but you can also check the current properties to see if your renderer is going to produce any graphic.
Additional states in properties helps to make a decision,
including:
true if the user is currently moving the canvas. Renderers
other than the node renderer usually render nothing while the user is moving
to speeds things up.
needsItemBuilder in interface RendereritemBuilder - builder that your renderer may needproperties - Current properties
true if you are going to use built items for rendering, false otherwisepublic java.lang.String getDisplayName()
Renderer
getDisplayName in interface Renderer
|
Gephi Toolkit Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||