public class Tag extends Object
Constructor and Description |
---|
Tag(String name) |
Tag(String name,
String text) |
Tag(String name,
Tag tag) |
Tag(String name,
Text text) |
Modifier and Type | Method and Description |
---|---|
void |
addTag(Tag tag)
Adds a component to this tag.
|
void |
addTag(Tag tag,
int ind)
Adds a component to this tag in a specified position.
|
void |
addText(String text) |
void |
addText(Text text) |
Tag |
getEmptyCopy()
Returns a copy without any nested tags.
|
Tag |
getFirstTag(String name) |
String |
getName() |
Iterator |
getPropertiesNames()
Returns all properties names.
|
String |
getPropertyValue(String name)
Returns a property value.
|
Style |
getStyle()
Returns the "style" property as a Style object.
|
Tag |
getTag(int ind)
Returns a tag by order of adiction.
|
String |
getText()
Returns all text without any format.
|
Tag |
removeFirstTag(String name) |
void |
removeProperty(String name)
Remove a property form this tag.
|
Tag |
removeTag(int ind)
Remove and returns a tag by order of adiction.
|
void |
setName(String name) |
void |
setPropertyValue(String name,
String property)
Sets a property value.
|
Iterator |
tags()
Returns all tags.
|
Object[] |
tagsArray()
Returns all tags.
|
ArrayList |
tagsCollection()
Returns all tags.
|
public Tag(String name)
public void setPropertyValue(String name, String property)
name
- The property's name.property
- The property's value.public Style getStyle()
public String getPropertyValue(String name)
name
- The property's name.public void removeProperty(String name)
name
- The property's name.public Iterator getPropertiesNames()
public void addTag(Tag tag)
tag
- The Component object.public void addTag(Tag tag, int ind)
tag
- The Component object.ind
- The position of the Component object.public void addText(String text)
public void addText(Text text)
public Tag getTag(int ind)
public Tag removeTag(int ind)
public Iterator tags()
public ArrayList tagsCollection()
public Object[] tagsArray()
public void setName(String name)
name
- The name to set.public String getName()
public String getText()
public Tag getEmptyCopy()
Copyright © 2015. All rights reserved.