ptolemy.actor.gt
Class GTEntityUtils.LoadActorIconChangeRequest

java.lang.Object
  extended by ptolemy.kernel.util.ChangeRequest
      extended by ptolemy.actor.gt.GTEntityUtils.LoadActorIconChangeRequest
Enclosing class:
GTEntityUtils

private static class GTEntityUtils.LoadActorIconChangeRequest
extends ChangeRequest

A change request to copy the icon of a newly created entity within a container to a given GTEntity.

Since:
Ptolemy II 7.1
Version:
$Id: GTEntityUtils.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Thomas Huining Feng
Accepted Rating:
Red (tfeng)
Proposed Rating:
Yellow (tfeng)

Field Summary
private  CompositeEntity _container
          The container of a single entity to retrieve the icon.
private  GTEntity _entity
          The entity to which the icon is to be copied.
 
Constructor Summary
GTEntityUtils.LoadActorIconChangeRequest(GTEntity entity, CompositeEntity container)
          Construct a change request to copy the icon of a newly created entity within a container to a given GTEntity.
 
Method Summary
protected  void _execute()
          Execute the change request by retrieving the icon description or EditorIcon of the single entity in the container given in the constructor and copying it to the entity given in the constructor.
 
Methods inherited from class ptolemy.kernel.util.ChangeRequest
addChangeListener, execute, getDescription, getLocality, getSource, isErrorReported, isPersistent, isStructuralChange, removeChangeListener, setDescription, setErrorReported, setListeners, setPersistent, waitForCompletion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_container

private CompositeEntity _container
The container of a single entity to retrieve the icon.


_entity

private GTEntity _entity
The entity to which the icon is to be copied.

Constructor Detail

GTEntityUtils.LoadActorIconChangeRequest

public GTEntityUtils.LoadActorIconChangeRequest(GTEntity entity,
                                                CompositeEntity container)
Construct a change request to copy the icon of a newly created entity within a container to a given GTEntity.

Parameters:
entity - The entity whose icon is to be set.
container - The container of a single entity inside, which has the icon to be copied.
Method Detail

_execute

protected void _execute()
                 throws java.lang.Exception
Execute the change request by retrieving the icon description or EditorIcon of the single entity in the container given in the constructor and copying it to the entity given in the constructor.

Specified by:
_execute in class ChangeRequest
Throws:
java.lang.Exception - If the icon cannot be retrieved, or it cannot be associated with the entity.