GrammarScope  4.0.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Private Attributes | List of all members
grammarscope.browser.renderer.NamedEntitiesRenderer Class Reference
Inheritance diagram for grammarscope.browser.renderer.NamedEntitiesRenderer:
Inheritance graph
[legend]
Collaboration diagram for grammarscope.browser.renderer.NamedEntitiesRenderer:
Collaboration graph
[legend]

Public Member Functions

 NamedEntitiesRenderer (final Graphics g, final HotSpots hotSpots)
 
Color getBackColor ()
 
int layout (final Document document, final JTextComponent textComponent, final int padWidth, final int padTopOffset, final int padHeight, final int lineHeight) throws BadLocationException
 
- Public Member Functions inherited from grammarscope.browser.renderer.BoxRenderer
 BoxRenderer (final Graphics g, final HotSpots hotSpots, final boolean tagFlag)
 
Context getContext ()
 
void paint (final Graphics g)
 
- Public Member Functions inherited from grammarscope.browser.renderer.ProtoRenderer
int getTopOffset ()
 
int getHeight ()
 

Static Public Member Functions

static void setBackColor (final Color color)
 
static void setForeColor (final Color color)
 
static void setBorderColor (final Color color)
 

Protected Member Functions

Drawable makeDrawable (final Rectangle barRectangle, final Paint backgroundColor, final String tag, final int slot, final boolean hasPreviousFlag, final boolean hasNextFlag, final int headOffset, final ISource source)
 
- Protected Member Functions inherited from grammarscope.browser.renderer.BoxRenderer
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
 
int computeBoxHeight (final int slotCount, final int padHeight)
 
int getDefaultHeight ()
 
void setHotSpots ()
 

Static Private Attributes

static final Color DEFAULT_BACKCOLOR = new Color(0xD6, 0xD9, 0xDF, RenderMode.ALPHA)
 
static final Color DEFAULT_FORECOLOR = Color.DARK_GRAY
 
static final Color DEFAULT_BORDERCOLOR = new Color(192, 192, 192)
 
static Color backColor = DEFAULT_BACKCOLOR
 
static Color foreColor = DEFAULT_FORECOLOR
 
static Color borderColor = DEFAULT_FORECOLOR
 

Additional Inherited Members

- Static Protected Member Functions inherited from grammarscope.browser.renderer.BoxRenderer
static int computeUsed (final int slotCount, final int boxHeight)
 
- Protected Attributes inherited from grammarscope.browser.renderer.BoxRenderer
final Map< Integer, List< Drawable > > drawables
 
final Context context
 
- Protected Attributes inherited from grammarscope.browser.renderer.ProtoRenderer
int topOffset
 
int height
 
- Static Protected Attributes inherited from grammarscope.browser.renderer.BoxRenderer
static final Font tagFont = new Font(Font.SANS_SERIF, Font.PLAIN, 9)
 
- Static Package Attributes inherited from grammarscope.browser.renderer.BoxRenderer
static final Color HEAD_COLOR = Color.GRAY
 
static final Color ARROW_COLOR = Color.LIGHT_GRAY
 

Detailed Description

Named Entities renderer

Author
Bernard Bou

Constructor & Destructor Documentation

◆ NamedEntitiesRenderer()

grammarscope.browser.renderer.NamedEntitiesRenderer.NamedEntitiesRenderer ( final Graphics  g,
final HotSpots  hotSpots 
)

Constructor

Parameters
ggraphics context
hotSpotshotspots

Member Function Documentation

◆ getBackColor()

Color grammarscope.browser.renderer.NamedEntitiesRenderer.getBackColor ( )

Get back color

Returns
back color

Implements grammarscope.browser.renderer.IRenderer.

◆ layout()

int grammarscope.browser.renderer.NamedEntitiesRenderer.layout ( final Document  document,
final JTextComponent  textComponent,
final int  padWidth,
final int  padTopOffset,
final int  padHeight,
final int  lineHeight 
) throws BadLocationException

Layout

Parameters
documentdocument
textComponenttext component
padWidthannotation pad width
padTopOffsetannotation pad top offset
padHeightannotation pad height
lineHeighttext line height
Returns
used pad height
Exceptions
BadLocationExceptionexception

Reimplemented from grammarscope.browser.renderer.BoxRenderer.

◆ makeDrawable()

Drawable grammarscope.browser.renderer.NamedEntitiesRenderer.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 
)
protected

Make drawable

Parameters
boxRectangledrawable height
backgroundColordrawable background color
tagdrawable tag
slotdrawable's allocated slot
hasPreviousFlagwhether this drawable continues previous line
hasNextFlagwhether this drawable is continued on next line
headOffsethead x offset (from left) if any
sourcesource object
Returns
drawable

Reimplemented from grammarscope.browser.renderer.BoxRenderer.

◆ setBackColor()

static void grammarscope.browser.renderer.NamedEntitiesRenderer.setBackColor ( final Color  color)
static

Set back color

Parameters
colorcolor

◆ setBorderColor()

static void grammarscope.browser.renderer.NamedEntitiesRenderer.setBorderColor ( final Color  color)
static

Set border color

Parameters
colorcolor

◆ setForeColor()

static void grammarscope.browser.renderer.NamedEntitiesRenderer.setForeColor ( final Color  color)
static

Set fore color

Parameters
colorcolor

Member Data Documentation

◆ backColor

Color grammarscope.browser.renderer.NamedEntitiesRenderer.backColor = DEFAULT_BACKCOLOR
staticprivate

Back color

◆ borderColor

Color grammarscope.browser.renderer.NamedEntitiesRenderer.borderColor = DEFAULT_FORECOLOR
staticprivate

Border color

◆ DEFAULT_BACKCOLOR

final Color grammarscope.browser.renderer.NamedEntitiesRenderer.DEFAULT_BACKCOLOR = new Color(0xD6, 0xD9, 0xDF, RenderMode.ALPHA)
staticprivate

Default back color

◆ DEFAULT_BORDERCOLOR

final Color grammarscope.browser.renderer.NamedEntitiesRenderer.DEFAULT_BORDERCOLOR = new Color(192, 192, 192)
staticprivate

Default border color

◆ DEFAULT_FORECOLOR

final Color grammarscope.browser.renderer.NamedEntitiesRenderer.DEFAULT_FORECOLOR = Color.DARK_GRAY
staticprivate

Default fore color

◆ foreColor

Color grammarscope.browser.renderer.NamedEntitiesRenderer.foreColor = DEFAULT_FORECOLOR
staticprivate

Fore color


The documentation for this class was generated from the following file: