|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.whatswrong.SingleSentenceRenderer
public class SingleSentenceRenderer
A SingleSentenceRenderer renders an NLPInstance as a single sentence with spans drawn below the tokens, and dependencies above the tokens.
| Constructor Summary | |
|---|---|
SingleSentenceRenderer()
|
|
| Method Summary | |
|---|---|
Edge |
getEdgeAt(Point2D p,
int radius)
Get the Edge at a given location. |
int |
getHeightFactor()
Returns an integer that reflects the height of the graph. |
int |
getMargin()
Returns the margin between tokens. |
boolean |
isAntiAliasing()
Should anti-aliasing be used when drawing the graph. |
boolean |
isCurved()
Returns whether the renderer draws a more curved graph or not. |
Dimension |
render(NLPInstance instance,
Graphics2D graphics2D)
Renders the given instance as a single sentence with spans drawn below tokens, and dependencies above tokens. |
void |
setAntiAliasing(boolean antiAliasing)
Should anti-aliasing be used when drawing the graph. |
void |
setCurved(boolean isCurved)
Controls whether the graph should be curved or rectangular. |
void |
setEdgeTypeColor(String edgeType,
Color color)
Set the color for edges of a certain type. |
void |
setEdgeTypeOrder(String edgeType,
int order)
Sets the order/vertical layer in which the area of a certain type should be drawn. |
void |
setHeightFactor(int heightFactor)
Controls the height of the graph. |
void |
setMargin(int margin)
Sets the margin between tokens. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingleSentenceRenderer()
| Method Detail |
|---|
public Dimension render(NLPInstance instance,
Graphics2D graphics2D)
render in interface NLPCanvasRendererinstance - the instance to rendergraphics2D - the graphics object to draw upon
NLPCanvasRenderer.render(NLPInstance, Graphics2D)public void setAntiAliasing(boolean antiAliasing)
setAntiAliasing in interface NLPCanvasRendererantiAliasing - rue iff anti-aliasing should be used when drawing the graph.public void setMargin(int margin)
setMargin in interface NLPCanvasRenderermargin - the margin between tokens.public int getMargin()
getMargin in interface NLPCanvasRenderer
public Edge getEdgeAt(Point2D p,
int radius)
NLPCanvasRenderer
getEdgeAt in interface NLPCanvasRendererp - the location of the edge.radius - the radius around the point which the edge should cross.
public void setHeightFactor(int heightFactor)
setHeightFactor in interface NLPCanvasRendererheightFactor - an integer that indicates how high the graph should be.public int getHeightFactor()
getHeightFactor in interface NLPCanvasRendererpublic void setCurved(boolean isCurved)
setCurved in interface NLPCanvasRendererisCurved - should the graph be more curved.NLPCanvasRenderer.setCurved(boolean)public boolean isCurved()
isCurved in interface NLPCanvasRenderer
public void setEdgeTypeColor(String edgeType,
Color color)
setEdgeTypeColor in interface NLPCanvasRendereredgeType - the type of the edges we want to change the color for.color - the color of the edges of the given type.
public void setEdgeTypeOrder(String edgeType,
int order)
setEdgeTypeOrder in interface NLPCanvasRendereredgeType - the type we want to change the order for.order - the order/vertical layer in which the area of the given type should be drawn.public boolean isAntiAliasing()
isAntiAliasing in interface NLPCanvasRenderer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||