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.


Fields inherited from class monrovia.protocol.Command
COMMAND_1INT_STAT, COMMAND_2INT_STAT, COMMAND_NO_ARG, COMMAND_REMOVE, COMMAND_STRING_ARG, mId, mName, mType
 
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 monrovia.protocol.Command
getCommandID, getCommandName, getCommandType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 command
pCommandText - the command text
pCommandType - the command type
Method Detail

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 button
pY - 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 button
pY - y coordinate of the button
pBitmap - 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.