Klasse FWFileChooserFormComponent
- Alle implementierten Schnittstellen:
ActionListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,FWObserver
- Autor:
- andi, ckunze
Form component that displays a standard dialog to let the user select a file or directory.
Multiple selection is not supported. Use a
tag in the XML configuration of the enclosing form to make this component select files or use a tag to make it select directories. The component reckognizes the following parameters in its XML configuration:
Required:
- id
Optional:
- enabled
- Determines, if the value of the component can be changed. Possible values are expressions that evaluate to 0, 1, true or false. The default value is true.
- default
- An expression that evaluates to a file or directory name. If the component is configured for file selection, this sets the preselected file or the initial directory of the file selection dialog. If the component is configured for directory selection, this sets the preselected directory. Notice that this setting has no effect, if the components initial value is set using a FormFiller! If the component is configured for diectory selection and this parameter is not set, the initial directory will be set to the user's home directory.
- required
- Default: false.
If the component is used for file selection, the displayed file types can be limited by their extensions using <extension> child elements. Note however, that this does not limit the file types that can be selected! If specified for a directory chooser, these child elements are ignored.
An example configuration might look like this:
<file id="mymodel.inputfile" required="true" enabled="true" default="data/myinputfile.dat"> <extension>dat</extension> <extension>txt</extension> </file> - Siehe auch:
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenVon Klasse geerbte verschachtelte Klassen/Schnittstellen javax.swing.JPanel
JPanel.AccessibleJPanelVon Klasse geerbte verschachtelte Klassen/Schnittstellen javax.swing.JComponent
JComponent.AccessibleJComponentVon Klasse geerbte verschachtelte Klassen/Schnittstellen java.awt.Container
Container.AccessibleAWTContainerVon Klasse geerbte verschachtelte Klassen/Schnittstellen java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Feldübersicht
Von Klasse geerbte Felder net.simplace.pipe.formcomponents.FWAbstractFormComponent
COPY_BUTTON_DEFAULT_IMAGE, COPY_BUTTON_DISABLED_IMAGE, COPY_BUTTON_HIGHLIGHT_IMAGE, DETACH_AUTO, DETACH_BUTTON, DETACH_FALSE, DETACH_LINKED, DETACH_TRUE, DETATCH_BORDER_DEFAULT_COLOR, DETATCH_BORDER_HIGHLIGHT_COLOR, DETATCH_BORDER_WIDTH, DETATCH_BUTTON_DEFAULT_IMAGE, DETATCH_BUTTON_DISABLED_IMAGE, DETATCH_BUTTON_HIGHLIGHT_IMAGE, EXPORT_BUTTON_DEFAULT_IMAGE, EXPORT_BUTTON_DISABLED_IMAGE, EXPORT_BUTTON_HIGHLIGHT_IMAGE, iDetachContentPanel, iObservable, PRINT_BUTTON_DEFAULT_IMAGE, PRINT_BUTTON_DISABLED_IMAGE, PRINT_BUTTON_HIGHLIGHT_IMAGEVon Klasse geerbte Felder javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWVon Klasse geerbte Felder java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTVon Schnittstelle geerbte Felder java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungFWFileChooserFormComponent(String aFormId, String aFieldId, boolean aShowBorder, org.jdom2.Element aParameters, FWObservable aObservabal, boolean aIsDirectoryChooser) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidDisplay a standard file/directory selection dialog and save the resultgetValue()If used for file selection, returns the currently selected file or null if the current selection is a directory, does not exist or is not a valid file.protected com.lowagie.text.RectanglegetValueCell(int aType) returns the value label to use for generating rtf, pdf or html version of the formvoidvoidsetEnabled(boolean aNewState) voidSets aFile as the current valuevoidvoidConstructs a File from aValue and calls @link setValue( File ) with itvoidupdate(FWObservable aObservable, Object aKeyOfParameterChanged) updates different functions like enableing of the ComponentVon Klasse geerbte Methoden net.simplace.pipe.formcomponents.FWAbstractFormComponent
add, add, attachPanel, closeFormComponent, createDetachControls, detachPanel, disposePanel, exportData, getCells, getComponentParameteterValue, getConfiguration, getDetachability, getFieldID, getFormElement, getFormFiller, getFormID, getJumper, getJumperRule, getLocaleValue, getLocaleValue, getMaximumSize, getObservable, getOriginalComponentParameteterValue, getPreferredSize, getRequiredWarning, getSystemID, getTitle, hasConfiguration, hasFormFiller, init, isClosingRequired, isEnabled, isRequired, notifyDependentComponents, remove, setConfiguration, setDefault, setDetachControlsEnabled, setDetachControlsHighlighted, setFieldID, setFormElement, setFormID, setObservable, setRequired, setTitle, setUpDetachControl, toStringVon Klasse geerbte Methoden javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIVon Klasse geerbte Methoden javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateVon Klasse geerbte Methoden java.awt.Container
add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeVon Klasse geerbte Methoden java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Konstruktordetails
-
FWFileChooserFormComponent
public FWFileChooserFormComponent(String aFormId, String aFieldId, boolean aShowBorder, org.jdom2.Element aParameters, FWObservable aObservabal, boolean aIsDirectoryChooser) - Parameter:
aFormId-aFieldId-aShowBorder-aParameters-aObservabal-aIsDirectoryChooser-
-
-
Methodendetails
-
getValue
If used for file selection, returns the currently selected file or null if the current selection is a directory, does not exist or is not a valid file.If used for directory selection, returns the currently selected directory, the parent directory of the currently selected file or null if the current selection does not exist or is not a valid file or directory.
- Angegeben von:
getValuein KlasseFWAbstractFormComponent- Gibt zurück:
- value of the implemented component
-
setValue
Constructs a File from aValue and calls @link setValue( File ) with it- Angegeben von:
setValuein KlasseFWAbstractFormComponent- Parameter:
aValue- of the implemented component
-
setValue
Sets aFile as the current value- Parameter:
aFile-
-
setValue
- Parameter:
aFiles-
-
setEnabled
public void setEnabled(boolean aNewState) - Setzt außer Kraft:
setEnabledin KlasseJComponent
-
actionPerformed
Display a standard file/directory selection dialog and save the result- Angegeben von:
actionPerformedin SchnittstelleActionListener
-
update
Beschreibung aus Klasse kopiert:FWAbstractFormComponentupdates different functions like enableing of the Component- Angegeben von:
updatein SchnittstelleFWObserver- Setzt außer Kraft:
updatein KlasseFWAbstractFormComponent- Parameter:
aObservable- the observable object.aKeyOfParameterChanged- an argument passed to thenotifyObserversmethod.- Siehe auch:
-
processFormFiller
public void processFormFiller()- Angegeben von:
processFormFillerin KlasseFWAbstractFormComponent
-
getValueCell
protected com.lowagie.text.Rectangle getValueCell(int aType) Beschreibung aus Klasse kopiert:FWAbstractFormComponentreturns the value label to use for generating rtf, pdf or html version of the form- Angegeben von:
getValueCellin KlasseFWAbstractFormComponent- Parameter:
aType-- Gibt zurück:
- iText Cell
-