public class LayoutParser
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LayoutParser.ScreenOrientation
The different screen orientations possible for the visual
representation.
|
Constructor and Description |
---|
LayoutParser(CompositeEntity topLevelActor)
Parse the layout XML file so that the screen display
can be set up according to the user's preferences.
|
Modifier and Type | Method and Description |
---|---|
LayoutParser.ScreenOrientation |
getOrientation()
Get the orientation of the screen from the parsed layout file.
|
java.util.ArrayList<AttributeElement> |
getPositionableAttributes()
Get the attributes with positions defined in the layout file.
|
java.util.HashSet<NamedObj> |
getPositionableElements()
Return all elements in the model that has its positions defined.
|
java.util.ArrayList<EntityElement> |
getPositionableEntities()
Get the entities with positions defined.
|
java.util.HashSet<NamedObj> |
getProxyElements()
Return all the elements in the model marked as proxies.
|
java.util.ArrayList<TabDefinition> |
getTabDefinitions()
Get the parsed tabs defined in the layout file.
|
static boolean |
isPositionable(NamedObj node)
Return true if the node has location defined.
|
public LayoutParser(CompositeEntity topLevelActor)
topLevelActor
- Top-level actor of the parsed model file.public LayoutParser.ScreenOrientation getOrientation()
public java.util.ArrayList<TabDefinition> getTabDefinitions() throws IllegalActionException, NameDuplicationException
IllegalActionException
- If a tab description is incorrectNameDuplicationException
- If there's an error setting the
style due to naming issues.public java.util.ArrayList<EntityElement> getPositionableEntities() throws IllegalActionException
IllegalActionException
- If an entity does not
implement PortablePlaceable
or if
the location information is invalid for any of the entities.public java.util.ArrayList<AttributeElement> getPositionableAttributes() throws IllegalActionException
IllegalActionException
- If the location information is invalid
for any of the attributes, or if the attribute is not Settable.public java.util.HashSet<NamedObj> getProxyElements()
public java.util.HashSet<NamedObj> getPositionableElements()
public static boolean isPositionable(NamedObj node)
node
- The named object to check.