|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.node.NodeDialogPane
org.knime.base.node.io.filereader.FileReaderNodeDialog
class FileReaderNodeDialog
ItemListener
for the file
location ComboBox (because we need to remove it and add it again from
time to time.Constructor Summary | |
---|---|
FileReaderNodeDialog()
Creates a new file reader dialog pane. |
Method Summary | |
---|---|
protected void |
advancedSettings()
Called when the user presses the "Advanced Settings..." button. |
protected void |
analyzeAction()
triggers analysis. |
protected void |
analyzeDataFileAndUpdatePreview(boolean forceAnalyze)
Updates the preview table, if a new and valid URL was specified in the data file name text field or the force parameter is set true. |
protected void |
colHeadersSettingsChanged()
Reads the settings of the 'fileHasColHeaders' checkbox and transfers them into the internal settings object. |
protected void |
commentSettingsChanged()
Called whenever the Java-Style comment box is clickered. |
protected void |
delimSettingsChanged()
Reads the settings of the column delimiter box and transfers them into the internal settings object. |
protected void |
ignoreWSChanged()
The item changed listener to the 'ignore whitespaces' check box. |
void |
itemStateChanged(ItemEvent e)
This dialog implements the ItemListener for the file selection
combo box. |
protected void |
loadSettingsFrom(NodeSettingsRO settings,
DataTableSpec[] specs)
Invoked before the dialog window is opened. |
void |
onCancel()
Override this method in order to react on events induced by the Cancel button from the surrounding dialog. |
protected String |
popupFileChooser(String startingPath,
boolean readXml)
Pops up the file selection dialog and returns the path to the selected file - or null if the user canceled. |
protected void |
readXMLSettings()
Pops up a file chooser dialog and reads the settings fromt the selected xml file. |
protected void |
rowHeadersSettingsChanged()
Reads the settings of the 'fileHasRowHeaders' checkbox and transfers them into the internal settings object. |
protected void |
saveSettingsTo(NodeSettingsWO settings)
Invoked when the settings need to be applied. |
protected void |
setNewUserSettingsForColumn(int colIdx)
Pops open the dialog of the columnProperties object of the specified column. |
(package private) static URL |
textToURL(String url)
Tries to create an URL from the passed string. |
protected void |
waitForAnalyzeAction()
If no analysis is running it triggers one and waits until its done, otherwise it just waits for the running analysis to finish. |
Methods inherited from class org.knime.core.node.NodeDialogPane |
---|
addJobMgrTab, addTab, addTabAt, createFlowVariableModel, createFlowVariableModel, createFlowVariableModel, finishEditingAndSaveSettingsTo, getAvailableFlowVariables, getPanel, getTab, getTabIndex, internalLoadSettingsFrom, loadSettingsFrom, loadSettingsFrom, onClose, onOpen, removeTab, renameTab, saveSettingsTo, setEnabled, setSelected |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
FileReaderNodeDialog()
Method Detail |
---|
public void itemStateChanged(ItemEvent e)
ItemListener
for the file selection
combo box. This way we can remove it when we load the file history in the
drop down list (because this triggers a useless event), and add it
afterwards again.
itemStateChanged
in interface ItemListener
e
- the event#itemStateChanged(java.awt.event.ItemEvent)
protected void rowHeadersSettingsChanged()
protected void colHeadersSettingsChanged()
protected void ignoreWSChanged()
protected void delimSettingsChanged()
protected void commentSettingsChanged()
protected void setNewUserSettingsForColumn(int colIdx)
colIdx
- the index of the column to get new user settings forprotected void loadSettingsFrom(NodeSettingsRO settings, DataTableSpec[] specs) throws NotConfigurableException
The implementation must be able to handle invalid or incomplete settings as the model may not have any reasonable values yet (for example when the dialog is opened for the first time). When an empty/invalid settings object is passed the dialog should set default values in its components.
loadSettingsFrom
in class NodeDialogPane
settings
- The settings to load into the dialog. Could be an empty
object or contain invalid settings. But will never be null.specs
- The input data table specs. Items of the array could be null
if no spec is available from the corresponding input port.
NotConfigurableException
- if the dialog cannot be opened because
of real invalid settings or if any preconditions are not fulfilled, e.g.
no predecessor node, no nominal column in input table, etc.NodeModel.loadSettingsFrom(NodeSettingsRO)
protected void saveSettingsTo(NodeSettingsWO settings) throws InvalidSettingsException
saveSettingsTo
in class NodeDialogPane
settings
- The settings object to write into.
InvalidSettingsException
- If the settings are not applicable to
the model.NodeModel.loadSettingsFrom(NodeSettingsRO)
public void onCancel()
onCancel
in class NodeDialogPane
protected void analyzeDataFileAndUpdatePreview(boolean forceAnalyze)
NOTE: May change the global settings object completely.
forceAnalyze
- forces the analysis of the datafile even though it
might be the one set in the global settings (and thus already
being analyzed).protected void waitForAnalyzeAction()
protected void analyzeAction()
protected void advancedSettings()
protected void readXMLSettings()
protected String popupFileChooser(String startingPath, boolean readXml)
null
if the user canceled.
startingPath
- the path the dialog starts inreadXml
- if true
the filter will be set to '*.xml'
files
null
if user
canceledstatic URL textToURL(String url) throws MalformedURLException
url
- the string to transform into an URL
MalformedURLException
- if the value passed was invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |