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

java.lang.Object
  extended by org.openbp.jaspira.propertybrowser.editor.standard.PathEditorCustomizer
Direct Known Subclasses:
ImagePathEditorCustomizer

public class PathEditorCustomizer
extends java.lang.Object

Component selection editor customizer. Allows to customize the display and operation of the file chooser.

Author:
Heiko Erhardt

Constructor Summary
PathEditorCustomizer()
          Default constructor.
 
Method Summary
 boolean chooserClosed(PathEditor editor, javax.swing.JFileChooser chooser, java.lang.String[] pathRef)
          Called after the chooser has been closed.
 boolean chooserInitialized(PathEditor editor, javax.swing.JFileChooser chooser, java.lang.String[] pathRef)
          Called after the chooser has been initialized.
 boolean initializeChooser(PathEditor editor, javax.swing.JFileChooser chooser, java.lang.String[] pathRef)
          Called before the chooser is being initialized.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathEditorCustomizer

public PathEditorCustomizer()
Default constructor.

Method Detail

initializeChooser

public boolean initializeChooser(PathEditor editor,
                                 javax.swing.JFileChooser chooser,
                                 java.lang.String[] pathRef)
Called before the chooser is being initialized. The method may perform additional initializations of the chooser, e. g. customize the file filter. The default implementation returns true.

Parameters:
editor - The editor
chooser - The file chooser to initialize
pathRef - Reference to the current path value. Contains exactly one string element, which can be null
Returns:
true To proceed false To cancel the chooser display

chooserInitialized

public boolean chooserInitialized(PathEditor editor,
                                  javax.swing.JFileChooser chooser,
                                  java.lang.String[] pathRef)
Called after the chooser has been initialized. The method may perform additional initializations of the chooser, e. g. set the current path. The default implementation returns true.

Parameters:
editor - The editor
chooser - The initialized file chooser
pathRef - Reference to the current path value. Contains exactly one string element, which can be null
Returns:
true To proceed false To cancel the chooser display

chooserClosed

public boolean chooserClosed(PathEditor editor,
                             javax.swing.JFileChooser chooser,
                             java.lang.String[] pathRef)
Called after the chooser has been closed. The default implementation returns true.

Parameters:
editor - The component selection editor that owns the customizer
chooser - The file chooser to display
pathRef - Reference to the current path value. Contains exactly one string element, which can be null if the cancel button was pressed
Returns:
true To accept the selected object false To abort the selection. The property the editor refers to stays unchanged.


Copyright © 2011. All Rights Reserved.