Example #1
0
 /**
  * Add components to the properties dialog
  *
  * @param tabbedPane the tabbed pane to add to
  */
 protected void addPropertiesComponents(JTabbedPane tabbedPane) {
   super.addPropertiesComponents(tabbedPane);
   // set vertical range "visible" checkbox to current status of
   // individual vert axis visibility, independent of global
   // 'show display scales' switch
   vertRangeWidget =
       getViewpointControl()
           .makeVerticalRangeWidget(getNavigatedDisplay().getVerticalRangeVisible());
   tabbedPane.add("Vertical Scale", GuiUtils.topLeft(vertRangeWidget));
 }
Example #2
0
 /**
  * Add the Grid Fields component to the properties tab
  *
  * @param tabbedPane properties tab
  */
 public void addPropertiesTabs(JTabbedPane tabbedPane) {
   super.addPropertiesTabs(tabbedPane);
   List comps = new ArrayList();
   gridProperties = new GridParameters(this);
   makeGridFieldsCbx = new JCheckBox("Make Grid Fields", makeGridFields);
   comps.add(GuiUtils.filler());
   comps.add(GuiUtils.left(makeGridFieldsCbx));
   comps.addAll(gridProperties.comps);
   GuiUtils.tmpInsets = GuiUtils.INSETS_5;
   tabbedPane.addTab(
       "Objective Analysis",
       GuiUtils.topLeft(GuiUtils.doLayout(comps, 2, GuiUtils.WT_NN, GuiUtils.WT_N)));
 }
Example #3
0
    /**
     * Utility method to add components to dialog list
     *
     * @param comps list to add to
     * @param name name
     * @param cbx enable checkbox
     * @param comp the component
     */
    private void addEditComponents(
        List comps, String name, final JCheckBox cbx, final JComponent comp) {
      cbx.addChangeListener(
          new ChangeListener() {
            public void stateChanged(ChangeEvent e) {
              GuiUtils.enableTree(comp, cbx.isSelected());
            }
          });

      GuiUtils.enableTree(comp, cbx.isSelected());
      comps.add(GuiUtils.top(GuiUtils.inset(cbx, 5)));
      comps.add(GuiUtils.top(GuiUtils.inset(GuiUtils.rLabel(name), new Insets(8, 0, 0, 0))));
      JComponent right = GuiUtils.inset(comp, new Insets(3, 5, 0, 0));
      //            comps.add(GuiUtils.leftCenter(GuiUtils.top(GuiUtils.inset(cbx,
      //                    new Insets(2, 0, 0, 0))), GuiUtils.topLeft(right)));
      comps.add(GuiUtils.topLeft(right));
    }
Example #4
0
    /**
     * Make the gui for the field selector
     *
     * @return gui for field selector
     */
    protected JComponent doMakeContents() {
      GuiUtils.tmpInsets = GuiUtils.INSETS_5;
      comp = GuiUtils.doLayout(comps, 2, GuiUtils.WT_N, GuiUtils.WT_N);
      if (dataSelection != null) {
        Object prop;
        prop = dataSelection.getProperty(PROP_GRID_X);
        if (prop != null) {
          gridXFld.setText("" + prop);
          // If we have a data selection property then turn of cbx
          useDefaultCbx.setSelected(false);
        }
        prop = dataSelection.getProperty(PROP_GRID_Y);
        if (prop != null) {
          gridYFld.setText("" + prop);
        }

        prop = dataSelection.getProperty(PROP_GRID_UNIT);
        if (prop != null) {
          gridUnitCmbx.setSelectedItem(TwoFacedObject.findId(prop, tfos));
        }
        prop = dataSelection.getProperty(PROP_GRID_NUMPASSES);
        if (prop != null) {
          numGridPassesFld.setText("" + prop);
        }
        prop = dataSelection.getProperty(PROP_GRID_GAIN);
        if (prop != null) {
          gainComp.setValue(((Number) prop).floatValue());
        }
        prop = dataSelection.getProperty(PROP_GRID_SEARCH_RADIUS);
        if (prop != null) {
          searchComp.setValue(((Number) prop).floatValue());
        }
      }

      checkEnable();
      return GuiUtils.topCenter(GuiUtils.right(useDefaultCbx), GuiUtils.topLeft(comp));
    }