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

Public Member Functions

 Bar (final Rectangle rectangle, final Paint backgroundColor, final String tag, final int slot, final boolean hasPreviousFlag, final boolean hasNextFlag, final int head, final ISource source)
 
Rectangle getRectangle (final int barHeight)
 
void draw (final Graphics g, final Context c)
 
ISource getSource ()
 
String toString ()
 

Public Attributes

final int left
 
final int top
 
final int width
 
final int height
 
final Paint backgroundColor
 
final String tag
 
final int slot
 
final boolean hasNextBar
 
final boolean hasPreviousBar
 
final int head
 

Package Attributes

final ISource source
 

Static Package Attributes

static final int ARROW_DX = 5
 
static final int ARROW_DY = 5
 
static final int HEAD_DX = 2
 
static final int HEAD_DY = 3
 

Detailed Description

Bar between lines

Constructor & Destructor Documentation

◆ Bar()

grammarscope.browser.renderer.Bar.Bar ( final Rectangle  rectangle,
final Paint  backgroundColor,
final String  tag,
final int  slot,
final boolean  hasPreviousFlag,
final boolean  hasNextFlag,
final int  head,
final ISource  source 
)

Constructor

Parameters
rectanglebar height
backgroundColorbar background color
tagbar tag
slotbar's allocated slot
hasPreviousFlagWhether this bar continues previous line
hasNextFlagWhether this bar is continued on next line
headHead x offset (from left) if any
sourcesource object

Member Function Documentation

◆ draw()

void grammarscope.browser.renderer.Bar.draw ( final Graphics  g,
final Context  c 
)

Draw bar

Parameters
ggraphics context
ccontext

Implements grammarscope.browser.renderer.Drawable.

◆ getRectangle()

Rectangle grammarscope.browser.renderer.Bar.getRectangle ( final int  barHeight)

Get bar rectangle

Returns
bar rectangle

Implements grammarscope.browser.renderer.Drawable.

◆ getSource()

ISource grammarscope.browser.renderer.Bar.getSource ( )

Return source

Returns
source

Implements grammarscope.browser.renderer.Drawable.

◆ toString()

String grammarscope.browser.renderer.Bar.toString ( )

Member Data Documentation

◆ ARROW_DX

final int grammarscope.browser.renderer.Bar.ARROW_DX = 5
staticpackage

Arrow width

◆ ARROW_DY

final int grammarscope.browser.renderer.Bar.ARROW_DY = 5
staticpackage

Arrow height

◆ backgroundColor

final Paint grammarscope.browser.renderer.Bar.backgroundColor

Bar color

◆ hasNextBar

final boolean grammarscope.browser.renderer.Bar.hasNextBar

Whether this bar is continued on next line

◆ hasPreviousBar

final boolean grammarscope.browser.renderer.Bar.hasPreviousBar

Whether this bar continues on previous line

◆ head

final int grammarscope.browser.renderer.Bar.head

Head x1 offset (from x1) if any (negative if no head is contained)

◆ HEAD_DX

final int grammarscope.browser.renderer.Bar.HEAD_DX = 2
staticpackage

Head width

◆ HEAD_DY

final int grammarscope.browser.renderer.Bar.HEAD_DY = 3
staticpackage

Head height

◆ height

final int grammarscope.browser.renderer.Bar.height

Bar height (if -1, take the common bar height)

◆ left

final int grammarscope.browser.renderer.Bar.left

Bar left

◆ slot

final int grammarscope.browser.renderer.Bar.slot

Allocated slot

◆ source

final ISource grammarscope.browser.renderer.Bar.source
package

Source object

◆ tag

final String grammarscope.browser.renderer.Bar.tag

Bar tag (relation)

◆ top

final int grammarscope.browser.renderer.Bar.top

Bar top

◆ width

final int grammarscope.browser.renderer.Bar.width

Bar width


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