public abstract class PositionableElement
extends java.lang.Object
| Constructor and Description |
|---|
PositionableElement(NamedObj element)
Store the element that should have its location defined.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addToContainer(PortableContainer container)
Add the visual representation of the element to the provided
container.
|
NamedObj |
getElement()
Get the underlying element.
|
HomerLocation |
getLocation()
Get the location of the element.
|
java.lang.String |
getTab()
Get the location of the element.
|
void |
setLocation(int x,
int y,
int width,
int height)
Set the location of this element's representation.
|
void |
setTab(java.lang.String tag)
Set the tab attribute in the underlying named object wrapped by this element.
|
public PositionableElement(NamedObj element)
element - The object with the location defined.public abstract void addToContainer(PortableContainer container) throws IllegalActionException
container - The container to place the representation in.IllegalActionException - If the element cannot be added
to the container.public NamedObj getElement()
public HomerLocation getLocation() throws IllegalActionException
IllegalActionException - If the location of the element
is not defined.setLocation(int, int, int, int)public java.lang.String getTab()
setTab(String)public void setLocation(int x,
int y,
int width,
int height)
throws IllegalActionException
x - The x position of the top-left corner.y - The y position of the top-left corner.width - The width of the representation.height - The height of the representation.IllegalActionException - If the location cannot be set.getLocation()public void setTab(java.lang.String tag)
throws IllegalActionException
tag - The tag identifier of the tab this element belongs to.IllegalActionException - If the tab cannot be set.getTab()