Example #1
0
 /**
  * Return a label for the given point on the graph axis
  *
  * @param value the value on the graph
  * @return the label for the given value
  */
 private String getLeafLabel(double value) {
   String label = Double.toString(value);
   try {
     int v = (int) value;
     int r = idxMap.getSrc(v);
     if (r < 0 || r >= tm.getRowCount()) {
       return "";
     }
     if (labelColumn >= 0 && labelColumn < tm.getColumnCount()) {
       Object o = tm.getValueAt(r, labelColumn);
       return o != null ? o.toString() : "";
     }
   } catch (Exception ex) {
     ExceptionHandler.popupException("" + ex);
   }
   try {
     label = Integer.toString((int) value);
   } catch (Exception ex) {
     ExceptionHandler.popupException("" + ex);
   }
   return label;
 }