public class TabDefinition
extends java.lang.Object
Constructor and Description |
---|
TabDefinition(ComponentEntity topLevel,
java.lang.String tag,
java.lang.String name)
Tab element to hold the content for visual representation.
|
Modifier and Type | Method and Description |
---|---|
void |
addContent(PositionableElement element)
Add an element to the contents of this tab.
|
java.lang.Object |
getContent()
Remove an element to the contents of this tab.
/** Return the content area of the tab.
|
java.util.ArrayList<PositionableElement> |
getElements()
Get all the elements on this tab.
|
java.lang.String |
getName()
Get the name of the tab.
|
StringAttribute |
getTabAttribute()
Get the underlying Ptolemy object representing the tab.
|
java.lang.String |
getTag()
Get the tag used to identify the tab.
|
void |
removeContent(PositionableElement element)
Remove an element to the contents of this tab.
|
void |
setContent(ContentPrototype content)
Set the content area of the tab.
|
void |
setName(java.lang.String name)
Set the name of the tab.
|
public TabDefinition(ComponentEntity topLevel, java.lang.String tag, java.lang.String name) throws IllegalActionException, NameDuplicationException
tag
- The tag used to identify this tab.name
- The name of the tab. This will used in the user
interface.topLevel
- The container containing all tab definitions. If the
container does not have the attribute that contains all tab definition
information, it will be created.NameDuplicationException
- If the name coincides with an
attribute already in the container.IllegalActionException
- If the attribute is not of an acceptable
class for the container, or if the name contains a period.public void addContent(PositionableElement element) throws IllegalActionException
element
- Ptolemy element with location defined.IllegalActionException
- If the element cannot be added to the
tab content area, or if the tab content area has not been set.setContent(ContentPrototype)
public java.lang.Object getContent()
setContent(ContentPrototype)
public java.lang.String getName()
setName(String)
public StringAttribute getTabAttribute()
public java.lang.String getTag()
public void setContent(ContentPrototype content)
content
- The content to be used in the tab.getContent()
public void setName(java.lang.String name) throws IllegalActionException
name
- The new name of the tab.IllegalActionException
- If the new name is not accepted by the model.getName()
public void removeContent(PositionableElement element) throws IllegalActionException
element
- Ptolemy element with location defined.IllegalActionException
- If the element cannot be removed from
the tab content area, or if the tab content area has not been set.public java.util.ArrayList<PositionableElement> getElements()