|
Gridarta Editor
|
A component for selecting files. More...
Inheritance diagram for net.sf.gridarta.gui.utils.JFileField:
Collaboration diagram for net.sf.gridarta.gui.utils.JFileField:Public Member Functions | |
| void | addDocumentListener (@NotNull final DocumentListener documentListener) |
| Adds a DocumentListener to the text input field. More... | |
| void | fileChooserButton () |
| The action method for the button. More... | |
| File | getFile () |
| Returns the currently selected file. More... | |
| JFileField (@NotNull final Component parent, @NotNull final String key, @Nullable final File baseDir, @NotNull final File file, final int fileSelectionMode) | |
| Creates a new instance. More... | |
| void | setFile (@NotNull final File file) |
| Sets the currently selected file. More... | |
Private Member Functions | |
| String | getRelativeFile (@NotNull final File file) |
| Returns the contents for the text input field for a file. More... | |
Private Attributes | |
| final File | baseDir |
| The base directory. More... | |
| final JFileChooser | fileChooser = new JFileChooser() |
| The JFileChooser for selecting the file. More... | |
| final Component | parent |
| The parent component. More... | |
| final JTextField | textField |
| The text file that contains the currently selected file. More... | |
Static Private Attributes | |
| static final ActionBuilder | ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta") |
| The ActionBuilder. More... | |
| static final long | serialVersionUID = 1L |
| The serial version UID. More... | |
A component for selecting files.
It consists of a text field and a button which pops up a file chooser.
Definition at line 45 of file JFileField.java.
| net.sf.gridarta.gui.utils.JFileField.JFileField | ( | @NotNull final Component | parent, |
| @NotNull final String | key, | ||
| @Nullable final File | baseDir, | ||
| @NotNull final File | file, | ||
| final int | fileSelectionMode | ||
| ) |
Creates a new instance.
| parent | the parent component |
| key | the resource key for showing tooltips |
| baseDir | the base directory; when non- null |
| file | the currently selected file |
| fileSelectionMode | the file selection mode for the file chooser |
Definition at line 92 of file JFileField.java.
References net.sf.gridarta.gui.utils.JFileField.baseDir, net.sf.gridarta.gui.utils.JFileField.fileChooserButton(), net.sf.gridarta.gui.utils.JFileField.getRelativeFile(), net.sf.gridarta.utils.ActionBuilderUtils.getString(), and net.sf.gridarta.gui.utils.JFileField.parent.
Here is the call graph for this function:| void net.sf.gridarta.gui.utils.JFileField.addDocumentListener | ( | @NotNull final DocumentListener | documentListener | ) |
Adds a DocumentListener to the text input field.
| documentListener | the document listener to add |
Definition at line 144 of file JFileField.java.
Here is the caller graph for this function:| void net.sf.gridarta.gui.utils.JFileField.fileChooserButton | ( | ) |
The action method for the button.
It shows the file chooser.
Definition at line 152 of file JFileField.java.
References net.sf.gridarta.gui.utils.JFileField.getFile(), and net.sf.gridarta.gui.utils.JFileField.setFile().
Referenced by net.sf.gridarta.gui.utils.JFileField.JFileField().
Here is the call graph for this function:
Here is the caller graph for this function:| File net.sf.gridarta.gui.utils.JFileField.getFile | ( | ) |
Returns the currently selected file.
Definition at line 113 of file JFileField.java.
References net.sf.gridarta.gui.utils.JFileField.baseDir.
Referenced by net.sf.gridarta.gui.dialog.prefs.AppPreferences.apply(), net.sf.gridarta.gui.dialog.prefs.ResPreferences.apply(), net.sf.gridarta.gui.utils.JFileField.fileChooserButton(), net.sf.gridarta.gui.dialog.prefs.AppPreferences.isChanged(), net.sf.gridarta.gui.dialog.prefs.ResPreferences.isChanged(), and net.sf.gridarta.gui.dialog.plugin.parameter.MapPathParameterView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.MapPathParameterView().
Here is the caller graph for this function:
|
private |
Returns the contents for the text input field for a file.
| file | the file |
Definition at line 136 of file JFileField.java.
References net.sf.gridarta.model.io.PathManagerUtils.getMapPath().
Referenced by net.sf.gridarta.gui.utils.JFileField.JFileField(), and net.sf.gridarta.gui.utils.JFileField.setFile().
Here is the call graph for this function:
Here is the caller graph for this function:| void net.sf.gridarta.gui.utils.JFileField.setFile | ( | @NotNull final File | file | ) |
Sets the currently selected file.
| file | the currently selected file |
Definition at line 126 of file JFileField.java.
References net.sf.gridarta.gui.utils.JFileField.getRelativeFile().
Referenced by net.sf.gridarta.gui.dialog.prefs.AppPreferences.defaults(), net.sf.gridarta.gui.dialog.prefs.ResPreferences.defaults(), net.sf.gridarta.gui.utils.JFileField.fileChooserButton(), net.sf.gridarta.gui.dialog.prefs.AppPreferences.revert(), and net.sf.gridarta.gui.dialog.prefs.ResPreferences.revert().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
The ActionBuilder.
Definition at line 56 of file JFileField.java.
|
private |
The base directory.
When non-
, the contents of textField are relative to this directory.
Definition at line 69 of file JFileField.java.
Referenced by net.sf.gridarta.gui.utils.JFileField.getFile(), and net.sf.gridarta.gui.utils.JFileField.JFileField().
|
private |
The JFileChooser for selecting the file.
Definition at line 81 of file JFileField.java.
|
private |
The parent component.
Definition at line 62 of file JFileField.java.
Referenced by net.sf.gridarta.gui.utils.JFileField.JFileField().
|
staticprivate |
The serial version UID.
Definition at line 50 of file JFileField.java.
|
private |
The text file that contains the currently selected file.
Definition at line 75 of file JFileField.java.