com.tensegrity.gui.swing.customattribute
Class DirectoryLocationEditor

java.lang.Object
  extended bycom.tensegrity.gui.swing.customattribute.DirectoryLocationEditor
All Implemented Interfaces:
CustomAttributeEditor

public class DirectoryLocationEditor
extends java.lang.Object
implements CustomAttributeEditor

The DirectoryLocationEditor implementation based on a JFileChooser to let users select a directory destination.

Version:
$Id: DirectoryLocationEditor.java,v 1.5 2005/03/17 08:32:29 BurkhardWick Exp $
Author:
Gilles Iachelini

Constructor Summary
DirectoryLocationEditor()
          Creates the FileEditor.
 
Method Summary
 java.lang.Object getComponent(CustomAttributeEditorEnvironment environment)
          As a FileEditor we do not return a Component for inplace editing, rather rely on our own implementation, which bases on the JFileChooser.
 java.lang.Object getValue()
          Returns a File instance from the given text.
 boolean isStandalone()
          Returns true for all editors that display a modal dialog for editing of the value.
 void setValue(java.lang.Object value)
          Sets the value on the editor.
 void showEditor(CustomAttributeEditorEnvironment environment)
          This method will be invoked to initiate the editing process.
 boolean wasCanceled()
          This method is checked right after the showEditor method returns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryLocationEditor

public DirectoryLocationEditor()
Creates the FileEditor.

Method Detail

setValue

public void setValue(java.lang.Object value)
Description copied from interface: CustomAttributeEditor
Sets the value on the editor.

Specified by:
setValue in interface CustomAttributeEditor
Parameters:
value - the value to be edited.
See Also:
CustomAttributeEditor.setValue(Object)

getValue

public java.lang.Object getValue()
Returns a File instance from the given text. That means, that we write the new text to the file.

Specified by:
getValue in interface CustomAttributeEditor
Returns:
the currently edited value.
See Also:
CustomAttributeEditor.getValue()

isStandalone

public boolean isStandalone()
Description copied from interface: CustomAttributeEditor
Returns true for all editors that display a modal dialog for editing of the value. It returns false if the editor will provide an in-place editor which will be shown inside of the AttributeEditor.

Specified by:
isStandalone in interface CustomAttributeEditor
Returns:
true for editors that are using a modal dialog for editing
See Also:
CustomAttributeEditor.isStandalone()

wasCanceled

public boolean wasCanceled()
Description copied from interface: CustomAttributeEditor
This method is checked right after the showEditor method returns. If an editor returns true, no further changes are made to the value and the whole editing process is treated as it was canceled by the user.

Specified by:
wasCanceled in interface CustomAttributeEditor
Returns:
true, if the editor was canceled.
See Also:
CustomAttributeEditor.wasCanceled()

getComponent

public java.lang.Object getComponent(CustomAttributeEditorEnvironment environment)
As a FileEditor we do not return a Component for inplace editing, rather rely on our own implementation, which bases on the JFileChooser.

Specified by:
getComponent in interface CustomAttributeEditor
Parameters:
environment - The environment with information about where the editor will be used.
Returns:
an instance of Component to be used as an editor.
See Also:
CustomAttributeEditor.getComponent(CustomAttributeEditorEnvironment)

showEditor

public void showEditor(CustomAttributeEditorEnvironment environment)
Description copied from interface: CustomAttributeEditor
This method will be invoked to initiate the editing process. For all those editors which are standalone this call is useful to open the frame, window,dialog or whatever is used to realize the editor. This method has to be synchronous, so that the method will return after editing is completely finished.

Specified by:
showEditor in interface CustomAttributeEditor
Parameters:
environment - The environment with information about where the editor will be used.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.