|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.actor.gui.UserActorLibrary
public class UserActorLibrary
Access the User Actor Library.
Red (neuendor) |
Red (neuendor) |
Field Summary | |
---|---|
static java.lang.String |
USER_LIBRARY_NAME
The name of the user library. |
Constructor Summary | |
---|---|
UserActorLibrary()
|
Method Summary | |
---|---|
private static void |
_instantiateLibrary(CompositeEntity library,
ModelDirectory directory,
Configuration configuration,
java.io.File file,
CompositeEntity libraryContainer,
PtolemyEffigy finalLibraryEffigy)
instantiate a ComponentEntity and create the changeRequest to implement it in the model |
static void |
openLibrary(Configuration configuration,
java.io.File file)
Open the MoML file at the given location as a new library in the actor library for this application. |
static void |
openUserLibrary(Configuration configuration)
Open the user actor library as a new library in the actor library for this application. |
static void |
saveComponentInLibrary(Configuration configuration,
Entity entity)
Save the given entity in the user library in the given configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String USER_LIBRARY_NAME
This variable is not final so that users of this class may change it.
Constructor Detail |
---|
public UserActorLibrary()
Method Detail |
---|
public static void openUserLibrary(Configuration configuration) throws java.lang.Exception
The name of the user actor library consists of the
values of StringUtilities.preferencesDirectory()
and USER_LIBRARY_NAME
and ".xml" concatenated.
An alternate class can be used to build the library if reading the MoML is not desired. The class must extend ptolemy.moml.LibraryBuilder and the _alternateLibraryBuilder property must be set with the 'value' set to the class that extends LibraryBuilder.
configuration
- The configuration where we look for the
actor library.
java.lang.Exception
- If there is a problem opening the configuration,
opening the MoML file, or opening the MoML file as a new library.public static void openLibrary(Configuration configuration, java.io.File file) throws java.lang.Exception
configuration
- The configuration where we look for the
actor library.file
- The MoML file to open.
java.lang.Exception
- If there is a problem opening the
configuration, opening the MoML file, or opening the MoML file
as a new library.public static void saveComponentInLibrary(Configuration configuration, Entity entity) throws java.io.IOException, IllegalActionException
configuration
- The configuration.entity
- The entity to save.
java.io.IOException
- if the user library cannot be found.
IllegalActionException
- If there is a problem creating
the entity in the library.private static void _instantiateLibrary(CompositeEntity library, ModelDirectory directory, Configuration configuration, java.io.File file, CompositeEntity libraryContainer, PtolemyEffigy finalLibraryEffigy) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |