|
| void | makeDrawable (final List< Segment > segments, final Segment headSegment, final String tag, final Paint color, final int slot, final int padTopOffset, final int lineHeight, final ISource source, final JTextComponent textComponent) throws BadLocationException |
| |
| abstract Drawable | makeDrawable (final Rectangle boxRectangle, final Paint backgroundColor, final String tag, final int slot, final boolean hasPreviousFlag, final boolean hasNextFlag, final int headOffset, final ISource source) |
| |
| int | computeBoxHeight (final int slotCount, final int padHeight) |
| |
| int | getDefaultHeight () |
| |
| void | setHotSpots () |
| |
|
| static int | computeUsed (final int slotCount, final int boxHeight) |
| |
|
| static final Font | tagFont = new Font(Font.SANS_SERIF, Font.PLAIN, 9) |
| |
Box renderer
- Author
- Bernard Bou
◆ BoxRenderer()
| grammarscope.browser.renderer.BoxRenderer.BoxRenderer |
( |
final Graphics |
g, |
|
|
final HotSpots |
hotSpots, |
|
|
final boolean |
tagFlag |
|
) |
| |
Constructor
- Parameters
-
| g | graphic context |
| hotSpots | hotspots |
| tagFlag | tag flag |
◆ addDrawable()
| void grammarscope.browser.renderer.BoxRenderer.addDrawable |
( |
final Drawable |
drawable, |
|
|
final int |
lineId |
|
) |
| |
|
private |
Add drawable to drawables
- Parameters
-
| drawable | drawable |
| lineId | line id |
◆ computeBoxHeight()
| int grammarscope.browser.renderer.BoxRenderer.computeBoxHeight |
( |
final int |
slotCount, |
|
|
final int |
padHeight |
|
) |
| |
|
protected |
Compute box height giving each box an equal share of the pad height
- Parameters
-
| slotCount | number of slots |
| padHeight | pad height |
- Returns
- box height
◆ computeUsed()
| static int grammarscope.browser.renderer.BoxRenderer.computeUsed |
( |
final int |
slotCount, |
|
|
final int |
boxHeight |
|
) |
| |
|
staticprotected |
Compute used height
- Parameters
-
| slotCount | slot count |
| boxHeight | box height |
- Returns
- used height
◆ getContext()
| Context grammarscope.browser.renderer.BoxRenderer.getContext |
( |
| ) |
|
Get context
- Returns
- context
◆ getDefaultHeight()
| int grammarscope.browser.renderer.BoxRenderer.getDefaultHeight |
( |
| ) |
|
|
protected |
Get minimum box height to accept label
- Returns
- minimum box height to accept label
◆ layout()
| abstract int grammarscope.browser.renderer.BoxRenderer.layout |
( |
final Document |
document, |
|
|
final JTextComponent |
textComponent, |
|
|
final int |
padWidth, |
|
|
final int |
padTopOffset, |
|
|
final int |
padHeight, |
|
|
final int |
lineHeight |
|
) |
| throws BadLocationException |
|
abstract |
◆ makeDrawable() [1/2]
| void grammarscope.browser.renderer.BoxRenderer.makeDrawable |
( |
final List< Segment > |
segments, |
|
|
final Segment |
headSegment, |
|
|
final String |
tag, |
|
|
final Paint |
color, |
|
|
final int |
slot, |
|
|
final int |
padTopOffset, |
|
|
final int |
lineHeight, |
|
|
final ISource |
source, |
|
|
final JTextComponent |
textComponent |
|
) |
| throws BadLocationException |
|
protected |
Make drawable
- Parameters
-
| segments | segments for box to span |
| headSegment | head segment |
| tag | box tag |
| color | box color |
| slot | box slot |
| padTopOffset | top |
| lineHeight | text line height |
| source | source object |
| textComponent | text component to provide segment locations |
- Exceptions
-
| BadLocationException | exception |
◆ makeDrawable() [2/2]
| abstract Drawable grammarscope.browser.renderer.BoxRenderer.makeDrawable |
( |
final Rectangle |
boxRectangle, |
|
|
final Paint |
backgroundColor, |
|
|
final String |
tag, |
|
|
final int |
slot, |
|
|
final boolean |
hasPreviousFlag, |
|
|
final boolean |
hasNextFlag, |
|
|
final int |
headOffset, |
|
|
final ISource |
source |
|
) |
| |
|
abstractprotected |
◆ paint()
| void grammarscope.browser.renderer.BoxRenderer.paint |
( |
final Graphics |
graphics | ) |
|
◆ setHotSpots()
| void grammarscope.browser.renderer.BoxRenderer.setHotSpots |
( |
| ) |
|
|
protected |
◆ ARROW_COLOR
| final Color grammarscope.browser.renderer.BoxRenderer.ARROW_COLOR = Color.LIGHT_GRAY |
|
staticpackage |
◆ BOTTOM_INSET
| final int grammarscope.browser.renderer.BoxRenderer.BOTTOM_INSET = 5 |
|
staticprivate |
◆ context
| final Context grammarscope.browser.renderer.BoxRenderer.context |
|
protected |
◆ drawables
| final Map<Integer, List<Drawable> > grammarscope.browser.renderer.BoxRenderer.drawables |
|
protected |
◆ HEAD_COLOR
| final Color grammarscope.browser.renderer.BoxRenderer.HEAD_COLOR = Color.GRAY |
|
staticpackage |
◆ hotSpots
| final HotSpots grammarscope.browser.renderer.BoxRenderer.hotSpots |
|
private |
◆ LABEL_BOTTOM_INSET
| final int grammarscope.browser.renderer.BoxRenderer.LABEL_BOTTOM_INSET = 1 |
|
staticprivate |
◆ LABEL_TOP_INSET
| final int grammarscope.browser.renderer.BoxRenderer.LABEL_TOP_INSET = 1 |
|
staticprivate |
◆ tagFont
| final Font grammarscope.browser.renderer.BoxRenderer.tagFont = new Font(Font.SANS_SERIF, Font.PLAIN, 9) |
|
staticprotected |
◆ TOP_INSET
| final int grammarscope.browser.renderer.BoxRenderer.TOP_INSET = 5 |
|
staticprivate |
◆ X_MARGIN
| final int grammarscope.browser.renderer.BoxRenderer.X_MARGIN = 40 |
|
staticprivate |
The documentation for this class was generated from the following file:
- grammarscope/browser/src/main/java/grammarscope/browser/renderer/BoxRenderer.java