com.wirefusion.propertyeditor
Class FilePropertyEditor

java.lang.Object
  extended by com.wirefusion.propertyeditor.WfPropertyEditor
      extended by com.wirefusion.propertyeditor.FilePropertyEditor

public class FilePropertyEditor
extends WfPropertyEditor

This editor is intended for file selection.


Field Summary
 
Fields inherited from class com.wirefusion.propertyeditor.WfPropertyEditor
LEFT_POSITION, TOP_POSITION
 
Constructor Summary
FilePropertyEditor(java.lang.String propertyId, java.lang.String label, java.io.File file, java.lang.String[] fileFormats, java.lang.String[] fileDescriptions, java.io.File defaultFolder, java.lang.String defaultFolderID, boolean isImageFile)
          Constructs a FilePropertyEditor object. new FilePropertyEditor("fileChanged", Messages.getString("ImageProperties.Image"), getImageFile(), new String[] { "gif", "jpg", "jpeg", "png" }, null, defaultFolder, "image", true); fileEditor.setDefaultTextDimension(getWobModel().getOperatorAreaModel().getOperatorArea().getSize());
 
Method Summary
 void setDefaultTextDimension(java.awt.Dimension dim)
          Only has effect if this is an image file property.
 void setEnabled(boolean enabled)
          Enables or disables this component, depending on the value of the parameter enabled.
 
Methods inherited from class com.wirefusion.propertyeditor.WfPropertyEditor
addPropertyChangeListener, firePropertyChange, getEditor, getInfoString, getPropertyId, isEnabled, removePropertyChangeListener, setLabelPosition, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilePropertyEditor

public FilePropertyEditor(java.lang.String propertyId,
                          java.lang.String label,
                          java.io.File file,
                          java.lang.String[] fileFormats,
                          java.lang.String[] fileDescriptions,
                          java.io.File defaultFolder,
                          java.lang.String defaultFolderID,
                          boolean isImageFile)
Constructs a FilePropertyEditor object. new FilePropertyEditor("fileChanged", Messages.getString("ImageProperties.Image"), getImageFile(), new String[] { "gif", "jpg", "jpeg", "png" }, null, defaultFolder, "image", true); fileEditor.setDefaultTextDimension(getWobModel().getOperatorAreaModel().getOperatorArea().getSize());

Parameters:
propertyId - the property ID
label - the label
file - the file
fileFormats - the file formats Example value: new String[] {"gif", "jpg", "jpeg", "png"}
fileDescriptions - file descriptions. Use null if no descriptions wanted.
defaultFolder - the default folder to open when the user opens the file dialog. Use null if a "standard folder" should be used as default.
defaultFolderID - WireFusion will associate the file dialog of this property editor with this ID and remembers the folder last used under this ID. Example: Lets say "myId" is used, and the user open the folder "c:\\images\". Next time the user opens a file dialog associated with "myId", it will be opened in "c:\\images\" (even if another default folder is specified).
isImageFile - specifies if the file value is an image file
Method Detail

setEnabled

public void setEnabled(boolean enabled)
Description copied from class: WfPropertyEditor
Enables or disables this component, depending on the value of the parameter enabled. If disabled, the ditor does not respond to user input. All subclasses of this class may not support being disabled.

Overrides:
setEnabled in class WfPropertyEditor
Parameters:
enabled - If true, this editor is enabled; otherwise the editor is disabled.

setDefaultTextDimension

public void setDefaultTextDimension(java.awt.Dimension dim)
Only has effect if this is an image file property. The default dimension of the "text image creation tool" in the image dialog will be the value set with this method.

Parameters:
dim - the default text image dimension.