amber.server.panel
Class BaseFrame

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

public abstract class BaseFrame
extends BasePanel
implements java.io.Serializable

This class is an extension to the BasePanel class and handles the extra requirements inherent in the fact that this class handles a window rather than a panel which lives inside some type of container such as an HTML page.

See Also:
ApplicationInterface, BasePanel, Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
protected  java.lang.String title
           
 
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
BaseFrame()
          Default constructor.
BaseFrame(ApplicationInterface pageHandler)
          The initialising constructor.
BaseFrame(ApplicationInterface pageHandler, PanelTemplateGroup panelGroup, boolean selectedState)
          The initialising constructor.
BaseFrame(int id, ApplicationInterface pageHandler)
          The initialising constructor.
BaseFrame(int id, int baseOffset, ApplicationInterface pageHandler)
          The initialising constructor.
BaseFrame(int id, int baseOffset, ApplicationInterface pageHandler, PanelTemplateGroup panelGroup, boolean selectedState)
          The initialising constructor.
 
Method Summary
 java.lang.String getPanelType()
          This function returns the panel component to use with this class.
 java.lang.String getTitle()
          This function gets the title in the frame caption.
 boolean isVisible()
          This returns the current visible state of the frame.
 void setActive(boolean state)
          This function tells the ComponentHandler that there is a corresponding remote component to communicate with and that the link is active.
 void setBounds(int x, int y, int width, int height)
          This is used to set the size and location of the corresponding remote frame.
 void setBounds(java.awt.Rectangle r)
          This is used to set the size and location of the corresponding remote frame.
 void setInternalBounds(int x, int y, int width, int height)
          Resizes the internal panel in the frame window.
 void setInternalBounds(java.awt.Rectangle r)
          Resizes the internal panel in the frame window.
 void setInternalLocation(int x, int y)
          Moves the internal panel in the frame window.
 void setInternalLocation(java.awt.Point p)
          Moves the internal panel in the frame window.
 void setInternalSize(java.awt.Dimension d)
          Resizes the internal panel in the frame window.
 void setInternalSize(int width, int height)
          Resizes the internal panel in the frame window.
 void setLocation(int x, int y)
          Moves the frame to the new location on the screen.
 void setLocation(java.awt.Point p)
          Moves the frame to the new location on the screen.
 void setSize(java.awt.Dimension d)
          Resizes this component to conform to the new size.
 void setSize(int width, int height)
          Resizes this component to conform to the new size.
 void setTitle(java.lang.String title)
          This function sets the title in the frame caption.
 void setVisible(boolean state)
          This function is called to make the corresponding remote frame visible or invisible.
 void toBack()
          Sends the frame to the back.
 void toFront()
          Brings the frame to the front.
 
Methods inherited from class amber.server.panel.BasePanel
add, addComponent, addInPostPacketListener, addInPrePacketListener, buildComponent, buildComponent, defineComponents, 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, addDrawLine, addDrawOval, addDrawPolygon, addDrawPolyline, addDrawRect, addDrawRoundRect, addDrawString, addDrawString, addFill3DRect, addFillArc, addFillOval, addFillPolygon, addFillRect, addFillRoundRect, addOperation, addSetClip, addSetColour, addSetFont, addSetPaintMode, addSetXORMode, getDrawOperations, 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
 
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, 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, 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
 
Methods inherited from interface amber.server.panel.ContainerHandler
canClose, fillControls, saveData
 

Field Detail

title

protected java.lang.String title
Constructor Detail

BaseFrame

public BaseFrame()
Default constructor.

BaseFrame

public BaseFrame(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.

BaseFrame

public BaseFrame(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.

BaseFrame

public BaseFrame(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.

BaseFrame

public BaseFrame(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.

BaseFrame

public BaseFrame(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.
Method Detail

setVisible

public void setVisible(boolean state)
This function is called to make the corresponding remote frame visible or invisible.
Overrides:
setVisible in class ComponentHandler
Parameters:
state - boolean true if the form is to be visible.
Throws:
java.lang.RuntimeException - containing the error information.

isVisible

public boolean isVisible()
This returns the current visible state of the frame.
Overrides:
isVisible in class ComponentHandler
Returns:
boolean true if the form is to be visible.

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
This is used to set the size and location of the corresponding remote frame.
Overrides:
setBounds in class PanelHandler
Parameters:
x - int x location of the top left corner.
y - int y location of the top left corner.
width - int width of the frame.
height - int height of the frame.
Throws:
java.lang.RuntimeException - containing the error information.

setBounds

public void setBounds(java.awt.Rectangle r)
This is used to set the size and location of the corresponding remote frame.
Overrides:
setBounds in class PanelHandler
Parameters:
r - Rectangle containing frame coordinates.
Throws:
java.lang.RuntimeException - containing the error information.

setTitle

public void setTitle(java.lang.String title)
This function sets the title in the frame caption.
Parameters:
title - String title for the window frame.
Throws:
java.lang.RuntimeException - containing the error information.

setActive

public void setActive(boolean state)
               throws ComponentHandlerException
This function tells the ComponentHandler that there is a corresponding remote component to communicate with and that the link is active. When active all pending packets are flushed to the remote component. If the panel has been set active more than once setting it active again will force a recreation of the panel at the remote client.
Overrides:
setActive in class BasePanel
Parameters:
state - boolean state which when true enables the component. This is the default.
Throws:
ComponentHandlerException - with any errors.

getTitle

public java.lang.String getTitle()
This function gets the title in the frame caption. This will only return the title set from the setTitle function. Static titles set in the applet tag will not be displayed.
Returns:
String title for the window frame.
Throws:
java.lang.RuntimeException - containing the error information.

getPanelType

public java.lang.String getPanelType()
This function returns the panel component to use with this class.
Overrides:
getPanelType in class PanelHandler
Returns:
String containing the panel type to use.

setLocation

public void setLocation(java.awt.Point p)
Moves the frame to the new location on the screen. The new location is specified by the input point.
Overrides:
setLocation in class PanelHandler
Parameters:
p - Point containing the new location.

setLocation

public void setLocation(int x,
                        int y)
Moves the frame to the new location on the screen. The new location is specified by the input x and y coordinates.
Overrides:
setLocation in class PanelHandler
Parameters:
x - int x coordinate of the top left corner.
y - int y coordinate of the top left corner.

setSize

public void setSize(java.awt.Dimension d)
Resizes this component to conform to the new size. This component's new size is specified by the input dimension.
Overrides:
setSize in class PanelHandler
Parameters:
d - Dimension containing the new size.

setSize

public void setSize(int width,
                    int height)
Resizes this component to conform to the new size. This component's new size is specified by width and height.
Overrides:
setSize in class PanelHandler
Parameters:
width - int width of new size.
height - int height of new size.

setInternalLocation

public void setInternalLocation(java.awt.Point p)
                         throws ComponentHandlerException
Moves the internal panel in the frame window. This does not affect the screen real estate that the frame takes up however the internal panel moves inside the frame boundaries.
Parameters:
p - Point with the specified location.
Throws:
ComponentHandlerException - with any errors.

setInternalLocation

public void setInternalLocation(int x,
                                int y)
                         throws ComponentHandlerException
Moves the internal panel in the frame window. This does not affect the screen real estate that the frame takes up however the internal panel moves inside the frame boundaries.
Parameters:
x - int x position of top left corner.
y - int y position of top left corner.
Throws:
ComponentHandlerException - with any errors.

setInternalSize

public void setInternalSize(java.awt.Dimension d)
                     throws ComponentHandlerException
Resizes the internal panel in the frame window. This does not affect the screen real estate that the frame takes up however the internal panel increases in size.
Parameters:
d - Dimension with the specified bounds.
Throws:
ComponentHandlerException - with any errors.

setInternalSize

public void setInternalSize(int width,
                            int height)
                     throws ComponentHandlerException
Resizes the internal panel in the frame window. This does not affect the screen real estate that the frame takes up however the internal panel increases in size.
Parameters:
width - int width of new size.
height - int height of new size.
Throws:
ComponentHandlerException - with any errors.

setInternalBounds

public void setInternalBounds(java.awt.Rectangle r)
                       throws ComponentHandlerException
Resizes the internal panel in the frame window. This does not affect the screen real estate that the frame takes up however the internal panel increases in size.
Parameters:
r - Rectangle with the specified bounds.
Throws:
ComponentHandlerException - with any errors.

setInternalBounds

public void setInternalBounds(int x,
                              int y,
                              int width,
                              int height)
                       throws ComponentHandlerException
Resizes the internal panel in the frame window. This does not affect the screen real estate that the frame takes up however the internal panel increases in size.
Parameters:
x - int x position of top left corner.
y - int y position of top left corner.
width - int width of new size.
height - int height of new size.
Throws:
ComponentHandlerException - with any errors.

toFront

public void toFront()
Brings the frame to the front.

toBack

public void toBack()
Sends the frame to the back.


Copyright © 2002 Clearfield Research Ltd. All Rights Reserved.