public final class DialogComponentAuthentication extends DialogComponent implements ActionListener
DialogComponent.EmptySettingsModel
DEFAULT_BG, DEFAULT_FG
Constructor and Description |
---|
DialogComponentAuthentication(SettingsModelAuthentication authModel)
Constructor for this dialog component with default authentication types.
|
DialogComponentAuthentication(SettingsModelAuthentication authModel,
String label,
HashMap<SettingsModelAuthentication.AuthenticationType,Pair<String,String>> namingMap,
SettingsModelAuthentication.AuthenticationType... supportedTypes)
Constructor for this dialog component
|
DialogComponentAuthentication(SettingsModelAuthentication authModel,
String label,
SettingsModelAuthentication.AuthenticationType... supportedTypes)
Constructor for this dialog component.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e)
Called whenever the authentication type has changed.
|
protected void |
checkConfigurabilityBeforeLoad(PortObjectSpec[] specs)
Will be called before the new values are loaded from the NodeSettings
object.
|
void |
loadCredentials(CredentialsProvider cp)
Loads items in credentials select box.
|
void |
loadSettingsFrom(NodeSettingsRO settings,
PortObjectSpec[] specs,
CredentialsProvider cp) |
protected void |
setEnabledComponents(boolean enabled)
This method is called by the above (final)
DialogComponent.setEnabled(boolean)
method. |
void |
setPasswordLabel(String passwordLabel)
Set the text displayed in the passwordLabel
|
void |
setToolTipText(String text)
Implement this so it sets the tooltip on your component(s).
|
void |
setUsernameLabel(String usernameLabel)
Set the text displayed in the usernameLabel
|
protected void |
updateComponent()
Read the value from the
SettingsModel 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.
|
clearError, getComponentPanel, getLastTableSpec, getLastTableSpecs, getModel, loadSettingsFrom, saveSettingsTo, setEnabled, showError
public DialogComponentAuthentication(SettingsModelAuthentication authModel)
authModel
- The SettingsModel
.public DialogComponentAuthentication(SettingsModelAuthentication authModel, String label, SettingsModelAuthentication.AuthenticationType... supportedTypes)
authModel
- The SettingsModel
.label
- The label.supportedTypes
- the authentication SettingsModelAuthentication.AuthenticationType
s to displaypublic DialogComponentAuthentication(SettingsModelAuthentication authModel, String label, HashMap<SettingsModelAuthentication.AuthenticationType,Pair<String,String>> namingMap, SettingsModelAuthentication.AuthenticationType... supportedTypes)
authModel
- The SettingsModel
label
- The label.namingMap
- The map containing the SettingsModelAuthentication.AuthenticationType
as key and a pair
consisting of the label and the tooltip String for the radio buttons for authentication typessupportedTypes
- the authentication SettingsModelAuthentication.AuthenticationType
s to displayprotected void updateComponent()
SettingsModel
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 setToolTipText(String text)
setToolTipText
in class DialogComponent
text
- the tool tip text to set.JComponent.setToolTipText(java.lang.String)
public void loadSettingsFrom(NodeSettingsRO settings, PortObjectSpec[] specs, CredentialsProvider cp) throws NotConfigurableException
settings
- specs
- cp
- NotConfigurableException
public void loadCredentials(CredentialsProvider cp)
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void setUsernameLabel(String usernameLabel)
usernameLabel
- the label text to be setpublic void setPasswordLabel(String passwordLabel)
passwordLabel
- the label text to be set
KNIME GmbH, Konstanz, Germany
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.