Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.common.gui.sendsettings
Class ChangeSendSettingsDialog  view ChangeSendSettingsDialog download ChangeSendSettingsDialog.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended bycom.flexstor.common.awt.dialogs.ModalDlg
                      extended bycom.flexstor.common.awt.dialogs.OptionDlg
                          extended bycom.flexstor.common.gui.sendsettings.ChangeSendSettingsDialog
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, com.flexstor.common.awt.event.FlexTextListener, java.awt.image.ImageObserver, java.awt.event.KeyListener, java.awt.MenuContainer, java.io.Serializable, com.flexstor.common.awt.event.SettingsEventListener, java.awt.event.TextListener, com.flexstor.common.threadmgr.ThreadConsumerI

public final class ChangeSendSettingsDialog
extends com.flexstor.common.awt.dialogs.OptionDlg
implements java.awt.event.TextListener, java.awt.event.ActionListener, com.flexstor.common.awt.event.SettingsEventListener, com.flexstor.common.awt.event.FlexTextListener, com.flexstor.common.threadmgr.ThreadConsumerI

Main Dialog That allows user to Modify/Add/Delete Send Settings


Nested Class Summary
 
Nested classes inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private static int ACTION_DELETE
           
private static int ACTION_SAVE
           
private static int ACTION_SAVEAS
           
protected  com.flexstor.common.gui.addressbook.AddressBookModelI addBookModel
           
private static java.lang.String ADHOC_NAME
           
protected  boolean bChangeInProgress
           
protected  boolean bSystemSettingSelected
           
protected  com.flexstor.common.awt.field.FlexChoice chSetting
           
protected  com.flexstor.common.data.ejb.setting.SendSettingData currentSetting
           
private  int currentTab
           
private static java.lang.String DEFAULT_NAME
           
protected  java.awt.Dimension dimMinSize
           
protected  java.awt.Frame fParent
           
protected  java.util.Hashtable htSettings
           
protected  SendSettingsConversionPanel pnlConversion
           
protected  SendSettingsEmailPanel pnlEMail
           
protected  SendSettingsFtpPanel pnlFtp
           
protected  SendSettingsGeneralPanel pnlGeneral
           
protected  SendSettingsEmailPanel pnlManual
           
protected  com.flexstor.common.awt.FlexBorderPanel pnlSetting
           
protected  com.flexstor.common.awt.FlexTabPanel pnlTabs
           
protected  java.lang.String sDefaultEMailAddress
           
protected  java.util.Vector selectedSendSettings
           
protected  com.flexstor.common.settings.SettingsModelI settingsModel
           
static int TAB_CONVERSION
           
static int TAB_EMAIL
           
static int TAB_FTP
           
static int TAB_GENERAL
           
static int TAB_OTHER
           
protected  com.flexstor.common.data.ejb.setting.SendSettingData tempSetting
           
 
Fields inherited from class com.flexstor.common.awt.dialogs.OptionDlg
ACTION_APPLY, ACTION_CANCEL, ACTION_CUSTOM, ACTION_DISCARD, ACTION_HELP, ACTION_NO, ACTION_OK, ACTION_YES, APPLY_DISCARD_CANCEL, helpHandler, IDENTIFIER, keyWatcher, nCancelActionId, nDefaultActionId, nStatus, OK, OK_CANCEL, OK_CANCEL_HELP, pnlButtons, vButtons, YES_NO, YES_NO_CANCEL
 
Fields inherited from class com.flexstor.common.awt.dialogs.ModalDlg
bEnforceMinimumSize, focusComponent
 
Fields inherited from class java.awt.Dialog
 
Fields inherited from class java.awt.Window
 
Fields inherited from class java.awt.Container
 
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
ChangeSendSettingsDialog(java.awt.Frame fParent, com.flexstor.common.data.ejb.setting.SendSettingData initialSetting, java.util.Hashtable htSettings, com.flexstor.common.settings.SendSettingsModel model, java.util.Vector selectedSendSettings, com.flexstor.common.gui.addressbook.AddressBookModelI addBookModel)
          Creates a new dialog to modify send settings.
ChangeSendSettingsDialog(java.awt.Frame fParent, com.flexstor.common.data.ejb.setting.SendSettingData initialSetting, java.util.Hashtable htSettings, com.flexstor.common.settings.SettingsModelI model, com.flexstor.common.gui.addressbook.AddressBookModelI addBookModel)
          Creates a new dialog to modify send settings.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Implementation for ActionListener.
private  void addButtons(int id, java.lang.String label, int position)
          Utility method to add Action Buttons
 void addNotify()
          Method called after dialog created
protected  boolean canPerformDefaultAction()
          This abstract method returns a boolean indicating if the default action can be executed, i.e.
private  void configureButtons()
          Enables/disables buttons dependant on the current state of the dialog.
private  void configureTab(boolean ftp, boolean email, boolean manual)
          This will set the proper tab selected.
private  boolean confirmDiscard()
          Asks the user if pending changes for a setting are to be discarded.
 void dispose()
          Disposes the Dialog and then causes show() to return if it is currently blocked.
 void eventOccured(com.flexstor.common.awt.event.SettingsEvent e)
          Any class implementing this interface must provide defination to this method.
private  void getDataFromGUI(com.flexstor.common.data.ejb.setting.SendSettingData setting)
          Populates a setting object from the GUI.It gets the setting from GUI only for currently selected send type on Send Via Panel.
private  java.lang.String getDefaultEMailAddress()
          Sets the default e-mail address for the e-mail tab, required for e-mail send setting to be enabled.
 java.awt.Dimension getMinimumSize()
          Returns the minimum size of this container.
 java.awt.Dimension getPreferredSize()
          Symantec's TabPanel returns a fixed size, so we must overwrite this method.
 com.flexstor.common.data.ejb.setting.SendSettingData getSetting()
          Get the current setting selected in dialog
protected  int getWindowId()
          Subclasses need to overwrite this method to define their window id for the help call, default indicate no call to the help system.
private  void init()
          Initialize the dialog
static void main(java.lang.String[] args)
           
private  boolean makeAdhocSetting()
          Makes a Temporary Send Setting for user with Adhoc name
private  void populateGUI(com.flexstor.common.data.ejb.setting.SendSettingData setting)
          Populates GUI from a setting object.
private  java.util.Hashtable populateSettings()
           
 void processService(java.lang.Object obj)
          Implementation of ThreadConsumerI.To run all the database intesive methods in different thread.
private  boolean saveAsNewSetting()
          SaveAs the current setting selected in dialog
private  boolean saveSetting()
          Save the current setting selected in dialog
private  java.lang.String selectEMailAddress(java.lang.String address)
          Show email address selection list, which allows user to select email addresses.
private  void selectFtpAddress()
          Show ftp address selection list,which allows user to select a ftp address.
private  void selectSetting(com.flexstor.common.data.ejb.setting.SendSettingData setting)
          Synchronizes choice, currentSetting and state variables updates GUI
 void setDefaultEMailAddress(java.lang.String sAddress)
          Sets the default e-mail address for the e-mail tab, required for e-mail send setting to be enabled.
 void setPreferredSize(java.awt.Dimension dim)
          Sets a new preferred size.
 void textValueChangeBegin(com.flexstor.common.awt.event.FlexTextEvent e)
          Implementation for FlexTextListener.
 void textValueChanged(java.awt.event.TextEvent e)
          This method is called when the text being monitored changes.
 void textValueChangeEnd(com.flexstor.common.awt.event.FlexTextEvent e)
          Implementation for FlexTextListener.This method will be called on selecting new setting on settings combobox, on entering any text on text fields email/ftp tabs.
 boolean verify()
          Checks for validation in children tabs
 
Methods inherited from class com.flexstor.common.awt.dialogs.OptionDlg
createButtonPanel, createButtons, getCancelAction, getComponentForId, getDefaultAction, getFieldId, getStatus, initialize, keyPressed, keyReleased, keyTyped, registerHelpHandler, setCancelAction, setContent, setDefaultAction, setStatus
 
Methods inherited from class com.flexstor.common.awt.dialogs.ModalDlg
centerOn, enableInput, setFocusComponent, setMinimumSizeEnforcement, setVisible, validate
 
Methods inherited from class java.awt.Dialog
getAccessibleContext, getTitle, hide, isModal, isResizable, isUndecorated, paramString, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getGraphicsConfiguration, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusDownCycle, update, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TAB_GENERAL

public static final int TAB_GENERAL
See Also:
Constant Field Values

TAB_FTP

public static final int TAB_FTP
See Also:
Constant Field Values

TAB_EMAIL

public static final int TAB_EMAIL
See Also:
Constant Field Values

TAB_OTHER

public static final int TAB_OTHER
See Also:
Constant Field Values

TAB_CONVERSION

public static final int TAB_CONVERSION
See Also:
Constant Field Values

currentTab

private int currentTab

DEFAULT_NAME

private static java.lang.String DEFAULT_NAME

ADHOC_NAME

private static java.lang.String ADHOC_NAME

ACTION_SAVE

private static final int ACTION_SAVE
See Also:
Constant Field Values

ACTION_SAVEAS

private static final int ACTION_SAVEAS
See Also:
Constant Field Values

ACTION_DELETE

private static final int ACTION_DELETE
See Also:
Constant Field Values

dimMinSize

protected java.awt.Dimension dimMinSize

pnlTabs

protected com.flexstor.common.awt.FlexTabPanel pnlTabs

pnlGeneral

protected SendSettingsGeneralPanel pnlGeneral

pnlFtp

protected SendSettingsFtpPanel pnlFtp

pnlEMail

protected SendSettingsEmailPanel pnlEMail

pnlManual

protected SendSettingsEmailPanel pnlManual

pnlConversion

protected SendSettingsConversionPanel pnlConversion

pnlSetting

protected com.flexstor.common.awt.FlexBorderPanel pnlSetting

chSetting

protected com.flexstor.common.awt.field.FlexChoice chSetting

fParent

protected java.awt.Frame fParent

htSettings

protected java.util.Hashtable htSettings

currentSetting

protected com.flexstor.common.data.ejb.setting.SendSettingData currentSetting

tempSetting

protected com.flexstor.common.data.ejb.setting.SendSettingData tempSetting

bChangeInProgress

protected boolean bChangeInProgress

bSystemSettingSelected

protected boolean bSystemSettingSelected

sDefaultEMailAddress

protected java.lang.String sDefaultEMailAddress

settingsModel

protected com.flexstor.common.settings.SettingsModelI settingsModel

addBookModel

protected com.flexstor.common.gui.addressbook.AddressBookModelI addBookModel

selectedSendSettings

protected java.util.Vector selectedSendSettings
Constructor Detail

ChangeSendSettingsDialog

public ChangeSendSettingsDialog(java.awt.Frame fParent,
                                com.flexstor.common.data.ejb.setting.SendSettingData initialSetting,
                                java.util.Hashtable htSettings,
                                com.flexstor.common.settings.SendSettingsModel model,
                                java.util.Vector selectedSendSettings,
                                com.flexstor.common.gui.addressbook.AddressBookModelI addBookModel)
Creates a new dialog to modify send settings.


ChangeSendSettingsDialog

public ChangeSendSettingsDialog(java.awt.Frame fParent,
                                com.flexstor.common.data.ejb.setting.SendSettingData initialSetting,
                                java.util.Hashtable htSettings,
                                com.flexstor.common.settings.SettingsModelI model,
                                com.flexstor.common.gui.addressbook.AddressBookModelI addBookModel)
Creates a new dialog to modify send settings.

Method Detail

init

private void init()
Initialize the dialog


addButtons

private void addButtons(int id,
                        java.lang.String label,
                        int position)
Utility method to add Action Buttons


getWindowId

protected int getWindowId()
Description copied from class: com.flexstor.common.awt.dialogs.OptionDlg
Subclasses need to overwrite this method to define their window id for the help call, default indicate no call to the help system.


addNotify

public void addNotify()
Method called after dialog created


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Implementation for ActionListener.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

processService

public void processService(java.lang.Object obj)
Implementation of ThreadConsumerI.To run all the database intesive methods in different thread.

Specified by:
processService in interface com.flexstor.common.threadmgr.ThreadConsumerI

selectEMailAddress

private java.lang.String selectEMailAddress(java.lang.String address)
Show email address selection list, which allows user to select email addresses.


selectFtpAddress

private void selectFtpAddress()
Show ftp address selection list,which allows user to select a ftp address.


textValueChangeBegin

public void textValueChangeBegin(com.flexstor.common.awt.event.FlexTextEvent e)
Implementation for FlexTextListener.

Specified by:
textValueChangeBegin in interface com.flexstor.common.awt.event.FlexTextListener

textValueChangeEnd

public void textValueChangeEnd(com.flexstor.common.awt.event.FlexTextEvent e)
Implementation for FlexTextListener.This method will be called on selecting new setting on settings combobox, on entering any text on text fields email/ftp tabs.

Specified by:
textValueChangeEnd in interface com.flexstor.common.awt.event.FlexTextListener

getPreferredSize

public java.awt.Dimension getPreferredSize()
Symantec's TabPanel returns a fixed size, so we must overwrite this method.


setPreferredSize

public void setPreferredSize(java.awt.Dimension dim)
Sets a new preferred size.


getMinimumSize

public java.awt.Dimension getMinimumSize()
Description copied from class: java.awt.Container
Returns the minimum size of this container.


configureTab

private void configureTab(boolean ftp,
                          boolean email,
                          boolean manual)
This will set the proper tab selected. If configureTab(true,false,false) is called, then ftp tab will be selected.


getSetting

public com.flexstor.common.data.ejb.setting.SendSettingData getSetting()
Get the current setting selected in dialog


populateGUI

private void populateGUI(com.flexstor.common.data.ejb.setting.SendSettingData setting)
Populates GUI from a setting object.


getDataFromGUI

private void getDataFromGUI(com.flexstor.common.data.ejb.setting.SendSettingData setting)
Populates a setting object from the GUI.It gets the setting from GUI only for currently selected send type on Send Via Panel.


configureButtons

private void configureButtons()
Enables/disables buttons dependant on the current state of the dialog.


canPerformDefaultAction

protected boolean canPerformDefaultAction()
Description copied from class: com.flexstor.common.awt.dialogs.OptionDlg
This abstract method returns a boolean indicating if the default action can be executed, i.e. if this method returns false, the enter key does NOT fire an action event.


confirmDiscard

private boolean confirmDiscard()
Asks the user if pending changes for a setting are to be discarded. If so, changes will be reflected in the temporay setting which will be selected automatically. Methods gets called when Cancel was pressed or the setting choice was changed.


textValueChanged

public void textValueChanged(java.awt.event.TextEvent e)
Description copied from interface: java.awt.event.TextListener
This method is called when the text being monitored changes.

Specified by:
textValueChanged in interface java.awt.event.TextListener

eventOccured

public void eventOccured(com.flexstor.common.awt.event.SettingsEvent e)
Description copied from interface: com.flexstor.common.awt.event.SettingsEventListener
Any class implementing this interface must provide defination to this method.

Specified by:
eventOccured in interface com.flexstor.common.awt.event.SettingsEventListener

saveSetting

private boolean saveSetting()
Save the current setting selected in dialog


saveAsNewSetting

private boolean saveAsNewSetting()
SaveAs the current setting selected in dialog


selectSetting

private void selectSetting(com.flexstor.common.data.ejb.setting.SendSettingData setting)
Synchronizes choice, currentSetting and state variables updates GUI


makeAdhocSetting

private boolean makeAdhocSetting()
Makes a Temporary Send Setting for user with Adhoc name


verify

public boolean verify()
Checks for validation in children tabs


dispose

public void dispose()
Description copied from class: java.awt.Dialog
Disposes the Dialog and then causes show() to return if it is currently blocked.


setDefaultEMailAddress

public void setDefaultEMailAddress(java.lang.String sAddress)
Sets the default e-mail address for the e-mail tab, required for e-mail send setting to be enabled.


getDefaultEMailAddress

private java.lang.String getDefaultEMailAddress()
Sets the default e-mail address for the e-mail tab, required for e-mail send setting to be enabled.


populateSettings

private java.util.Hashtable populateSettings()

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception