Oxygen XML Editor 11.2 Author API

ro.sync.ecss.extensions.api.highlights
Class HighlightPainterInfo

java.lang.Object
  extended by ro.sync.ecss.extensions.api.highlights.HighlightPainterInfo

public class HighlightPainterInfo
extends Object

Information needed by the painter.


Constructor Summary
HighlightPainterInfo(Graphics g, int currentBoxHeight, Point origin, int relativeX, int length, int startOffset, int endOffset, int baseLine, int fontAscent, int fontSize, int parentLineBoxHight, Point parentLineBoxOrigin)
          Renders the highlight.
 
Method Summary
 int getBaseLine()
          Returns the base line relative to top, relative to the box.
 int getCurrentBoxHeight()
          Current run of text/image height.
 int getEndOffset()
          Returns the end offset in content.
 int getFontAscent()
          Returns the font ascent.
 int getFontSize()
          Returns the font size.
 Graphics getGraphics()
          Returns the graphics used for paint.
 int getLength()
          Returns the length of highlight, in pixels.
 Point getOrigin()
          Returns the origin of box, relative to the upper corner of the editor.
 int getParentLineBoxHight()
           
 Point getParentLineBoxOrigin()
           
 int getRelativeX()
          Returns the relative X from where highlight should start.
 int getStartOffset()
          Returns the start offset in content.
 boolean isHighlightOverText()
          Returns true if the highlight is done over a text view.
 void setHighlightOverText(boolean isHighlightOverText)
          It is set by the author layout, so that the painter knows the painted box is a text box.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HighlightPainterInfo

public HighlightPainterInfo(Graphics g,
                            int currentBoxHeight,
                            Point origin,
                            int relativeX,
                            int length,
                            int startOffset,
                            int endOffset,
                            int baseLine,
                            int fontAscent,
                            int fontSize,
                            int parentLineBoxHight,
                            Point parentLineBoxOrigin)
Renders the highlight.

Parameters:
g - The graphics
currentBoxHeight - The current box height.
origin - Origin (upper left corner of the box in absolute coordinates)
relativeX - The x relative to the origin where the highlight must start.
length - The length of the highlight, in pixels.
startOffset - Start offset of highlight
endOffset - End offset of highlight
baseLine - The base line relative to the box start
fontAscent - The font ascent
fontSize - The font size
parentLineBoxHight - The height of the parent line box. Can be -1.
parentLineBoxOrigin - The origin of the parent line box. Can be null.
Method Detail

setHighlightOverText

public void setHighlightOverText(boolean isHighlightOverText)
It is set by the author layout, so that the painter knows the painted box is a text box.

Parameters:
isHighlightOverText - The isHighlightOverText to set.

getGraphics

public Graphics getGraphics()
Returns the graphics used for paint.

Returns:
Returns the graphics used for paint.

getCurrentBoxHeight

public int getCurrentBoxHeight()
Current run of text/image height. Usually the highlight should expand as high as the containing box.

Returns:
Current run of text/image height. Usually the highlight should expand as high as the containing box.

getOrigin

public Point getOrigin()
Returns the origin of box, relative to the upper corner of the editor.

Returns:
Returns the origin of box, relative to the upper corner of the editor.

getRelativeX

public int getRelativeX()
Returns the relative X from where highlight should start.

Returns:
Returns the relative X from where highlight should start.

getLength

public int getLength()
Returns the length of highlight, in pixels.

Returns:
Returns the length of highlight, in pixels.

getStartOffset

public int getStartOffset()
Returns the start offset in content.

Returns:
Returns the start offset in content.

getEndOffset

public int getEndOffset()
Returns the end offset in content.

Returns:
Returns the end offset in content.

getBaseLine

public int getBaseLine()
Returns the base line relative to top, relative to the box.

Returns:
Returns the base line relative to top, relative to the box.

getFontAscent

public int getFontAscent()
Returns the font ascent.

Returns:
Returns the font ascent.

getFontSize

public int getFontSize()
Returns the font size.

Returns:
Returns the font size.

isHighlightOverText

public boolean isHighlightOverText()
Returns true if the highlight is done over a text view.

Returns:
Returns true if the highlight is done over a text view.

getParentLineBoxHight

public int getParentLineBoxHight()
Returns:
Returns the height of parent line box. Can be -1.

getParentLineBoxOrigin

public Point getParentLineBoxOrigin()
Returns:
Returns the origin(absolute) of the parent line box. Can be null.

Oxygen XML Editor 11.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2010.