|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.node.defaultnodesettings.DialogComponent
org.knime.core.node.defaultnodesettings.DialogComponentFileChooser
public class DialogComponentFileChooser
A standard component allowing to choose a location(directory) and/or file name.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.knime.core.node.defaultnodesettings.DialogComponent |
---|
DialogComponent.EmptySettingsModel |
Field Summary |
---|
Fields inherited from class org.knime.core.node.defaultnodesettings.DialogComponent |
---|
DEFAULT_BG, DEFAULT_FG |
Constructor Summary | |
---|---|
DialogComponentFileChooser(SettingsModelString stringModel,
String historyID,
int dialogType,
boolean directoryOnly)
Constructor that creates a file/directory chooser of the given type without a file filter. |
|
DialogComponentFileChooser(SettingsModelString stringModel,
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. |
|
DialogComponentFileChooser(SettingsModelString stringModel,
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. |
|
DialogComponentFileChooser(SettingsModelString stringModel,
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 | |
---|---|
protected void |
checkConfigurabilityBeforeLoad(PortObjectSpec[] specs)
Will be called before the new values are loaded from the NodeSettings object. |
protected void |
clearError(JComboBox box)
Sets the coloring of the specified component back to normal. |
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)
This method is called by the above (final) DialogComponent.setEnabled(boolean)
method. |
void |
setToolTipText(String text)
Implement this so it sets the tooltip on your component(s). |
protected void |
updateComponent()
Read the value from the DialogComponent.EmptySettingsModel and set/display it in the
component. |
protected void |
validateSettingsBeforeSave()
Will be called before the value of the component is saved into the NodeSettings object. |
Methods inherited from class org.knime.core.node.defaultnodesettings.DialogComponent |
---|
clearError, getComponentPanel, getLastTableSpec, getLastTableSpecs, getModel, loadSettingsFrom, saveSettingsTo, setEnabled, showError |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DialogComponentFileChooser(SettingsModelString stringModel, String historyID, String... validExtensions)
JFileChooser.OPEN_DIALOG
that filters files according to the
given extensions. Also non-existing paths are accepted.
stringModel
- the model holding the valuehistoryID
- to identify the file historyvalidExtensions
- only show files with those extensions. An entry
in this array may contain the |
character between two
file extensions that will be shown in one item of the file type
combo box. This means that one item allows for more than one file type.
Specify extension including the dot ".".public DialogComponentFileChooser(SettingsModelString stringModel, String historyID, int dialogType, boolean directoryOnly)
stringModel
- 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 DialogComponentFileChooser(SettingsModelString stringModel, String historyID, int dialogType, String... validExtensions)
stringModel
- the model holding the valuehistoryID
- id for the file historydialogType
- JFileChooser.OPEN_DIALOG
,
JFileChooser.SAVE_DIALOG
or
JFileChooser.CUSTOM_DIALOG
validExtensions
- only show files with those extensions. An entry
in this array may contain the |
character between two
file extensions that will be shown in one item of the file type
combo box. This means that one item allows for more than one file type.
Specify extension including the dot ".".public DialogComponentFileChooser(SettingsModelString stringModel, String historyID, int dialogType, boolean directoryOnly, String... validExtensions)
stringModel
- the model holding the valuehistoryID
- to identify the file historydialogType
- 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 extensions. An entry
in this array may contain the |
character between two
file extensions that will be shown in one item of the file type
combo box. This means that one item allows for more than one file type.
Specify extension including the dot ".".Method Detail |
---|
protected void clearError(JComboBox box)
box
- the component to clear the error status for.protected void updateComponent()
DialogComponent.EmptySettingsModel
and set/display it in the
component. (Called after loading new values in the model to ensure they
are transfered into the component.) Implementations should set the new
value(s) in the components, should clear any possible error indications,
and should also take over the enable state.
updateComponent
in class DialogComponent
protected void validateSettingsBeforeSave() throws InvalidSettingsException
validateSettingsBeforeSave
in class DialogComponent
InvalidSettingsException
- if the entered values are invalidprotected void checkConfigurabilityBeforeLoad(PortObjectSpec[] specs) throws NotConfigurableException
checkConfigurabilityBeforeLoad
in class DialogComponent
specs
- the specs from the input ports.
NotConfigurableException
- if the component can't be used due to
inappropriate table specs. (Prevents the dialog from being
opened.)protected void setEnabledComponents(boolean enabled)
DialogComponent.setEnabled(boolean)
method. Derived classes should disable all the contained components in
here.
setEnabledComponents
in class DialogComponent
enabled
- the new status of the componentDialogComponent.setEnabled(boolean)
public void setBorderTitle(String newTitle)
newTitle
- the new title to display in the border.
NullPointerException
- if the new title is null.public void setToolTipText(String text)
setToolTipText
in class DialogComponent
text
- the tool tip text to set.JComponent.setToolTipText(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |