|
||||||||||
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(java.awt.geom.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. |
java.awt.Dimension |
render(NLPInstance instance,
java.awt.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(java.lang.String edgeType,
java.awt.Color color)
Set the color for edges of a certain type. |
void |
setEdgeTypeOrder(java.lang.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 java.awt.Dimension render(NLPInstance instance, java.awt.Graphics2D graphics2D)
render
in interface NLPCanvasRenderer
instance
- the instance to rendergraphics2D
- the graphics object to draw upon
NLPCanvasRenderer.render(NLPInstance, Graphics2D)
public void setAntiAliasing(boolean antiAliasing)
setAntiAliasing
in interface NLPCanvasRenderer
antiAliasing
- rue iff anti-aliasing should be used when drawing the graph.public void setMargin(int margin)
setMargin
in interface NLPCanvasRenderer
margin
- the margin between tokens.public int getMargin()
getMargin
in interface NLPCanvasRenderer
public Edge getEdgeAt(java.awt.geom.Point2D p, int radius)
NLPCanvasRenderer
getEdgeAt
in interface NLPCanvasRenderer
p
- the location of the edge.radius
- the radius around the point which the edge should cross.
public void setHeightFactor(int heightFactor)
setHeightFactor
in interface NLPCanvasRenderer
heightFactor
- an integer that indicates how high the graph should be.public int getHeightFactor()
getHeightFactor
in interface NLPCanvasRenderer
public void setCurved(boolean isCurved)
setCurved
in interface NLPCanvasRenderer
isCurved
- should the graph be more curved.NLPCanvasRenderer.setCurved(boolean)
public boolean isCurved()
isCurved
in interface NLPCanvasRenderer
public void setEdgeTypeColor(java.lang.String edgeType, java.awt.Color color)
setEdgeTypeColor
in interface NLPCanvasRenderer
edgeType
- 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(java.lang.String edgeType, int order)
setEdgeTypeOrder
in interface NLPCanvasRenderer
edgeType
- 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 |