Exemplo n.º 1
0
 /**
  * Shows or hides the text for the currently selected figure.
  *
  * @param show Pass <code>true</code> to show the text, <code>false</code> otherwise.
  * @param figure The selected figure.
  */
 void showText(boolean show, ROIFigure figure) {
   if (fieldTable == null) return;
   int n = fieldTable.getRowCount();
   if (n > 4) {
     FigureTableModel ftm = (FigureTableModel) fieldTable.getModel();
     ROIFigure f = ftm.getFigure();
     if (f != null && f == figure)
       fieldTable.getModel().setValueAt(show, getRowIndex(MeasurementAttributes.SHOWTEXT), 1);
   }
 }
Exemplo n.º 2
0
 /**
  * Returns <code>true</code> if the text has to be shown, <code>false</code> otherwise.
  *
  * @return See above.
  */
 boolean isShowText() {
   if (fieldTable == null) return false;
   int n = fieldTable.getRowCount();
   if (n > 4) {
     Object v = fieldTable.getModel().getValueAt(getRowIndex(MeasurementAttributes.SHOWTEXT), 1);
     if (v == null) return false;
     return (Boolean) v;
   }
   return false;
 }
Exemplo n.º 3
0
 /**
  * Returns <code>true</code> if the figure dimensions are to be scaled proportionally, <code>false
  * </code> otherwise.
  *
  * @return See above.
  */
 boolean isScaleProportionally() {
   if (fieldTable == null) return false;
   int n = fieldTable.getRowCount();
   if (n > 1) {
     Object v =
         fieldTable
             .getModel()
             .getValueAt(getRowIndex(MeasurementAttributes.SCALE_PROPORTIONALLY), 1);
     if (v == null) return false;
     return (Boolean) v;
   }
   return false;
 }