Beispiel #1
0
 /** Method called when the "OK" panel is hit. Updates any changed fields in the 3D tab. */
 @Override
 public void term() {
   for (Iterator<Layer> it = curTech.getLayers(); it.hasNext(); ) {
     Layer layer = it.next();
     assert !layer.isPseudoLayer();
     GenMath.MutableDouble thickness = threeDThicknessMap.get(layer);
     GenMath.MutableDouble height = threeDDistanceMap.get(layer);
     setDouble(layer.getThicknessSetting(), thickness.doubleValue());
     setDouble(layer.getDistanceSetting(), height.doubleValue());
   }
 }
Beispiel #2
0
 /** Method called when the factory reset is requested. */
 @Override
 public void reset() {
   for (Iterator<Layer> it = curTech.getLayers(); it.hasNext(); ) {
     Layer layer = it.next();
     assert !layer.isPseudoLayer();
     Setting thicknessSetting = layer.getThicknessSetting();
     Setting distanceSetting = layer.getDistanceSetting();
     setDouble(thicknessSetting, thicknessSetting.getDoubleFactoryValue());
     setDouble(distanceSetting, distanceSetting.getDoubleFactoryValue());
   }
 }
Beispiel #3
0
  /**
   * Method called at the start of the dialog. Caches current values and displays them in the 3D
   * tab.
   */
  @Override
  public void init() {
    threeDTechnology.setText("Layer cross section for technology '" + curTech.getTechName() + "'");
    threeDLayerModel = new DefaultListModel();
    threeDLayerList = new JList(threeDLayerModel);
    threeDLayerList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    threeDLayerPane.setViewportView(threeDLayerList);
    threeDLayerList.clearSelection();
    threeDLayerList.addMouseListener(
        new MouseAdapter() {
          public void mouseClicked(MouseEvent evt) {
            threeDValuesChanged(false);
          }
        });
    threeDThicknessMap = new HashMap<Layer, GenMath.MutableDouble>();
    threeDDistanceMap = new HashMap<Layer, GenMath.MutableDouble>();
    // Sorted by Height to be consistent with LayersTab
    for (Layer layer : curTech.getLayersSortedByName()) {
      if (layer.isPseudoLayer()) continue;
      threeDLayerModel.addElement(layer.getName());
      double thickness = getDouble(layer.getThicknessSetting());
      double distance = getDouble(layer.getDistanceSetting());
      threeDThicknessMap.put(layer, new GenMath.MutableDouble(thickness));
      threeDDistanceMap.put(layer, new GenMath.MutableDouble(distance));
    }
    threeDLayerList.setSelectedIndex(0);
    threeDHeight.getDocument().addDocumentListener(new ThreeDInfoDocumentListener(this));
    threeDThickness.getDocument().addDocumentListener(new ThreeDInfoDocumentListener(this));

    threeDSideView = new ThreeDSideView(this);
    threeDSideView.setMinimumSize(new java.awt.Dimension(200, 450));
    threeDSideView.setPreferredSize(new java.awt.Dimension(200, 450));
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridx = 2;
    gbc.gridy = 1;
    gbc.gridwidth = 2;
    gbc.gridheight = 4;
    gbc.weightx = 0.5;
    gbc.weighty = 1.0;
    gbc.fill = GridBagConstraints.BOTH;
    gbc.insets = new java.awt.Insets(4, 4, 4, 4);
    threeD.add(threeDSideView, gbc);
    threeDValuesChanged(false);
  }