amber.server.component
Class PanelHandler

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

public class PanelHandler
extends ComponentHandler
implements java.io.Serializable

This class handles the requirements for the manipulation of the packets moving to and from a panel component. This component is currently unique in that it does relatively little itself merely acting as a holder for other components.

It is recommended that if panels 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, BasePanel, XYConstraints, Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
static byte AddOperation
           
protected  boolean autoRedrawState
          The current autoredraw state.
protected  java.util.Vector drawOperations
          A cache of the currently specified draw operations.
static byte InsertOperation
           
static byte PaintPanel
           
static byte PanelNextAvailableCommand
           
protected  java.util.Vector postInPacketListeners
           
protected  java.util.Vector preInPacketListeners
          Vector holding listeners to monitoring packet listeners.
static byte RemoveAllOperations
           
static byte RemoveOperation
           
static byte ReplaceOperation
           
static byte SetBorder
          Command
static byte 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
PanelHandler()
          Default constructor.
PanelHandler(ApplicationInterface pageHandler)
          The initialising constructor.
PanelHandler(int id, ApplicationInterface pageHandler)
          The initialising constructor.
 
Method Summary
 void addComponent(int componentId, int eventMask, int x, int y, int width, int height, java.lang.String className, java.lang.String parameters)
          This function adds a specified component to the corresponding remote Panel.
 void addComponent(int componentId, int eventMask, int x, int y, int width, int height, java.lang.String className, java.lang.String parameters, boolean redrawPanel)
          This function adds a specified component to the corresponding remote Panel.
 long addDraw3DRect(int x, int y, int width, int height, boolean raised)
          This function adds a new drawing command to the panel.
 long addDrawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
          This function adds a new drawing command to the panel.
 long addDrawImage(java.lang.String imageName, int x, int y, boolean tile)
          This function adds a new drawing command to the panel.
 long addDrawImage(java.lang.String imageName, int x, int y, int width, int height)
          This function adds a new drawing command to the panel.
 long addDrawLine(int x1, int y1, int x2, int y2)
          This function adds a new drawing command to the panel.
 long addDrawOval(int x, int y, int width, int height)
          This function adds a new drawing command to the panel.
 long addDrawPolygon(int[] x, int[] y, int numberPoints)
          This function adds a new drawing command to the panel.
 long addDrawPolyline(int[] x, int[] y, int numberPoints)
          This function adds a new drawing command to the panel.
 long addDrawRect(int x, int y, int width, int height)
          This function adds a new drawing command to the panel.
 long addDrawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          This function adds a new drawing command to the panel.
 long addDrawString(java.lang.String str, int x, int y)
          This function adds a new drawing command to the panel.
 long addDrawString(java.lang.String str, int x, int y, int alignment)
          This function adds a new drawing command to the panel.
 long addFill3DRect(int x, int y, int width, int height, boolean raised)
          This function adds a new drawing command to the panel.
 long addFillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
          This function adds a new drawing command to the panel.
 long addFillOval(int x, int y, int width, int height)
          This function adds a new drawing command to the panel.
 long addFillPolygon(int[] x, int[] y, int numberPoints)
          This function adds a new drawing command to the panel.
 long addFillRect(int x, int y, int width, int height)
          This function adds a new drawing command to the panel.
 long addFillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          This function adds a new drawing command to the panel.
protected  long addOperation(int[] drawInfo, java.lang.String data)
          This function actually performs the messaging requirements to send the drawing command to the remote panel.
 long addSetClip(int x, int y, int width, int height)
          This function adds a new drawing command to the panel.
 long addSetColour(java.awt.Color colour)
          This function adds a new drawing command to the panel.
 long addSetFont(java.lang.String fontName, int style, int size)
          This function adds a new drawing command to the panel.
 long addSetPaintMode()
          This function adds a new drawing command to the panel.
 long addSetXORMode(java.awt.Color colour)
          This function adds a new drawing command to the panel.
 java.util.Vector getDrawOperations()
          Returns the current queue of drawing operations.
 java.lang.String getPanelType()
          This function returns the panel component to use with this class.
protected  int handleToIndex(long handle)
          This function converts the handle into an index in the Vector of operations.
 long insertDraw3DRect(int x, int y, int width, int height, boolean raised, long handle)
          This function inserts a new drawing command to the panel.
 long insertDrawArc(int x, int y, int width, int height, int startAngle, int arcAngle, long handle)
          This function inserts a new drawing command to the panel.
 long insertDrawImage(java.lang.String imageName, int x, int y, boolean tile, long handle)
          This function inserts a new drawing command to the panel.
 long insertDrawImage(java.lang.String imageName, int x, int y, int width, int height, long handle)
          This function inserts a new drawing command to the panel.
 long insertDrawLine(int x1, int y1, int x2, int y2, long handle)
          This function inserts a new drawing command to the panel.
 long insertDrawPolygon(int[] x, int[] y, int numberPoints, long handle)
          This function inserts a new drawing command to the panel.
 long insertDrawPolyline(int[] x, int[] y, int numberPoints, long handle)
          This function inserts a new drawing command to the panel.
 long insertDrawRect(int x, int y, int width, int height, long handle)
          This function inserts a new drawing command to the panel.
 long insertDrawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight, long handle)
          This function inserts a new drawing command to the panel.
 long insertDrawString(java.lang.String str, int x, int y, int alignment, long handle)
          This function inserts a new drawing command to the panel.
 long insertDrawString(java.lang.String str, int x, int y, long handle)
          This function inserts a new drawing command to the panel.
 long insertFill3DRect(int x, int y, int width, int height, boolean raised, long handle)
          This function inserts a new drawing command to the panel.
 long insertFill3DRect(int x, int y, int width, int height, long handle)
          This function inserts a new drawing command to the panel.
 long insertFillArc(int x, int y, int width, int height, int startAngle, int arcAngle, long handle)
          This function inserts a new drawing command to the panel.
 long insertFillOval(int x, int y, int width, int height, long handle)
          This function inserts a new drawing command to the panel.
 long insertFillPolygon(int[] x, int[] y, int numberPoints, long handle)
          This function inserts a new drawing command to the panel.
 long insertFillRect(int x, int y, int width, int height, long handle)
          This function inserts a new drawing command to the panel.
 long insertFillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight, long handle)
          This function inserts a new drawing command to the panel.
protected  long insertOperation(int[] drawInfo, java.lang.String data, long handle)
          This function actually performs the messaging requirements to send the drawing command to the remote panel.
 long insertSetClip(int x, int y, int width, int height, long handle)
          This function inserts a new drawing command to the panel.
 long insertSetColour(java.awt.Color colour, long handle)
          This function inserts a new drawing command to the panel.
 long insertSetFont(java.lang.String fontName, int style, int size, long handle)
          This function inserts a new drawing command to the panel.
 long insertSetPaintMode(long handle)
          This function inserts a new drawing command to the panel.
 long insertSetXORMode(java.awt.Color colour, long handle)
          This function inserts a new drawing command to the panel.
protected  void performSetBounds(int x, int y, int width, int height, boolean message)
          This function is to allow derived classes the ability to bypass the setBounds functions and only set the values rather than message to the remote component.
protected  void performSetLocation(int x, int y, boolean message)
          This function is to allow derived classes the ability to bypass the setLocation functions and only set the values rather than message to the remote component.
protected  void performSetSize(int width, int height, boolean message)
          This function is to allow derived classes the ability to bypass the setSize functions and only set the values rather than message to the remote component.
 void removeAllComponents()
          This function removes all components from the corresponding remote Panel.
 void removeAllDrawOperations()
          This function removes all the specified queued draw operation from the queue of operations.
 void removeComponent(ComponentHandler component)
          This function removes a specified component from the corresponding remote Panel.
 void removeDrawOperation(long handle)
          This function removes the specified queued draw operation from the queue of operations.
 void repaintPanel()
          This forces a repaint on the panel.
 void replaceDraw3DRect(int x, int y, int width, int height, boolean raised, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceDrawArc(int x, int y, int width, int height, int startAngle, int arcAngle, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceDrawImage(java.lang.String imageName, int x, int y, boolean tile, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceDrawImage(java.lang.String imageName, int x, int y, int width, int height, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceDrawLine(int x1, int y1, int x2, int y2, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceDrawPolygon(int[] x, int[] y, int numberPoints, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceDrawPolyline(int[] x, int[] y, int numberPoints, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceDrawRect(int x, int y, int width, int height, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceDrawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceDrawString(java.lang.String str, int x, int y, int alignment, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceDrawString(java.lang.String str, int x, int y, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceFill3DRect(int x, int y, int width, int height, boolean raised, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceFill3DRect(int x, int y, int width, int height, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceFillArc(int x, int y, int width, int height, int startAngle, int arcAngle, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceFillOval(int x, int y, int width, int height, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceFillPolygon(int[] x, int[] y, int numberPoints, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceFillRect(int x, int y, int width, int height, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceFillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
protected  void replaceOperation(int[] drawInfo, java.lang.String data, long handle)
          This function actually performs the messaging requirements to send the drawing command to the remote panel.
 void replaceSetClip(int x, int y, int width, int height, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceSetColour(java.awt.Color colour, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceSetFont(java.lang.String fontName, int style, int size, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceSetPaintMode(long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void replaceSetXORMode(java.awt.Color colour, long handle)
          This function replaces the current drawing command with a new drawing command in the panel.
 void resetState()
          This function resets the component to a default state.
 void setAutoRepaint(boolean state)
          This sets the state of the automatic repaint functionality.
 void setBorder(int type)
          This function tells the remote panel to set the border to the new type.
 void setBounds(ComponentHandler component, int x, int y, int width, int height)
          This function moves the specified component in the panel.
 void setBounds(ComponentHandler component, java.awt.Rectangle rect)
          This function moves the specified component in the panel.
 void setBounds(int x, int y, int width, int height)
          This function alters the size of the panel.
 void setBounds(java.awt.Rectangle r)
          This function alters the size of the panel.
 void setLocation(ComponentHandler component, int x, int y)
          This function moves the specified component in the panel.
 void setLocation(ComponentHandler component, java.awt.Point point)
          This function moves the specified component in the panel.
 void setLocation(int x, int y)
          This function alters the internal position of the panel.
 void setLocation(java.awt.Point p)
          This function alters the internal position of the panel.
 void setSize(ComponentHandler component, java.awt.Dimension dimension)
          This function alters the size of the specified component in the panel.
 void setSize(ComponentHandler component, int width, int height)
          This function alters the size of the specified component in the panel.
 void setSize(java.awt.Dimension d)
          This function alters the size of the panel.
 void setSize(int width, int height)
          This function alters the size of the panel.
 
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

SetBorder

public static final byte SetBorder
Command

AddOperation

public static final byte AddOperation

InsertOperation

public static final byte InsertOperation

ReplaceOperation

public static final byte ReplaceOperation

RemoveOperation

public static final byte RemoveOperation

RemoveAllOperations

public static final byte RemoveAllOperations

SetReDraw

public static final byte SetReDraw

PaintPanel

public static final byte PaintPanel

PanelNextAvailableCommand

public static final byte PanelNextAvailableCommand

preInPacketListeners

protected java.util.Vector preInPacketListeners
Vector holding listeners to monitoring packet listeners.

postInPacketListeners

protected java.util.Vector postInPacketListeners

drawOperations

protected java.util.Vector drawOperations
A cache of the currently specified draw operations.

autoRedrawState

protected boolean autoRedrawState
The current autoredraw state.
Constructor Detail

PanelHandler

public PanelHandler()
Default constructor.

PanelHandler

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

PanelHandler

public PanelHandler(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

resetState

public void resetState()
This function resets the component to a default state. It is used to resynchronize the visual and internal versions of the component. IT SHOULD NEVER BE CALLED BY THE APPLICATION CODE.
Overrides:
resetState in class ComponentHandler

setAutoRepaint

public void setAutoRepaint(boolean state)
                    throws ComponentHandlerException
This sets the state of the automatic repaint functionality. If this flag is true (the default) then any draw operation will invoke a repaint operation on the client.
Parameters:
state - boolean if true then auto repaint is enabled.
Throws:
amber.server.exception.ComponentHandler - with any errors.

repaintPanel

public void repaintPanel()
                  throws ComponentHandlerException
This forces a repaint on the panel.
Throws:
amber.server.exception.ComponentHandler - with any errors.

addComponent

public void addComponent(int componentId,
                         int eventMask,
                         int x,
                         int y,
                         int width,
                         int height,
                         java.lang.String className,
                         java.lang.String parameters)
                  throws ComponentHandlerException
This function adds a specified component to the corresponding remote Panel.
Parameters:
componentId - int containing the component id.
eventMask - int containing the event mask.
x - int x coordinate of top left point of component in panel.
y - int y coordinate of top left point of component in panel.
width - int width of component in panel.
height - int height of component in panel.
className - String name of the class to instantiate on the panel.
parameters - String parameters of the component when created.
Throws:
amber.server.exception.ComponentHandler - with any errors.

addComponent

public void addComponent(int componentId,
                         int eventMask,
                         int x,
                         int y,
                         int width,
                         int height,
                         java.lang.String className,
                         java.lang.String parameters,
                         boolean redrawPanel)
                  throws ComponentHandlerException
This function adds a specified component to the corresponding remote Panel.
Parameters:
componentId - int containing the component id.
eventMask - int containing the event mask.
x - int x coordinate of top left point of component in panel.
y - int y coordinate of top left point of component in panel.
width - int width of component in panel.
height - int height of component in panel.
className - String name of the class to instantiate on the panel.
parameters - String parameters of the component when created.
redrawPanel - boolean which will cause the panel to redraw when true.
Throws:
amber.server.exception.ComponentHandler - with any errors.

removeComponent

public void removeComponent(ComponentHandler component)
                     throws ComponentHandlerException
This function removes a specified component from the corresponding remote Panel.
Parameters:
component - ComponentHandler of the corresponding component to remove.
Throws:
amber.server.exception.ComponentHandler - with any errors.

removeAllComponents

public void removeAllComponents()
                         throws ComponentHandlerException
This function removes all components from the corresponding remote Panel.
Throws:
amber.server.exception.ComponentHandler - with any errors.

performSetLocation

protected void performSetLocation(int x,
                                  int y,
                                  boolean message)
This function is to allow derived classes the ability to bypass the setLocation functions and only set the values rather than message to the remote component. This is because the behaviour for a derived control may be different to this control.
Parameters:
x - int x coordinate of the top left corner.
y - int y coordinate of the top left corner.
message - boolean when true the system attempts to set the remote components values also.

performSetSize

protected void performSetSize(int width,
                              int height,
                              boolean message)
This function is to allow derived classes the ability to bypass the setSize functions and only set the values rather than message to the remote component. This is because the behaviour for a derived control may be different to this control.
Parameters:
width - int width coordinate of the top left corner.
height - int height coordinate of the top left corner.
message - boolean when true the system attempts to set the remote components values also.

performSetBounds

protected void performSetBounds(int x,
                                int y,
                                int width,
                                int height,
                                boolean message)
This function is to allow derived classes the ability to bypass the setBounds functions and only set the values rather than message to the remote component. This is because the behaviour for a derived control may be different to this control.
Parameters:
x - int x coordinate of the top left corner.
y - int y coordinate of the top left corner.
width - int width coordinate of the top left corner.
height - int height coordinate of the top left corner.
message - boolean when true the system attempts to set the remote components values also.

setLocation

public void setLocation(java.awt.Point p)
This function alters the internal position of the panel. Most remote panels are encapsulated in ScrollPanes. This function allows the user to specify what part of the panel will be displayed in the ScrollPane.
Overrides:
setLocation in class java.awt.Component
Parameters:
p - Point location of the panel.

setLocation

public void setLocation(int x,
                        int y)
This function alters the internal position of the panel. Most remote panels are encapsulated in ScrollPanes. This function allows the user to specify what part of the panel will be displayed in the ScrollPane.
Overrides:
setLocation in class java.awt.Component
Parameters:
x - int x location of the component.
y - int y location of the component.

setSize

public void setSize(java.awt.Dimension d)
This function alters the size of the panel. Most remote panels are encapsulated in ScrollPanes. This function allows the user to specify how big the internal panel will be without altering the screen real estate required.
Overrides:
setSize in class java.awt.Component
Parameters:
d - Dimension size of the panel.

setSize

public void setSize(int width,
                    int height)
This function alters the size of the panel. Most remote panels are encapsulated in ScrollPanes. This function allows the user to specify how big the internal panel will be without altering the screen real estate required.
Overrides:
setSize in class java.awt.Component
Parameters:
width - int width of the component.
height - int height of the component.

setBounds

public void setBounds(java.awt.Rectangle r)
This function alters the size of the panel. Most remote panels are encapsulated in ScrollPanes. This function allows the user to specify how big and what is displayed on the internal panel without altering the screen real estate required.
Overrides:
setBounds in class java.awt.Component
Parameters:
r - Rectangle bounds of the panel.

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
This function alters the size of the panel. Most remote panels are encapsulated in ScrollPanes. This function allows the user to specify how big and what is displayed on the internal panel without altering the screen real estate required.
Overrides:
setBounds in class java.awt.Component
Parameters:
x - int x location of the component.
y - int y location of the component.
width - int width of the component.
height - int height of the component.

setSize

public void setSize(ComponentHandler component,
                    java.awt.Dimension dimension)
             throws ComponentHandlerException
This function alters the size of the specified component in the panel.
Parameters:
component - ComponentHandler of the component to resize.
dimension - Dimension containing the new size.
Throws:
ComponentHandlerException - containing the error information.

setSize

public void setSize(ComponentHandler component,
                    int width,
                    int height)
             throws ComponentHandlerException
This function alters the size of the specified component in the panel.
Parameters:
component - ComponentHandler of the component to resize.
width - int width of the component.
height - int height of the component.
Throws:
ComponentHandlerException - containing the error information.

setLocation

public void setLocation(ComponentHandler component,
                        java.awt.Point point)
                 throws ComponentHandlerException
This function moves the specified component in the panel.
Parameters:
component - ComponentHandler of the component to move.
point - Point containing the new location.
Throws:
ComponentHandlerException - containing the error information.

setLocation

public void setLocation(ComponentHandler component,
                        int x,
                        int y)
                 throws ComponentHandlerException
This function moves the specified component in the panel.
Parameters:
component - ComponentHandler of the component to move.
x - int x location of the component.
y - int y location of the component.
Throws:
ComponentHandlerException - containing the error information.

setBounds

public void setBounds(ComponentHandler component,
                      java.awt.Rectangle rect)
               throws ComponentHandlerException
This function moves the specified component in the panel.
Parameters:
component - ComponentHandler of the component to move.
rect - Rectangle containing the new location and size.
Throws:
ComponentHandlerException - containing the error information.

setBounds

public void setBounds(ComponentHandler component,
                      int x,
                      int y,
                      int width,
                      int height)
               throws ComponentHandlerException
This function moves the specified component in the panel.
Parameters:
component - ComponentHandler of the component to move.
x - int x location of the component.
y - int y location of the component.
width - int width of the component.
height - int height of the component.
Throws:
ComponentHandlerException - 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 ComponentHandler
Returns:
String containing the panel type to use.

setBorder

public void setBorder(int type)
               throws ComponentHandlerException
This function tells the remote panel to set the border to the new type. The type of border is a constant set in amber.awt.DrawPanel.
Parameters:
type - int type of border to draw.
Throws:
ComponentHandlerException - containing the error information.

getDrawOperations

public java.util.Vector getDrawOperations()
Returns the current queue of drawing operations.
Returns:
Vector containing the series of DrawOperations.

removeDrawOperation

public void removeDrawOperation(long handle)
                         throws ComponentHandlerException
This function removes the specified queued draw operation from the queue of operations.
Parameters:
handle - long handle of the operation to remove.
Throws:
ComponentHandlerException - containing the error information.

removeAllDrawOperations

public void removeAllDrawOperations()
                             throws ComponentHandlerException
This function removes all the specified queued draw operation from the queue of operations.
Throws:
ComponentHandlerException - containing the error information.

addSetColour

public long addSetColour(java.awt.Color colour)
                  throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Sets the drawing colour.
Parameters:
colour - Color to add.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertSetColour

public long insertSetColour(java.awt.Color colour,
                            long handle)
                     throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Sets the drawing colour.
Parameters:
colour - Color to add.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceSetColour

public void replaceSetColour(java.awt.Color colour,
                             long handle)
                      throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Sets the drawing colour.
Parameters:
colour - Color to add.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addSetFont

public long addSetFont(java.lang.String fontName,
                       int style,
                       int size)
                throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Sets the text font.
Parameters:
name - String containing the name of the font.
style - int containing the style of the font.
size - int containing the size of the font.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertSetFont

public long insertSetFont(java.lang.String fontName,
                          int style,
                          int size,
                          long handle)
                   throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Sets the text font.
Parameters:
name - String containing the name of the font.
style - int containing the style of the font.
size - int containing the size of the font.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceSetFont

public void replaceSetFont(java.lang.String fontName,
                           int style,
                           int size,
                           long handle)
                    throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Sets the text font.
Parameters:
name - String containing the name of the font.
style - int containing the style of the font.
size - int containing the size of the font.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addDrawLine

public long addDrawLine(int x1,
                        int y1,
                        int x2,
                        int y2)
                 throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws a line, using the current color, between the points (x1, y1) and (x2, y2) in this graphics context's coordinate system.
Parameters:
x1 - the first point's x coordinate.
y1 - the first point's y coordinate.
x2 - the second point's x coordinate.
y2 - the second point's y coordinate.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertDrawLine

public long insertDrawLine(int x1,
                           int y1,
                           int x2,
                           int y2,
                           long handle)
                    throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws a line, using the current color, between the points (x1, y1) and (x2, y2) in this graphics context's coordinate system.
Parameters:
x1 - the first point's x coordinate.
y1 - the first point's y coordinate.
x2 - the second point's x coordinate.
y2 - the second point's y coordinate.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceDrawLine

public void replaceDrawLine(int x1,
                            int y1,
                            int x2,
                            int y2,
                            long handle)
                     throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Draws a line, using the current color, between the points (x1, y1) and (x2, y2) in this graphics context's coordinate system.
Parameters:
x1 - the first point's x coordinate.
y1 - the first point's y coordinate.
x2 - the second point's x coordinate.
y2 - the second point's y coordinate.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addFillRect

public long addFillRect(int x,
                        int y,
                        int width,
                        int height)
                 throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Fills the specified rectangle. The left and right edges of the rectangle are at x and x + width - 1. The top and bottom edges are at y and y + height - 1. The resulting rectangle covers an area width pixels wide by height pixels tall. The rectangle is filled using the graphics context's current color.
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertFillRect

public long insertFillRect(int x,
                           int y,
                           int width,
                           int height,
                           long handle)
                    throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Fills the specified rectangle. The left and right edges of the rectangle are at x and x + width - 1. The top and bottom edges are at y and y + height - 1. The resulting rectangle covers an area width pixels wide by height pixels tall. The rectangle is filled using the graphics context's current color.
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceFillRect

public void replaceFillRect(int x,
                            int y,
                            int width,
                            int height,
                            long handle)
                     throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Fills the specified rectangle. The left and right edges of the rectangle are at x and x + width - 1. The top and bottom edges are at y and y + height - 1. The resulting rectangle covers an area width pixels wide by height pixels tall. The rectangle is filled using the graphics context's current color.
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addDrawRect

public long addDrawRect(int x,
                        int y,
                        int width,
                        int height)
                 throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws the outline of the specified rectangle. The left and right edges of the rectangle are at x and x + width. The top and bottom edges are at y and y + height. The rectangle is drawn using the graphics context's current color.
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertDrawRect

public long insertDrawRect(int x,
                           int y,
                           int width,
                           int height,
                           long handle)
                    throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws the outline of the specified rectangle. The left and right edges of the rectangle are at x and x + width. The top and bottom edges are at y and y + height. The rectangle is drawn using the graphics context's current color.
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceDrawRect

public void replaceDrawRect(int x,
                            int y,
                            int width,
                            int height,
                            long handle)
                     throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Draws the outline of the specified rectangle. The left and right edges of the rectangle are at x and x + width. The top and bottom edges are at y and y + height. The rectangle is drawn using the graphics context's current color.
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addDrawRoundRect

public long addDrawRoundRect(int x,
                             int y,
                             int width,
                             int height,
                             int arcWidth,
                             int arcHeight)
                      throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws an outlined round-cornered rectangle using this graphics context's current color. The left and right edges of the rectangle are at x and x + width, respectively. The top and bottom edges of the rectangle are at y and y + height.
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
arcWidth - the horizontal diameter of the arc at the four corners.
arcHeight - the vertical diameter of the arc at the four corners.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertDrawRoundRect

public long insertDrawRoundRect(int x,
                                int y,
                                int width,
                                int height,
                                int arcWidth,
                                int arcHeight,
                                long handle)
                         throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws the outline of the specified rectangle. The left and right edges of the rectangle are at x and x + width. The top and bottom edges are at y and y + height. The rectangle is drawn using the graphics context's current color.
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceDrawRoundRect

public void replaceDrawRoundRect(int x,
                                 int y,
                                 int width,
                                 int height,
                                 int arcWidth,
                                 int arcHeight,
                                 long handle)
                          throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Draws the outline of the specified rectangle. The left and right edges of the rectangle are at x and x + width. The top and bottom edges are at y and y + height. The rectangle is drawn using the graphics context's current color.
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addFillRoundRect

public long addFillRoundRect(int x,
                             int y,
                             int width,
                             int height,
                             int arcWidth,
                             int arcHeight)
                      throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Fills the specified rounded corner rectangle with the current color. The left and right edges of the rectangle are at x and x + width - 1, respectively. The top and bottom edges of the rectangle are at y and y + height - 1.
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
arcWidth - the horizontal diameter of the arc at the four corners.
arcHeight - the vertical diameter of the arc at the four corners.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertFillRoundRect

public long insertFillRoundRect(int x,
                                int y,
                                int width,
                                int height,
                                int arcWidth,
                                int arcHeight,
                                long handle)
                         throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Fills the specified rounded corner rectangle with the current color. The left and right edges of the rectangle are at x and x + width - 1, respectively. The top and bottom edges of the rectangle are at y and y + height - 1.
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
arcWidth - the horizontal diameter of the arc at the four corners.
arcHeight - the vertical diameter of the arc at the four corners.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceFillRoundRect

public void replaceFillRoundRect(int x,
                                 int y,
                                 int width,
                                 int height,
                                 int arcWidth,
                                 int arcHeight,
                                 long handle)
                          throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Fills the specified rounded corner rectangle with the current color. The left and right edges of the rectangle are at x and x + width - 1, respectively. The top and bottom edges of the rectangle are at y and y + height - 1.
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
arcWidth - the horizontal diameter of the arc at the four corners.
arcHeight - the vertical diameter of the arc at the four corners.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addDraw3DRect

public long addDraw3DRect(int x,
                          int y,
                          int width,
                          int height,
                          boolean raised)
                   throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws a 3-D highlighted outline of the specified rectangle. The edges of the rectangle are highlighted so that they appear to be beveled and lit from the upper left corner.

The colors used for the highlighting effect are determined based on the current color. The resulting rectangle covers an area that is width + 1 pixels wide by height + 1 pixels tall.

Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
raised - a boolean that determines whether the rectangle appears to be raised above the surface or sunk into the surface.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertDraw3DRect

public long insertDraw3DRect(int x,
                             int y,
                             int width,
                             int height,
                             boolean raised,
                             long handle)
                      throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws a 3-D highlighted outline of the specified rectangle. The edges of the rectangle are highlighted so that they appear to be beveled and lit from the upper left corner.

The colors used for the highlighting effect are determined based on the current color. The resulting rectangle covers an area that is width + 1 pixels wide by height + 1 pixels tall.

Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
raised - a boolean that determines whether the rectangle appears to be raised above the surface or sunk into the surface.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceDraw3DRect

public void replaceDraw3DRect(int x,
                              int y,
                              int width,
                              int height,
                              boolean raised,
                              long handle)
                       throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Draws a 3-D highlighted outline of the specified rectangle. The edges of the rectangle are highlighted so that they appear to be beveled and lit from the upper left corner.

The colors used for the highlighting effect are determined based on the current color. The resulting rectangle covers an area that is width + 1 pixels wide by height + 1 pixels tall.

Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
raised - a boolean that determines whether the rectangle appears to be raised above the surface or sunk into the surface.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addFill3DRect

public long addFill3DRect(int x,
                          int y,
                          int width,
                          int height,
                          boolean raised)
                   throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Paints a 3-D highlighted rectangle filled with the current color. The edges of the rectangle will be highlighted so that it appears as if the edges were beveled and lit from the upper left corner. The colors used for the highlighting effect will be determined from the current color.
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
raised - a boolean value that determines whether the rectangle appears to be raised above the surface or etched into the surface.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertFill3DRect

public long insertFill3DRect(int x,
                             int y,
                             int width,
                             int height,
                             boolean raised,
                             long handle)
                      throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Paints a 3-D highlighted rectangle filled with the current color. The edges of the rectangle will be highlighted so that it appears as if the edges were beveled and lit from the upper left corner. The colors used for the highlighting effect will be determined from the current color.
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
raised - a boolean value that determines whether the rectangle appears to be raised above the surface or etched into the surface.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceFill3DRect

public void replaceFill3DRect(int x,
                              int y,
                              int width,
                              int height,
                              boolean raised,
                              long handle)
                       throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Paints a 3-D highlighted rectangle filled with the current color. The edges of the rectangle will be highlighted so that it appears as if the edges were beveled and lit from the upper left corner. The colors used for the highlighting effect will be determined from the current color.
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
raised - a boolean value that determines whether the rectangle appears to be raised above the surface or etched into the surface.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addDrawOval

public long addDrawOval(int x,
                        int y,
                        int width,
                        int height)
                 throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws the outline of an oval. The result is a circle or ellipse that fits within the rectangle specified by the x, y, width, and height arguments.

The oval covers an area that is width + 1 pixels wide and height + 1 pixels tall.

Parameters:
x - the x coordinate of the upper left corner of the oval to be drawn.
y - the y coordinate of the upper left corner of the oval to be drawn.
width - the width of the oval to be drawn.
height - the height of the oval to be drawn.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertFill3DRect

public long insertFill3DRect(int x,
                             int y,
                             int width,
                             int height,
                             long handle)
                      throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws the outline of an oval. The result is a circle or ellipse that fits within the rectangle specified by the x, y, width, and height arguments.

The oval covers an area that is width + 1 pixels wide and height + 1 pixels tall.

Parameters:
x - the x coordinate of the upper left corner of the oval to be drawn.
y - the y coordinate of the upper left corner of the oval to be drawn.
width - the width of the oval to be drawn.
height - the height of the oval to be drawn.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceFill3DRect

public void replaceFill3DRect(int x,
                              int y,
                              int width,
                              int height,
                              long handle)
                       throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Draws the outline of an oval. The result is a circle or ellipse that fits within the rectangle specified by the x, y, width, and height arguments.

The oval covers an area that is width + 1 pixels wide and height + 1 pixels tall.

Parameters:
x - the x coordinate of the upper left corner of the oval to be drawn.
y - the y coordinate of the upper left corner of the oval to be drawn.
width - the width of the oval to be drawn.
height - the height of the oval to be drawn.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addFillOval

public long addFillOval(int x,
                        int y,
                        int width,
                        int height)
                 throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Fills an oval bounded by the specified rectangle with the current color.
Parameters:
x - the x coordinate of the upper left corner of the oval to be filled.
y - the y coordinate of the upper left corner of the oval to be filled.
width - the width of the oval to be filled.
height - the height of the oval to be filled.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertFillOval

public long insertFillOval(int x,
                           int y,
                           int width,
                           int height,
                           long handle)
                    throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Fills an oval bounded by the specified rectangle with the current color.
Parameters:
x - the x coordinate of the upper left corner of the oval to be filled.
y - the y coordinate of the upper left corner of the oval to be filled.
width - the width of the oval to be filled.
height - the height of the oval to be filled.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceFillOval

public void replaceFillOval(int x,
                            int y,
                            int width,
                            int height,
                            long handle)
                     throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Fills an oval bounded by the specified rectangle with the current color.
Parameters:
x - the x coordinate of the upper left corner of the oval to be filled.
y - the y coordinate of the upper left corner of the oval to be filled.
width - the width of the oval to be filled.
height - the height of the oval to be filled.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addDrawArc

public long addDrawArc(int x,
                       int y,
                       int width,
                       int height,
                       int startAngle,
                       int arcAngle)
                throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws the outline of a circular or elliptical arc covering the specified rectangle.

The resulting arc begins at startAngle and extends for arcAngle degrees, using the current color. Angles are interpreted such that 0 degrees is at the 3 o'clock position. A positive value indicates a counter-clockwise rotation while a negative value indicates a clockwise rotation.

The center of the arc is the center of the rectangle whose origin is (xy) and whose size is specified by the width and height arguments.

The resulting arc covers an area width + 1 pixels wide by height + 1 pixels tall.

Parameters:
x - the x coordinate of the upper-left corner of the arc to be drawn.
y - the y coordinate of the upper-left corner of the arc to be drawn.
width - the width of the arc to be drawn.
height - the height of the arc to be drawn.
startAngle - the beginning angle.
arcAngle - the angular extent of the arc, relative to the start angle.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertDrawArc

public long insertDrawArc(int x,
                          int y,
                          int width,
                          int height,
                          int startAngle,
                          int arcAngle,
                          long handle)
                   throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws the outline of a circular or elliptical arc covering the specified rectangle.

The resulting arc begins at startAngle and extends for arcAngle degrees, using the current color. Angles are interpreted such that 0 degrees is at the 3 o'clock position. A positive value indicates a counter-clockwise rotation while a negative value indicates a clockwise rotation.

The center of the arc is the center of the rectangle whose origin is (xy) and whose size is specified by the width and height arguments.

The resulting arc covers an area width + 1 pixels wide by height + 1 pixels tall.

Parameters:
x - the x coordinate of the upper-left corner of the arc to be drawn.
y - the y coordinate of the upper-left corner of the arc to be drawn.
width - the width of the arc to be drawn.
height - the height of the arc to be drawn.
startAngle - the beginning angle.
arcAngle - the angular extent of the arc, relative to the start angle.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceDrawArc

public void replaceDrawArc(int x,
                           int y,
                           int width,
                           int height,
                           int startAngle,
                           int arcAngle,
                           long handle)
                    throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Draws the outline of a circular or elliptical arc covering the specified rectangle.

The resulting arc begins at startAngle and extends for arcAngle degrees, using the current color. Angles are interpreted such that 0 degrees is at the 3 o'clock position. A positive value indicates a counter-clockwise rotation while a negative value indicates a clockwise rotation.

The center of the arc is the center of the rectangle whose origin is (xy) and whose size is specified by the width and height arguments.

The resulting arc covers an area width + 1 pixels wide by height + 1 pixels tall.

Parameters:
x - the x coordinate of the upper-left corner of the arc to be drawn.
y - the y coordinate of the upper-left corner of the arc to be drawn.
width - the width of the arc to be drawn.
height - the height of the arc to be drawn.
startAngle - the beginning angle.
arcAngle - the angular extent of the arc, relative to the start angle.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addFillArc

public long addFillArc(int x,
                       int y,
                       int width,
                       int height,
                       int startAngle,
                       int arcAngle)
                throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws a filled circular or elliptical arc covering the specified rectangle.

The resulting arc begins at startAngle and extends for arcAngle degrees, using the current color. Angles are interpreted such that 0 degrees is at the 3 o'clock position. A positive value indicates a counter-clockwise rotation while a negative value indicates a clockwise rotation.

The center of the arc is the center of the rectangle whose origin is (xy) and whose size is specified by the width and height arguments.

The resulting arc covers an area width + 1 pixels wide by height + 1 pixels tall.

Parameters:
x - the x coordinate of the upper-left corner of the arc to be drawn.
y - the y coordinate of the upper-left corner of the arc to be drawn.
width - the width of the arc to be drawn.
height - the height of the arc to be drawn.
startAngle - the beginning angle.
arcAngle - the angular extent of the arc, relative to the start angle.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertFillArc

public long insertFillArc(int x,
                          int y,
                          int width,
                          int height,
                          int startAngle,
                          int arcAngle,
                          long handle)
                   throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws a filled circular or elliptical arc covering the specified rectangle.

The resulting arc begins at startAngle and extends for arcAngle degrees, using the current color. Angles are interpreted such that 0 degrees is at the 3 o'clock position. A positive value indicates a counter-clockwise rotation while a negative value indicates a clockwise rotation.

The center of the arc is the center of the rectangle whose origin is (xy) and whose size is specified by the width and height arguments.

The resulting arc covers an area width + 1 pixels wide by height + 1 pixels tall.

Parameters:
x - the x coordinate of the upper-left corner of the arc to be drawn.
y - the y coordinate of the upper-left corner of the arc to be drawn.
width - the width of the arc to be drawn.
height - the height of the arc to be drawn.
startAngle - the beginning angle.
arcAngle - the angular extent of the arc, relative to the start angle.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceFillArc

public void replaceFillArc(int x,
                           int y,
                           int width,
                           int height,
                           int startAngle,
                           int arcAngle,
                           long handle)
                    throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Draws a filled circular or elliptical arc covering the specified rectangle.

The resulting arc begins at startAngle and extends for arcAngle degrees, using the current color. Angles are interpreted such that 0 degrees is at the 3 o'clock position. A positive value indicates a counter-clockwise rotation while a negative value indicates a clockwise rotation.

The center of the arc is the center of the rectangle whose origin is (xy) and whose size is specified by the width and height arguments.

The resulting arc covers an area width + 1 pixels wide by height + 1 pixels tall.

Parameters:
x - the x coordinate of the upper-left corner of the arc to be drawn.
y - the y coordinate of the upper-left corner of the arc to be drawn.
width - the width of the arc to be drawn.
height - the height of the arc to be drawn.
startAngle - the beginning angle.
arcAngle - the angular extent of the arc, relative to the start angle.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addDrawString

public long addDrawString(java.lang.String str,
                          int x,
                          int y)
                   throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws the text given by the specified string, using this graphics context's current font and color. The baseline of the first character is at position (xy) in this graphics context's coordinate system.
Parameters:
str - the string to be drawn.
x - the x coordinate.
y - the y coordinate.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertDrawString

public long insertDrawString(java.lang.String str,
                             int x,
                             int y,
                             long handle)
                      throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws the text given by the specified string, using this graphics context's current font and color. The baseline of the first character is at position (xy) in this graphics context's coordinate system.
Parameters:
str - the string to be drawn.
x - the x coordinate.
y - the y coordinate.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceDrawString

public void replaceDrawString(java.lang.String str,
                              int x,
                              int y,
                              long handle)
                       throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Draws the text given by the specified string, using this graphics context's current font and color. The baseline of the first character is at position (xy) in this graphics context's coordinate system.
Parameters:
str - the string to be drawn.
x - the x coordinate.
y - the y coordinate.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addDrawString

public long addDrawString(java.lang.String str,
                          int x,
                          int y,
                          int alignment)
                   throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws the text given by the specified string, using this graphics context's current font and color. The baseline of the first character is at position (xy) in this graphics context's coordinate system.
Parameters:
str - the string to be drawn.
x - the x coordinate.
y - the y coordinate.
alignment - the alignment of the text. This corresponds to the DrawPanel text constants.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.
See Also:
DrawPanel.Default, DrawPanel.Left, DrawPanel.Centre, DrawPanel.Right, DrawPanel.TopAligned, DrawPanel.CentreAligned, DrawPanel.BottomAligned

insertDrawString

public long insertDrawString(java.lang.String str,
                             int x,
                             int y,
                             int alignment,
                             long handle)
                      throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws the text given by the specified string, using this graphics context's current font and color. The baseline of the first character is at position (xy) in this graphics context's coordinate system.
Parameters:
str - the string to be drawn.
x - the x coordinate.
y - the y coordinate.
alignment - the alignment of the text. This corresponds to the DrawPanel text constants.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.
See Also:
DrawPanel.Default, DrawPanel.Left, DrawPanel.Centre, DrawPanel.Right, DrawPanel.TopAligned, DrawPanel.CentreAligned, DrawPanel.BottomAligned

replaceDrawString

public void replaceDrawString(java.lang.String str,
                              int x,
                              int y,
                              int alignment,
                              long handle)
                       throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Draws the text given by the specified string, using this graphics context's current font and color. The baseline of the first character is at position (xy) in this graphics context's coordinate system.
Parameters:
str - the string to be drawn.
x - the x coordinate.
y - the y coordinate.
alignment - the alignment of the text. This corresponds to the DrawPanel text constants.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.
See Also:
DrawPanel.Default, DrawPanel.Left, DrawPanel.Centre, DrawPanel.Right, DrawPanel.TopAligned, DrawPanel.CentreAligned, DrawPanel.BottomAligned

addDrawImage

public long addDrawImage(java.lang.String imageName,
                         int x,
                         int y,
                         boolean tile)
                  throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws the image at the specified location in the panel.
Parameters:
imageName - String name of the image file to display.
x - int x position of the top left corner of the image.
y - int y position of the top left corner of the image.
tile - boolean when true the image tiles across the entire panel.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertDrawImage

public long insertDrawImage(java.lang.String imageName,
                            int x,
                            int y,
                            boolean tile,
                            long handle)
                     throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws the image at the specified location in the panel.
Parameters:
imageName - String name of the image file to display.
x - int x position of the top left corner of the image.
y - int y position of the top left corner of the image.
tile - boolean when true the image tiles across the entire panel.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceDrawImage

public void replaceDrawImage(java.lang.String imageName,
                             int x,
                             int y,
                             boolean tile,
                             long handle)
                      throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Draws the image at the specified location in the panel.
Parameters:
imageName - String name of the image file to display.
x - int x position of the top left corner of the image.
y - int y position of the top left corner of the image.
tile - boolean when true the image tiles across the entire panel.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addDrawImage

public long addDrawImage(java.lang.String imageName,
                         int x,
                         int y,
                         int width,
                         int height)
                  throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.

The image is drawn inside the specified rectangle of this graphics context's coordinate space, and is scaled if necessary. Transparent pixels are drawn in the specified background color.

Parameters:
imageName - String name of the image file to display.
x - int x position of the top left corner of the image.
y - int y position of the top left corner of the image.
width - int width of the area the image will be displayed in.
height - int height of the area the image will be displayed in.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertDrawImage

public long insertDrawImage(java.lang.String imageName,
                            int x,
                            int y,
                            int width,
                            int height,
                            long handle)
                     throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.

The image is drawn inside the specified rectangle of this graphics context's coordinate space, and is scaled if necessary. Transparent pixels are drawn in the specified background color.

Parameters:
imageName - String name of the image file to display.
x - int x position of the top left corner of the image.
y - int y position of the top left corner of the image.
width - int width of the area the image will be displayed in.
height - int height of the area the image will be displayed in.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceDrawImage

public void replaceDrawImage(java.lang.String imageName,
                             int x,
                             int y,
                             int width,
                             int height,
                             long handle)
                      throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.

The image is drawn inside the specified rectangle of this graphics context's coordinate space, and is scaled if necessary. Transparent pixels are drawn in the specified background color.

Parameters:
imageName - String name of the image file to display.
x - int x position of the top left corner of the image.
y - int y position of the top left corner of the image.
width - int width of the area the image will be displayed in.
height - int height of the area the image will be displayed in.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addDrawPolygon

public long addDrawPolygon(int[] x,
                           int[] y,
                           int numberPoints)
                    throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws an outline of a polygon as specified by the two arrays of coordinates. Each array contain one half of the coordinates for each point in the polygon. If the first and last points differ a line is automatically drawn from first to last to close the figure.
Parameters:
x - int array containing the x positions of the polygon points.
y - int array containing the y positions of the polygon points.
numberPoints - int specifying how many of the points in the array to use.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertDrawPolygon

public long insertDrawPolygon(int[] x,
                              int[] y,
                              int numberPoints,
                              long handle)
                       throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws an outline of a polygon as specified by the two arrays of coordinates. Each array contain one half of the coordinates for each point in the polygon. If the first and last points differ a line is automatically drawn from first to last to close the figure.
Parameters:
x - int array containing the x positions of the polygon points.
y - int array containing the y positions of the polygon points.
numberPoints - int specifying how many of the points in the array to use.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceDrawPolygon

public void replaceDrawPolygon(int[] x,
                               int[] y,
                               int numberPoints,
                               long handle)
                        throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Draws an outline of a polygon as specified by the two arrays of coordinates. Each array contain one half of the coordinates for each point in the polygon. If the first and last points differ a line is automatically drawn from first to last to close the figure.
Parameters:
x - int array containing the x positions of the polygon points.
y - int array containing the y positions of the polygon points.
numberPoints - int specifying how many of the points in the array to use.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addFillPolygon

public long addFillPolygon(int[] x,
                           int[] y,
                           int numberPoints)
                    throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws a polygon which is filled with the current foreground colour as specified by the two arrays of coordinates. Each array contain one half of the coordinates for each point in the polygon. If the first and last points differ a line is automatically drawn from first to last to close the figure.
Parameters:
x - int array containing the x positions of the polygon points.
y - int array containing the y positions of the polygon points.
numberPoints - int specifying how many of the points in the array to use.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertFillPolygon

public long insertFillPolygon(int[] x,
                              int[] y,
                              int numberPoints,
                              long handle)
                       throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws a polygon which is filled with the current foreground colour as specified by the two arrays of coordinates. Each array contain one half of the coordinates for each point in the polygon. If the first and last points differ a line is automatically drawn from first to last to close the figure.
Parameters:
x - int array containing the x positions of the polygon points.
y - int array containing the y positions of the polygon points.
numberPoints - int specifying how many of the points in the array to use.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceFillPolygon

public void replaceFillPolygon(int[] x,
                               int[] y,
                               int numberPoints,
                               long handle)
                        throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Draws a polygon which is filled with the current foreground colour as specified by the two arrays of coordinates. Each array contain one half of the coordinates for each point in the polygon. If the first and last points differ a line is automatically drawn from first to last to close the figure.
Parameters:
x - int array containing the x positions of the polygon points.
y - int array containing the y positions of the polygon points.
numberPoints - int specifying how many of the points in the array to use.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addDrawPolyline

public long addDrawPolyline(int[] x,
                            int[] y,
                            int numberPoints)
                     throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws a sequence of connected lines as specified by the two arrays of coordinates. Each array contain one half of the coordinates for each point in the lines. If the first and last points differ the figure is not closed.
Parameters:
x - int array containing the x positions of the polyline points.
y - int array containing the y positions of the polyline points.
numberPoints - int specifying how many of the points in the array to use.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertDrawPolyline

public long insertDrawPolyline(int[] x,
                               int[] y,
                               int numberPoints,
                               long handle)
                        throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Draws a sequence of connected lines as specified by the two arrays of coordinates. Each array contain one half of the coordinates for each point in the lines. If the first and last points differ the figure is not closed.
Parameters:
x - int array containing the x positions of the polyline points.
y - int array containing the y positions of the polyline points.
numberPoints - int specifying how many of the points in the array to use.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceDrawPolyline

public void replaceDrawPolyline(int[] x,
                                int[] y,
                                int numberPoints,
                                long handle)
                         throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Draws a sequence of connected lines as specified by the two arrays of coordinates. Each array contain one half of the coordinates for each point in the lines. If the first and last points differ the figure is not closed.
Parameters:
x - int array containing the x positions of the polyline points.
y - int array containing the y positions of the polyline points.
numberPoints - int specifying how many of the points in the array to use.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addSetClip

public long addSetClip(int x,
                       int y,
                       int width,
                       int height)
                throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Sets the clipping rectangle in the drawing area. Operations which draw outside this area are ignored. The left and right edges of the clipping area are at x and x + width. The top and bottom edges are at y and y + height.
Parameters:
x - the x coordinate of the clipping region.
y - the y coordinate of the clipping region.
width - the width of the region.
height - the height of the region.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertSetClip

public long insertSetClip(int x,
                          int y,
                          int width,
                          int height,
                          long handle)
                   throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Sets the clipping rectangle in the drawing area. Operations which draw outside this area are ignored. The left and right edges of the clipping area are at x and x + width. The top and bottom edges are at y and y + height.
Parameters:
x - the x coordinate of the clipping region.
y - the y coordinate of the clipping region.
width - the width of the region.
height - the height of the region.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceSetClip

public void replaceSetClip(int x,
                           int y,
                           int width,
                           int height,
                           long handle)
                    throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Sets the clipping rectangle in the drawing area. Operations which draw outside this area are ignored. The left and right edges of the clipping area are at x and x + width. The top and bottom edges are at y and y + height.
Parameters:
x - the x coordinate of the clipping region.
y - the y coordinate of the clipping region.
width - the width of the region.
height - the height of the region.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addSetPaintMode

public long addSetPaintMode()
                     throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Sets the paint mode of this graphics context to overwrite the destination with this graphics context's current color. This sets the logical pixel operation function to the paint or overwrite mode. All subsequent rendering operations will overwrite the destination with the current color.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertSetPaintMode

public long insertSetPaintMode(long handle)
                        throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Sets the paint mode of this graphics context to overwrite the destination with this graphics context's current color. This sets the logical pixel operation function to the paint or overwrite mode. All subsequent rendering operations will overwrite the destination with the current color.
Parameters:
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceSetPaintMode

public void replaceSetPaintMode(long handle)
                         throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Sets the paint mode of this graphics context to overwrite the destination with this graphics context's current color. This sets the logical pixel operation function to the paint or overwrite mode. All subsequent rendering operations will overwrite the destination with the current color.
Parameters:
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addSetXORMode

public long addSetXORMode(java.awt.Color colour)
                   throws ComponentHandlerException
This function adds a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Sets the paint mode of this graphics context to alternate between this graphics context's current color and the new specified color. This specifies that logical pixel operations are performed in the XOR mode, which alternates pixels between the current color and a specified XOR color.

When drawing operations are performed, pixels which are the current color are changed to the specified color, and vice versa.

Pixels that are of colors other than those two colors are changed in an unpredictable but reversible manner; if the same figure is drawn twice, then all pixels are restored to their original values.

Parameters:
colour - Alternation Color to use.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

insertSetXORMode

public long insertSetXORMode(java.awt.Color colour,
                             long handle)
                      throws ComponentHandlerException
This function inserts a new drawing command to the panel. The commands are executed in sequence from first to last. The command is: Sets the paint mode of this graphics context to alternate between this graphics context's current color and the new specified color. This specifies that logical pixel operations are performed in the XOR mode, which alternates pixels between the current color and a specified XOR color.

When drawing operations are performed, pixels which are the current color are changed to the specified color, and vice versa.

Pixels that are of colors other than those two colors are changed in an unpredictable but reversible manner; if the same figure is drawn twice, then all pixels are restored to their original values.

Parameters:
colour - Alternation Color to use.
handle - long handle of the drawing operation to insert before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceSetXORMode

public void replaceSetXORMode(java.awt.Color colour,
                              long handle)
                       throws ComponentHandlerException
This function replaces the current drawing command with a new drawing command in the panel. The commands are executed in sequence from first to last. The command is: Sets the paint mode of this graphics context to alternate between this graphics context's current color and the new specified color. This specifies that logical pixel operations are performed in the XOR mode, which alternates pixels between the current color and a specified XOR color.

When drawing operations are performed, pixels which are the current color are changed to the specified color, and vice versa.

Pixels that are of colors other than those two colors are changed in an unpredictable but reversible manner; if the same figure is drawn twice, then all pixels are restored to their original values.

Parameters:
colour - Alternation Color to use.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.

addOperation

protected long addOperation(int[] drawInfo,
                            java.lang.String data)
                     throws ComponentHandlerException
This function actually performs the messaging requirements to send the drawing command to the remote panel. It also adds the operation to the queue of operations locally.
Parameters:
drawInfo - int array containing information on the operation.
The first parameter is the operation.
The second parameter is the operation flags.
The constants are in amber.awt.DrawPanel.
data - String information for the operation.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

handleToIndex

protected int handleToIndex(long handle)
This function converts the handle into an index in the Vector of operations.
Parameters:
handle - long the handle of the operation to find.
Returns:
int index of the operation in the Vector. Returns -1 if the handle cannot be located.

insertOperation

protected long insertOperation(int[] drawInfo,
                               java.lang.String data,
                               long handle)
                        throws ComponentHandlerException
This function actually performs the messaging requirements to send the drawing command to the remote panel. It also inserts the operation into the queue of operations locally.
Parameters:
drawInfo - int array containing information on the operation.
The first parameter is the operation.
The second parameter is the operation flags.
The constants are in amber.awt.DrawPanel.
data - String information for the operation.
handle - long handle of the operation to insert the drawing operation before in the sequence of operations.
Returns:
long containing the handle of the operation. This may by used by remove and replace methods to change just this operation.
Throws:
ComponentHandlerException - containing the error information.

replaceOperation

protected void replaceOperation(int[] drawInfo,
                                java.lang.String data,
                                long handle)
                         throws ComponentHandlerException
This function actually performs the messaging requirements to send the drawing command to the remote panel. It also replaces the operation in the queue of operations locally.
Parameters:
drawInfo - int array containing information on the operation.
The first parameter is the operation.
The second parameter is the operation flags.
The constants are in amber.awt.DrawPanel.
data - String information for the operation.
handle - long handle of the drawing operation to replace in the sequence of operations.
Throws:
ComponentHandlerException - containing the error information.


Copyright © 2002 Clearfield Research Ltd. All Rights Reserved.