|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
schmitzm.swing.InputOption
schmitzm.swing.ManualInputOption
schmitzm.swing.BrowseInputOption
schmitzm.swing.FileInputOption
public class FileInputOption
Diese Eingabe-Option dient dazu eine Datei-Angabe zu vorzunehmen. Dies
kann ueber manuelle Eingabe erfolgen, oder durch Browsen mittels einem
JFileChooser
. Der Wert, den die Eingabe-Option repraesentiert stellt
ein File
-Objekt dar.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class schmitzm.swing.ManualInputOption |
---|
ManualInputOption.Double, ManualInputOption.Integer, ManualInputOption.Text |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class schmitzm.swing.BrowseInputOption |
---|
browseButton, inpCompCont, object |
Fields inherited from class schmitzm.swing.InputOption |
---|
descLabel, inpComp, invalidInputMess, OPTION_COMPONENT |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 | |
---|---|
FileInputOption(String label,
boolean inputNeeded)
Erzeugt eine neue Eingabe-Option. |
|
FileInputOption(String label,
boolean inputNeeded,
File defValue)
Erzeugt eine neue Eingabe-Option. |
Method Summary | |
---|---|
File |
convertFromString(String objectStr)
Liefert das ein File -Objekt zu der Text-Eingabe (Dateipfad)
der Option. |
String |
convertToString(Object object)
Liefert den kompletten Datei-Pfad fuer die durch die Eingabe-Option repraesentierten File . |
JFileChooser |
getFileChooser()
Liefert den Dateiauswahl-Dialog fuer die Browse-Aktion. |
File |
getValue()
Liefert den Wert, der in der Option eingegeben wurde. |
File |
performBrowse(Object actValue)
Implementiert die Browse-Aktion die ausgefuehrt wird, wenn der Button der Eingabe-Option gedrueckt wird. |
Methods inherited from class schmitzm.swing.BrowseInputOption |
---|
performGetValue, performSetValue |
Methods inherited from class schmitzm.swing.ManualInputOption |
---|
createInputComponent, performIsInputEmpty, performIsInputValid |
Methods inherited from class schmitzm.swing.InputOption |
---|
addInputOptionListener, fireFocusGained, fireFocusLost, fireOptionChanged, getDescriptionLabel, getInputComponent, getInvalidInputMessage, getLabel, grabFocus, inputEmpty, inputNeeded, isInputValid, removeInputOptionListener, setEnabled, setInputNeeded, setToolTipText, setValue |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FileInputOption(String label, boolean inputNeeded, File defValue)
label
- Beschreibung der Eingabe-OptioninputNeeded
- bestimmt, ob eine Eingabe erforderlich istdefValue
- Standard-Wert der vorgeblendet wirdpublic FileInputOption(String label, boolean inputNeeded)
label
- Beschreibung der Eingabe-OptioninputNeeded
- bestimmt, ob eine Eingabe erforderlich istMethod Detail |
---|
public File getValue()
BrowseInputOption.performGetValue()
auf.
getValue
in class InputOption
null
wenn die aktuelle Eingabe nicht zulaessig ist
(siehe InputOption.isInputValid()
)public JFileChooser getFileChooser()
JFileChooser
public File convertFromString(String objectStr)
File
-Objekt zu der Text-Eingabe (Dateipfad)
der Option.
convertFromString
in class BrowseInputOption
objectStr
- Objekt-Stringpublic String convertToString(Object object)
File
.
convertToString
in class BrowseInputOption
object
- File
-Instanz
null
, fall kein File
-Objekt uebergeben wirdpublic File performBrowse(Object actValue)
JFileChooser
.
performBrowse
in class BrowseInputOption
actValue
- aktueller Wert der Eingabe-Option
null
falls die Browse-Aktion abgebrochen wird
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |