Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sunwheeltech.sirius.support
Class FilePropertyEditor  view FilePropertyEditor download FilePropertyEditor.java

java.lang.Object
  extended bycom.sunwheeltech.sirius.support.GenericDialogPropertyEditor
      extended bycom.sunwheeltech.sirius.support.FilePropertyEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class FilePropertyEditor
extends GenericDialogPropertyEditor

Property editor for File objects with a popup dialog for browsing filesystem or text input, to allow files not present on the debvelopment system


Field Summary
(package private)  java.io.File file
          file property being edited
 
Fields inherited from class com.sunwheeltech.sirius.support.GenericDialogPropertyEditor
button, dialog, fld, inline, listeners, NULL_VALUE_LABEL, root, value
 
Constructor Summary
FilePropertyEditor()
           
 
Method Summary
 java.lang.String getAsText()
          retrieve valid text representation of current value of the field.
 java.lang.String getJavaInitializationString()
          get the code that will initialise the value
 java.lang.Object getValue()
          get the value of the property being edited
 void makeGUI()
          customise the dialog for browsing files etc.
 java.lang.Object parseDialogResult(java.lang.Object obj)
          implementation of a method that parses the Item returned by the dialog
 java.lang.Object parseTextInput(java.lang.String str)
          set the value of the property from the text input - try to create a url from the text.
 void setValue(java.lang.Object obj)
          set the value of the property being edited
protected  void syncDialogToText()
          match dialog value to text input, as the text has just been altered.
 
Methods inherited from class com.sunwheeltech.sirius.support.GenericDialogPropertyEditor
addPropertyChangeListener, firePropertyChange, getCustomEditor, getRoot, getTags, isPaintable, paintValue, removePropertyChangeListener, revertText, setAsText, setRoot, supportsCustomEditor, syncTextToDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

java.io.File file
file property being edited

Constructor Detail

FilePropertyEditor

public FilePropertyEditor()
Method Detail

getValue

public java.lang.Object getValue()
get the value of the property being edited

Specified by:
getValue in interface java.beans.PropertyEditor
Overrides:
getValue in class GenericDialogPropertyEditor

setValue

public void setValue(java.lang.Object obj)
set the value of the property being edited

Specified by:
setValue in interface java.beans.PropertyEditor
Overrides:
setValue in class GenericDialogPropertyEditor

makeGUI

public void makeGUI()
customise the dialog for browsing files etc.

Overrides:
makeGUI in class GenericDialogPropertyEditor

getAsText

public java.lang.String getAsText()
retrieve valid text representation of current value of the field. By default, returns the toString() of the current view's referred object, or "null" if empty

Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class GenericDialogPropertyEditor

parseTextInput

public java.lang.Object parseTextInput(java.lang.String str)
set the value of the property from the text input - try to create a url from the text. (It only checks for well-formedness of the URL, doesn't try to connect to it)

Overrides:
parseTextInput in class GenericDialogPropertyEditor

parseDialogResult

public java.lang.Object parseDialogResult(java.lang.Object obj)
implementation of a method that parses the Item returned by the dialog

Overrides:
parseDialogResult in class GenericDialogPropertyEditor

syncDialogToText

protected void syncDialogToText()
match dialog value to text input, as the text has just been altered. See if the url is file or zip or jar-class protocol, and try to set the dialog to point to that item's parent folder

Overrides:
syncDialogToText in class GenericDialogPropertyEditor

getJavaInitializationString

public java.lang.String getJavaInitializationString()
get the code that will initialise the value

Specified by:
getJavaInitializationString in interface java.beans.PropertyEditor
Overrides:
getJavaInitializationString in class GenericDialogPropertyEditor