|
VTT Java 2010 Version |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nih.nlm.nls.vtt.Model.Tag
public class Tag
This is the Tag Java object class. A tag is used to markup a selected text. A tag includes color, font, size, style, and other properties.
History:
Constructor Summary | |
---|---|
Tag()
Create a Tag Java object with default values. |
|
Tag(java.lang.String name)
Create a Tag Java object by specifying name. |
|
Tag(java.lang.String name,
java.lang.String category,
boolean display,
boolean bold,
boolean italic,
boolean underline,
java.awt.Color foreground,
java.awt.Color background,
java.lang.String fontFamily,
java.lang.String fontSize)
Create a Tag Java object by specifying name, category, display, bold, italic, underline, foreground color, background color, font family name, and font size. |
|
Tag(java.lang.String name,
java.lang.String category,
boolean bold,
boolean italic,
boolean underline,
java.awt.Color foreground,
java.awt.Color background)
Create a Tag Java object by specifying name, category, bold, italic, underline, foreground color, and background color. |
|
Tag(Tag tag)
Create a Tag Java object by specifying a tag. |
Method Summary | |
---|---|
java.awt.Color |
GetBackground()
Get the background color of text |
java.lang.String |
GetCategory()
Get the category |
static java.lang.String |
GetCategory(java.lang.String nameCategory)
Get the category by specifying nameCategory |
java.lang.String |
GetFontFamily()
Get the name of font family |
java.lang.String |
GetFontSize()
Get the size of font |
int |
GetFontSize(int baseFontSize)
Get the absolute size of font by specifying the base size |
java.awt.Color |
GetForeground()
Get the foreground color of text |
java.lang.String |
GetName()
Get the name |
static java.lang.String |
GetName(java.lang.String nameCategory)
Get the name by specifying nameCategory |
java.lang.String |
GetNameCategory()
Get the name category |
static java.lang.String |
GetNameCategory(java.lang.String name,
java.lang.String category)
Convert the name and category to nameCategory string |
boolean |
IsBold()
Get the boolean flag of bold |
boolean |
IsDisplay()
Get the boolean flag of display |
boolean |
IsItalic()
Get the boolean flag of italic |
boolean |
IsUnderline()
Get the boolean flag of underline |
void |
SetBackground(java.awt.Color background)
Set the background color in the font style |
void |
SetBold(boolean bold)
Set the bold in the font style |
void |
SetCategory(java.lang.String category)
Set the category |
void |
SetDisplay(boolean display)
Set the display |
void |
SetFontFamily(java.lang.String fontFamily)
Set the name of font family |
void |
SetFontSize(java.lang.String fontSize)
Set the size of font |
void |
SetForeground(java.awt.Color foreground)
Set the foreground color in font style |
void |
SetItalic(boolean italic)
Set the italic in the font style |
void |
SetName(java.lang.String name)
Set the name |
void |
SetTag(Tag tag)
Set tag to a specified tag |
void |
SetToTextDefault()
Set bold, italic, underline, display, font, size to default |
void |
SetUnderline(boolean underline)
Set the underline in the font style |
java.lang.String |
ToString()
Convert tag to a string representation: name|category|bold|italic|underline|display|fr|fg|fb|br|bg|bb|font|size |
static java.lang.String |
ToString(Tag tag)
Convert a specified tag to a string representation: name|category|bold|italic|underline|display|fr|fg|fb|br|bg|bb|font|size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tag()
public Tag(Tag tag)
tag
- a tag to be instantiatedpublic Tag(java.lang.String name)
name
- the name of tagpublic Tag(java.lang.String name, java.lang.String category, boolean bold, boolean italic, boolean underline, java.awt.Color foreground, java.awt.Color background)
name
- the name of tagcategory
- the category of tagbold
- bold in font styleitalic
- italic in font styleunderline
- underline in font styleforeground
- foreground color in font stylebackground
- background color in font stylepublic Tag(java.lang.String name, java.lang.String category, boolean display, boolean bold, boolean italic, boolean underline, java.awt.Color foreground, java.awt.Color background, java.lang.String fontFamily, java.lang.String fontSize)
name
- the name of tagcategory
- the category of tagdisplay
- the boolean flag of display the tagbold
- bold in font styleitalic
- italic in font styleunderline
- underline in font styleforeground
- foreground color in font stylebackground
- background color in font stylefontFamily
- name of font familyfontSize
- size of fontMethod Detail |
---|
public void SetName(java.lang.String name)
name
- of the tagpublic void SetCategory(java.lang.String category)
category
- the category of tagpublic void SetDisplay(boolean display)
display
- the boolean flag of display the tagpublic void SetBold(boolean bold)
bold
- bold in font stylepublic void SetItalic(boolean italic)
italic
- italic in the font stylepublic void SetUnderline(boolean underline)
underline
- underline in the font stylepublic void SetForeground(java.awt.Color foreground)
foreground
- foreground color in font stylepublic void SetBackground(java.awt.Color background)
background
- background color in the font stylepublic void SetFontFamily(java.lang.String fontFamily)
fontFamily
- name of font familypublic void SetFontSize(java.lang.String fontSize)
fontSize
- size of fontpublic java.lang.String GetName()
public java.lang.String GetCategory()
public java.lang.String GetNameCategory()
public static java.lang.String GetNameCategory(java.lang.String name, java.lang.String category)
public static java.lang.String GetName(java.lang.String nameCategory)
public static java.lang.String GetCategory(java.lang.String nameCategory)
public boolean IsDisplay()
public boolean IsBold()
public boolean IsItalic()
public boolean IsUnderline()
public java.awt.Color GetForeground()
public java.awt.Color GetBackground()
public java.lang.String GetFontFamily()
public java.lang.String GetFontSize()
public int GetFontSize(int baseFontSize)
public void SetTag(Tag tag)
tag
- the specified tagpublic void SetToTextDefault()
public java.lang.String ToString()
public static java.lang.String ToString(Tag tag)
|
VTT Java 2010 Version |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |