com.jaxfront.swing.ui.beans
Class FileDialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.jaxfront.swing.ui.visualizers.AbstractView
                      extended by com.jaxfront.swing.ui.visualizers.AbstractSimpleTypeView
                          extended by com.jaxfront.swing.ui.beans.FileDialog
All Implemented Interfaces:
ComplexVisualizer, SimpleTypeVisualizer, Visualizer, java.awt.event.FocusListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class FileDialog
extends AbstractSimpleTypeView

This class represents a JAXFront PlugIn Bean that acts as a helper for setting file URLs. A file URL can be either selected through a fileSelector or typed in directly into the textField.

Version:
1.60
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
 
Fields inherited from class com.jaxfront.swing.ui.visualizers.AbstractView
FILL, FILL_NO_GROW, HEADER_HEIGHT_OFFSET, PROPERTY_USER_CHANGED_SERIALIZE
 
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
FileDialog()
          Default constructor.
FileDialog(boolean asURL)
          Default constructor.
FileDialog(java.lang.Boolean asURL)
          Default constructor.
FileDialog(java.lang.Boolean asURL, java.lang.String suffix, java.lang.String suffixDescription, boolean acceptsDirectories)
           
FileDialog(SimpleType simpleType)
          Default constructor.
FileDialog(java.lang.String dialogType)
          Default constructor.
 
Method Summary
 void addFileFilter(java.lang.String suffix, java.lang.String description, boolean allowDirectories)
           
 java.lang.String getText()
          Returns the value of the component.
 void initActions()
          Initializes the actions for this bean.
 void populateModel()
          Updates the model (type) that belongs to this visualizer.
 void populateView()
          Updates the view of this visualizer.
 void setApplicationRequired(boolean required)
          Sets the view component to be required or not defined by the application not by xml schema.
 void setEnabled(boolean enabled)
          Sets the view component enabled or disabled.
 void setRequired(boolean required)
          Sets the view component to be required or not.
 
Methods inherited from class com.jaxfront.swing.ui.visualizers.AbstractSimpleTypeView
focusGained, focusLost, getEditorField, getSimpleModel, itemStateChanged, keyPressed, keyReleased, keyTyped, markError, release, removeLabel, resetError, setBackground, setChoosenKeyContextValue, setEditable, setEditorField, setForeground, setLabelColor
 
Methods inherited from class com.jaxfront.swing.ui.visualizers.AbstractView
addNewChild, addTreeNode, createTabActionIcon, doUserSerialization, focusComponent, focusFirstComponent, getBorderPanel, getChoiceComboBox, getColumnSpecLabelAndComponent, getContext, getDefaultBackgroundColor, getDOM, getEditorComponent, getEditorComponentPanel, getFirstFocusableComponent, getHintTextLabel, getImplementation, getLabel, getLabelPanel, getLabelPanel, getLabelText, getModel, getPercentageColumnSpecComponent, getRowSpec, getRowSpecArray, getRowSpecDefaultComponentHeight, getSelectedType, getStyle, getTableLabelComponent, getVisualizerPanel, isRunningInDialog, isViewReleased, jumpTo, postInitialization, propertyChange, removeHint, removeMessage, removeTreeNode, scrollToView, setCodeSetValues, setEditorComponent, setEnabled, setFirstFocusableComponent, setLabelText, setModel, setSerializable, setTableLableComponent, setTreeIcon, setUserSerializable, setValues, setVisible, setVisibleAndSerializable, showHint, showLabel, showMessage, uiAction, useUserModifiedSerialization
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, 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
 

Constructor Detail

FileDialog

public FileDialog()
Default constructor.


FileDialog

public FileDialog(SimpleType simpleType)
Default constructor.

Parameters:
aType - a type that represents the model

FileDialog

public FileDialog(java.lang.String dialogType)
Default constructor.

Parameters:
dialogType - defines the type of the dialog (default is: open)

FileDialog

public FileDialog(boolean asURL)
Default constructor.

Parameters:
asURL - defines if this bean should handle the fileName as an URL

FileDialog

public FileDialog(java.lang.Boolean asURL)
Default constructor.

Parameters:
asURL - defines if this bean should handle the fileName as an URL

FileDialog

public FileDialog(java.lang.Boolean asURL,
                  java.lang.String suffix,
                  java.lang.String suffixDescription,
                  boolean acceptsDirectories)
Method Detail

addFileFilter

public void addFileFilter(java.lang.String suffix,
                          java.lang.String description,
                          boolean allowDirectories)

populateModel

public void populateModel()
Description copied from interface: Visualizer
Updates the model (type) that belongs to this visualizer.

Specified by:
populateModel in interface Visualizer
Overrides:
populateModel in class AbstractSimpleTypeView
See Also:
Visualizer.populateModel()

populateView

public void populateView()
Description copied from interface: Visualizer
Updates the view of this visualizer.

Specified by:
populateView in interface Visualizer
Specified by:
populateView in class AbstractView
See Also:
Visualizer.populateView()

initActions

public void initActions()
Initializes the actions for this bean.


setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: Visualizer
Sets the view component enabled or disabled.

Specified by:
setEnabled in interface Visualizer
Overrides:
setEnabled in class AbstractSimpleTypeView
Parameters:
enabled - enable/disable this visualizer
See Also:
Component.setEnabled(boolean)

getText

public java.lang.String getText()
Description copied from interface: SimpleTypeVisualizer
Returns the value of the component.

Specified by:
getText in interface SimpleTypeVisualizer
Specified by:
getText in class AbstractSimpleTypeView
Returns:
String
See Also:
AbstractSimpleTypeView.getText()

setApplicationRequired

public void setApplicationRequired(boolean required)
Description copied from interface: Visualizer
Sets the view component to be required or not defined by the application not by xml schema.

Specified by:
setApplicationRequired in interface Visualizer
Overrides:
setApplicationRequired in class AbstractSimpleTypeView
Parameters:
required - indicates if a visualizer required user input
See Also:
Visualizer.setRequired(boolean)

setRequired

public void setRequired(boolean required)
Description copied from interface: Visualizer
Sets the view component to be required or not. For example: the background of the view component may change its color.

Specified by:
setRequired in interface Visualizer
Overrides:
setRequired in class AbstractSimpleTypeView
Parameters:
required - indicates if a visualizer requires user input
See Also:
Visualizer.setRequired(boolean)