|
| | SemanticGraphRenderer (final Graphics g, final RelationFilter relationFilter, final RelationPalette relationPalette, final TypedDependencyProvider provider, final TypedDependencyMode mode, final HotSpots hotSpots, final boolean renderAsCurves) |
| |
| int | layout (final Document document, final JTextComponent textComponent, final int padWidth, final int padTopOffset, final int padHeight, final int lineHeight) throws BadLocationException |
| |
| Color | getBackColor () |
| |
| void | paint (final Graphics g) |
| |
| int | getTopOffset () |
| |
| int | getHeight () |
| |
|
| static final Font | tagFont = new Font(Font.SANS_SERIF, Font.PLAIN, 9) |
| |
|
| void | makeEdge (final int fromX, final int toX, final int baseY, final int fromAnchorX, final int toAnchorX, final int yAnchor, final int height, final String label, final Color color, final boolean isBackwards, final boolean isLeftTerminal, final boolean isRightTerminal, final int bottom, final boolean isVisible, final GraphEdge graphEdge) |
| |
|
| static void | drawBox (final Graphics g, final Rectangle box) |
| |
|
| static final String | LABEL_STAND_IN_CHAR = null |
| |
| static final int | LABEL_VERTICAL_TRUNCATE = 4 |
| |
| static final Stroke | SOLID = new BasicStroke() |
| |
| static final Stroke | DOTTED = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, new float[] { 1.0f, 5.0f }, 0f) |
| |
| static final Stroke | DASHED = new BasicStroke(1.0f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL, 1.0f, new float[] { 2.0f }, 0f) |
| |
| static final Stroke | SPAN_STROKE = SOLID |
| |
| static final Stroke | AXIS_STROKE = DASHED |
| |
| static final Stroke | EDGE_STROKE = SOLID |
| |
| static final Stroke | OVERFLOW_STROKE = DOTTED |
| |
| static final int | ARROW_TIP_WIDTH = 5 |
| |
| static final int | ARROW_TIP_HEIGHT = 3 |
| |
| static final int | ARROW_START_DIAMETER = 3 |
| |
| static final int | PAD_TOP_INSET = 4 |
| |
| static final int | PAD_BOTTOM_INSET = 2 |
| |
| static final int | EDGES_INSET_TOP = 10 |
| |
| static final int | EDGES_INSET_BOTTOM = 0 |
| |
| static final int | LABEL_TOP_INSET = 1 |
| |
| static final int | LABEL_BOTTOM_INSET = 1 |
| |
| static final int | LABEL_INFLATE = 1 |
| |
| static final int | X_MARGIN = 40 |
| |
| static final int | X_SHIFT = 3 |
| |
| static final int | TRUNCATE_MARGIN = 30 |
| |
| static final int | OVERFLOW_X_OFFSET = 5 |
| |
| static final int | OVERFLOW_Y_OFFSET = 5 |
| |
| static final int | OVERFLOW_WIDTH = 5 |
| |
| static final int | OVERFLOW_HEIGHT = 5 |
| |
| static final Color | DEFAULT_BACKCOLOR = new Color(0xC6, 0xDB, 0xEE, RenderMode.ALPHA) |
| |
| static final Color | DEFAULT_EDGE_COLOR = Color.DARK_GRAY |
| |
| static final Color | DEFAULT_LABEL_COLOR = Color.DARK_GRAY |
| |
| static final Color | DEFAULT_ARROW_TIP_COLOR = Color.DARK_GRAY |
| |
| static final Color | DEFAULT_ARROW_START_COLOR = Color.GRAY |
| |
| static final Color | DEFAULT_SPAN_COLOR = Color.GRAY |
| |
| static final Color | DEFAULT_AXIS_COLOR = Color.WHITE |
| |
| static final Color | DEFAULT_OVERFLOW_COLOR = Color.GRAY |
| |
| static Color | backColor = DEFAULT_BACKCOLOR |
| |
| static Color | labelColor = DEFAULT_LABEL_COLOR |
| |
| static Color | edgeColor = DEFAULT_EDGE_COLOR |
| |
| static Color | arrowTipColor = DEFAULT_EDGE_COLOR |
| |
| static Color | arrowStartColor = DEFAULT_ARROW_START_COLOR |
| |
| static Color | spanColor = DEFAULT_SPAN_COLOR |
| |
| static Color | axisColor = DEFAULT_AXIS_COLOR |
| |
Semantic graph renderer
- Author
- Bernard Bou
◆ SemanticGraphRenderer()
Constructor
- Parameters
-
| g | graphics context |
| relationFilter | relation filter |
| relationPalette | relation palette |
| provider | typed dependency provider |
| mode | typed dependency mode |
| hotSpots | hotspots |
| renderAsCurves | whether to render edges as curves |
◆ drawBox()
| static void grammarscope.browser.renderer.SemanticGraphRenderer.drawBox |
( |
final Graphics |
g, |
|
|
final Rectangle |
box |
|
) |
| |
|
staticprivate |
Draw box
- Parameters
-
| g | graphics context |
| box | box for typed dependency node |
◆ getBackColor()
| Color grammarscope.browser.renderer.SemanticGraphRenderer.getBackColor |
( |
| ) |
|
◆ layout()
| int grammarscope.browser.renderer.SemanticGraphRenderer.layout |
( |
final Document |
document, |
|
|
final JTextComponent |
textComponent, |
|
|
final int |
padWidth, |
|
|
final int |
padTopOffset, |
|
|
final int |
padHeight, |
|
|
final int |
lineHeight |
|
) |
| throws BadLocationException |
Layout
- Parameters
-
| document | document |
| textComponent | text component |
| padWidth | annotation pad width |
| padTopOffset | annotation pad top offset |
| padHeight | annotation pad height |
| lineHeight | text line height |
- Returns
- used pad height
- Exceptions
-
| BadLocationException | exception |
Implements grammarscope.browser.renderer.IRenderer.
◆ makeEdge()
| void grammarscope.browser.renderer.SemanticGraphRenderer.makeEdge |
( |
final int |
fromX, |
|
|
final int |
toX, |
|
|
final int |
baseY, |
|
|
final int |
fromAnchorX, |
|
|
final int |
toAnchorX, |
|
|
final int |
yAnchor, |
|
|
final int |
height, |
|
|
final String |
label, |
|
|
final Color |
color, |
|
|
final boolean |
isBackwards, |
|
|
final boolean |
isLeftTerminal, |
|
|
final boolean |
isRightTerminal, |
|
|
final int |
bottom, |
|
|
final boolean |
isVisible, |
|
|
final GraphEdge |
graphEdge |
|
) |
| |
|
private |
Make edge
- Parameters
-
| fromX | x from |
| toX | x to |
| baseY | base y |
| fromAnchorX | x anchor from |
| toAnchorX | x anchor to |
| yAnchor | y anchor |
| height | height |
| label | label |
| color | color |
| isBackwards | whether edge is backwards |
| isLeftTerminal | whether this edge left-terminates |
| isRightTerminal | whether this edge right-terminates |
| bottom | pad bottom |
| isVisible | whether this edge is visible |
| graphEdge | graph edge |
◆ paint()
| void grammarscope.browser.renderer.SemanticGraphRenderer.paint |
( |
final Graphics |
graphics | ) |
|
◆ setArrowStartColor()
| static void grammarscope.browser.renderer.SemanticGraphRenderer.setArrowStartColor |
( |
final Color |
color | ) |
|
|
static |
Set arrow start color
- Parameters
-
◆ setArrowTipColor()
| static void grammarscope.browser.renderer.SemanticGraphRenderer.setArrowTipColor |
( |
final Color |
color | ) |
|
|
static |
Set arrow tip color
- Parameters
-
◆ setAxisColor()
| static void grammarscope.browser.renderer.SemanticGraphRenderer.setAxisColor |
( |
final Color |
color | ) |
|
|
static |
Set axis color
- Parameters
-
◆ setBackColor()
| static void grammarscope.browser.renderer.SemanticGraphRenderer.setBackColor |
( |
final Color |
color | ) |
|
|
static |
Set back color
- Parameters
-
◆ setEdgeColor()
| static void grammarscope.browser.renderer.SemanticGraphRenderer.setEdgeColor |
( |
final Color |
color | ) |
|
|
static |
Set edge color
- Parameters
-
◆ setLabelColor()
| static void grammarscope.browser.renderer.SemanticGraphRenderer.setLabelColor |
( |
final Color |
color | ) |
|
|
static |
Set label color
- Parameters
-
◆ setSpanColor()
| static void grammarscope.browser.renderer.SemanticGraphRenderer.setSpanColor |
( |
final Color |
color | ) |
|
|
static |
Set span color
- Parameters
-
◆ ARROW_START_DIAMETER
| final int grammarscope.browser.renderer.SemanticGraphRenderer.ARROW_START_DIAMETER = 3 |
|
staticprivate |
◆ ARROW_TIP_HEIGHT
| final int grammarscope.browser.renderer.SemanticGraphRenderer.ARROW_TIP_HEIGHT = 3 |
|
staticprivate |
◆ ARROW_TIP_WIDTH
| final int grammarscope.browser.renderer.SemanticGraphRenderer.ARROW_TIP_WIDTH = 5 |
|
staticprivate |
◆ arrowStartColor
◆ arrowTipColor
| Color grammarscope.browser.renderer.SemanticGraphRenderer.arrowTipColor = DEFAULT_EDGE_COLOR |
|
staticprivate |
◆ AXIS_STROKE
| final Stroke grammarscope.browser.renderer.SemanticGraphRenderer.AXIS_STROKE = DASHED |
|
staticprivate |
◆ axisColor
◆ backColor
| Color grammarscope.browser.renderer.SemanticGraphRenderer.backColor = DEFAULT_BACKCOLOR |
|
staticprivate |
◆ boxes
| final Collection<Rectangle> grammarscope.browser.renderer.SemanticGraphRenderer.boxes |
|
private |
◆ DASHED
| final Stroke grammarscope.browser.renderer.SemanticGraphRenderer.DASHED = new BasicStroke(1.0f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL, 1.0f, new float[] { 2.0f }, 0f) |
|
staticprivate |
◆ DEFAULT_ARROW_START_COLOR
| final Color grammarscope.browser.renderer.SemanticGraphRenderer.DEFAULT_ARROW_START_COLOR = Color.GRAY |
|
staticprivate |
◆ DEFAULT_ARROW_TIP_COLOR
| final Color grammarscope.browser.renderer.SemanticGraphRenderer.DEFAULT_ARROW_TIP_COLOR = Color.DARK_GRAY |
|
staticprivate |
◆ DEFAULT_AXIS_COLOR
| final Color grammarscope.browser.renderer.SemanticGraphRenderer.DEFAULT_AXIS_COLOR = Color.WHITE |
|
staticprivate |
◆ DEFAULT_BACKCOLOR
| final Color grammarscope.browser.renderer.SemanticGraphRenderer.DEFAULT_BACKCOLOR = new Color(0xC6, 0xDB, 0xEE, RenderMode.ALPHA) |
|
staticprivate |
◆ DEFAULT_EDGE_COLOR
| final Color grammarscope.browser.renderer.SemanticGraphRenderer.DEFAULT_EDGE_COLOR = Color.DARK_GRAY |
|
staticprivate |
◆ DEFAULT_LABEL_COLOR
| final Color grammarscope.browser.renderer.SemanticGraphRenderer.DEFAULT_LABEL_COLOR = Color.DARK_GRAY |
|
staticprivate |
◆ DEFAULT_OVERFLOW_COLOR
| final Color grammarscope.browser.renderer.SemanticGraphRenderer.DEFAULT_OVERFLOW_COLOR = Color.GRAY |
|
staticprivate |
◆ DEFAULT_SPAN_COLOR
| final Color grammarscope.browser.renderer.SemanticGraphRenderer.DEFAULT_SPAN_COLOR = Color.GRAY |
|
staticprivate |
◆ DOTTED
| final Stroke grammarscope.browser.renderer.SemanticGraphRenderer.DOTTED = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, new float[] { 1.0f, 5.0f }, 0f) |
|
staticprivate |
◆ EDGE_STROKE
| final Stroke grammarscope.browser.renderer.SemanticGraphRenderer.EDGE_STROKE = SOLID |
|
staticprivate |
◆ edgeColor
◆ edges
| final Collection<Edge> grammarscope.browser.renderer.SemanticGraphRenderer.edges |
|
private |
◆ EDGES_INSET_BOTTOM
| final int grammarscope.browser.renderer.SemanticGraphRenderer.EDGES_INSET_BOTTOM = 0 |
|
staticprivate |
◆ EDGES_INSET_TOP
| final int grammarscope.browser.renderer.SemanticGraphRenderer.EDGES_INSET_TOP = 10 |
|
staticprivate |
◆ hotSpots
| final HotSpots grammarscope.browser.renderer.SemanticGraphRenderer.hotSpots |
|
private |
◆ LABEL_BOTTOM_INSET
| final int grammarscope.browser.renderer.SemanticGraphRenderer.LABEL_BOTTOM_INSET = 1 |
|
staticprivate |
◆ LABEL_INFLATE
| final int grammarscope.browser.renderer.SemanticGraphRenderer.LABEL_INFLATE = 1 |
|
staticprivate |
◆ LABEL_STAND_IN_CHAR
| final String grammarscope.browser.renderer.SemanticGraphRenderer.LABEL_STAND_IN_CHAR = null |
|
staticprivate |
Character used when there is not enough space. I f null, label will be truncated, and rotated 90°
◆ LABEL_TOP_INSET
| final int grammarscope.browser.renderer.SemanticGraphRenderer.LABEL_TOP_INSET = 1 |
|
staticprivate |
◆ LABEL_VERTICAL_TRUNCATE
| final int grammarscope.browser.renderer.SemanticGraphRenderer.LABEL_VERTICAL_TRUNCATE = 4 |
|
staticprivate |
Truncate length when label is vertical
◆ labelColor
◆ mode
◆ OVERFLOW_HEIGHT
| final int grammarscope.browser.renderer.SemanticGraphRenderer.OVERFLOW_HEIGHT = 5 |
|
staticprivate |
◆ OVERFLOW_STROKE
| final Stroke grammarscope.browser.renderer.SemanticGraphRenderer.OVERFLOW_STROKE = DOTTED |
|
staticprivate |
◆ OVERFLOW_WIDTH
| final int grammarscope.browser.renderer.SemanticGraphRenderer.OVERFLOW_WIDTH = 5 |
|
staticprivate |
◆ OVERFLOW_X_OFFSET
| final int grammarscope.browser.renderer.SemanticGraphRenderer.OVERFLOW_X_OFFSET = 5 |
|
staticprivate |
◆ OVERFLOW_Y_OFFSET
| final int grammarscope.browser.renderer.SemanticGraphRenderer.OVERFLOW_Y_OFFSET = 5 |
|
staticprivate |
◆ PAD_BOTTOM_INSET
| final int grammarscope.browser.renderer.SemanticGraphRenderer.PAD_BOTTOM_INSET = 2 |
|
staticprivate |
◆ PAD_TOP_INSET
| final int grammarscope.browser.renderer.SemanticGraphRenderer.PAD_TOP_INSET = 4 |
|
staticprivate |
◆ padWidth
| int grammarscope.browser.renderer.SemanticGraphRenderer.padWidth |
|
private |
◆ provider
Typed dependency provider
◆ relationFilter
| final RelationFilter grammarscope.browser.renderer.SemanticGraphRenderer.relationFilter |
|
package |
◆ relationPalette
| final RelationPalette grammarscope.browser.renderer.SemanticGraphRenderer.relationPalette |
|
package |
◆ renderAsCurves
| final boolean grammarscope.browser.renderer.SemanticGraphRenderer.renderAsCurves |
|
private |
◆ SOLID
| final Stroke grammarscope.browser.renderer.SemanticGraphRenderer.SOLID = new BasicStroke() |
|
staticprivate |
◆ SPAN_STROKE
| final Stroke grammarscope.browser.renderer.SemanticGraphRenderer.SPAN_STROKE = SOLID |
|
staticprivate |
◆ spanColor
◆ tagFont
| final Font grammarscope.browser.renderer.SemanticGraphRenderer.tagFont = new Font(Font.SANS_SERIF, Font.PLAIN, 9) |
|
staticprotected |
◆ tagMetrics
| final FontMetrics grammarscope.browser.renderer.SemanticGraphRenderer.tagMetrics |
|
private |
◆ TRUNCATE_MARGIN
| final int grammarscope.browser.renderer.SemanticGraphRenderer.TRUNCATE_MARGIN = 30 |
|
staticprivate |
◆ X_MARGIN
| final int grammarscope.browser.renderer.SemanticGraphRenderer.X_MARGIN = 40 |
|
staticprivate |
◆ X_SHIFT
| final int grammarscope.browser.renderer.SemanticGraphRenderer.X_SHIFT = 3 |
|
staticprivate |
The documentation for this class was generated from the following file: