|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--java.applet.Applet
|
+--amber.client.RComponent
An extension to Applet which adds the basic functionality of the Amber system - spawning send and receive threads if this is applet zero on the page, communicating with the server and detecting and communicating with other applets that exist on the page and communicating with them. This component when it is the master (ID 0) starting up communicates with the Amber server sending a substantial amount of information about the system it is running on. This information includes:
param name = "Extension0" value ="Value0|Data0"
ApplicationHandler,
ComponentHandler, Serialized Form| Inner classes inherited from class java.applet.Applet |
java.applet.Applet.AccessibleApplet |
| Inner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
protected ConnectionModule |
connectionModule
This is the handle of the primary connection module to the server. |
protected AmberInputStream |
dataDecoder
The data decoding data stream that is used by all components to send information. |
protected AmberOutputStream |
dataEncoder
|
protected java.awt.Font |
defaultFont
Default font for the component. |
protected java.io.ByteArrayOutputStream |
encoderBytes
The data encoding data stream that is used by all components to send information. |
protected boolean[] |
eventEnabled
Array containing whether or not to ignore events. |
static int |
InvalidPageSubId
|
int |
num
|
protected java.awt.Component |
visualObject
The visual object which is displayed in the applet. |
| 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 | |
RComponent()
Base Constructor for the applet. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
addBaseListeners(java.awt.Component source)
This function adds the standard base listeners to the specified component. |
void |
componentHidden(java.awt.event.ComponentEvent e)
|
void |
componentMoved(java.awt.event.ComponentEvent e)
|
void |
componentResized(java.awt.event.ComponentEvent e)
|
void |
componentShown(java.awt.event.ComponentEvent e)
|
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. |
protected void |
enableSpecifiedEvents(int eventMask)
This function enables the events specified by the parameter EVENTMASK. |
BaseComponent |
findApplet(int id)
This function hunts among the applets on the page looking for an Amber element which will respond to a specified ID. |
void |
focusGained(java.awt.event.FocusEvent e)
|
void |
focusLost(java.awt.event.FocusEvent e)
|
void |
forwardPacket(Packet packet)
Called by the ReceiveThread and any internal functions when a packet is to be sent to its required destination. |
java.lang.String |
getAppletInfo()
Get Applet information |
AmberInputStream |
getDataInput()
This function returns the current data input stream. |
short |
getId()
Return the ID integer of this applet |
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 applet. |
boolean |
isMyId(int id)
This function returns true if the id handed to it is to be handled here. |
void |
itemStateChanged(java.awt.event.ItemEvent e)
|
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
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 e,
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 |
setMessageBoxReturn(int value)
This function is called by the RMessageBox to set a return result and unlock the mutex. |
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 |
textValueChanged(java.awt.event.TextEvent e)
|
void |
waitForImage(java.awt.Image image)
This function waits for the specified image to load. |
protected void |
waitForRegistration()
This function waits for other applets to appear before continuing. |
void |
windowActivated(java.awt.event.WindowEvent e)
|
void |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
|
void |
windowDeactivated(java.awt.event.WindowEvent e)
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
|
void |
windowIconified(java.awt.event.WindowEvent e)
|
void |
windowOpened(java.awt.event.WindowEvent e)
|
| Methods inherited from class java.applet.Applet |
destroy, getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
| Methods inherited from class java.awt.Panel |
addNotify |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface amber.client.BaseComponent |
getAudioClip, getAudioClip, getCodeBase, getImage, getImage |
| Field Detail |
protected boolean[] eventEnabled
public static final int InvalidPageSubId
protected ConnectionModule connectionModule
protected java.awt.Font defaultFont
protected AmberInputStream dataDecoder
protected java.io.ByteArrayOutputStream encoderBytes
protected AmberOutputStream dataEncoder
public int num
protected java.awt.Component visualObject
| Constructor Detail |
public RComponent()
| Method Detail |
public java.lang.String getParameter(java.lang.String key,
java.lang.String def)
getParameter in interface BaseComponentkey - String containing the parameter key to search for.def - String used as the default should the parameter not exist.public void init()
init in interface BaseComponentinit in class java.applet.Appletpublic java.lang.String getSessionId()
getSessionId in interface BaseComponentpublic void setSessionId(java.lang.String id)
setSessionId in interface BaseComponentid - String containing the session ID.protected void waitForRegistration()
protected void enableSpecifiedEvents(int eventMask)
public void addBaseListeners(java.awt.Component source)
addBaseListeners in interface BaseComponentsource - The component which will be the source of the events.public java.lang.String getAppletInfo()
getAppletInfo in class java.applet.Appletpublic final short getId()
getId in interface BaseComponentpublic void setId(short newId)
setId in interface BaseComponentpublic BaseComponent findApplet(int id)
id - int id to find.public boolean isMyId(int id)
isMyId in interface BaseComponentid - int containing the ID to check for.
public void forwardPacket(Packet packet)
throws AmberException
forwardPacket in interface BaseComponentpacket - Packet containing the information to send to the specified
component.public void processPacket(Packet packet)
processPacket in interface BaseComponent
public void displayUrl(java.lang.String url,
java.lang.String location)
displayUrl in interface BaseComponenturl - 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 int displayMessage(java.lang.String title,
java.lang.String caption,
int type,
boolean modal)
displayMessage in interface BaseComponenttitle - 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 waitForImage(java.awt.Image image)
waitForImage in interface BaseComponentimage - Image to wait for.public void setVisible(boolean visible)
setVisible in interface BaseComponentsetVisible in class java.awt.Componentvisible - boolean true if the component is to be visible.public void setEnabled(boolean enabled)
setEnabled in interface BaseComponentsetEnabled in class java.awt.Componentenabled - boolean true if the component is to be enabled.public void setMessageBoxReturn(int value)
setMessageBoxReturn in interface MbInterfacevalue - The return value to send back from the message box to the server.public AmberInputStream createDataInput(Packet packet)
createDataInput in interface BaseComponentpacket - Packet containing the data to decode.public AmberInputStream getDataInput()
getDataInput in interface BaseComponent
public void sendEvent(java.util.EventObject e,
int id)
sendEvent in interface BaseComponente - EventObject to send.id - int ID of the source of the event.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void textValueChanged(java.awt.event.TextEvent e)
textValueChanged in interface java.awt.event.TextListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenerpublic void windowOpened(java.awt.event.WindowEvent e)
windowOpened in interface java.awt.event.WindowListenerpublic void windowClosing(java.awt.event.WindowEvent e)
windowClosing in interface java.awt.event.WindowListenerpublic void windowClosed(java.awt.event.WindowEvent e)
windowClosed in interface java.awt.event.WindowListenerpublic void windowIconified(java.awt.event.WindowEvent e)
windowIconified in interface java.awt.event.WindowListenerpublic void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified in interface java.awt.event.WindowListenerpublic void windowActivated(java.awt.event.WindowEvent e)
windowActivated in interface java.awt.event.WindowListenerpublic void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated in interface java.awt.event.WindowListenerpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void focusGained(java.awt.event.FocusEvent e)
focusGained in interface java.awt.event.FocusListenerpublic void focusLost(java.awt.event.FocusEvent e)
focusLost in interface java.awt.event.FocusListenerpublic void componentResized(java.awt.event.ComponentEvent e)
componentResized in interface java.awt.event.ComponentListenerpublic void componentMoved(java.awt.event.ComponentEvent e)
componentMoved in interface java.awt.event.ComponentListenerpublic void componentShown(java.awt.event.ComponentEvent e)
componentShown in interface java.awt.event.ComponentListenerpublic void componentHidden(java.awt.event.ComponentEvent e)
componentHidden in interface java.awt.event.ComponentListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||