Esempio n. 1
0
 void displayPosition(int projectionMode, double[] point) {
   if (showCoordinates < 0) {
     return;
   }
   if (point == null) {
     panel.setMessage(null, showCoordinates);
     return;
   }
   String text = ""; // $NON-NLS-1$
   switch (projectionMode) {
     case org.opensourcephysics.display3d.core.Camera.MODE_PLANAR_XY:
       if (formatX != null) {
         text = theFormatX.format(point[0]);
       }
       if (formatY != null) {
         text += ", " + theFormatY.format(point[1]); // $NON-NLS-1$
       }
       break;
     case org.opensourcephysics.display3d.core.Camera.MODE_PLANAR_XZ:
       if (formatX != null) {
         text = theFormatX.format(point[0]);
       }
       if (formatZ != null) {
         text += ", " + theFormatZ.format(point[2]); // $NON-NLS-1$
       }
       break;
     case org.opensourcephysics.display3d.core.Camera.MODE_PLANAR_YZ:
       if (formatY != null) {
         text = theFormatY.format(point[1]);
       }
       if (formatZ != null) {
         text += ", " + theFormatZ.format(point[2]); // $NON-NLS-1$
       }
       break;
     default:
       if (formatX != null) {
         text = theFormatX.format(point[0]);
       }
       if (formatY != null) {
         text += ", " + theFormatY.format(point[1]); // $NON-NLS-1$
       }
       if (formatZ != null) {
         text += ", " + theFormatZ.format(point[2]); // $NON-NLS-1$
       }
       break;
   }
   if (text.startsWith(", ")) { // $NON-NLS-1$
     text = text.substring(2);
   }
   panel.setMessage(text, showCoordinates);
 }
Esempio n. 2
0
 public void setRemoveHiddenLines(boolean _value) {
   this.removeHiddenLines = _value;
   if (panel != null) {
     panel.hintChanged(HINT_REMOVE_HIDDEN_LINES);
   }
 }
Esempio n. 3
0
 public final void setAxesLabels(String[] labels) {
   axesLabels = labels;
   if (panel != null) {
     panel.hintChanged(HINT_AXES_LABELS);
   }
 }
Esempio n. 4
0
 public void setDecorationType(int _value) {
   this.decorationType = _value;
   if (panel != null) {
     panel.hintChanged(HINT_DECORATION_TYPE);
   }
 }
Esempio n. 5
0
 public void setCursorType(int _type) {
   this.cursorType = _type;
   if (panel != null) {
     panel.hintChanged(HINT_CURSOR_TYPE);
   }
 }
Esempio n. 6
0
 public void setShowCoordinates(int location) {
   showCoordinates = location;
   if (panel != null) {
     panel.hintChanged(HINT_SHOW_COORDINATES);
   }
 }
Esempio n. 7
0
 public void setUseColorDepth(boolean _value) {
   this.useColorDepth = _value;
   if (panel != null) {
     panel.hintChanged(HINT_USE_COLOR_DEPTH);
   }
 }
Esempio n. 8
0
 public void setAllowQuickRedraw(boolean _value) {
   this.allowQuickRedraw = _value;
   if (panel != null) {
     panel.hintChanged(HINT_ALLOW_QUICK_REDRAW);
   }
 }