|
||||||||||
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
org.knime.core.node.util.FileSelectionPanel
public class FileSelectionPanel
Nested Class Summary |
---|
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 | |
---|---|
protected static Color |
DEFAULT_BG
default background color for editable components. |
protected static Color |
DEFAULT_FG
default foreground color for editable components. |
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 | |
---|---|
FileSelectionPanel(String configKey,
String historyID,
int dialogType,
boolean directoryOnly)
Constructor that creates a file/directory chooser of the given type without a file filter. |
|
FileSelectionPanel(String configKey,
String historyID,
int dialogType,
boolean directoryOnly,
String... validExtensions)
Constructor that creates a file or directory chooser of the given type that filters the files according to the given extensions. |
|
FileSelectionPanel(String configKey,
String historyID,
int dialogType,
String... validExtensions)
Constructor that creates a file chooser of the given type that filters the files according to the given extensions. |
|
FileSelectionPanel(String configKey,
String historyID,
String... validExtensions)
Constructor that creates a file chooser with an JFileChooser.OPEN_DIALOG that filters files according to the
given extensions. |
Method Summary | |
---|---|
void |
loadSettingsFrom(NodeSettingsRO settings,
DataTableSpec[] specs)
Method loadSettingsFrom. |
void |
saveSettingsTo(NodeSettingsWO settings)
Saves all settings to settings object. |
void |
setBorderTitle(String newTitle)
Replaces the title displayed in the border that surrounds the editfield and browse button with the specified new title. |
protected void |
setEnabledComponents(boolean enabled)
Enables components if enabled is true, otherwise components will be disabled. |
(package private) void |
updateComponent(String newFile)
Updates the components if the components filename is out of syn with the given filename. |
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 |
Field Detail |
---|
protected static final Color DEFAULT_FG
protected static final Color DEFAULT_BG
Constructor Detail |
---|
public FileSelectionPanel(String configKey, String historyID, String... validExtensions)
JFileChooser.OPEN_DIALOG
that filters files according to the
given extensions. Also non-existing paths are accepted.
configKey
- the model holding the valuehistoryID
- to identify the file historyvalidExtensions
- only show files with those extensionspublic FileSelectionPanel(String configKey, String historyID, int dialogType, boolean directoryOnly)
configKey
- the model holding the valuedialogType
- JFileChooser.OPEN_DIALOG
,
JFileChooser.SAVE_DIALOG
or
JFileChooser.CUSTOM_DIALOG
historyID
- to identify the file historydirectoryOnly
- true
if only directories should be
selectable, otherwise only files can be selectedpublic FileSelectionPanel(String configKey, String historyID, int dialogType, String... validExtensions)
configKey
- the config keydialogType
- JFileChooser.OPEN_DIALOG
,
JFileChooser.SAVE_DIALOG
or
JFileChooser.CUSTOM_DIALOG
validExtensions
- only show files with those extensionshistoryID
- id for the file historypublic FileSelectionPanel(String configKey, String historyID, int dialogType, boolean directoryOnly, String... validExtensions)
configKey
- the config key.dialogType
- JFileChooser.OPEN_DIALOG
,
JFileChooser.SAVE_DIALOG
or
JFileChooser.CUSTOM_DIALOG
directoryOnly
- true
if only directories should be
selectable, otherwise only files can be selectedvalidExtensions
- only show files with those extensionshistoryID
- to identify the file histroyMethod Detail |
---|
void updateComponent(String newFile)
newFile
- The new filename to set if the components filename is
not equal with the given one.protected void setEnabledComponents(boolean enabled)
enabled
- If true components will be enabled, if false disabled.public void setBorderTitle(String newTitle)
newTitle
- the new title to display in the border.
NullPointerException
- if the new title is null.public void saveSettingsTo(NodeSettingsWO settings)
settings
- Object to store settings in.public void loadSettingsFrom(NodeSettingsRO settings, DataTableSpec[] specs) throws InvalidSettingsException
settings
- The NodeSettings object of the containing NodeDialogPane.specs
- The DataTableSpec[] of the containing NodeDialogPane.
InvalidSettingsException
- If settings could not be loaded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |