Package ptolemy.actor.gt
Class GTEntityUtils
- java.lang.Object
-
- ptolemy.actor.gt.GTEntityUtils
-
public class GTEntityUtils extends java.lang.Object
A set of utilities for handling GTEntities (instances ofGTEntity
).- Since:
- Ptolemy II 7.1
- Version:
- $Id$
- Author:
- Thomas Huining Feng
- Pt.AcceptedRating:
- Red (tfeng)
- Pt.ProposedRating:
- Yellow (tfeng)
-
-
Constructor Summary
Constructors Constructor Description GTEntityUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Method Detail
-
exportPortProperties
public static void exportPortProperties(GTEntity entity, java.io.Writer output, int depth) throws java.io.IOException
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.- Parameters:
entity
- The entity whose ports are looked at.output
- The output writer.depth
- The depth for the MoML output.- Throws:
java.io.IOException
- If the output writer cannot be written to.
-
updateAppearance
public 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.- Parameters:
entity
- The entity.attribute
- The attribute whose recent change leads to an update of the entity.
-
valueChanged
public static void valueChanged(GTEntity entity, Settable settable)
React to change of a settable contained in the entity and update the entity's appearance.- Parameters:
entity
- The entity that contains the settable.settable
- The settable whose value is changed.- See Also:
ValueListener.valueChanged(Settable)
-
-