|
||||||||||
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.DialogComponentButtonLabel
public class DialogComponentButtonLabel
Provides a component containing a button and a label. The label's and
button's text can be set individually and an ActionListener
can be added to the button, to respond to action events. A model is not
needed, since no input component like a text field etc. is provided here.
Thus no setting values will be saved. The button will appear at the left
side of the label.
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 | |
---|---|
DialogComponentButtonLabel(String buttonText,
String labelText)
Creates new instance of DialogComponentButtonLabel with
given text to set as button text and label text. |
Method Summary | |
---|---|
void |
addActionListener(ActionListener listener)
|
protected void |
checkConfigurabilityBeforeLoad(PortObjectSpec[] specs)
Will be called before the new values are loaded from the NodeSettings object. |
void |
removeActionListener(ActionListener listener)
|
void |
setButtonText(String text)
|
protected void |
setEnabledComponents(boolean enabled)
This method is called by the above (final) DialogComponent.setEnabled(boolean)
method. |
void |
setLabelText(String text)
|
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 DialogComponentButtonLabel(String buttonText, String labelText)
DialogComponentButtonLabel
with
given text to set as button text and label text.
buttonText
- The text to set as button text.labelText
- The text to set as label text.Method Detail |
---|
public void addActionListener(ActionListener listener)
listener
- The listener to add.public void removeActionListener(ActionListener listener)
listener
- The listener to remove.public void setButtonText(String text)
text
- The text to set as button text.public void setLabelText(String text)
text
- The text to set as label text.protected 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 setToolTipText(String text)
setToolTipText
in class DialogComponent
text
- the tool tip text to set.JComponent.setToolTipText(java.lang.String)
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 invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |