@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public class HighlightPainterInfo
extends java.lang.Object
Constructor and Description |
---|
HighlightPainterInfo(Graphics g,
int currentBoxHeight,
Point origin,
int relativeX,
int textYPadding,
int length,
int startOffset,
int endOffset,
int baseLine,
int fontAscent,
int fontSize,
int parentLineBoxHight,
Point parentLineBoxOrigin)
Deprecated.
Use the constructors with parentLineBoxWidth, parentLineBoxHeight, parentLineBoxOrigin.
|
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)
Deprecated.
Use the constructors with parentLineBoxWidth, parentLineBoxHeight, parentLineBoxOrigin.
|
HighlightPainterInfo(Graphics g,
int currentBoxHeight,
Point origin,
int relativeX,
int textYPadding,
int length,
int startOffset,
int endOffset,
int baseLine,
int fontAscent,
int fontSize,
Point parentLineBoxOrigin,
int parentLineBoxWidth,
int parentLineBoxHeight)
Renders the highlight.
|
Modifier and Type | Method and Description |
---|---|
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 |
getParentLineBoxWidth() |
int |
getRelativeX()
Returns the relative X from where highlight should start.
|
int |
getStartOffset()
Returns the start offset in content.
|
int |
getTextYPadding()
Returns the relative Y position from box Y used to paint the text inside the box.
|
boolean |
isHighlightOverFormControl()
Check if we have a highlight over form controls
|
boolean |
isHighlightOverImage() |
boolean |
isHighlightOverText()
Returns true if the highlight is done over a text view.
|
void |
setHighlightOverFormControls(boolean isHighlightOverFormControl)
Set highlight over form controls.
|
void |
setHighlightOverImage(boolean isHighlightOverImage)
true if the highlight is over an image |
void |
setHighlightOverText(boolean isHighlightOverText)
It is set by the author layout, so that the painter knows the painted box is a text box.
|
void |
setLength(int length)
Set a new value for the length of the highlight, in pixels.
|
@Deprecated 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)
g
- The graphicscurrentBoxHeight
- 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 highlightendOffset
- End offset of highlightbaseLine
- The base line relative to the box startfontAscent
- The font ascentfontSize
- The font sizeparentLineBoxHight
- The height of the parent line box. Can be -1.parentLineBoxOrigin
- The origin of the parent line box. Can be null.@Deprecated public HighlightPainterInfo(Graphics g, int currentBoxHeight, Point origin, int relativeX, int textYPadding, int length, int startOffset, int endOffset, int baseLine, int fontAscent, int fontSize, int parentLineBoxHight, Point parentLineBoxOrigin)
g
- The graphicscurrentBoxHeight
- 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.textYPadding
- The relative Y position from box Y used to paint the box.length
- The length of the highlight, in pixels.startOffset
- Start offset of highlightendOffset
- End offset of highlightbaseLine
- The base line relative to the box startfontAscent
- The font ascentfontSize
- The font sizeparentLineBoxHight
- The height of the parent line box. Can be -1.parentLineBoxOrigin
- The origin of the parent line box. Can be null.public HighlightPainterInfo(Graphics g, int currentBoxHeight, Point origin, int relativeX, int textYPadding, int length, int startOffset, int endOffset, int baseLine, int fontAscent, int fontSize, Point parentLineBoxOrigin, int parentLineBoxWidth, int parentLineBoxHeight)
g
- The graphicscurrentBoxHeight
- 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.textYPadding
- The relative Y position from box Y used to paint the box.length
- The length of the highlight, in pixels.startOffset
- Start offset of highlightendOffset
- End offset of highlightbaseLine
- The base line relative to the box startfontAscent
- The font ascentfontSize
- The font sizeparentLineBoxWidth
- The width of the parent line box. Can be -1.parentLineBoxHeight
- The height of the parent line box. Can be -1.parentLineBoxOrigin
- The origin of the parent line box. Can be null.public void setHighlightOverText(boolean isHighlightOverText)
isHighlightOverText
- The isHighlightOverText to set.public Graphics getGraphics()
public int getCurrentBoxHeight()
public Point getOrigin()
public int getRelativeX()
public int getTextYPadding()
public int getLength()
public void setLength(int length)
length
- the new value.public int getStartOffset()
public int getEndOffset()
public int getBaseLine()
public int getFontAscent()
public int getFontSize()
public boolean isHighlightOverText()
public int getParentLineBoxHight()
public int getParentLineBoxWidth()
public Point getParentLineBoxOrigin()
public void setHighlightOverImage(boolean isHighlightOverImage)
true
if the highlight is over an imageisHighlightOverImage
- true
if the highlight is over an imagepublic boolean isHighlightOverImage()
true
if the highlight is over an imagepublic void setHighlightOverFormControls(boolean isHighlightOverFormControl)
isHighlightOverFormControl
- true
if we have a highlight over form controls.public boolean isHighlightOverFormControl()
true
if we have a highlight over form controls.© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.