org.openbp.jaspira.propertybrowser.editor.standard
Class PathEditor

java.lang.Object
  extended by org.openbp.jaspira.propertybrowser.editor.AbstractPropertyEditor
      extended by org.openbp.jaspira.propertybrowser.editor.standard.StringEditor
          extended by org.openbp.jaspira.propertybrowser.editor.standard.PathEditor
All Implemented Interfaces:
java.awt.event.FocusListener, java.awt.event.KeyListener, java.lang.Cloneable, java.util.EventListener, javax.swing.event.DocumentListener, Copyable, PropertyEditor

public class PathEditor
extends StringEditor

File name/path editor. Property editor that allows input of a file or path name and also provides a button which will activate a file chooser dialog. This editor accepts the following parameters:
title: Dialog title
type: Type of the dialog ("open"/"save" or a custom string that will appear on the "Accept" button)
dirselection: "true" if the dialog should be used to select a directory, "false" for file selection
filter: Selecteable file filters. The first file filter will be the active one. Each entry consists
of a description and a Unix shell-compatibale pattern, e. g. "XML Files|*.xml". customizer: Name of a customizer class (must extend PathEditorCustomizer)

Author:
Heiko Erhardt

Field Summary
 
Fields inherited from class org.openbp.jaspira.propertybrowser.editor.standard.StringEditor
textField
 
Fields inherited from class org.openbp.jaspira.propertybrowser.editor.AbstractPropertyEditor
component, listener, object, owner, parameterParser, params, propertyBrowser, propertyName, readonly, validator, value, valueChanged, valueLoaded
 
Fields inherited from interface org.openbp.common.generic.Copyable
COPY_DEEP, COPY_FIRST_LEVEL, COPY_SHALLOW
 
Constructor Summary
PathEditor()
          Default constructor.
 
Method Summary
 void createComponent()
          Creates the editor component of the property editor.
 void highlight(boolean on)
          Highlights the content of the component.
 void keyPressed(java.awt.event.KeyEvent e)
          Invoked when a key has been pressed.
protected  void parseParams(EditorParameterParser parser)
          Parses the editor parameters specified in the property descriptor.
 void showBrowser()
          Shows the component browser.
 
Methods inherited from class org.openbp.jaspira.propertybrowser.editor.standard.StringEditor
changedUpdate, getComponentValue, insertUpdate, removeUpdate, setComponentValue
 
Methods inherited from class org.openbp.jaspira.propertybrowser.editor.AbstractPropertyEditor
clone, copyFrom, focusGained, focusLost, forwardKeyEvent, getComponent, getObject, getOwner, getParameterParser, getParams, getPropertyBrowser, getPropertyComponent, getPropertyName, getSafeString, getValidator, getValue, initialize, initializeComponent, isReadonly, keyReleased, keyTyped, loadProperty, propertyChanged, resetComponentDisplay, resetProperty, saveProperty, setObject, setOwner, setParams, setPropertyBrowser, setPropertyName, setReadonly, setValidator, setValue, validateProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathEditor

public PathEditor()
Default constructor.

Method Detail

createComponent

public void createComponent()
Creates the editor component of the property editor.

Overrides:
createComponent in class StringEditor

highlight

public void highlight(boolean on)
Highlights the content of the component.

Overrides:
highlight in class StringEditor
Parameters:
on - true Turns the highlight on if the component has the focus
false Turns the highlight off

parseParams

protected void parseParams(EditorParameterParser parser)
Parses the editor parameters specified in the property descriptor.

Overrides:
parseParams in class AbstractPropertyEditor
Parameters:
parser - Editor parameter parser or null if there are no parameters defined

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Invoked when a key has been pressed.

Specified by:
keyPressed in interface java.awt.event.KeyListener
Overrides:
keyPressed in class StringEditor
Parameters:
e - Key event

showBrowser

public void showBrowser()
Shows the component browser.



Copyright © 2011. All Rights Reserved.