Example #1
0
 /**
  * Make a combo box to select vertical separation of wind barbs, in m
  *
  * @return component for vertical interval selection
  */
 protected JComponent doMakeVerticalIntervalComponent() {
   JComboBox intervalBox =
       GuiUtils.createValueBox(
           this,
           CMD_INTERVAL,
           (int) verticalIntervalValue,
           Misc.createIntervalList(250, 1000, 250),
           true);
   return GuiUtils.label("  Vertical interval (m): ", GuiUtils.wrap(intervalBox));
 }
Example #2
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));
  }