|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectchemaxon.struc.graphics.MTextDocument.Portion
Selected text.
| Method Summary | |
boolean |
endsWith(char c)
Tests whether this text portion ends with the specified character. |
double |
getAscent(java.awt.Graphics g,
java.awt.FontMetrics fm0)
Gets the ascent of this portion. |
double |
getDescent(java.awt.Graphics g,
java.awt.FontMetrics fm0)
Gets the descent of this portion. |
double |
getEndDx()
Gets the x shift at the end. |
int |
getEndPos()
Gets the position of the last character + 1. |
java.lang.String |
getPlainText()
Gets the selected text as a plain text string. |
MTextDocument.Portion |
getPortion(int start,
int end)
Gets a portion of the text relative to this portion. |
int |
getStartPos()
Gets the position of the first character. |
int |
length()
Gets the number of characters. |
double |
portionWidth(java.awt.Graphics g,
java.awt.FontMetrics fm0)
Gets the width of this portion. |
double |
portionXAdvance(java.awt.Graphics g,
java.awt.FontMetrics fm0)
Gets the x coordinate change from the beginning to the end of this portion. |
double |
portionXAdvance(java.awt.Graphics g,
java.awt.FontMetrics fm0,
boolean lastxadv)
Gets the width of this portion. |
java.lang.String |
toString()
Gets the string representation of the portion. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public final int getStartPos()
public final int getEndPos()
public final int length()
public final double portionWidth(java.awt.Graphics g,
java.awt.FontMetrics fm0)
g - the graphics context or nullfm0 - default font metrics
public final double portionXAdvance(java.awt.Graphics g,
java.awt.FontMetrics fm0)
g - the graphics context or nullfm0 - default font metrics
public final double portionXAdvance(java.awt.Graphics g,
java.awt.FontMetrics fm0,
boolean lastxadv)
g - the graphics context or nullfm0 - default font metricslastxadv - whether to calculate the x advance for the
next section beginning at the last character
public final double getEndDx()
public final double getAscent(java.awt.Graphics g,
java.awt.FontMetrics fm0)
g - the graphics context or nullfm0 - default font metrics
public final double getDescent(java.awt.Graphics g,
java.awt.FontMetrics fm0)
g - the graphics context or nullfm0 - default font metrics
public final MTextDocument.Portion getPortion(int start,
int end)
start - relative start positionend - relative end position
public final java.lang.String getPlainText()
public final java.lang.String toString()
public boolean endsWith(char c)
c - the character
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||