monrovia.client.ui
Class MenuCommand
java.lang.Object
|
+--monrovia.protocol.Command
|
+--monrovia.client.ui.MenuCommand
- public class MenuCommand
- extends Command
The class for the menu commands. A menu command includes a command ID
and a command text. A command button can also be made for the command.
Constructor Summary |
MenuCommand(int pCommandID,
java.lang.String pCommandText,
byte pCommandType)
Constructor for the class. |
Method Summary |
void |
deleteButton()
Deletes the button object from this MenuCommand object. |
com.sun.kjava.Button |
getButton()
Returns the button for the command. |
com.sun.kjava.Button |
makeButton(int pX,
int pY)
Constructs the command button. |
com.sun.kjava.Button |
makeButton(int pX,
int pY,
com.sun.kjava.Bitmap pBitmap)
Constructs the command button with the given bitmap. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MenuCommand
public MenuCommand(int pCommandID,
java.lang.String pCommandText,
byte pCommandType)
- Constructor for the class. Saves the command ID and the text.
- Parameters:
pCommandID
- the ID for this commandpCommandText
- the command textpCommandType
- the command type
makeButton
public com.sun.kjava.Button makeButton(int pX,
int pY)
- Constructs the command button. Attach the command text to the button.
- Parameters:
pX
- x coordinate of the buttonpY
- y coordinate of the button- Returns:
- the new Button object
makeButton
public com.sun.kjava.Button makeButton(int pX,
int pY,
com.sun.kjava.Bitmap pBitmap)
- Constructs the command button with the given bitmap.
- Parameters:
pX
- x coordinate of the buttonpY
- y coordinate of the buttonpBitmap
- bitmap to be used as the button image- Returns:
- the new Button object
getButton
public com.sun.kjava.Button getButton()
- Returns the button for the command.
- Returns:
- Button object
deleteButton
public void deleteButton()
- Deletes the button object from this MenuCommand object.