|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--amber.client.panel.BaseControl
A base class which adds required processing functions to a standard AWT component to handle the requirements of Panels.
ApplicationHandler,
ComponentHandler,
BaseComponent,
RBase| Field Summary | |
protected AmberInputStream |
dataDecoder
The data decoding data stream that is used by all components to send information. |
protected AmberOutputStream |
dataEncoder
|
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. |
protected BaseComponent |
mainEventHandler
|
protected java.lang.Object |
nonVisualObject
|
protected RContainer |
panelParent
|
protected java.awt.Component |
visualObject
|
| Constructor Summary | |
BaseControl()
|
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
addListeners(BaseComponent listener)
|
boolean |
canAdd()
This function tells the parent container whether it is safe to add this component to the container. |
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. |
BaseComponent |
findBaseComponent()
This function is used to get to the parent applet. |
void |
focusGained(java.awt.event.FocusEvent e)
|
void |
focusLost(java.awt.event.FocusEvent e)
|
void |
forwardPacket(Packet packet)
This function just gets the parent to send the packet for us. |
protected AmberInputStream |
getDataInput()
This function returns the current data input stream. |
short |
getId()
|
short |
getIdFromInternalObject(java.lang.Object source)
This function returns the ID of an object given the corresponding Visual Object returns -1 if no match. |
java.awt.Image |
getImage(java.lang.String urlName)
This function gets the image specified by the input URL. |
java.lang.Object |
getNonVisualObject()
This function is similar in form to the getVisualObject function however it is used for components which do not derive from Component. |
RContainer |
getParent()
Returns the parent of this particular panel component. |
java.awt.Component |
getVisualObject()
This function returns the object which is the visible part of an Amber panel component. |
void |
init(RContainer mainParent,
int[] data,
java.lang.String parameters)
This is the main initialisation function for this class. |
boolean |
isEventEnabled(int eventId)
Returns whether this component is listening to the specified event type. |
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)
|
abstract void |
parseParameters(java.lang.String parameter)
|
void |
processPacket(Packet packet)
This routine contains the logic to parse a packet and perform actions based on the packet's contents. |
void |
setEnabled(boolean enabled)
This function is called to enable or disable the control. |
void |
setId(short newId)
|
void |
setMessageBoxReturn(int value)
This function is called by the RMessageBox to set a return result and unlock the mutex. |
void |
setParent(RContainer newParent)
Sets the parent of this particular panel component. |
void |
setVisible(boolean visible)
This function is called to show or hide the control. |
void |
textValueChanged(java.awt.event.TextEvent e)
|
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.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean[] eventEnabled
protected RContainer panelParent
protected java.awt.Component visualObject
protected java.lang.Object nonVisualObject
protected AmberInputStream dataDecoder
protected java.io.ByteArrayOutputStream encoderBytes
protected AmberOutputStream dataEncoder
protected BaseComponent mainEventHandler
| Constructor Detail |
public BaseControl()
| Method Detail |
public void init(RContainer mainParent,
int[] data,
java.lang.String parameters)
mainParent - RContainer handle to the panel this is a component of.data - int [6] containing information useful to the component
in the order ID, eventMask, x, y, w, h.parameters - String containing any required parameters separated by '|'public abstract void parseParameters(java.lang.String parameter)
public void addListeners(BaseComponent listener)
public short getIdFromInternalObject(java.lang.Object source)
source - Object handle to the object which fired the event.public java.awt.Component getVisualObject()
public java.lang.Object getNonVisualObject()
public void setParent(RContainer newParent)
newParent - RContainer which is the parent holder.public RContainer getParent()
public java.awt.Image getImage(java.lang.String urlName)
urlName - String name of the URL.public boolean isEventEnabled(int eventId)
eventId - int which matches one of the event IDs specified in
RConstants.RConstantspublic short getId()
public void setId(short newId)
public boolean isMyId(int id)
id - int containing the ID to check for.public void processPacket(Packet packet)
public void forwardPacket(Packet packet)
throws AmberException
packet - Packet to be sent.AmberException - containing error information.public void setVisible(boolean visible)
public void setEnabled(boolean enabled)
public AmberInputStream createDataInput(Packet packet)
packet - Packet containing the data to decode.public boolean canAdd()
protected AmberInputStream getDataInput()
public BaseComponent findBaseComponent()
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 setMessageBoxReturn(int value)
setMessageBoxReturn in interface MbInterfacevalue - The return value to send back from the message box to the server.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenerpublic 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 textValueChanged(java.awt.event.TextEvent e)
textValueChanged in interface java.awt.event.TextListenerpublic 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 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 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 | |||||||||