com.bbn.openmap.util.propertyEditor
Class MultiDirectoryPropertyEditor

java.lang.Object
  |
  +--java.beans.PropertyEditorSupport
        |
        +--com.bbn.openmap.util.propertyEditor.FilePropertyEditor
              |
              +--com.bbn.openmap.util.propertyEditor.MultiDirectoryPropertyEditor
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, java.beans.PropertyEditor
Direct Known Subclasses:
FDUPropertyEditor, MultiDirFilePropertyEditor

public class MultiDirectoryPropertyEditor
extends FilePropertyEditor

A PropertyEditor that brings up a JFileChooser panel to several files and directories. You can enter information in the text field, and pressing the add button will bring up a file chooser. Anything chosen in the file chooser will be appended to what is currently in the text field.


Field Summary
protected  char pathSeparator
           
protected  javax.swing.JTextField textField
          The GUI component of this editor.
 
Fields inherited from class com.bbn.openmap.util.propertyEditor.FilePropertyEditor
button
 
Constructor Summary
MultiDirectoryPropertyEditor()
          Create MultiDirectoryPropertyEditor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void append(java.lang.String addPath)
          Add a path to the end of the current path.
 java.lang.String getAsText()
          Returns String from JTextfield.
 java.awt.Component getCustomEditor()
          Returns a JButton that will bring up a JFileChooser dialog.
 javax.swing.JFileChooser getFileChooser()
          Returns a JFileChooser that will choose a directory.
 char getPathSeparator()
           
 void setPathSeparator(char c)
          Set the character to use when appending paths.
 void setValue(java.lang.Object string)
          Sets String in JTextField.
 
Methods inherited from class com.bbn.openmap.util.propertyEditor.FilePropertyEditor
cleanUpName, getLastLocation, supportsCustomEditor
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getJavaInitializationString, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textField

protected javax.swing.JTextField textField
The GUI component of this editor.


pathSeparator

protected char pathSeparator
Constructor Detail

MultiDirectoryPropertyEditor

public MultiDirectoryPropertyEditor()
Create MultiDirectoryPropertyEditor.

Method Detail

setPathSeparator

public void setPathSeparator(char c)
Set the character to use when appending paths.


getPathSeparator

public char getPathSeparator()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class FilePropertyEditor

getCustomEditor

public java.awt.Component getCustomEditor()
Returns a JButton that will bring up a JFileChooser dialog.

Specified by:
getCustomEditor in interface java.beans.PropertyEditor
Overrides:
getCustomEditor in class FilePropertyEditor
Returns:
JButton button

getFileChooser

public javax.swing.JFileChooser getFileChooser()
Returns a JFileChooser that will choose a directory. The MultiSelectionEnabled doesn't work yet, so we have to have a workaround.

Overrides:
getFileChooser in class FilePropertyEditor
Returns:
JFileChooser

append

public void append(java.lang.String addPath)
Add a path to the end of the current path. Uses the pathSeparator between paths.


setValue

public void setValue(java.lang.Object string)
Sets String in JTextField.

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

getAsText

public java.lang.String getAsText()
Returns String from JTextfield.

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


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details