Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.account
Class EmptyAccountRegistrationForm

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by net.java.sip.communicator.util.swing.TransparentPanel
                      extended by net.java.sip.communicator.impl.gui.main.account.EmptyAccountRegistrationForm
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, AccountRegistrationForm

 class EmptyAccountRegistrationForm
extends TransparentPanel
implements AccountRegistrationForm

We use this class as a dummy implementation of the AccountRegistrationWizard only containing a blank page and not related to a specific protocol. We are using this class so that we could have the NewAccountDialog open without having a specific protocol selected. The point of having this empty page is to avoid users mistakenly filling in data for the default protocol without noticing that it is not really the protocol they had in mind.

Author:
Emil Ivov, Yana Stamcheva

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
EmptyAccountRegistrationForm()
          Creates the wizard.
 
Method Summary
 Component getAdvancedForm()
          Returns the advanced registration form.
 byte[] getIcon()
          Returns null since we don't have any images associated with this form or no image in our case.
 byte[] getListIcon()
          Called by the NewAccountDialog protocol combo renderer.
 String getProtocolDescription()
          Returns a dummy protocol description.
 String getProtocolName()
          Returns the name of a dummy protocol which is actually a prompt to select a network.
 Component getSimpleForm()
          Returns our only wizard page.
 String getUserNameExample()
          Returns an empty string since never used.
 boolean isModification()
          Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard
 boolean isSimpleFormEnabled()
          Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard
 boolean isWebSignupSupported()
          Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard
 void loadAccount(ProtocolProviderService protocolProvider)
          Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard
 void setModification(boolean isModification)
          Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard
 ProtocolProviderService signin()
          Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard
 ProtocolProviderService signin(String userName, String password)
          Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard
 void webSignup()
          Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmptyAccountRegistrationForm

public EmptyAccountRegistrationForm()
Creates the wizard.

Method Detail

getListIcon

public byte[] getListIcon()
Called by the NewAccountDialog protocol combo renderer. We don't have an icon so we return null

Specified by:
getListIcon in interface AccountRegistrationForm
Returns:
null;

getIcon

public byte[] getIcon()
Returns null since we don't have any images associated with this form or no image in our case.

Specified by:
getIcon in interface AccountRegistrationForm
Returns:
an empty byte[] array.

getProtocolDescription

public String getProtocolDescription()
Returns a dummy protocol description.

Specified by:
getProtocolDescription in interface AccountRegistrationForm
Returns:
a string containing a dummy protocol description.

getProtocolName

public String getProtocolName()
Returns the name of a dummy protocol which is actually a prompt to select a network.

Specified by:
getProtocolName in interface AccountRegistrationForm
Returns:
a string prompting the user to select a network.

getSimpleForm

public Component getSimpleForm()
Returns our only wizard page.

Specified by:
getSimpleForm in interface AccountRegistrationForm
Returns:
our only wizard page.

getAdvancedForm

public Component getAdvancedForm()
Returns the advanced registration form.

Specified by:
getAdvancedForm in interface AccountRegistrationForm
Returns:
the advanced registration form

getUserNameExample

public String getUserNameExample()
Returns an empty string since never used.

Specified by:
getUserNameExample in interface AccountRegistrationForm
Returns:
an empty string as we never use this method.

isModification

public boolean isModification()
Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard

Specified by:
isModification in interface AccountRegistrationForm
Returns:
true to indicate that this wizard is currently in modification mode, false - otherwise.

isSimpleFormEnabled

public boolean isSimpleFormEnabled()
Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard

Specified by:
isSimpleFormEnabled in interface AccountRegistrationForm
Returns:
true if the simple "Sign in" form is enabled or false otherwise.

isWebSignupSupported

public boolean isWebSignupSupported()
Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard

Specified by:
isWebSignupSupported in interface AccountRegistrationForm
Returns:
true if the web sign up is supported by the current implementation, false - otherwise

loadAccount

public void loadAccount(ProtocolProviderService protocolProvider)
Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard

Specified by:
loadAccount in interface AccountRegistrationForm
Parameters:
protocolProvider - The ProtocolProviderService to load data from.

setModification

public void setModification(boolean isModification)
Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard

Specified by:
setModification in interface AccountRegistrationForm
Parameters:
isModification - indicates if this wizard is opened for modification or for creating a new account.

signin

public ProtocolProviderService signin()
                               throws OperationFailedException
Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard

Specified by:
signin in interface AccountRegistrationForm
Returns:
the ProtocolProviderService that signed in
Throws:
OperationFailedException

signin

public ProtocolProviderService signin(String userName,
                                      String password)
                               throws OperationFailedException
Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard

Specified by:
signin in interface AccountRegistrationForm
Parameters:
userName - the user name to sign in with
password - the password to sign in with
Throws:
OperationFailedException

webSignup

public void webSignup()
               throws UnsupportedOperationException
Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard

Specified by:
webSignup in interface AccountRegistrationForm
Throws:
UnsupportedOperationException - if the web sign up operation is not supported by the current implementation.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.