|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.actor.gt.GTEntityUtils
public class GTEntityUtils
A set of utilities for handling GTEntities (instances of GTEntity
).
Red (tfeng) |
Yellow (tfeng) |
Nested Class Summary | |
---|---|
private static class |
GTEntityUtils.LoadActorIconChangeRequest
A change request to copy the icon of a newly created entity within a container to a given GTEntity. |
private static class |
GTEntityUtils.RestoreAppearanceChangeRequest
A change request to restore the default icon of an entity. |
Constructor Summary | |
---|---|
GTEntityUtils()
|
Method Summary | |
---|---|
private static void |
_loadActorIcon(GTEntity entity,
java.lang.String actorClassName)
Load the default icon of the actor specified in the class with name actorClassName, and set the entity with that icon. |
private static boolean |
_removeEditorIcons(GTEntity entity)
Remove the EditorIcons defined for the entity. |
private static void |
_setIconDescription(GTEntity entity,
java.lang.String iconDescription)
Set the icon description for the entity. |
static void |
exportPortProperties(GTEntity entity,
java.io.Writer output,
int depth)
For each port of the given entity, if the port's derived level is greater than 0 (i.e., it is created automatically by the entity), store the persistent attributes of the port in a "port" XML element. |
static void |
updateAppearance(GTEntity entity,
GTIngredientsAttribute attribute)
Update the appearance (icons and ports) of the entity with the change in a GTIngredientAttribute, such as a criterion or an operation. |
static void |
valueChanged(GTEntity entity,
Settable settable)
React to change of a settable contained in the entity and update the entity's appearance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GTEntityUtils()
Method Detail |
---|
public static void exportPortProperties(GTEntity entity, java.io.Writer output, int depth) throws java.io.IOException
entity
- The entity whose ports are looked at.output
- The output writer.depth
- The depth for the MoML output.
java.io.IOException
- If the output writer cannot be written to.public static void updateAppearance(GTEntity entity, GTIngredientsAttribute attribute)
entity
- The entity.attribute
- The attribute whose recent change leads to an update of
the entity.public static void valueChanged(GTEntity entity, Settable settable)
entity
- The entity that contains the settable.settable
- The settable whose value is changed.ValueListener.valueChanged(Settable)
private static void _loadActorIcon(GTEntity entity, java.lang.String actorClassName) throws java.lang.Exception
entity
- The entity whose icon is to be set.actorClassName
- The class name of the actor for loading the
default icon.
java.lang.Exception
- If the icon cannot be set for the entity.private static boolean _removeEditorIcons(GTEntity entity) throws KernelException
entity
- The entity.
KernelException
- If error occurs while removing the
EditorIcons.private static void _setIconDescription(GTEntity entity, java.lang.String iconDescription) throws java.lang.Exception
entity
- The entity.iconDescription
- The icon description.
java.lang.Exception
- If an icon description cannot be created, or it
cannot be associated with the entity.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |