Example #1
0
  public void buildPanel() {
    String path = FileUtil.getLayoutPath(layoutDir, fname);
    if (path == null) {
      Messages.postError("Could not open xml file:" + fname);
      return;
    }
    removeAll();
    try {
      LayoutBuilder.build(pane, vnmrIf, path);
    } catch (Exception e) {
      String strError = "Error building file: " + path;
      Messages.postError(strError);
      Messages.writeStackTrace(e);
      return;
    }

    if (bScrollBar) {
      spane =
          new JScrollPane(
              pane,
              JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
              JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
      add(spane);
    } else {
      spane = null;
      add(pane);
    }
    paramsLayout.preferredLayoutSize(pane);
  }
Example #2
0
 public Dimension getActualSize() {
   return paramsLayout.preferredLayoutSize(this);
 }