Enterprise Information Portal APIs

com.ibm.mm.beans.gui
Class CMBLogonPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--com.ibm.mm.beans.gui.CMBLogonPanel
All Implemented Interfaces:
javax.accessibility.Accessible, CMBConnectionReplyListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class CMBLogonPanel
extends javax.swing.JPanel
implements CMBConnectionReplyListener

The CMBLogonPanel displays the fields to enter userid and password, performs the logon, and provides the mechanism to change passwords on different servers.

Buttons

The CMBLogonPanel contains 5 buttons by default: OK, Cancel, Update Mapping, Change Passwords, and Help. All of these buttons may be displayed or hidden by setting the appropriate "isXXButtonVisible" property of the CMBLogonPanel, where "XX" is "OK", "Cancel", "ChangePasswords", "UpdateMapping", or "Help"

Logging on

After pressing the OK button, the LogonPanel will generate the CMBLogonCompletedEvent if the logon was successful.

Cancelling Logon

If the Cancel button was pressed before the logon was completed, the LogonPanel will generate the CMBLogonCancelled Event

Changing the password

When the Change Passwords button is pressed, the LogonPanel will bring up the modal ChangePasswords dialog, which enables the user to change passwords on one or more servers. When the password is succesfully changed, the CMBLogonPanel generates the CMBChangePasswordCompletedEvent.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
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
CMBLogonPanel()
          Constructor for the CMBLogonPanel
 
Method Summary
 void addChangePasswordCompletedListener(CMBChangePasswordCompletedListener listener)
          Add the specified listener, which will receive CMBChangePasswordCompletedEvents from the CMBLogonPanel
 void addChangePasswordHelpListener(CMBChangePasswordHelpListener listener)
          Add the specified listener, which will receive CMBChangePasswordHelpEvents from the CMBLogonPanel
 void addHelpListener(CMBHelpListener listener)
          Add the specified listener, which will receive CMBHelpEvents from the CMBLogonPanel
 void addLogonCancelledListener(CMBLogonCancelledListener listener)
          Add the specified listener, which will receive CMBPasswordsChangeCompletedEvents from the CMBLogonPanel
 void addLogonCompletedListener(CMBLogonCompletedListener listener)
          Add the specified listener, which will receive CMBLogonCompletedEvents from the CMBLogonPanel
 void addNotify()
           
 void addUpdateMappingCompletedListener(CMBUpdateMappingCompletedListener listener)
          Add the specified listener, which will receive CMBUpdateMappingCompletedEvents from the CMBLogonPanel
 void addUpdateMappingHelpListener(CMBUpdateMappingHelpListener listener)
          Add the specified listener, which will receive CMBUpdateMappingHelpEvents from the CMBLogonPanel
 java.util.Vector getChangePasswordServerList()
          Get the list of servers to display on the Change Passwords dialog
 CMBConnection getConnection()
          Get the connection object for the CMBLogonPanel
 java.lang.String[] getDisplayServerTypes()
          Get the list of server types to display on the Logon dialog.
 java.lang.String getNewPassword()
          Get the new password after a password change
 java.lang.String getPassword()
          Get the password displayed on the CMBLogonPanel
 java.lang.String getUserid()
          Get the userid displayed on the CMBLogonPanel
 boolean isCancelButtonVisible()
          Determines if the Cancel button is displayed
 boolean isChangePasswordsButtonVisible()
          Determines if the ChangePasswords button is displayed
 boolean isHelpButtonVisible()
          Determines if the Help button is displayed
 boolean isOKButtonVisible()
          Determines if the OK button is displayed
 boolean isServerNamePromptVisible()
          Determines if the server name prompt is displayed
 boolean isServerTypePromptVisible()
          Determines if the server type prompt is displayed
 boolean isUpdateMappingButtonVisible()
          Determines if the UpdateMapping button is displayed
 void logon()
          Connect to the server using the userid and password displayed in the logon panel
 void onCMBConnectionReply(CMBConnectionReplyEvent event)
          The method which implements the CMBConnectionReplyListener interface
 void removeChangePasswordCompletedListener(CMBChangePasswordCompletedListener listener)
          Remove the specified listener so it will no longer receive CMBChangePasswordCompletedEvents from the CMBLogonPanel
 void removeChangePasswordHelpListener(CMBChangePasswordHelpListener listener)
          Remove the specified listener so it will no longer receive CMBChangePasswordHelpEvents from the CMBLogonPanel
 void removeHelpListener(CMBHelpListener listener)
          Remove the specified listener so it will no longer receive CMBHelpEvents from the CMBLogonPanel
 void removeLogonCancelledListener(CMBLogonCancelledListener listener)
          Remove the specified listener so it will no longer receive CMBPasswordsChangeCompletedEvents from the CMBLogonPanel
 void removeLogonCompletedListener(CMBLogonCompletedListener listener)
          Remove the specified listener so it will no longer receive CMBLogonCompletedEvents from the CMBLogonPanel
 void removeUpdateMappingCompletedListener(CMBUpdateMappingCompletedListener listener)
          Remove the specified listener so it will no longer receive CMBUpdateMappingCompletedEvents from the CMBLogonPanel
 void removeUpdateMappingHelpListener(CMBUpdateMappingHelpListener listener)
          Remove the specified listener so it will no longer receive CMBUpdateMappingHelpEvents from the CMBLogonPanel
 void setBackground(java.awt.Color newColor)
          Overrides the setBackground function
 void setCancelButtonVisible(boolean val)
          Set whether the Cancel button should be displayed
 void setChangePasswordsButtonVisible(boolean val)
          Set whether the ChangePasswords button should be displayed
 void setChangePasswordServerList(java.util.Vector newList)
          Set the list of servers to display on the Change Passwords dialog
 void setConnection(CMBConnection newConnection)
          Set the connection object for the CMBLogonPanel
 void setCursor(java.awt.Cursor newCursor)
          Overridden to set cursor of contained controls
 void setDisplayServerTypes(java.lang.String[] newTypes)
          Set the list of server type datastore extensions to display on the Logon dialog.
 void setEnabled(boolean newEnable)
          Overridden to enable/disable contained controls
 void setFont(java.awt.Font newFont)
          Overrides the setFont function
 void setForeground(java.awt.Color newColor)
          Overrides the setForeground function
 void setHelpButtonVisible(boolean val)
          Set whether the Help button should be displayed
 void setLayout(java.awt.LayoutManager mgr)
          Overridden to disable changing of the layout manager.
 void setLocale(java.util.Locale newLocale)
          Overrides the setLocale function
 void setNewPassword(java.lang.String newPass)
          Set the new password after a password change
 void setOKButtonVisible(boolean val)
          Set whether the OK button should be displayed
 void setOpaque(boolean newOpaque)
          Overridden to set opaque on contained controls
 void setPassword(java.lang.String newPass)
          Set the password displayed on the CMBLogonPanel
 void setServerNamePromptVisible(boolean val)
          Set whether the server name prompt should be displayed
 void setServerTypePromptVisible(boolean val)
          Set whether the server type prompt should be displayed
 void setToolTipText(java.lang.String newTooltip)
          Overridden to set tooltip text on contained controls
 void setUpdateMappingButtonVisible(boolean val)
          Set whether the UpdateMapping button should be displayed
 void setUserid(java.lang.String newID)
          Set the userid displayed on the CMBLogonPanel
 void updateUI()
          Override updateUI to ensure proper updating of components
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CMBLogonPanel

public CMBLogonPanel()
Constructor for the CMBLogonPanel
Method Detail

addNotify

public void addNotify()
Overrides:
addNotify in class javax.swing.JComponent

setConnection

public void setConnection(CMBConnection newConnection)
Set the connection object for the CMBLogonPanel

getConnection

public CMBConnection getConnection()
Get the connection object for the CMBLogonPanel

setUserid

public void setUserid(java.lang.String newID)
Set the userid displayed on the CMBLogonPanel

getUserid

public java.lang.String getUserid()
Get the userid displayed on the CMBLogonPanel

setPassword

public void setPassword(java.lang.String newPass)
Set the password displayed on the CMBLogonPanel

getPassword

public java.lang.String getPassword()
Get the password displayed on the CMBLogonPanel

setHelpButtonVisible

public void setHelpButtonVisible(boolean val)
Set whether the Help button should be displayed

isHelpButtonVisible

public boolean isHelpButtonVisible()
Determines if the Help button is displayed

setOKButtonVisible

public void setOKButtonVisible(boolean val)
Set whether the OK button should be displayed

isOKButtonVisible

public boolean isOKButtonVisible()
Determines if the OK button is displayed

setCancelButtonVisible

public void setCancelButtonVisible(boolean val)
Set whether the Cancel button should be displayed

isCancelButtonVisible

public boolean isCancelButtonVisible()
Determines if the Cancel button is displayed

setChangePasswordsButtonVisible

public void setChangePasswordsButtonVisible(boolean val)
Set whether the ChangePasswords button should be displayed

isChangePasswordsButtonVisible

public boolean isChangePasswordsButtonVisible()
Determines if the ChangePasswords button is displayed

setUpdateMappingButtonVisible

public void setUpdateMappingButtonVisible(boolean val)
Set whether the UpdateMapping button should be displayed

isUpdateMappingButtonVisible

public boolean isUpdateMappingButtonVisible()
Determines if the UpdateMapping button is displayed

setServerNamePromptVisible

public void setServerNamePromptVisible(boolean val)
Set whether the server name prompt should be displayed
Since:
8.1

isServerNamePromptVisible

public boolean isServerNamePromptVisible()
Determines if the server name prompt is displayed
Since:
8.1

setServerTypePromptVisible

public void setServerTypePromptVisible(boolean val)
Set whether the server type prompt should be displayed
Since:
8.1

isServerTypePromptVisible

public boolean isServerTypePromptVisible()
Determines if the server type prompt is displayed
Since:
8.1

getNewPassword

public java.lang.String getNewPassword()
Get the new password after a password change

setNewPassword

public void setNewPassword(java.lang.String newPass)
Set the new password after a password change

getChangePasswordServerList

public java.util.Vector getChangePasswordServerList()
Get the list of servers to display on the Change Passwords dialog

setChangePasswordServerList

public void setChangePasswordServerList(java.util.Vector newList)
Set the list of servers to display on the Change Passwords dialog

getDisplayServerTypes

public java.lang.String[] getDisplayServerTypes()
Get the list of server types to display on the Logon dialog. These will only be used if serverTypesPromptVisible property is set to true.

By default, the list of available server types is read from the com.ibm.mm.beans.gui.CMBMessages.properties file. To add another server type to the list, simply add another line to the properties file. For example, if you have a custom datastore with extension 'ABC', then you would add the following line of text to the properties file: LogonPanel.serverType.ABC="ABC datastore display name" Your server type will then appear in the server types prompt by default.

Returns:
array of Strings
Since:
8.1

setDisplayServerTypes

public void setDisplayServerTypes(java.lang.String[] newTypes)
Set the list of server type datastore extensions to display on the Logon dialog. These will only be used if serverTypesPromptVisible property is set to true. This function allows you to restrict the server types which are shown in the server types prompt. By default, all server type values that are found in the properties file are shown. If you only want to show a few datastore types, for example, DB2 and CM V8, and your custom datastore with extension 'ABC', you would do the following: setDisplayServerTypes(new String["ABC", CMBBaseConstant.CMB_DSTYPE_DB2, CMBBaseConstant.CMB_DSTYPE_ICM]);
Parameters:
newTypes - array of Strings
Since:
8.1

logon

public void logon()
Connect to the server using the userid and password displayed in the logon panel

onCMBConnectionReply

public void onCMBConnectionReply(CMBConnectionReplyEvent event)
The method which implements the CMBConnectionReplyListener interface
Specified by:
onCMBConnectionReply in interface CMBConnectionReplyListener
Parameters:
event - The CMBConnectionReplyEvent received from the non-visual connection bean.

setForeground

public void setForeground(java.awt.Color newColor)
Overrides the setForeground function
Overrides:
setForeground in class javax.swing.JComponent

setBackground

public void setBackground(java.awt.Color newColor)
Overrides the setBackground function
Overrides:
setBackground in class javax.swing.JComponent

setFont

public void setFont(java.awt.Font newFont)
Overrides the setFont function
Overrides:
setFont in class javax.swing.JComponent

setCursor

public void setCursor(java.awt.Cursor newCursor)
Overridden to set cursor of contained controls
Overrides:
setCursor in class java.awt.Component

setOpaque

public void setOpaque(boolean newOpaque)
Overridden to set opaque on contained controls
Overrides:
setOpaque in class javax.swing.JComponent

setToolTipText

public void setToolTipText(java.lang.String newTooltip)
Overridden to set tooltip text on contained controls
Overrides:
setToolTipText in class javax.swing.JComponent

setEnabled

public void setEnabled(boolean newEnable)
Overridden to enable/disable contained controls
Overrides:
setEnabled in class javax.swing.JComponent

setLocale

public void setLocale(java.util.Locale newLocale)
Overrides the setLocale function
Overrides:
setLocale in class java.awt.Component

updateUI

public void updateUI()
Override updateUI to ensure proper updating of components
Overrides:
updateUI in class javax.swing.JPanel

setLayout

public void setLayout(java.awt.LayoutManager mgr)
Overridden to disable changing of the layout manager.
Overrides:
setLayout in class java.awt.Container

addLogonCompletedListener

public void addLogonCompletedListener(CMBLogonCompletedListener listener)
Add the specified listener, which will receive CMBLogonCompletedEvents from the CMBLogonPanel

removeLogonCompletedListener

public void removeLogonCompletedListener(CMBLogonCompletedListener listener)
Remove the specified listener so it will no longer receive CMBLogonCompletedEvents from the CMBLogonPanel

addLogonCancelledListener

public void addLogonCancelledListener(CMBLogonCancelledListener listener)
Add the specified listener, which will receive CMBPasswordsChangeCompletedEvents from the CMBLogonPanel

removeLogonCancelledListener

public void removeLogonCancelledListener(CMBLogonCancelledListener listener)
Remove the specified listener so it will no longer receive CMBPasswordsChangeCompletedEvents from the CMBLogonPanel

addHelpListener

public void addHelpListener(CMBHelpListener listener)
Add the specified listener, which will receive CMBHelpEvents from the CMBLogonPanel

removeHelpListener

public void removeHelpListener(CMBHelpListener listener)
Remove the specified listener so it will no longer receive CMBHelpEvents from the CMBLogonPanel

addChangePasswordHelpListener

public void addChangePasswordHelpListener(CMBChangePasswordHelpListener listener)
Add the specified listener, which will receive CMBChangePasswordHelpEvents from the CMBLogonPanel

removeChangePasswordHelpListener

public void removeChangePasswordHelpListener(CMBChangePasswordHelpListener listener)
Remove the specified listener so it will no longer receive CMBChangePasswordHelpEvents from the CMBLogonPanel

addChangePasswordCompletedListener

public void addChangePasswordCompletedListener(CMBChangePasswordCompletedListener listener)
Add the specified listener, which will receive CMBChangePasswordCompletedEvents from the CMBLogonPanel

removeChangePasswordCompletedListener

public void removeChangePasswordCompletedListener(CMBChangePasswordCompletedListener listener)
Remove the specified listener so it will no longer receive CMBChangePasswordCompletedEvents from the CMBLogonPanel

addUpdateMappingHelpListener

public void addUpdateMappingHelpListener(CMBUpdateMappingHelpListener listener)
Add the specified listener, which will receive CMBUpdateMappingHelpEvents from the CMBLogonPanel

removeUpdateMappingHelpListener

public void removeUpdateMappingHelpListener(CMBUpdateMappingHelpListener listener)
Remove the specified listener so it will no longer receive CMBUpdateMappingHelpEvents from the CMBLogonPanel

addUpdateMappingCompletedListener

public void addUpdateMappingCompletedListener(CMBUpdateMappingCompletedListener listener)
Add the specified listener, which will receive CMBUpdateMappingCompletedEvents from the CMBLogonPanel

removeUpdateMappingCompletedListener

public void removeUpdateMappingCompletedListener(CMBUpdateMappingCompletedListener listener)
Remove the specified listener so it will no longer receive CMBUpdateMappingCompletedEvents from the CMBLogonPanel

EIP JavaBeans

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.