Ejemplo n.º 1
0
  /**
   * Adds a action to the navigation panel
   *
   * @param text
   *          the text for the button
   * @param code
   *          the code to execute when the button is pressed
   *
   * @return the newly created button
   */
  public iActionComponent addAction(String text, String code) {
    UIAction a = new UIAction(text);

    a.setActionScript(code);
    a.setContext(this);

    return addAction(a);
  }
Ejemplo n.º 2
0
  /**
   * Adds a action to the navigation panel
   *
   * @param text
   *          the text for the button
   * @param link
   *          the link to activate when the button is pressed
   *
   * @return the newly created button
   */
  public iActionComponent addAction(String text, ActionLink link) {
    UIAction a = new UIAction(text);

    a.setActionListener(link);
    a.setContext(this);

    return addAction(a);
  }