com.vwp.swing
Class DynFileChooser

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JFileChooser
                  extended by com.vwp.swing.DynFileChooser
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class DynFileChooser
extends JFileChooser

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Field Summary
static String EXT_RSHAPE
           
static int FC_ALL
          These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser.
static int FC_COB
          These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser.
static int FC_DIRONLY
          These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser.
static int FC_HF
          These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser.
static int FC_IMG
          These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser.
static int FC_IMGPNG
          These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser.
static int FC_RSHAPE
          These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser.
static int FC_SCN
          These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser.
static int FC_TEXT
          These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser.
static int FC_VUHMAP
          These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser.
 
Fields inherited from class javax.swing.JFileChooser
ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY, ACCESSORY_CHANGED_PROPERTY, APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY, APPROVE_BUTTON_TEXT_CHANGED_PROPERTY, APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY, APPROVE_OPTION, APPROVE_SELECTION, CANCEL_OPTION, CANCEL_SELECTION, CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY, CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY, CUSTOM_DIALOG, DIALOG_TITLE_CHANGED_PROPERTY, DIALOG_TYPE_CHANGED_PROPERTY, DIRECTORIES_ONLY, DIRECTORY_CHANGED_PROPERTY, ERROR_OPTION, FILE_FILTER_CHANGED_PROPERTY, FILE_HIDING_CHANGED_PROPERTY, FILE_SELECTION_MODE_CHANGED_PROPERTY, FILE_SYSTEM_VIEW_CHANGED_PROPERTY, FILE_VIEW_CHANGED_PROPERTY, FILES_AND_DIRECTORIES, FILES_ONLY, MULTI_SELECTION_ENABLED_CHANGED_PROPERTY, OPEN_DIALOG, SAVE_DIALOG, SELECTED_FILE_CHANGED_PROPERTY, SELECTED_FILES_CHANGED_PROPERTY
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DynFileChooser(int Mode)
          Public constructor, creates a new dynamic filechooser object
DynFileChooser(int Mode, String CustomExt, String CustomExtDescr)
          Public constructor, creates a new dynamic filechooser object
 
Method Summary
 boolean openDialog()
          Displays the FileChooser as a Load-dialog.
 boolean openDialog(String title)
          Displays the FileChooser as a Load-dialog.
 boolean saveDialog()
          Displays the FileChooser as a Save-dialog.
 boolean saveDialog(String title)
          Displays the FileChooser as a Save-dialog.
 
Methods inherited from class javax.swing.JFileChooser
accept, addActionListener, addChoosableFileFilter, approveSelection, cancelSelection, changeToParentDirectory, ensureFileIsVisible, getAcceptAllFileFilter, getAccessibleContext, getAccessory, getActionListeners, getApproveButtonMnemonic, getApproveButtonText, getApproveButtonToolTipText, getChoosableFileFilters, getControlButtonsAreShown, getCurrentDirectory, getDescription, getDialogTitle, getDialogType, getDragEnabled, getFileFilter, getFileSelectionMode, getFileSystemView, getFileView, getIcon, getName, getSelectedFile, getSelectedFiles, getTypeDescription, getUI, getUIClassID, isAcceptAllFileFilterUsed, isDirectorySelectionEnabled, isFileHidingEnabled, isFileSelectionEnabled, isMultiSelectionEnabled, isTraversable, removeActionListener, removeChoosableFileFilter, rescanCurrentDirectory, resetChoosableFileFilters, setAcceptAllFileFilterUsed, setAccessory, setApproveButtonMnemonic, setApproveButtonMnemonic, setApproveButtonText, setApproveButtonToolTipText, setControlButtonsAreShown, setCurrentDirectory, setDialogTitle, setDialogType, setDragEnabled, setFileFilter, setFileHidingEnabled, setFileSelectionMode, setFileSystemView, setFileView, setMultiSelectionEnabled, setSelectedFile, setSelectedFiles, showDialog, showOpenDialog, showSaveDialog, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FC_HF

public static final int FC_HF
These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser. All flags can be ORed, except FC_DIRONLY and FC_ALL which have to be set exclusive. FC_DIRONLY lets the FileChooser only show directories, FC_ALL disables all Filefilters and lets the FileChooser display all files.

See Also:
Constant Field Values

FC_IMG

public static final int FC_IMG
These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser. All flags can be ORed, except FC_DIRONLY and FC_ALL which have to be set exclusive. FC_DIRONLY lets the FileChooser only show directories, FC_ALL disables all Filefilters and lets the FileChooser display all files.

See Also:
Constant Field Values

FC_VUHMAP

public static final int FC_VUHMAP
These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser. All flags can be ORed, except FC_DIRONLY and FC_ALL which have to be set exclusive. FC_DIRONLY lets the FileChooser only show directories, FC_ALL disables all Filefilters and lets the FileChooser display all files.

See Also:
Constant Field Values

FC_IMGPNG

public static final int FC_IMGPNG
These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser. All flags can be ORed, except FC_DIRONLY and FC_ALL which have to be set exclusive. FC_DIRONLY lets the FileChooser only show directories, FC_ALL disables all Filefilters and lets the FileChooser display all files.

See Also:
Constant Field Values

FC_COB

public static final int FC_COB
These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser. All flags can be ORed, except FC_DIRONLY and FC_ALL which have to be set exclusive. FC_DIRONLY lets the FileChooser only show directories, FC_ALL disables all Filefilters and lets the FileChooser display all files.

See Also:
Constant Field Values

FC_SCN

public static final int FC_SCN
These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser. All flags can be ORed, except FC_DIRONLY and FC_ALL which have to be set exclusive. FC_DIRONLY lets the FileChooser only show directories, FC_ALL disables all Filefilters and lets the FileChooser display all files.

See Also:
Constant Field Values

FC_TEXT

public static final int FC_TEXT
These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser. All flags can be ORed, except FC_DIRONLY and FC_ALL which have to be set exclusive. FC_DIRONLY lets the FileChooser only show directories, FC_ALL disables all Filefilters and lets the FileChooser display all files.

See Also:
Constant Field Values

FC_RSHAPE

public static final int FC_RSHAPE
These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser. All flags can be ORed, except FC_DIRONLY and FC_ALL which have to be set exclusive. FC_DIRONLY lets the FileChooser only show directories, FC_ALL disables all Filefilters and lets the FileChooser display all files.

See Also:
Constant Field Values

FC_DIRONLY

public static final int FC_DIRONLY
These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser. All flags can be ORed, except FC_DIRONLY and FC_ALL which have to be set exclusive. FC_DIRONLY lets the FileChooser only show directories, FC_ALL disables all Filefilters and lets the FileChooser display all files.

See Also:
Constant Field Values

FC_ALL

public static final int FC_ALL
These constants can be used as flag to identify what kind of file extension have to be shown by the FileChooser. All flags can be ORed, except FC_DIRONLY and FC_ALL which have to be set exclusive. FC_DIRONLY lets the FileChooser only show directories, FC_ALL disables all Filefilters and lets the FileChooser display all files.

See Also:
Constant Field Values

EXT_RSHAPE

public static final String EXT_RSHAPE
See Also:
Constant Field Values
Constructor Detail

DynFileChooser

public DynFileChooser(int Mode)
Public constructor, creates a new dynamic filechooser object

Parameters:
Mode - specifies what files the DynFileChooser has to display. Here the FC_xxx constants have to be set.

DynFileChooser

public DynFileChooser(int Mode,
                      String CustomExt,
                      String CustomExtDescr)
Public constructor, creates a new dynamic filechooser object

Parameters:
Mode - specifies what files the DynFileChooser has to display. Here the FC_xxx constants have to be set.
CustomExt - specifies an additional, custom file extension which has to be displayed. Here only the extension without a leading dot has to be handed over (e.g. "wav")
CustomExtDescr - specifies a description for the additionally, custom file extension which will be displayed in the FileChoosers extension combobox too.
Method Detail

saveDialog

public boolean saveDialog(String title)
Displays the FileChooser as a Save-dialog. That means, if a file is choosen which already exists, the user is asked if he is sure that he want to overwrite this file.

Parameters:
title - the title which has to be displayed in the DynFileChoosers title bar (e.g. "Save file");
Returns:
returns TRUE if the operation was successfully and the user selected a file, FALSE if the DynFileChooser was cancelled

saveDialog

public boolean saveDialog()
Displays the FileChooser as a Save-dialog. That means, if a file is choosen which already exists, the user is asked if he is sure that he want to overwrite this file.

Returns:
returns TRUE if the operation was successfully and the user selected a file, FALSE if the DynFileChooser was cancelled

openDialog

public boolean openDialog(String title)
Displays the FileChooser as a Load-dialog.

Parameters:
title - the title which has to be displayed in the DynFileChoosers title bar (e.g. "Load file");
Returns:
returns TRUE if the operation was successfully and the user selected an existing file, FALSE if the DynFileChooser was cancelled

openDialog

public boolean openDialog()
Displays the FileChooser as a Load-dialog.

Returns:
returns TRUE if the operation was successfully and the user selected an existing file, FALSE if the DynFileChooser was cancelled