amber.server.component
Class FrameHandler

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

public class FrameHandler
extends PanelHandler
implements java.io.Serializable

This class handles the requirements for the manipulation of the packets moving to and from a frame component. This component functions similarly to the PanelHandler except rather than controlling a panel embedded in the HTML file it creates a separate window outside of the browser. It is recommended that if frames are to be used the classes in the package amber.server.panel are used. These have substantially more functionality relating to the handling of child controls.

The remote client class also responds to information stored in the parameters field of the XYConstraints object when this handler is added to a panel. The allowed parameters are separated in the string by '|' characters. Any unused trailing parameters are optional and will assume default values, however the parameter order is fixed.

For example, if the component takes 4 parameters which are ints, a valid parameter string would be:

"1|2|3"

In this case the fourth parameter would assume the default value.

The parameter elements for this component are:

Component Parameters
NameTypeDescriptionRepeatsDefault

Version:
1.0.0
Author:
Dr. David J. Knowles
See Also:
ApplicationInterface, ComponentHandler, BaseFrame, XYConstraints, Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
static byte SetFrameBounds
           
static byte SetFrameVisible
           
static byte SetTitle
           
static byte SetToFront
           
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
FrameHandler()
          Default constructor.
FrameHandler(ApplicationInterface pageHandler)
          The initialising constructor.
FrameHandler(int id, ApplicationInterface pageHandler)
          The initialising constructor.
 
Method Summary
 java.lang.String getPanelType()
          This function returns the panel component to use with this class.
 void setBounds(int x, int y, int width, int height)
          Moves and resizes this component to conform to the new position and size specified by the parameters.
 void setBounds(java.awt.Rectangle r)
          Moves and resizes this component to conform to the new bounding rectangle r.
 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)
          Sets the window title to the input value.
 void toBack()
          Sends the frame to the back.
 void toFront()
          Brings the frame to the front.
 
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, removeComponent, 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, getComponentStructure, 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, isMyId, isVisible, processActionEvent, processComponentEvent, processCurrentPacket, 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, setActive, 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
 

Field Detail

SetFrameVisible

public static final byte SetFrameVisible

SetFrameBounds

public static final byte SetFrameBounds

SetTitle

public static final byte SetTitle

SetToFront

public static final byte SetToFront
Constructor Detail

FrameHandler

public FrameHandler()
Default constructor.

FrameHandler

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

FrameHandler

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

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.

setBounds

public void setBounds(java.awt.Rectangle r)
Moves and resizes this component to conform to the new bounding rectangle r. This component's new position is specified by r.x and r.y, and its new size is specified by r.width and r.height
Overrides:
setBounds in class PanelHandler
Parameters:
r - Rectangle containing the bounds of the frame.

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Moves and resizes this component to conform to the new position and size specified by the parameters. This component's new position is specified by x and y, and its new size is specified by width and height
Overrides:
setBounds in class PanelHandler
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.

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.

setTitle

public void setTitle(java.lang.String title)
Sets the window title to the input value.
Parameters:
title - String containing the new title of the window.

toFront

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

toBack

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

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.


Copyright © 2002 Clearfield Research Ltd. All Rights Reserved.