amber.type.server
Class PanelComponentInfo

java.lang.Object
  |
  +--amber.type.server.PanelComponentInfo
All Implemented Interfaces:
java.io.Serializable

public class PanelComponentInfo
extends java.lang.Object
implements java.io.Serializable

This class holds all the required information to handle panel components within the BasePanel derived controllers.

See Also:
BasePanel, Serialized Form

Constructor Summary
PanelComponentInfo()
          Default Constructor.
PanelComponentInfo(ComponentHandler component, int id, int eventMask, int x, int y, int width, int height, java.lang.String className, java.lang.String parameters)
          Initialising Constructor.
PanelComponentInfo(ComponentHandler component, int x, int y, int width, int height, java.lang.String className, java.lang.String parameters)
          Initialising Constructor.
 
Method Summary
 boolean contains(int x, int y)
          Checks whether this component "contains" the specified point, where x and y are defined to be relative to the coordinate system of this component.
 boolean contains(java.awt.Point point)
          Checks whether this component "contains" the specified point, where x and y are defined to be relative to the coordinate system of this component.
 boolean equals(java.lang.Object other)
          Determines whether two info objects are equal.
 java.awt.Rectangle getBounds()
          This function gets the bounds of the control.
 java.lang.String getClassName()
          Gets the data in the following variable: Name of the actual class to be instantiated in the Panel.
 ComponentHandler getComponent()
          Gets the data in the following variable: This is the handler for the corresponding remote panel component.
 int getEventMask()
          Gets the data in the following variable: The mask specifying which events the remote component will respond to.
 int getHeight()
          Gets the data in the following variable: Height of the panel component in the panel.
 int getId()
          Gets the data in the following variable: The id of the remote component.
 java.awt.Point getLocation()
          This function gets the location of the control.
 java.lang.String getParameters()
          Gets the data in the following variable: Starting parameters of the panel component when created.
 java.awt.Dimension getSize()
          This function gets the size of the control.
 int getWidth()
          Gets the data in the following variable: Width of the panel component in the panel.
 int getX()
          Gets the data in the following variable: X coordinate of the top left hand corner of the panel component in the panel.
 int getY()
          Gets the data in the following variable: Y coordinate of the top left hand corner of the panel component in the panel.
 boolean isComponentAt(int x, int y)
          Checks whether this component is the component at the specified point, where x and y are defined to be relative to the parent panel coordinate system.
 boolean isComponentAt(java.awt.Point point)
          Checks whether this component is the component at the specified point, where x and y are defined to be relative to the parent panel coordinate system.
 void setBounds(int x, int y, int width, int height)
          This function sets the size and location of the control.
 void setBounds(java.awt.Rectangle rect)
          This function sets the size and location of the control.
 void setClassName(java.lang.String data)
          Sets the data in the following variable: Name of the actual class to be instantiated in the Panel.
 void setComponent(ComponentHandler data)
          Sets the data in the following variable: This is the handler for the corresponding remote panel component.
 void setEventMask(int data)
          Sets the data in the following variable: The mask specifying which events the remote component will respond to.
 void setHeight(int data)
          Sets the data in the following variable: Height of the panel component in the panel.
 void setId(int data)
          Sets the data in the following variable: The id of the remote component.
 void setLocation(int x, int y)
          This function sets the location of the control.
 void setLocation(java.awt.Point location)
          This function sets the location of the control.
 void setParameters(java.lang.String data)
          Sets the data in the following variable: Starting parameters of the panel component when created.
 void setSize(java.awt.Dimension dimension)
          This function sets the size of the control.
 void setSize(int width, int height)
          This function sets the size of the control.
 void setWidth(int data)
          Sets the data in the following variable: Width of the panel component in the panel.
 void setX(int data)
          Sets the data in the following variable: X coordinate of the top left hand corner of the panel component in the panel.
 void setY(int data)
          Sets the data in the following variable: Y coordinate of the top left hand corner of the panel component in the panel.
 java.lang.String toString()
          This function returns the String form of the data.
 void translate(int x, int y)
          This function moves the control an offset from its current location as specified by the input coordinates.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PanelComponentInfo

public PanelComponentInfo()
Default Constructor.

PanelComponentInfo

public PanelComponentInfo(ComponentHandler component,
                          int x,
                          int y,
                          int width,
                          int height,
                          java.lang.String className,
                          java.lang.String parameters)
Initialising Constructor.
Parameters:
component - This is the handler for the corresponding remote panel component.
x - X coordinate of the top left hand corner of the panel component in the panel.
y - Y coordinate of the top left hand corner of the panel component in the panel.
width - Width of the panel component in the panel.
height - Height of the panel component in the panel.
className - Name of the actual class to be instantiated in the Panel.
parameters - Starting parameters of the panel component when created.

PanelComponentInfo

public PanelComponentInfo(ComponentHandler component,
                          int id,
                          int eventMask,
                          int x,
                          int y,
                          int width,
                          int height,
                          java.lang.String className,
                          java.lang.String parameters)
Initialising Constructor.
Parameters:
component - This is the handler for the corresponding remote panel component.
id - The id of the remote component.
eventMask - The mask specifying which events the remote component will respond to.
x - X coordinate of the top left hand corner of the panel component in the panel.
y - Y coordinate of the top left hand corner of the panel component in the panel.
width - Width of the panel component in the panel.
height - Height of the panel component in the panel.
className - Name of the actual class to be instantiated in the Panel.
parameters - Starting parameters of the panel component when created.
Method Detail

getComponent

public ComponentHandler getComponent()
Gets the data in the following variable: This is the handler for the corresponding remote panel component.
Returns:
ComponentHandler containing the required information.

getId

public int getId()
Gets the data in the following variable: The id of the remote component.
Returns:
int containing the required information.

getEventMask

public int getEventMask()
Gets the data in the following variable: The mask specifying which events the remote component will respond to.
Returns:
int containing the required information.

getX

public int getX()
Gets the data in the following variable: X coordinate of the top left hand corner of the panel component in the panel.
Returns:
int containing the required information.

getY

public int getY()
Gets the data in the following variable: Y coordinate of the top left hand corner of the panel component in the panel.
Returns:
int containing the required information.

getWidth

public int getWidth()
Gets the data in the following variable: Width of the panel component in the panel.
Returns:
int containing the required information.

getHeight

public int getHeight()
Gets the data in the following variable: Height of the panel component in the panel.
Returns:
int containing the required information.

getClassName

public java.lang.String getClassName()
Gets the data in the following variable: Name of the actual class to be instantiated in the Panel.
Returns:
String containing the required information.

getParameters

public java.lang.String getParameters()
Gets the data in the following variable: Starting parameters of the panel component when created.
Returns:
String containing the required information.

getLocation

public java.awt.Point getLocation()
This function gets the location of the control.
Returns:
Point containing the current location of the control.

getBounds

public java.awt.Rectangle getBounds()
This function gets the bounds of the control.
Returns:
Rectangle containing the control bounds.

getSize

public java.awt.Dimension getSize()
This function gets the size of the control.
Returns:
Dimension containing the control size.

setComponent

public void setComponent(ComponentHandler data)
Sets the data in the following variable: This is the handler for the corresponding remote panel component.
Parameters:
data - ComponentHandler containing the data to set the variable to.

setId

public void setId(int data)
Sets the data in the following variable: The id of the remote component.
Parameters:
data - int containing the data to set the variable to.

setEventMask

public void setEventMask(int data)
Sets the data in the following variable: The mask specifying which events the remote component will respond to.
Parameters:
data - int containing the data to set the variable to.

setX

public void setX(int data)
Sets the data in the following variable: X coordinate of the top left hand corner of the panel component in the panel.
Parameters:
data - int containing the data to set the variable to.

setY

public void setY(int data)
Sets the data in the following variable: Y coordinate of the top left hand corner of the panel component in the panel.
Parameters:
data - int containing the data to set the variable to.

setWidth

public void setWidth(int data)
Sets the data in the following variable: Width of the panel component in the panel.
Parameters:
data - int containing the data to set the variable to.

setHeight

public void setHeight(int data)
Sets the data in the following variable: Height of the panel component in the panel.
Parameters:
data - int containing the data to set the variable to.

setClassName

public void setClassName(java.lang.String data)
Sets the data in the following variable: Name of the actual class to be instantiated in the Panel.
Parameters:
data - String containing the data to set the variable to.

setParameters

public void setParameters(java.lang.String data)
Sets the data in the following variable: Starting parameters of the panel component when created.
Parameters:
data - String containing the data to set the variable to.

setLocation

public void setLocation(java.awt.Point location)
This function sets the location of the control.
Parameters:
location - New Point where the control is to be located.

setLocation

public void setLocation(int x,
                        int y)
This function sets the location of the control.
Parameters:
x - int X coordinate of the new location.
y - int Y coordinate of the new location.

setSize

public void setSize(java.awt.Dimension dimension)
This function sets the size of the control.
Parameters:
dimension - New Dimension containing the control size.

setSize

public void setSize(int width,
                    int height)
This function sets the size of the control.
Parameters:
width - int width of the control.
height - int height of the control.

setBounds

public void setBounds(java.awt.Rectangle rect)
This function sets the size and location of the control.
Parameters:
rect - New Rectangle containing the control bounds.

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
This function sets the size and location of the control.
Parameters:
x - int x location of the control.
y - int y location of the control.
width - int width of the control.
height - int height of the control.

translate

public void translate(int x,
                      int y)
This function moves the control an offset from its current location as specified by the input coordinates.
Parameters:
x - int X amount of the translation value.
y - int Y amount of the translation value.

equals

public boolean equals(java.lang.Object other)
Determines whether two info objects are equal. The two are equal if all the internal values match.
Overrides:
equals in class java.lang.Object
Parameters:
other - PanelComponentInfo which is the object to compare.

contains

public boolean contains(int x,
                        int y)
Checks whether this component "contains" the specified point, where x and y are defined to be relative to the coordinate system of this component.
Parameters:
x - int x value of the coordinate.
y - int y value of the coordinate.
Returns:
boolean true if the location is contained in this component.

contains

public boolean contains(java.awt.Point point)
Checks whether this component "contains" the specified point, where x and y are defined to be relative to the coordinate system of this component.
Parameters:
point - Point containing the location.
Returns:
boolean true if the location is contained in this component.

isComponentAt

public boolean isComponentAt(int x,
                             int y)
Checks whether this component is the component at the specified point, where x and y are defined to be relative to the parent panel coordinate system.
Parameters:
x - int x value of the coordinate.
y - int y value of the coordinate.
Returns:
boolean true if the location is contained in this component.

isComponentAt

public boolean isComponentAt(java.awt.Point point)
Checks whether this component is the component at the specified point, where x and y are defined to be relative to the parent panel coordinate system.
Parameters:
point - Point containing the coordinate location.
Returns:
boolean true if the location is contained in this component.

toString

public java.lang.String toString()
This function returns the String form of the data.
Overrides:
toString in class java.lang.Object
Returns:
String containing the string version of this class.


Copyright © 2002 Clearfield Research Ltd. All Rights Reserved.