コード例 #1
0
ファイル: ThreeDTab.java プロジェクト: imr/Electric8
 private void threeDValuesChanged(boolean set) {
   if (!set) initial3DTextChanging = true;
   else if (initial3DTextChanging) return;
   String layerName = (String) threeDLayerList.getSelectedValue();
   Layer layer = curTech.findLayer(layerName);
   if (layer == null) return;
   GenMath.MutableDouble thickness = threeDThicknessMap.get(layer);
   GenMath.MutableDouble height = threeDDistanceMap.get(layer);
   if (set) {
     thickness.setValue(TextUtils.atofDistance(threeDThickness.getText()));
     height.setValue(TextUtils.atofDistance(threeDHeight.getText()));
   } else {
     threeDHeight.setText(TextUtils.formatDistance(height.doubleValue()));
     threeDThickness.setText(TextUtils.formatDistance(thickness.doubleValue()));
   }
   if (!set) initial3DTextChanging = false;
   threeDSideView.repaint();
 }
コード例 #2
0
ファイル: ThreeDTab.java プロジェクト: imr/Electric8
 public void mouseDragged(MouseEvent evt) {
   Dimension dim = getSize();
   String layerName = (String) dialog.threeDLayerList.getSelectedValue();
   Layer layer = dialog.curTech.findLayer(layerName);
   GenMath.MutableDouble height = threeDDistanceMap.get(layer);
   double newHeight =
       (double) (dim.height - evt.getY()) / dim.height * (highHeight - lowHeight) + lowHeight;
   if (height.doubleValue() != newHeight) {
     height.setValue(newHeight);
     dialog.threeDHeight.setText(TextUtils.formatDistance(newHeight));
     repaint();
   }
 }
コード例 #3
0
ファイル: RoutingTab.java プロジェクト: imr/Electric8
  /**
   * Method called at the start of the dialog. Caches current values and displays them in the
   * Routing tab.
   */
  public void init() {
    // initilze for the stitcher that is running
    boolean initRoutMimicOn = Routing.isMimicStitchOn();
    boolean initRoutAutoOn = Routing.isAutoStitchOn();
    if (!initRoutMimicOn && !initRoutAutoOn) routNoStitcher.setSelected(true);
    else {
      if (initRoutMimicOn) routMimicStitcher.setSelected(true);
      else routAutoStitcher.setSelected(true);
    }

    // initialize the "default arc" setting
    for (Iterator<Technology> tIt = Technology.getTechnologies(); tIt.hasNext(); ) {
      Technology tech = tIt.next();
      routTechnology.addItem(tech.getTechName());
      sogRouteTechnology.addItem(tech.getTechName());
    }
    routTechnology.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            techChanged();
          }
        });

    // the sea-of-gates section
    sogFavorChecks = new HashMap<ArcProto, JCheckBox>();
    sogProhibitChecks = new HashMap<ArcProto, JCheckBox>();
    sogArcList = new JPanel();
    sogRouteArcOptions.setViewportView(sogArcList);
    sogRouteTechnology.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            sogTechChanged();
          }
        });
    sogRouteTechnology.setSelectedItem(Technology.getCurrent().getTechName());
    sogMaxArcWidth.setText(TextUtils.formatDistance(Routing.getSeaOfGatesMaxWidth()));
    sogComplexityLimit.setText(Integer.toString(Routing.getSeaOfGatesComplexityLimit()));
    sogParallel.setSelected(Routing.isSeaOfGatesUseParallelRoutes());
    sogParallel.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            sogParallelChanged();
          }
        });
    sogParallelDij.setSelected(Routing.isSeaOfGatesUseParallelFromToRoutes());
    sogParallelDij.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            sogParallelChanged();
          }
        });

    routTechnology.setSelectedItem(Technology.getCurrent().getTechName());
    routOverrideArc.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            overrideChanged();
          }
        });
    String prefArcName = Routing.getPreferredRoutingArc();
    initRoutDefArc = null;
    if (prefArcName.length() > 0) {
      initRoutDefArc = ArcProto.findArcProto(prefArcName);
      routOverrideArc.setSelected(true);
    } else {
      routOverrideArc.setSelected(false);
    }
    overrideChanged();
    if (initRoutDefArc != null) {
      routTechnology.setSelectedItem(initRoutDefArc.getTechnology().getTechName());
      routDefaultArc.setSelectedItem(initRoutDefArc.getName());
    }

    // auot routing section
    routAutoCreateExports.setSelected(Routing.isAutoStitchCreateExports());

    // mimic routing section
    routMimicPortsMustMatch.setSelected(Routing.isMimicStitchMatchPorts());
    routMimicPortsWidthMustMatch.setSelected(Routing.isMimicStitchMatchPortWidth());
    routMimicNumArcsMustMatch.setSelected(Routing.isMimicStitchMatchNumArcs());
    routMimicNodeSizesMustMatch.setSelected(Routing.isMimicStitchMatchNodeSize());
    routMimicNodeTypesMustMatch.setSelected(Routing.isMimicStitchMatchNodeType());
    routMimicNoOtherArcs.setSelected(Routing.isMimicStitchNoOtherArcsSameDir());
    routMimicOnlyNewTopology.setSelected(Routing.isMimicStitchOnlyNewTopology());
    routMimicInteractive.setSelected(Routing.isMimicStitchInteractive());
    routMimicKeepPins.setSelected(Routing.isMimicStitchPinsKept());
  }