| com.sun.rave.designtime.DesignIde
DesignIde | public interface DesignIde (Code) | | A DesignIde is a top-level container for DesignProjects at design-time.
The DesignIde represents the Creator IDE itself. Not much can be done with
DesignIde in the Creator Design-Time API, except for accessing DesignProjects,
listening to project-level events, and storing user-level data.
IMPLEMENTED BY CREATOR - This interface is implemented by Creator
for use by the component (bean) author.
since: Mako |
addDesignIdeListener | public void addDesignIdeListener(DesignIdeListener listener)(Code) | | Adds a listener to this DesignIde
Parameters: listener - The desired listener to add |
createDesignProject | public DesignProject createDesignProject(Map projectData)(Code) | | Creates a new DesignProject for this IDE.
FIXME - decide on paramete3rs to createDesignContext() method
Parameters: projectData - A Map of project data to apply to the newlycreated project The newly created DesignProject, or null if the operationwas unsuccessful |
getDesignIdeListeners | public DesignIdeListener[] getDesignIdeListeners()(Code) | | Returns the array of current listeners to this DesignIde
An array of listeners currently listening to this DesignIde |
getDesignProjects | public DesignProject[] getDesignProjects()(Code) | | Returns all the DesignProjects in this IDE. There will be one
DesignProject for each open project in the IDE.
An array of DesignProject objects |
getIdeData | public Object getIdeData(String key)(Code) | | Retrieves the value for a global name-value pair of data. This
name-value pair will be stored in the associated user settings file
(as text), so this data is retrievable in any IDE session once it
has been set.
NOTE: The 'data' Object can be a simple String or a complex
(non-String) Object. Either way, it will be stored as text in IDE
state and will be associated with this IDE. When the IDE state is
written to disk, any complex (non-String) objects will be converted
to String using the 'toString()' method. If a component author wishes to
store a complex (non-String) object, they must be sure to override the
'toString()' method on their object to serialize out enough information
to be able to restore the object when a subsequent call to 'getIdeData'
returns a String. Though a complex object was stored via the
'setIdeData' method, a component author *may* get back a String from
'getIdeData' if the IDE has been closed and reopened since the previous
call to 'setIdeData'. It is the responsibility of the component author
to reconstruct the complex object from the String, and if desired, put
it back into the context using the 'setIdeData' method passing the newly
constructed object in. This way, all subsequent calls to 'getIdeData'
with that key will return the complex object instance - until the
IDE is closed and restored.
Parameters: key - The desired String key to retrieve the data object for The data object that is currently stored under this key -this may be a String or an Object, based on what was stored using'setIdeData'. NOTE: This will always be a String after the usersettings are read from disk, even if the stored object was not aString - it will have been converted using the 'toString()' method. See Also: DesignIde.setIdeData(StringObject) |
removeDesignIdeListener | public void removeDesignIdeListener(DesignIdeListener listener)(Code) | | Removes a listener from this DesignIde
Parameters: listener - The desired listener to remove |
removeDesignProject | public boolean removeDesignProject(DesignProject project)(Code) | | Removes an existing DesignProject from this IDE.
Parameters: project - The desired DesignProject to remove from the IDE true if the operation was successful,false if not |
setIdeData | public void setIdeData(String key, Object data)(Code) | | Sets a global name-value pair of data. This name-value pair will be
stored in the associated user settings file (as text), so this data is
retrievable in a future IDE session.
NOTE: The 'data' Object can be a simple String or a complex
(non-String) Object. Either way, it will be stored as text in IDE
state and will be associated with this IDE. When the IDE state is
written to disk, any complex (non-String) objects will be converted to
String using the 'toString()' method. If a component author wishes to
store a complex (non-String) object, they must be sure to override the
'toString()' method on their object to serialize out enough information
to be able to restore the object when a subsequent call to 'getGlobalData'
returns a String. Though a complex object was stored via the
'setIdeData' method, a component author *may* get back a String from
'getIdeData' if the IDE has been closed and reopened since the
previous call to 'setIdeData'. It is the responsibility of the
component author to reconstruct the complex object from the String,
and if desired, put it back into the context using the 'setIdeData'
method passing the newly constructed object in. This way, all subsequent
calls to 'getIdeData' with that key will return the complex object
instance - until the IDE is closed and restored.
Parameters: key - The String key to store the data object under Parameters: data - The data object to store - this may be a String or anycomplex object, but it will be stored as a string using the'toString()' method when the user settings are written to disk. See Also: DesignIde.getIdeData(String) |
|
|