Example #1
0
  public int getInteractivePage(gguiPage page) {
    gguiObject gObj;
    int opt;

    if (linkObject < 1 || linkObject > page.countObjects()) {
      return -1;
    }
    gObj = page.getObject(linkObject - 1);
    opt = gObj.getInteractive() - 1;
    if (opt < 0 || opt > links.size()) {
      System.err.println("Error while trying to find interactive position: " + opt);
      return -1;
    }
    return transf.createInt(
        (String) links.elementAt(opt),
        "Error while trying to find interactive position: can't create integer.");
  }
Example #2
0
  private void setValuesToObjects() {
    gguiRoot c_root;
    gguiPage c_page;

    c_page = (gguiPage) getParent();
    while (cObject.getItemCount() > 1) {
      cObject.remove(1);
    }
    for (int i = 0; i < c_page.countObjects(); i++) {
      cObject.insert(c_page.getObject(i).getName(), i + 1);
    }

    while (clJumpto.getPageCount() > 1) {
      clJumpto.removePage(1);
    }
    c_root = (gguiRoot) c_page.getParent();
    for (int i = 0; i < c_root.countPages(); i++) {
      clJumpto.insertPage(c_root.getPage(i).getName(), i + 1);
    }
  }