amber.server.panel
Class GenericPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--amber.server.component.ComponentHandler
              |
              +--amber.server.component.PanelHandler
                    |
                    +--amber.server.panel.BasePanel
                          |
                          +--amber.server.panel.GenericPanel
All Implemented Interfaces:
ApplicationInterface, ContainerHandler, java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.io.Serializable

public class GenericPanel
extends BasePanel
implements java.io.Serializable

This class is a simple extension to the BasePanel class and allows the user to perform general panel operations without the requirement to subclass BasePanel.

See Also:
ApplicationInterface, BasePanel, Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Fields inherited from class amber.server.panel.BasePanel
autoDoLayoutState, xOffset, yOffset
 
Fields inherited from class amber.server.component.PanelHandler
AddOperation, autoRedrawState, drawOperations, InsertOperation, PaintPanel, PanelNextAvailableCommand, postInPacketListeners, preInPacketListeners, RemoveAllOperations, RemoveOperation, ReplaceOperation, SetBorder, SetReDraw
 
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
GenericPanel()
          Default constructor.
GenericPanel(ApplicationInterface pageHandler)
          The initialising constructor.
GenericPanel(ApplicationInterface pageHandler, PanelTemplateGroup panelGroup, boolean selectedState)
          The initialising constructor.
GenericPanel(ApplicationInterface pageHandler, PanelTemplateGroup panelGroup, boolean selectedState, int x, int y)
          The initialising constructor.
GenericPanel(int id, ApplicationInterface pageHandler)
          The initialising constructor.
GenericPanel(int id, int baseOffset, ApplicationInterface pageHandler)
          The initialising constructor.
GenericPanel(int id, int baseOffset, ApplicationInterface pageHandler, PanelTemplateGroup panelGroup, boolean selectedState)
          The initialising constructor.
GenericPanel(int id, int baseOffset, ApplicationInterface pageHandler, PanelTemplateGroup panelGroup, boolean selectedState, int x, int y)
          The initialising constructor.
 
Method Summary
 boolean canClose()
          This function determines if the panel can be closed.
 void defineComponents()
          This function is called to define the components which are a part of this template.
 void fillControls()
          This function should be called at the end of recreatePanel.
 void saveData()
          This function is called to save any required information in the panel.
 
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, setActive, 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, addDrawLine, addDrawOval, addDrawPolygon, addDrawPolyline, addDrawRect, addDrawRoundRect, addDrawString, addDrawString, addFill3DRect, addFillArc, addFillOval, addFillPolygon, addFillRect, addFillRoundRect, addOperation, addSetClip, addSetColour, addSetFont, addSetPaintMode, addSetXORMode, getDrawOperations, getPanelType, handleToIndex, insertDraw3DRect, insertDrawArc, 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, removeAllComponents, removeAllDrawOperations, removeDrawOperation, repaintPanel, replaceDraw3DRect, replaceDrawArc, 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, setBounds, setBounds, setLocation, setLocation, setSize, setSize
 
Methods inherited from class amber.server.component.ComponentHandler
addActionListener, 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, getBounds, getDefaultParameters, getEventMask, getFontCharacteristics, getFontCharacteristics, getFontCharacteristics, getFontCharacteristics, getFontStyle, getId, getLocation, getLog, getModalObject, getParentApplication, getParentContainer, getParentServer, getResponsePacket, getSelectedObjects, getSize, getTimeout, getValidId, getX, getY, handleMessages, handlePacket, internalForwardPacket, internalGetBounds, intToBoolean, isActive, isApplicationActive, isComponentModal, isConnected, isEnabled, isVisible, processActionEvent, processComponentEvent, processEvent, processFocusEvent, processItemEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processNormalResponse, processTextEvent, queryMessageBox, removeActionListener, removeComponentListener, removeEventMask, removeFocusListener, removeItemListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removeTextListener, removeWindowListener, requestFocus, restart, sendPacket, sendPacketAndBlock, sendPendingPackets, setActionCommand, setBackground, setComponentModal, setConnectedState, setCursor, setEnabled, setEventMask, setFont, setFont, setFontStyle, setForeground, setForegroundBackground, setId, setLog, setModalObject, setParentApplication, setParentContainer, setParentServer, setTimeout, setVisible, setX, setY, shutDown, shutDownClient, shutDownClient, start
 
Methods inherited from class java.awt.Component
action, add, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getToolkit, getTreeLock, getWidth, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isFocusTraversable, 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, remove, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, reshape, resize, resize, setComponentOrientation, setDropTarget, setLocale, setName, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericPanel

public GenericPanel()
Default constructor.

GenericPanel

public GenericPanel(ApplicationInterface pageHandler)
The initialising constructor. This constructor dynamically requests a valid ID value from the ApplicationInterface.
Parameters:
pageHandler - The handle to the main ApplicationInterface which handles the functions of page overall. residing on the browser.

GenericPanel

public GenericPanel(int id,
                    ApplicationInterface pageHandler)
The initialising constructor.
Parameters:
id - The int containing the id of the corresponding remote component residing on the browser.
pageHandler - The handle to the main ApplicationInterface which handles the functions of page overall.

GenericPanel

public GenericPanel(ApplicationInterface pageHandler,
                    PanelTemplateGroup panelGroup,
                    boolean selectedState)
The initialising constructor. This constructor dynamically requests a valid ID value from the ApplicationInterface.
Parameters:
pageHandler - The handle to the main ApplicationInterface which handles the functions of page overall. residing on the browser.
panelGroup - PanelTemplateGroup class which is used to stitch several panels onto one base panel.
selectedState - boolean true if this is the selected panel template.

GenericPanel

public GenericPanel(ApplicationInterface pageHandler,
                    PanelTemplateGroup panelGroup,
                    boolean selectedState,
                    int x,
                    int y)
The initialising constructor. This constructor dynamically requests a valid ID value from the ApplicationInterface.
Parameters:
pageHandler - The handle to the main ApplicationInterface which handles the functions of page overall. residing on the browser.
panelGroup - PanelTemplateGroup class which is used to stitch several panels onto one base panel.
selectedState - boolean true if this is the selected panel template.
x - int x coordinate of the top left point of the panel in the drawing panel. This can be used to offset the drawing of the controls in the panel.
y - int y coordinate of the top left point of the panel in the drawing panel.

GenericPanel

public GenericPanel(int id,
                    int baseOffset,
                    ApplicationInterface pageHandler)
The initialising constructor.
Parameters:
id - The int containing the id of the corresponding remote component residing on the browser.
baseOffset - The int containing the base offset for the id's of the internal panel components.
pageHandler - The handle to the main ApplicationInterface which handles the functions of page overall.

GenericPanel

public GenericPanel(int id,
                    int baseOffset,
                    ApplicationInterface pageHandler,
                    PanelTemplateGroup panelGroup,
                    boolean selectedState)
The initialising constructor.
Parameters:
id - The int containing the id of the corresponding remote component residing on the browser.
baseOffset - The int containing the base offset for the id's of the internal panel components.
pageHandler - The handle to the main ApplicationInterface which handles the functions of page overall.
panelGroup - PanelTemplateGroup class which is used to stitch several panels onto one base panel.
selectedState - boolean true if this is the selected panel template.

GenericPanel

public GenericPanel(int id,
                    int baseOffset,
                    ApplicationInterface pageHandler,
                    PanelTemplateGroup panelGroup,
                    boolean selectedState,
                    int x,
                    int y)
The initialising constructor.
Parameters:
id - The int containing the id of the corresponding remote component residing on the browser.
baseOffset - The int containing the base offset for the id's of the internal panel components.
pageHandler - The handle to the main ApplicationInterface which handles the functions of page overall.
panelGroup - PanelTemplateGroup class which is used to stitch several panels onto one base panel.
selectedState - boolean true if this is the selected panel template.
x - int x coordinate of the top left point of the panel in the drawing panel. This can be used to offset the drawing of the controls in the panel.
y - int y coordinate of the top left point of the panel in the drawing panel.
Method Detail

fillControls

public void fillControls()
This function should be called at the end of recreatePanel. Its specific purpose is to set the controls to a known state once they are created.
Following copied from interface: amber.server.panel.ContainerHandler
See Also:
BasePanel.defineComponents()

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.
Returns:
boolean false if it is not possible to close this panel.

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.
Following copied from interface: amber.server.panel.ContainerHandler
See Also:
PanelTemplateGroup

defineComponents

public void defineComponents()
This function is called to define the components which are a part of this template. This function is called by the derived constructor to set up the normal static components and their location. It cannot be called from the constructor of this class as the components are not likely to be created. It is important to note that components should be added to the panel using the setUpComponent function rather than addComponent. addComponent will attempt to create the component at the remote location which will not be possible when defineComponents is called.
Overrides:
defineComponents in class BasePanel


Copyright © 2002 Clearfield Research Ltd. All Rights Reserved.