Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.plugin.sipaccregwizz
Class ConnectionPanel

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.plugin.sipaccregwizz.ConnectionPanel
All Implemented Interfaces:
ItemListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, DocumentListener, ValidatingPanel

public class ConnectionPanel
extends TransparentPanel
implements ItemListener, DocumentListener, ValidatingPanel

The panel containing information about the connection.

Author:
Yana Stamcheva
See Also:
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
ConnectionPanel(SIPAccountRegistrationForm regform)
          Creates an instance of the ConnectionPanel.
 
Method Summary
 void changedUpdate(DocumentEvent e)
          Not used.
(package private)  void enablesProxyAutoConfigure(boolean isEnable)
          Enables/disables the proxy auto-configuration.
(package private)  String getAuthenticationName()
          Returns the authentication name.
(package private)  String getCertificateId()
          Gets the ID of the selected client TLS certificate or null if no certificate is selected.
(package private)  String getDTMFMethod()
          Returns the DTMF method.
(package private)  String getKeepAliveInterval()
          Returns the keep alive interval
(package private)  String getKeepAliveMethod()
          Returns the keep alive method.
(package private)  String getProxy()
          Returns the proxy.
(package private)  String getProxyPort()
          Return the proxy port.
(package private)  String getSelectedTransport()
          Returns the selected transport.
(package private)  String getServerAddress()
          Returns the server address.
(package private)  String getServerPort()
          Returns the server port.
(package private)  String getVoicemailCheckURI()
          Returns the voicemail check URI.
(package private)  String getVoicemailURI()
          Returns the voicemail URI.
 void insertUpdate(DocumentEvent e)
          Handles the DocumentEvent triggered when user types in the proxy or port field.
(package private)  boolean isMessageWaitingEnabled()
          Returns is message waiting indications is enabled.
(package private)  boolean isProxyAutoConfigureEnabled()
          Indicates if the proxy auto-configure is enabled.
 boolean isValidated()
          Whether current inserted values into the panel are valid and enough to continue with account creation/modification.
 void itemStateChanged(ItemEvent e)
          Indicates that the state of the item has changed.
 void removeUpdate(DocumentEvent e)
          Handles the DocumentEvent triggered when user deletes letters from the proxy and port fields.
(package private)  void setAuthenticationName(String authName)
          Sets the authentication name.
(package private)  void setCertificateId(String id)
          Sets the selected client TLS certificate entry.
(package private)  void setDTMFMethod(String dtmfMethod)
          Sets the DTMF method.
(package private)  void setKeepAliveInterval(String keepAliveInterval)
          Sets the keep alive interval
(package private)  void setKeepAliveMethod(String keepAliveMethod)
          Sets the keep alive method.
(package private)  void setMessageWaitingIndications(boolean enabled)
          Sets is message waiting indications is enabled.
(package private)  void setProxy(String proxyAddress)
          Sets the proxy address.
(package private)  void setProxyPort(String proxyPort)
          Sets the proxy port.
(package private)  void setSelectedTransport(String preferredTransport)
          Sets the selected transport.
(package private)  void setServerAddress(String serverAddress)
          Sets the server address.
(package private)  void setServerEnabled(boolean isEnabled)
          Enables/disables the server text field.
 void setServerFieldAccordingToUIN(String serverAddress)
          Parse the server part from the sip id and set it to server as default value.
(package private)  void setServerOverridden(boolean isServerOverridden)
          Sets the serverOverridden property.
(package private)  void setServerPort(String serverPort)
          Sets the server port.
(package private)  void setVoicemailCheckURI(String voicemailCheckURI)
          Sets the voicemail check URI.
(package private)  void setVoicemailURI(String voicemailURI)
          Sets the voicemail URI.
 
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

ConnectionPanel

public ConnectionPanel(SIPAccountRegistrationForm regform)
Creates an instance of the ConnectionPanel.

Parameters:
regform - the parent registration form
Method Detail

setServerFieldAccordingToUIN

public void setServerFieldAccordingToUIN(String serverAddress)
Parse the server part from the sip id and set it to server as default value. If Advanced option is enabled Do nothing.

Parameters:
serverAddress - the address of the server

itemStateChanged

public void itemStateChanged(ItemEvent e)
Indicates that the state of the item has changed.

Specified by:
itemStateChanged in interface ItemListener
Parameters:
e - the ItemEvent that notified us

getServerAddress

String getServerAddress()
Returns the server address.

Returns:
the server address

setServerAddress

void setServerAddress(String serverAddress)
Sets the server address.

Parameters:
serverAddress - the server address

setServerEnabled

void setServerEnabled(boolean isEnabled)
Enables/disables the server text field.

Parameters:
isEnabled - true to enable the server text field, false - otherwise

getAuthenticationName

String getAuthenticationName()
Returns the authentication name.

Returns:
the authentication name

setAuthenticationName

void setAuthenticationName(String authName)
Sets the authentication name.

Parameters:
authName - the authentication name

getServerPort

String getServerPort()
Returns the server port.

Returns:
the server port

setServerPort

void setServerPort(String serverPort)
Sets the server port.

Parameters:
serverPort - the server port

getProxy

String getProxy()
Returns the proxy.

Returns:
the proxy

setProxy

void setProxy(String proxyAddress)
Sets the proxy address.

Parameters:
proxyAddress - the proxy address

getProxyPort

String getProxyPort()
Return the proxy port.

Returns:
the proxy port

setProxyPort

void setProxyPort(String proxyPort)
Sets the proxy port.

Parameters:
proxyPort - the proxy port

getSelectedTransport

String getSelectedTransport()
Returns the selected transport.

Returns:
the selected transport

setSelectedTransport

void setSelectedTransport(String preferredTransport)
Sets the selected transport.

Parameters:
preferredTransport - the transport to select

getCertificateId

String getCertificateId()
Gets the ID of the selected client TLS certificate or null if no certificate is selected.

Returns:
the ID of the selected client TLS certificate or null if no certificate is selected.

setCertificateId

void setCertificateId(String id)
Sets the selected client TLS certificate entry.

Parameters:
id - The ID of the entry to select.

getKeepAliveMethod

String getKeepAliveMethod()
Returns the keep alive method.

Returns:
the keep alive method

setKeepAliveMethod

void setKeepAliveMethod(String keepAliveMethod)
Sets the keep alive method.

Parameters:
keepAliveMethod - the keep alive method

getKeepAliveInterval

String getKeepAliveInterval()
Returns the keep alive interval

Returns:
the keep alive interval

getDTMFMethod

String getDTMFMethod()
Returns the DTMF method.

Returns:
the DTMF method

setDTMFMethod

void setDTMFMethod(String dtmfMethod)
Sets the DTMF method.

Parameters:
dtmfMethod - the DTMF method

getVoicemailURI

String getVoicemailURI()
Returns the voicemail URI.

Returns:
the voicemail URI.

setVoicemailURI

void setVoicemailURI(String voicemailURI)
Sets the voicemail URI.

Parameters:
voicemailURI - the voicemail URI.

getVoicemailCheckURI

String getVoicemailCheckURI()
Returns the voicemail check URI.

Returns:
the voicemail URI.

setVoicemailCheckURI

void setVoicemailCheckURI(String voicemailCheckURI)
Sets the voicemail check URI.

Parameters:
voicemailCheckURI - the voicemail URI.

isMessageWaitingEnabled

boolean isMessageWaitingEnabled()
Returns is message waiting indications is enabled.

Returns:
is message waiting indications is enabled.

setMessageWaitingIndications

void setMessageWaitingIndications(boolean enabled)
Sets is message waiting indications is enabled.

Parameters:
enabled - is message waiting indications is enabled.

setKeepAliveInterval

void setKeepAliveInterval(String keepAliveInterval)
Sets the keep alive interval

Parameters:
keepAliveInterval - the keep alive interval

setServerOverridden

void setServerOverridden(boolean isServerOverridden)
Sets the serverOverridden property.

Parameters:
isServerOverridden - true to indicate that the server is overridden, false - otherwise

isProxyAutoConfigureEnabled

boolean isProxyAutoConfigureEnabled()
Indicates if the proxy auto-configure is enabled.

Returns:
true if the proxy auto-configuration is enabled, false - otherwise

enablesProxyAutoConfigure

void enablesProxyAutoConfigure(boolean isEnable)
Enables/disables the proxy auto-configuration.

Parameters:
isEnable - true to enable proxy auto-configuration, false - otherwise

insertUpdate

public void insertUpdate(DocumentEvent e)
Handles the DocumentEvent triggered when user types in the proxy or port field. Enables or disables the "Next" wizard button according to whether the fields are empty.

Specified by:
insertUpdate in interface DocumentListener
Parameters:
e - the DocumentEvent that notified us

removeUpdate

public void removeUpdate(DocumentEvent e)
Handles the DocumentEvent triggered when user deletes letters from the proxy and port fields. Enables or disables the "Next" wizard button according to whether the fields are empty.

Specified by:
removeUpdate in interface DocumentListener
Parameters:
e - the DocumentEvent that notified us

changedUpdate

public void changedUpdate(DocumentEvent e)
Not used.

Specified by:
changedUpdate in interface DocumentListener
Parameters:
e - the document event

isValidated

public boolean isValidated()
Whether current inserted values into the panel are valid and enough to continue with account creation/modification. Checks whether proxy field values are ok to continue with account creating.

Specified by:
isValidated in interface ValidatingPanel
Returns:
whether the input values are ok to continue with account creation/modification.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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