Пример #1
0
 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
 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();
   }
 }