|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This is an interface which is concerned with the basic messaging and event handling for the Amber system. For the system to function at some point in the hierarchy there should be a class which implements this interface.
ApplicationHandler,
ComponentHandler| Method Summary | |
void |
addBaseListeners(java.awt.Component source)
This function adds the standard base listeners to the specified component. |
AmberInputStream |
createDataInput(Packet packet)
This function creates a data input stream from the data in the packet. |
int |
displayMessage(java.lang.String title,
java.lang.String caption,
int type,
boolean modal)
This function creates and displays a MessageBox given the specified Title and caption. |
void |
displayUrl(java.lang.String url,
java.lang.String location)
This function gets an URL and displays it. |
void |
forwardPacket(Packet packet)
Called by the ReceiveThread and any internal functions when a packet is to be sent to its required destination. |
java.applet.AudioClip |
getAudioClip(java.net.URL url)
Returns the AudioClip object specified by the
URL argument. |
java.applet.AudioClip |
getAudioClip(java.net.URL url,
java.lang.String name)
Returns the AudioClip object specified by the
URL and name arguments. |
java.net.URL |
getCodeBase()
Gets the base URL. |
AmberInputStream |
getDataInput()
This function returns the current data input stream. |
short |
getId()
Return the ID integer of this control. |
java.awt.Image |
getImage(java.net.URL url)
Returns an Image object that can then be painted on
the screen. |
java.awt.Image |
getImage(java.net.URL url,
java.lang.String name)
Returns an Image object that can then be painted on the screen. |
java.lang.String |
getParameter(java.lang.String key,
java.lang.String def)
Get a parameter value |
java.lang.String |
getSessionId()
Returns the session ID of the current Amber Session. |
void |
init()
Main initialisation function for the component. |
boolean |
isMyId(int id)
This function returns true if the id handed to it is to be handled here. |
void |
processPacket(Packet packet)
This routine contains the logic to parse a packet and perform actions based on the packet's contents. |
void |
sendEvent(java.util.EventObject event,
int id)
This function sends an event to the server. |
void |
setEnabled(boolean enabled)
This function is called to enable or disable the control. |
void |
setId(short newId)
Set the ID integer of this applet |
void |
setSessionId(java.lang.String id)
Sets the session ID of the current Amber Session. |
void |
setVisible(boolean visible)
This function is called to show or hide the control. |
void |
waitForImage(java.awt.Image image)
This function waits for the specified image to load. |
| Methods inherited from interface amber.client.MbInterface |
setMessageBoxReturn |
| Methods inherited from interface java.awt.event.ActionListener |
actionPerformed |
| Methods inherited from interface java.awt.event.TextListener |
textValueChanged |
| Methods inherited from interface java.awt.event.KeyListener |
keyPressed, keyReleased, keyTyped |
| Methods inherited from interface java.awt.event.MouseListener |
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased |
| Methods inherited from interface java.awt.event.ItemListener |
itemStateChanged |
| Methods inherited from interface java.awt.event.WindowListener |
windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened |
| Methods inherited from interface java.awt.event.MouseMotionListener |
mouseDragged, mouseMoved |
| Methods inherited from interface java.awt.event.FocusListener |
focusGained, focusLost |
| Method Detail |
public java.lang.String getParameter(java.lang.String key,
java.lang.String def)
key - String containing the parameter key to search for.def - String used as the default should the parameter not exist.public void init()
public void addBaseListeners(java.awt.Component source)
source - The component which will be the source of the events.public short getId()
public void setId(short newId)
public boolean isMyId(int id)
id - int containing the ID to check for.
public void forwardPacket(Packet packet)
throws AmberException
packet - Packet containing the information to send to the specified
component.AmberException - containing any errors.public void processPacket(Packet packet)
public int displayMessage(java.lang.String title,
java.lang.String caption,
int type,
boolean modal)
title - The String containing the title.caption - The String containing the caption.offset - int offset into the byte array.type - int defining the type of message box to display.modal - boolean true if the program is to block waiting for the replypublic void setVisible(boolean visible)
visible - boolean true if the component is to be visible.public void setEnabled(boolean enabled)
enabled - boolean true if the component is to be enabled.public AmberInputStream createDataInput(Packet packet)
packet - Packet containing the data to decode.public AmberInputStream getDataInput()
public java.net.URL getCodeBase()
public java.applet.AudioClip getAudioClip(java.net.URL url)
AudioClip object specified by the
URL argument.
This method always returns immediately, whether or not the audio clip exists. When this applet attempts to play the audio clip, the data will be loaded.
url - an absolute URL giving the location of the audio clip.AudioClip
public java.applet.AudioClip getAudioClip(java.net.URL url,
java.lang.String name)
AudioClip object specified by the
URL and name arguments.
This method always returns immediately, whether or not the audio clip exists. When this applet attempts to play the audio clip, the data will be loaded.
url - an absolute URL giving the base location of the
audio clip.name - the location of the audio clip, relative to the
url argument.AudioClippublic java.awt.Image getImage(java.net.URL url)
Image object that can then be painted on
the screen. The url that is passed as an argument
must specify an absolute URL.
This method always returns immediately, whether or not the image exists. When this applet attempts to draw the image on the screen, the data will be loaded. The graphics primitives that draw the image will incrementally paint on the screen.
url - an absolute URL giving the location of the image.Image
public java.awt.Image getImage(java.net.URL url,
java.lang.String name)
This method always returns immediately, whether or not the image exists. When this applet attempts to draw the image on the screen, the data will be loaded. The graphics primitives that draw the image will incrementally paint on the screen.
url - an absolute URL giving the base location of the image.name - the location of the image, relative to the
url argument.Imagepublic void waitForImage(java.awt.Image image)
image - Image to wait for.
public void displayUrl(java.lang.String url,
java.lang.String location)
url - String URL to display.location - String location to display the URL in. It the string
is null the function defaults to the current window.
public void sendEvent(java.util.EventObject event,
int id)
event - EventObject to send.id - int ID of the source of the event.public java.lang.String getSessionId()
public void setSessionId(java.lang.String id)
id - String containing the session ID.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||