Esempio n. 1
0
  /**
   * Switches a current displayable in a display. The <code>display</code> instance is taken from
   * <code>getDisplay</code> method. This method is used by all actions in the design for switching
   * displayable.
   *
   * @param alert the Alert which is temporarily set to the display; if <code>null</code>, then
   *     <code>nextDisplayable</code> is set immediately
   * @param nextDisplayable the Displayable to be set
   */
  public void switchDisplayable(
      Alert alert, Displayable nextDisplayable) { // GEN-END:|5-switchDisplayable|0|5-preSwitch
    // write pre-switch user code here

    Display display = getDisplay(); // GEN-BEGIN:|5-switchDisplayable|1|5-postSwitch
    if (alert == null) {
      display.setCurrent(nextDisplayable);
    } else {
      display.setCurrent(alert, nextDisplayable);
    } // GEN-END:|5-switchDisplayable|1|5-postSwitch
    // write post-switch user code here
  } // GEN-BEGIN:|5-switchDisplayable|2|
Esempio n. 2
0
 /**
  * Returns a display instance.
  *
  * @return the display instance.
  */
 public Display getDisplay() {
   return Display.getDisplay(this);
 }