Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## AppletInterface
Class UpdateFrame

    java.lang.Object
      java.awt.Component
          amber.server.component.ComponentHandler
              amber.server.component.PanelHandler
                  amber.server.panel.BasePanel
                      amber.server.panel.BaseFrame
                          AppletInterface.UpdateFrame

All Implemented Interfaces:
  java.awt.event.ActionListener, amber.server.application.ApplicationInterface, amber.awt.event.ComponentWindowListener, amber.server.panel.ContainerHandler, java.util.EventListener, java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.io.Serializable

public class UpdateFrame
extends amber.server.panel.BaseFrame
implements java.awt.event.ActionListener, amber.awt.event.ComponentWindowListener

Author:
  student This class is being used for updating user information This starts with validation of user data, followed by sending admin update to TMS and update user details in the application database.
See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

Field Summary
`private UserAddress_Data` | `addressdata`
`private amber.server.component.ButtonHandler` | `btnAdd`
`private amber.server.component.FloatButtonHandler` | `btnLogout`
`private amber.server.component.FloatButtonHandler` | `btnMain`
`private amber.server.component.ButtonHandler` | `btnRemove`
`private amber.server.component.FloatButtonHandler` | `btnUpdate`
`private amber.server.component.FloatButtonHandler` | `btnUpdateLocal`
`private MainFrame` | `caller`
`private amber.server.component.ChoiceHandler` | `chInterested`
`int` | `FRAMEHEIGHT`
`int` | `FRAMEWIDTH`
`private amber.server.component.ImageHandler` | `imgBanner`
`private Stock_Data[]` | `interested`
`private amber.server.component.LabelHandler` | `lblAccountDetails`
`private amber.server.component.LabelHandler` | `lblCity`
`private amber.server.component.LabelHandler` | `lblContactAddress`
`private amber.server.component.LabelHandler` | `lblCountry`
`private amber.server.component.LabelHandler` | `lblEmail`
`private amber.server.component.LabelHandler` | `lblFirstName`
`private amber.server.component.LabelHandler` | `lblInfo`
`private amber.server.component.LabelHandler` | `lblInterestedStocks`
`private amber.server.component.LabelHandler` | `lblLastName`
`private amber.server.component.LabelHandler` | `lblOrganisation`
`private amber.server.component.LabelHandler` | `lblPersonOrganisation`
`private amber.server.component.LabelHandler` | `lblPhoneNumber`
`private amber.server.component.LabelHandler` | `lblPreBillingAmount`
`private amber.server.component.LabelHandler` | `lblStockPreferences`
`private amber.server.component.LabelHandler` | `lblStreet`
`private amber.server.component.LabelHandler` | `lblSuburb`
`private java.awt.Font` | `level1`
`private java.awt.Font` | `level2`
`private Stock_Data[]` | `listed`
`private amber.server.component.ListHandler` | `lstStocks`
`private ServletConnection` | `servletconn`
`private amber.server.component.TextFieldHandler` | `txtCity`
`private amber.server.component.TextFieldHandler` | `txtCountry`
`private amber.server.component.TextFieldHandler` | `txtEmail`
`private amber.server.component.TextFieldHandler` | `txtFirstName`
`private amber.server.component.TextFieldHandler` | `txtLastName`
`private amber.server.component.TextFieldHandler` | `txtOrganisation`
`private amber.server.component.TextFieldHandler` | `txtPhone`
`private amber.server.component.TextFieldHandler` | `txtPreBillingAmount`
`private amber.server.component.TextFieldHandler` | `txtStreet`
`private amber.server.component.TextFieldHandler` | `txtSuburb`
`private UserManager` | `umanager`
`private User_Data` | `userdata`
`private XmlGenerator` | `xmlgenerator`
`private XmlUnmarshal` | `xmlunmarshal`

Fields inherited from class amber.server.panel.BaseFrame
`title`

Fields inherited from class amber.server.panel.BasePanel
`autoDoLayoutState, xOffset, yOffset`

Fields inherited from class amber.server.component.PanelHandler
`AddOperation, autoRedrawState, defaultSpecialKeyCodes, defaultSpecialModifiers, drawOperations, InsertOperation, PaintPanel, PanelNextAvailableCommand, postInPacketListeners, preInPacketListeners, RemoveAllOperations, RemoveOperation, ReplaceOperation, SetBorder, SetReDraw, SetSpecialKeys, specialKeyCodesCache, SpecialKeyEvent, specialKeyModifierCache`

Fields inherited from class amber.server.component.ComponentHandler
`actionCommand, active, ApplicationId, CancelReturn, dataEncoder, DefaultTimeout, enabledState, encoderBytes, id, InvalidId, MaximumId, NoReturn, OkCancelType, OkReturn, OkType, OkYesReturn, parentPage, responsePackets, timeoutValue, UnchangeableInvalidId, visibleState, YesNoCancelType, YesNoType, YesReturn`

Fields inherited from class java.awt.Component
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Fields inherited from interface amber.server.panel.ContainerHandler
`AddComponent, AutoDoLayout, ForceDoLayout, GetInsets, GetInsetsResponse, NextAvailableCommand, RemoveAllComponents, RemoveComponent, SetBounds`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`UpdateFrame()` This is the constructor for UpdateFrame.java
`UpdateFrame(amber.server.application.ApplicationInterface appHandler)` The initialising constructor.
`UpdateFrame(amber.server.application.ApplicationInterface appHandler, MainFrame mf)` The initialising constructor.
`UpdateFrame(int id, amber.server.application.ApplicationInterface appHandler)` The initialising constructor.

Method Summary
`void` | `actionPerformed(java.awt.event.ActionEvent e)`
`private void` | `addComponents()` This method is being used for adding components to the 3 panels.
`private void` | `addListeners()` This method is being used for adding listeners to the components that are being used in this frame.
`boolean` | `canClose()` This function determines if the panel can be closed.
`private void` | `closeWindow()` This method is being used for preparing for the closure of the window.
`protected void` | `defineComponents()` This function is called to define the components which are a part of this panel.
`void` | `fillControls()` This function would normally never need to be called, but is required to be defined as it is called internally.
`private Stock_Data[]` | `getStocks(java.lang.String[] names)` This method is being used for getting all the stocks specified by the names.
`protected StockTradingApplication` | `getStockTradingApplication()` This method is being used for getting the parent application.
`private boolean` | `isNumber(java.lang.String s)` This utility method is being used for checking if the given string is a number
`private void` | `preFillDataFields()` This method is being used for pre-setting the components using the data classes.
`void` | `saveData()` This function is called to save any required information in the panel.
`private void` | `setProperties()` This method is being used for setting the properties of components being used in this frame.
`void` | `windowActivated(amber.awt.event.ComponentWindowEvent arg0)`
`void` | `windowClosed(amber.awt.event.ComponentWindowEvent arg0)`
`void` | `windowClosing(amber.awt.event.ComponentWindowEvent arg0)`
`void` | `windowDeactivated(amber.awt.event.ComponentWindowEvent arg0)`
`void` | `windowDeiconified(amber.awt.event.ComponentWindowEvent arg0)`
`void` | `windowIconified(amber.awt.event.ComponentWindowEvent arg0)`
`void` | `windowOpened(amber.awt.event.ComponentWindowEvent arg0)`

Methods inherited from class amber.server.panel.BaseFrame
`getPanelType, getTitle, isVisible, setActive, setBounds, setBounds, setInternalBounds, setInternalBounds, setInternalLocation, setInternalLocation, setInternalSize, setInternalSize, setLocation, setLocation, setSize, setSize, setTitle, setVisible, toBack, toFront`

Methods inherited from class amber.server.panel.BasePanel
`add, addComponent, addInPostPacketListener, addInPrePacketListener, buildComponent, buildComponent, doPanelLayout, fireInPostPacketPerformed, fireInPrePacketPerformed, forwardPacket, getAutoDoLayout, getComponents, getComponentStructure, getInsets, getPanelComponent, getPanelComponentAt, getPanelComponentAt, getPanelComponentAt, getPanelComponentAt, getPanelGroup, isMyId, isSelected, matchComponentToControl, matchIdToControl, processCurrentPacket, recreatePanel, remove, removeComponent, removeInPostPacketListener, removeInPrePacketListener, setAutoDoLayout, setBounds, setBounds, setComponentBaseOffset, setLocation, setLocation, setPanelGroup, setPanelLocation, setPanelLocation, setSelected, setSelectedInternal, setSize, setSize, setUpComponent`

Methods inherited from class amber.server.component.PanelHandler
`addComponent, addComponent, addDraw3DRect, addDrawArc, addDrawImage, addDrawImage, addDrawImage, addDrawImage, addDrawLine, addDrawOval, addDrawPolygon, addDrawPolyline, addDrawRect, addDrawRoundRect, addDrawString, addDrawString, addFill3DRect, addFillArc, addFillOval, addFillPolygon, addFillRect, addFillRoundRect, addOperation, addSetClip, addSetColour, addSetFont, addSetPaintMode, addSetXORMode, addSpecialKeyListener, disableSpecialKeyEvents, enableSpecialKeyEvents, getDrawOperations, getSpecialKeyCodes, handlePacket, handleToIndex, insertDraw3DRect, insertDrawArc, insertDrawImage, insertDrawImage, insertDrawImage, insertDrawImage, insertDrawLine, insertDrawPolygon, insertDrawPolyline, insertDrawRect, insertDrawRoundRect, insertDrawString, insertDrawString, insertFill3DRect, insertFill3DRect, insertFillArc, insertFillOval, insertFillPolygon, insertFillRect, insertFillRoundRect, insertOperation, insertSetClip, insertSetColour, insertSetFont, insertSetPaintMode, insertSetXORMode, performSetBounds, performSetLocation, performSetSize, processEvent, processSpecialKeyEvent, removeAllComponents, removeAllDrawOperations, removeDrawOperation, removeSpecialKeyListener, repaintPanel, replaceDraw3DRect, replaceDrawArc, replaceDrawImage, replaceDrawImage, replaceDrawImage, replaceDrawImage, replaceDrawLine, replaceDrawPolygon, replaceDrawPolyline, replaceDrawRect, replaceDrawRoundRect, replaceDrawString, replaceDrawString, replaceFill3DRect, replaceFill3DRect, replaceFillArc, replaceFillOval, replaceFillPolygon, replaceFillRect, replaceFillRoundRect, replaceOperation, replaceSetClip, replaceSetColour, replaceSetFont, replaceSetPaintMode, replaceSetXORMode, resetState, setAutoRepaint, setBorder, setSpecialKeyCodes, setSpecialKeyEventState`

Methods inherited from class amber.server.component.ComponentHandler
`addActionListener, addCloseable, addComponentListener, addEventMask, addFocusListener, addItemListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addReceivedPacket, addTextListener, addWindowListener, booleanToInt, createDataInput, directPacket, displayMessageBox, fireWindowActivated, fireWindowClosed, fireWindowClosing, fireWindowDeactivated, fireWindowDeiconified, fireWindowEvent, fireWindowIconified, fireWindowOpened, forceComponentGetUrl, forceComponentGetUrl, forwardEventPacket, generateActionEvent, generateFocusEvent, generateItemEvent, generateKeyEvent, generateMouseEvent, getActionCommand, getAllCloseable, getBounds, getDataEncoderStream, getDefaultParameters, getEncoderStream, getEventMask, getFontCharacteristics, getFontCharacteristics, getFontCharacteristics, getFontCharacteristics, getFontStyle, getId, getLocation, getLog, getMaximumSize, getMinimumSize, getModalObject, getParentApplication, getParentContainer, getParentServer, getPreferredSize, getRemoteProperties, getResponsePacket, getSelectedObjects, getSize, getSizeCharacteristics, getTimeout, getToolTip, getValidId, getX, getY, handleMessages, internalForwardPacket, internalGetBounds, intToBoolean, isActive, isApplicationActive, isComponentModal, isConnected, isEnabled, isSpecialPacket, processActionEvent, processApplicationPacket, processComponentEvent, processFocusEvent, processItemEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processNormalResponse, processTextEvent, queryMessageBox, removeActionListener, removeCloseable, removeComponentListener, removeEventMask, removeFocusListener, removeItemListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removeTextListener, removeToolTip, removeWindowListener, requestFocus, restart, sendPacket, sendPacketAndBlock, sendPacketAndBlock, sendPendingPackets, setActionCommand, setBackground, setComponentModal, setConnectedState, setCursor, setEnabled, setEventMask, setFont, setFont, setFontStyle, setForeground, setForegroundBackground, setId, setLog, setModalObject, setParentApplication, setParentContainer, setParentServer, setRemoteProperties, setTimeout, setToolTip, setX, setY, shutDown, shutDownClient, shutDownClient, start`

Methods inherited from class java.awt.Component
`action, add, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, getWidth, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setName, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### addressdata

    private UserAddress_Data addressdata

### btnAdd

    private amber.server.component.ButtonHandler btnAdd

### btnLogout

    private amber.server.component.FloatButtonHandler btnLogout

### btnMain

    private amber.server.component.FloatButtonHandler btnMain

### btnRemove

    private amber.server.component.ButtonHandler btnRemove

### btnUpdate

    private amber.server.component.FloatButtonHandler btnUpdate

### btnUpdateLocal

    private amber.server.component.FloatButtonHandler btnUpdateLocal

### caller

    private MainFrame caller

### chInterested

    private amber.server.component.ChoiceHandler chInterested

### FRAMEHEIGHT

    public final int FRAMEHEIGHT

See Also:
  Constant Field Values

### FRAMEWIDTH

    public final int FRAMEWIDTH

See Also:
  Constant Field Values

### imgBanner

    private amber.server.component.ImageHandler imgBanner

### interested

    private Stock_Data[] interested

### lblAccountDetails

    private amber.server.component.LabelHandler lblAccountDetails

### lblCity

    private amber.server.component.LabelHandler lblCity

### lblContactAddress

    private amber.server.component.LabelHandler lblContactAddress

### lblCountry

    private amber.server.component.LabelHandler lblCountry

### lblEmail

    private amber.server.component.LabelHandler lblEmail

### lblFirstName

    private amber.server.component.LabelHandler lblFirstName

### lblInfo

    private amber.server.component.LabelHandler lblInfo

### lblInterestedStocks

    private amber.server.component.LabelHandler lblInterestedStocks

### lblLastName

    private amber.server.component.LabelHandler lblLastName

### lblOrganisation

    private amber.server.component.LabelHandler lblOrganisation

### lblPersonOrganisation

    private amber.server.component.LabelHandler lblPersonOrganisation

### lblPhoneNumber

    private amber.server.component.LabelHandler lblPhoneNumber

### lblPreBillingAmount

    private amber.server.component.LabelHandler lblPreBillingAmount

### lblStockPreferences

    private amber.server.component.LabelHandler lblStockPreferences

### lblStreet

    private amber.server.component.LabelHandler lblStreet

### lblSuburb

    private amber.server.component.LabelHandler lblSuburb

### level1

    private java.awt.Font level1

### level2

    private java.awt.Font level2

### listed

    private Stock_Data[] listed

### lstStocks

    private amber.server.component.ListHandler lstStocks

### servletconn

    private ServletConnection servletconn

### txtCity

    private amber.server.component.TextFieldHandler txtCity

### txtCountry

    private amber.server.component.TextFieldHandler txtCountry

### txtEmail

    private amber.server.component.TextFieldHandler txtEmail

### txtFirstName

    private amber.server.component.TextFieldHandler txtFirstName

### txtLastName

    private amber.server.component.TextFieldHandler txtLastName

### txtOrganisation

    private amber.server.component.TextFieldHandler txtOrganisation

### txtPhone

    private amber.server.component.TextFieldHandler txtPhone

### txtPreBillingAmount

    private amber.server.component.TextFieldHandler txtPreBillingAmount

### txtStreet

    private amber.server.component.TextFieldHandler txtStreet

### txtSuburb

    private amber.server.component.TextFieldHandler txtSuburb

### umanager

    private UserManager umanager

### userdata

    private User_Data userdata

### xmlgenerator

    private XmlGenerator xmlgenerator

### xmlunmarshal

    private XmlUnmarshal xmlunmarshal

Constructor Detail

### UpdateFrame

    public UpdateFrame()

  This is the constructor for UpdateFrame.java

### UpdateFrame

    public UpdateFrame(amber.server.application.ApplicationInterface appHandler)

  The initialising constructor.

Parameters:
  `appHandler` - The handle to the main ApplicationInterface which handles the functions of the overall application.

### UpdateFrame

    public UpdateFrame(amber.server.application.ApplicationInterface appHandler,
                       MainFrame mf)

  The initialising constructor.

Parameters:
  `appHandler` - The handle to the main ApplicationInterface which handles the functions of the overall application.

### UpdateFrame

    public UpdateFrame(int id,
                       amber.server.application.ApplicationInterface appHandler)

  The initialising constructor.

Parameters:
  `id` - The int containing the id of the corresponding remote component residing on the browser.
  `appHandler` - The handle to the main ApplicationInterface which handles the functions of the overall application.

Method Detail

### actionPerformed

    public void actionPerformed(java.awt.event.ActionEvent e)

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

### addComponents

    private void addComponents()

  This method is being used for adding components to the 3 panels.

  Returns:
    void

### addListeners

    private void addListeners()

  This method is being used for adding listeners to the components that are being used in this frame.

  Returns:
    void

### canClose

    public boolean canClose()

  This function determines if the panel can be closed. The derived panels must determine if this panel can close. If this is not possible the function should return false.

  Specified by:
    `canClose` in interface `amber.server.panel.ContainerHandler`
  Returns:
    boolean false if it is not possible to close this panel.

### closeWindow

    private void closeWindow()

  This method is being used for preparing for the closure of the window.

  Returns:
    void

### defineComponents

    protected void defineComponents()

  This function is called to define the components which are a part of this panel. This function is called by the constructor to set up the normal static components and their locations. This method is required.

### fillControls

    public void fillControls()

  This function would normally never need to be called, but is required to be defined as it is called internally. Its specific purpose is to set the controls to a known state once they are created.

  Specified by:
    `fillControls` in interface `amber.server.panel.ContainerHandler`

### getStocks

    private Stock_Data[] getStocks(java.lang.String[] names)

  This method is being used for getting all the stocks specified by the names.

  Parameters:
    `names` - The names of all the stocks to be retrieved.
  Returns:
    Stock_Data[] The stocks which retrieved.

### getStockTradingApplication

    protected StockTradingApplication getStockTradingApplication()

  This method is being used for getting the parent application.

  Returns:
    StockTradingApplication The parent application.

### isNumber

    private boolean isNumber(java.lang.String s)

  This utility method is being used for checking if the given string is a number

  Parameters:
    `s` - The string to be checked.
  Returns:
    boolean Specifies whether the given string is a number.

### preFillDataFields

    private void preFillDataFields()

  This method is being used for pre-setting the components using the data classes.

  Returns:
    void

### saveData

    public void saveData()

  This function is called to save any required information in the panel. This function is called externally when another panel wishes to take over the base panel or when closing the panel. This function need not actually do something.

  Specified by:
    `saveData` in interface `amber.server.panel.ContainerHandler`

### setProperties

    private void setProperties()

  This method is being used for setting the properties of components being used in this frame.

  Returns:
    void

### windowActivated

    public void windowActivated(amber.awt.event.ComponentWindowEvent arg0)

  Specified by:
    `windowActivated` in interface `amber.awt.event.ComponentWindowListener`

### windowClosed

    public void windowClosed(amber.awt.event.ComponentWindowEvent arg0)

  Specified by:
    `windowClosed` in interface `amber.awt.event.ComponentWindowListener`

### windowClosing

    public void windowClosing(amber.awt.event.ComponentWindowEvent arg0)

  Specified by:
    `windowClosing` in interface `amber.awt.event.ComponentWindowListener`

### windowDeactivated

    public void windowDeactivated(amber.awt.event.ComponentWindowEvent arg0)

  Specified by:
    `windowDeactivated` in interface `amber.awt.event.ComponentWindowListener`

### windowDeiconified

    public void windowDeiconified(amber.awt.event.ComponentWindowEvent arg0)

  Specified by:
    `windowDeiconified` in interface `amber.awt.event.ComponentWindowListener`

### windowIconified

    public void windowIconified(amber.awt.event.ComponentWindowEvent arg0)

  Specified by:
    `windowIconified` in interface `amber.awt.event.ComponentWindowListener`

### windowOpened

    public void windowOpened(amber.awt.event.ComponentWindowEvent arg0)

  Specified by:
    `windowOpened` in interface `amber.awt.event.ComponentWindowListener`

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD