|
||||||||||
| 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.FilesHistoryPanel
public final class FilesHistoryPanel
Panel that contains an editable Combo Box showing the file to write to and a button to trigger a file chooser. The elements in the combo are files that have been recently used.
StringHistory,
Serialized Form| 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 |
|---|
| 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 | |
|---|---|
FilesHistoryPanel(FlowVariableModel fvm,
String historyID,
boolean showErrorMessage,
String... suffixes)
Creates new instance, sets properties, for instance renderer, accordingly. |
|
FilesHistoryPanel(String historyID,
boolean showErrorMessage)
Creates new instance, sets properties, for instance renderer, accordingly. |
|
FilesHistoryPanel(String historyID,
String... suffixes)
Creates new instance, sets properties, for instance renderer, accordingly. |
|
| Method Summary | |
|---|---|
void |
addChangeListener(ChangeListener cl)
Adds a change listener that gets notified if a new file name is entered into the text field. |
static File |
getFile(String fileOrUrl)
Return a file object for the given fileName. |
String |
getSelectedFile()
Get currently selected file. |
String[] |
getSuffixes()
|
void |
removeChangeListener(ChangeListener cl)
Removes the given change listener from the listener list. |
void |
setEnabled(boolean enabled)
|
void |
setMarkIfNonexisting(boolean b)
Sets if the text field should be colored if the selected file does not exist. |
void |
setSelectedFile(String url)
Set the file url as default. |
void |
setSelectMode(int mode)
Sets the select mode for the file chooser dialog. |
void |
setSuffixes(String... suffixes)
Set file file as part of the suffix. |
void |
updateHistory()
Updates the elements in the combo box, reads the file history. |
| 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 FilesHistoryPanel(String historyID,
String... suffixes)
historyID - identifier for the string history, see
StringHistorysuffixes - the set of suffixes for the file chooser
public FilesHistoryPanel(FlowVariableModel fvm,
String historyID,
boolean showErrorMessage,
String... suffixes)
historyID - identifier for the string history, see
StringHistorysuffixes - the set of suffixes for the file chooserfvm - model to allow to use a variable instead of the text field.showErrorMessage - if true there are error messages if the file
exists or the path is not available and so on.
public FilesHistoryPanel(String historyID,
boolean showErrorMessage)
historyID - identifier for the string history, see
StringHistoryshowErrorMessage - if true there are error messages if the file
exists or the path is not available and so on.| Method Detail |
|---|
public void setSuffixes(String... suffixes)
suffixes - The new list of valid suffixes.public String[] getSuffixes()
public String getSelectedFile()
JComboBox.getSelectedItem()public void setSelectedFile(String url)
url - the file to chooseJComboBox.setSelectedItem(java.lang.Object)public void updateHistory()
public void addChangeListener(ChangeListener cl)
cl - a change listenerpublic void removeChangeListener(ChangeListener cl)
cl - a change listenerpublic void setSelectMode(int mode)
mode - one of JFileChooser.FILES_ONLY,
JFileChooser.DIRECTORIES_ONLY, or
JFileChooser.FILES_AND_DIRECTORIESJFileChooser.setFileSelectionMode(int)public static final File getFile(String fileOrUrl)
fileOrUrl - the file name to convert to a file
public void setEnabled(boolean enabled)
setEnabled in class JComponentpublic void setMarkIfNonexisting(boolean b)
b - true if the text field should be colored,
false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||