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

Public Member Functions

 Icon (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 ()
 

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
 

Static Private Member Functions

static BufferedImage overlay (final BufferedImage image, final BufferedImage image0)
 

Private 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
 
final ISource source
 
final BufferedImage image
 
final BufferedImage overlayImage
 

Detailed Description

Bar between lines

Constructor & Destructor Documentation

◆ Icon()

grammarscope.browser.renderer.Icon.Icon ( 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.Icon.draw ( final Graphics  g,
final Context  c 
)

Draw bar

Parameters
ggraphics context
ccontext

Implements grammarscope.browser.renderer.Drawable.

◆ getRectangle()

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

Get bar rectangle

Returns
bar rectangle

Implements grammarscope.browser.renderer.Drawable.

◆ getSource()

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

Return source

Returns
source

Implements grammarscope.browser.renderer.Drawable.

◆ overlay()

static BufferedImage grammarscope.browser.renderer.Icon.overlay ( final BufferedImage  image,
final BufferedImage  image0 
)
staticprivate

◆ toString()

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

Member Data Documentation

◆ ARROW_DX

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

Arrow width

◆ ARROW_DY

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

Arrow height

◆ backgroundColor

final Paint grammarscope.browser.renderer.Icon.backgroundColor
private

Bar color

◆ hasNextBar

final boolean grammarscope.browser.renderer.Icon.hasNextBar
private

Whether this bar is continued on next line

◆ hasPreviousBar

final boolean grammarscope.browser.renderer.Icon.hasPreviousBar
private

Whether this bar continues on previous line

◆ head

final int grammarscope.browser.renderer.Icon.head
private

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

◆ HEAD_DX

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

Head width

◆ HEAD_DY

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

Head height

◆ height

final int grammarscope.browser.renderer.Icon.height
private

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

◆ image

final BufferedImage grammarscope.browser.renderer.Icon.image
private

Image

◆ left

final int grammarscope.browser.renderer.Icon.left
private

Bar left

◆ overlayImage

final BufferedImage grammarscope.browser.renderer.Icon.overlayImage
private

Image

◆ slot

final int grammarscope.browser.renderer.Icon.slot
private

Allocated slot

◆ source

final ISource grammarscope.browser.renderer.Icon.source
private

Source object

◆ tag

final String grammarscope.browser.renderer.Icon.tag
private

Bar tag (relation)

◆ top

final int grammarscope.browser.renderer.Icon.top
private

Bar top

◆ width

final int grammarscope.browser.renderer.Icon.width
private

Bar width


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