Exemplo n.º 1
0
 /* (non-Javadoc)
  * @see Displayable#addCommand(Command)
  */
 public void addCommand(Command command) {
   if (command != DISMISS_COMMAND) {
     super.addCommand(command);
     super.removeCommand(DISMISS_COMMAND);
     setCommandsVisibility(isModal());
   }
 }
Exemplo n.º 2
0
 /* (non-Javadoc)
  * @see Displayable#removeCommand(Command)
  */
 public void removeCommand(Command command) {
   if (command != DISMISS_COMMAND) {
     super.removeCommand(command);
     if (getNumCommands() == 0) {
       super.addCommand(DISMISS_COMMAND);
     }
     setCommandsVisibility(isModal());
   }
 }