|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.wirefusion.project.WobProperties
public abstract class WobProperties
If you want your Wob to be configurable in the WireFusion Designer, then create a subclass of this class. This class has for example the responsibility of the Properties GUI of the object (seen when selecting the Wob in WireFusion Designer), reading and writing the current configuration of the Wob to the project file and also for writing the configuration to the data file read by the corresponding player object.
| Field Summary | |
|---|---|
static int |
LOAD_AS_CLASS_LIBRARY
A resource file loading mode. |
static int |
LOAD_BEFORE_START
A resource file loading mode. |
static int |
LOAD_ON_REQUEST
A resource file loading mode. |
| Method Summary | |
|---|---|
java.io.File |
addPlayerResource(java.io.File resourceFile,
java.lang.String resourceId,
boolean addChecksumToFilename,
int loadingMode)
Adds a player resource to this Wob. |
java.io.File |
addPlayerResource(java.lang.String filenameOfResourceInWobFolder,
java.lang.String resourceId,
int loadingMode)
Adds a player resource to this Wob. |
java.io.File |
addProjectResource(java.io.File resourceFile,
java.lang.String resourceId,
boolean addChecksumToFilename)
Adds a project resource to this Wob. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a ChangeListener to this object. |
WobPort |
createPort(java.lang.String portId)
Creates and adds a port that is configured according to its corresponding port template in config.xml. |
void |
destroyPropertyEditorCollection(PropertyEditorCollection propertyEditorCollection)
Many subclasses of WobProperties implements the PropertyEditorCollectionFactory interface, which contains the two methods createPropertyEditorCollection and destroyPropertyEditorCollection. |
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Notifies all listeners that have registered interest for notification on this event type. |
java.io.File |
getFileInWobFolder(java.lang.String resourceName)
Returns a resource located in the Wob Folder (the same folder that contains the config.xml file) |
java.io.File |
getPlayerResourceById(java.lang.String resourceId)
Returns the resource file with the given resource ID, or null if no resource with the given ID exists. |
WobPort |
getPort(java.lang.String portId)
Returns the created port with the specified id. |
java.util.Enumeration |
getPorts()
Returns an enumeration all the ports (WobPort) of this Wob. |
java.io.File |
getProjectResourceById(java.lang.String resourceId)
Returns the dependency file with the given dependency ID, or null if no dependency with the given ID exists. |
double |
getSerializedWobVersion()
This method can be called from inside the readExternal method of WobProperties objects. |
TargetArea |
getTargetArea()
Returns the Target Area of this Wob, or null if it doesn't have a Target Area. |
WfUndoManager |
getUndoManager()
Returns the Undo Manager |
java.lang.String |
getWobName()
Returns the current label of the Wob, as specified by the user in the Script area. |
void |
init()
This method is always executed when a wob is loaded (from a project file, a .wob file or when it is dragged in from the Wob library). |
void |
openDialog()
This method is called when the Wob is double clicked. |
void |
readExternal(java.io.ObjectInput in)
Override to load the current state of the object from the project data file. |
void |
removePlayerResourceById(java.lang.String dependencyId)
Removes a player resource. |
void |
removeProjectResourceById(java.lang.String dependencyId)
Removes a project resource. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a ChangeListener from this object. |
java.lang.String |
toString()
Override if you want the WireFusion Designer to be able to present a string representing the objects state (in the Details view in the Script area for example). |
void |
updatePropertyEditors()
Updates all property editors associated with this Wob by destroying them and recreating them. |
abstract void |
writeData(java.io.DataOutputStream dos)
Override to write the data that the corresponding Wob object will read in its readData method. |
void |
writeExternal(java.io.ObjectOutput out)
Override to save the current state of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int LOAD_ON_REQUEST
public static final int LOAD_BEFORE_START
public static final int LOAD_AS_CLASS_LIBRARY
| Method Detail |
|---|
public void init()
public java.lang.String toString()
toString in class java.lang.Objectpublic void writeExternal(java.io.ObjectOutput out)
writeExternal in interface java.io.Externalizableout - The ObjectOutput objectExternalizable.writeExternal(ObjectOutput)public void readExternal(java.io.ObjectInput in)
readExternal in interface java.io.Externalizablein - The ObjectInput objectExternalizable.readExternal(ObjectInput)public abstract void writeData(java.io.DataOutputStream dos)
dos - a DataOutputStreampublic void openDialog()
public WfUndoManager getUndoManager()
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
ChangeListener to this object.
l - the listener to be addedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l - the listener to be removed
public void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
EventListenerList
public java.io.File addPlayerResource(java.io.File resourceFile,
java.lang.String resourceId,
boolean addChecksumToFilename,
int loadingMode)
resourceFile - a FileresourceId - You must give the resource an id that is unique among the
player and project resources of this Wob.addChecksumToFilename - true if a checksum should be added to the filename, otherwise false.loadingMode - Specifies how the resource should be loaded into the player.
Choose between the WobProperties constants LOAD_ON_REQUEST,
LOAD_BEFORE_START and LOAD_AS_CLASS_LIBRARY.
public java.io.File addPlayerResource(java.lang.String filenameOfResourceInWobFolder,
java.lang.String resourceId,
int loadingMode)
filenameOfResourceInWobFolder - the name of a resource file located in the Wob folder (do not
include the path).resourceId - You must give the resource an id that is unique among the player
and project resources of this Wob.loadingMode - Specifies how the resource should be loaded into the player.
Choose between the WobProperties constants LOAD_ON_REQUEST,
LOAD_BEFORE_START and LOAD_AS_CLASS_LIBRARY.
public java.io.File addProjectResource(java.io.File resourceFile,
java.lang.String resourceId,
boolean addChecksumToFilename)
resourceFile - a FileresourceId - You must give the resource an id that is unique among the player
and project resources of this Wob.addChecksumToFilename - true if a checksum should be added to the filename, otherwise
false.
public java.io.File getPlayerResourceById(java.lang.String resourceId)
resourceId - A resource id.
public java.io.File getProjectResourceById(java.lang.String resourceId)
resourceId - A dependency id.
public void removePlayerResourceById(java.lang.String dependencyId)
dependencyId - The id of the resource to removepublic void removeProjectResourceById(java.lang.String dependencyId)
dependencyId - The id of the resource to removepublic WobPort createPort(java.lang.String portId)
portId - the port id
public WobPort getPort(java.lang.String portId)
portId -
public java.util.Enumeration getPorts()
public java.io.File getFileInWobFolder(java.lang.String resourceName)
resourceName - the resource name.
public double getSerializedWobVersion()
public java.lang.String getWobName()
public TargetArea getTargetArea()
public void destroyPropertyEditorCollection(PropertyEditorCollection propertyEditorCollection)
propertyEditorCollection - public void updatePropertyEditors()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||