|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.zion.jbuddy.richcontent.RichContentTokenizer
public final class RichContentTokenizer
Traverses the content and attributes of RichContent
.
Example usage:
All methods in this class are synchronized and thread-safe.
RichContent
,
Serialized FormField Summary | |
---|---|
static int |
BACKGROUND_COLOR
A token type. |
static int |
BOLD
A token type. |
static int |
COLOR
A token type. |
static int |
FONT
A token type. |
static int |
FONT_SIZE
A token type. |
static int |
ITALIC
A token type. |
static int |
STRIKE_THROUGH
A token type. |
static int |
SUBSCRIPT
A token type. |
static int |
SUPERSCRIPT
A token type. |
static int |
TEXT
A token type. |
static int |
UNDERLINE
A token type. |
static int |
URL
A token type. |
Constructor Summary | |
---|---|
RichContentTokenizer(RichContent content)
Creates a RichContentTokenizer that traverses over the specified content. |
Method Summary | |
---|---|
int |
countTokens()
Calculates the number of times that nextToken() can be called
before it throws a NoSuchElementException . |
boolean |
equals(Object v)
Returns true if the specified object is a RichContentTokenizer object and is traversing the same text and attributes as this one. |
int |
getBackgroundColor()
Returns the current token's background color. |
int |
getColor()
Returns the current token's color. |
String |
getFont()
Returns the current token's font face. |
int |
getFontSize()
Returns the current token's font size. |
String |
getText()
Returns the current token's text. |
String |
getUrl()
Returns the current token's hyperlink URL. |
boolean |
hasMoreTokens()
Returns true if there are more tokens available. |
boolean |
isBold()
Returns whether the current token is bold. |
boolean |
isItalic()
Returns whether the current token is italic. |
boolean |
isStrikeThrough()
Returns whether the current token has a strike-through effect. |
boolean |
isSubscript()
Returns whether the current token is subscript. |
boolean |
isSuperscript()
Returns whether the current token is superscript. |
boolean |
isUnderline()
Returns whether the current token is underlined. |
int |
nextToken()
Retrieves the next token and returns its type. |
String |
toString()
Returns a string representation of this tokenizer. |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int TEXT
getText()
,
nextToken()
,
Constant Field Valuespublic static final int COLOR
getColor()
,
nextToken()
,
Constant Field Valuespublic static final int BACKGROUND_COLOR
getBackgroundColor()
,
nextToken()
,
Constant Field Valuespublic static final int FONT
getFont()
,
nextToken()
,
Constant Field Valuespublic static final int FONT_SIZE
getFontSize()
,
nextToken()
,
Constant Field Valuespublic static final int URL
getUrl()
,
nextToken()
,
Constant Field Valuespublic static final int BOLD
isBold()
,
nextToken()
,
Constant Field Valuespublic static final int ITALIC
isItalic()
,
nextToken()
,
Constant Field Valuespublic static final int STRIKE_THROUGH
isStrikeThrough()
,
nextToken()
,
Constant Field Valuespublic static final int SUBSCRIPT
isSubscript()
,
nextToken()
,
Constant Field Valuespublic static final int SUPERSCRIPT
isSuperscript()
,
nextToken()
,
Constant Field Valuespublic static final int UNDERLINE
isUnderline()
,
nextToken()
,
Constant Field ValuesConstructor Detail |
---|
public RichContentTokenizer(RichContent content)
Method Detail |
---|
public int nextToken()
TEXT
, call getText()
to retrieve its value.
See the documentation for the static types in this class for more information.
public boolean hasMoreTokens()
nextToken()
will throw a
NoSuchElementException
.
public int countTokens()
nextToken()
can be called
before it throws a NoSuchElementException
.
public String getText()
public int getColor()
public int getBackgroundColor()
public String getFont()
public int getFontSize()
public String getUrl()
public boolean isBold()
public boolean isItalic()
public boolean isStrikeThrough()
public boolean isSubscript()
public boolean isSuperscript()
public boolean isUnderline()
public boolean equals(Object v)
equals
in class Object
public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |