示例#1
0
 /**
  * _more_
  *
  * @return _more_
  */
 private JComponent doMakeContents() {
   chartTop = new JPanel(new BorderLayout());
   chartLeft = new JPanel(new BorderLayout());
   JComponent chartComp =
       GuiUtils.leftCenter(chartLeft, GuiUtils.topCenter(chartTop, getChart().getContents()));
   return chartComp;
 }
示例#2
0
  /**
   * Add in any special control widgets to the current list of widgets.
   *
   * @param controlWidgets list of control widgets
   * @throws VisADException VisAD error
   * @throws RemoteException RMI error
   */
  public void getControlWidgets(List controlWidgets) throws VisADException, RemoteException {
    super.getControlWidgets(controlWidgets);

    if (!usePoints) {
      JCheckBox textureToggle = GuiUtils.makeCheckbox("", this, "useTexture3D");
      controlWidgets.add(
          new WrapperWidget(
              this,
              GuiUtils.rLabel("Use 3D Texture:"),
              GuiUtils.leftCenter(textureToggle, GuiUtils.filler())));
    } else {
      controlWidgets.add(
          new WrapperWidget(
              this, GuiUtils.rLabel("Point Size:"), GuiUtils.left(doMakePointSizeWidget())));
    }
  }
示例#3
0
  /**
   * Make the control widgets
   *
   * @param controlWidgets list of control widgets
   * @throws RemoteException Java RMI error
   * @throws VisADException VisAD Error
   */
  public void getControlWidgets(List controlWidgets) throws VisADException, RemoteException {
    super.getControlWidgets(controlWidgets);

    JComponent barbSizeBox =
        GuiUtils.wrap(
            GuiUtils.createValueBox(
                this, CMD_BARBSIZE, (int) flowScaleValue, Misc.createIntervalList(1, 10, 1), true));

    // make possible another component(s) to put on same line w barbSizeBox
    JComponent extra = doMakeExtraComponent();

    JComponent rightPanel =
        GuiUtils.leftCenter(
            ((extra != null)
                ? (JComponent) GuiUtils.hflow(Misc.newList(barbSizeBox, extra))
                : (JComponent) barbSizeBox),
            GuiUtils.filler());
    controlWidgets.add(new WrapperWidget(this, GuiUtils.rLabel("Windbarb size: "), rightPanel));
  }
示例#4
0
  /**
   * Create and return the Gui contents.
   *
   * @return The gui contents.
   */
  protected JComponent doMakeContents() {
    //        dataSelector = new DataSelector(getIdv(), new Dimension(400, 200),
    //                                        true);

    // Get the list of catalogs but remove the old catalog.xml entry
    urlListHandler = getPreferenceList(PREF_CATALOGLIST);
    final XmlChooser xmlChooser = this;
    ActionListener catListListener =
        new ActionListener() {
          public void actionPerformed(ActionEvent ae) {
            if (!okToDoUrlListEvents) {
              return;
            }
            xmlChooser.actionPerformed(ae);
          }
        };
    urlBox = urlListHandler.createComboBox(GuiUtils.CMD_UPDATE, catListListener, true);

    GuiUtils.setPreferredWidth(urlBox, 200);

    // top panel
    JButton browseButton = new JButton("Select File...");
    browseButton.setToolTipText("Choose a catalog from disk");
    browseButton.setActionCommand(CMD_BROWSE);
    browseButton.addActionListener(this);

    GuiUtils.setHFill();
    JPanel catListPanel =
        GuiUtils.doLayout(new Component[] {urlBox}, 1, GuiUtils.WT_Y, GuiUtils.WT_N);

    backBtn =
        GuiUtils.getImageButton(GuiUtils.getImageIcon("/auxdata/ui/icons/Left16.gif", getClass()));
    backBtn.setToolTipText("View previous selection");
    GuiUtils.makeMouseOverBorder(backBtn);
    backBtn.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent ae) {
            goBack();
          }
        });

    fwdBtn =
        GuiUtils.getImageButton(GuiUtils.getImageIcon("/auxdata/ui/icons/Right16.gif", getClass()));
    GuiUtils.makeMouseOverBorder(fwdBtn);
    fwdBtn.setToolTipText("View next selection");
    fwdBtn.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent ae) {
            goForward();
          }
        });

    checkButtons();
    JComponent bottomButtons = getDefaultButtons();
    handlerHolder = new JPanel();
    handlerHolder.setLayout(new BorderLayout());
    //        JPanel tmp = new JPanel();
    //        tmp.setPreferredSize(new Dimension(200,500));
    //        handlerHolder.add(tmp, BorderLayout.CENTER);

    if (getIdv().getArgsManager().getInitCatalogs().size() > 0) {
      initialUrlPath = (String) getIdv().getArgsManager().getInitCatalogs().get(0);
      urlBox.setSelectedItem(initialUrlPath);
    } else {
      if ((initialUrlPath != null) && (initialUrlPath.length() > 0)) {
        makeUiFromPath(initialUrlPath);
      } else {
        makeBlankTree();
      }
    }
    JPanel navButtons = GuiUtils.hbox(backBtn, fwdBtn);

    GuiUtils.tmpInsets = GRID_INSETS;
    JPanel catPanel =
        GuiUtils.doLayout(
            new Component[] {new JLabel("Catalogs:"), catListPanel, browseButton},
            3,
            GuiUtils.WT_NYN,
            GuiUtils.WT_N);
    JPanel topPanel = GuiUtils.leftCenter(navButtons, catPanel);
    myContents = GuiUtils.topCenterBottom(topPanel, handlerHolder, bottomButtons);
    //        myContents = GuiUtils.topCenter(getStatusComponent(), myContents);
    return myContents;
  }