Exemple #1
0
 /**
  * Set the LineWidth property.
  *
  * @param value The new value for LineWidth
  */
 public void setLineWidth(float value) {
   super.setLineWidth(value);
   try {
     if (maxDistanceBox != null) {
       maxDistanceBox.setLineWidth(value);
     }
   } catch (Exception exc) {
     LogUtil.logException("Setting color", exc);
   }
 }
Exemple #2
0
  /**
   * Init at the end
   *
   * @return Success
   * @throws RemoteException On badness
   * @throws VisADException On badness
   */
  protected boolean initFinalInner() throws VisADException, RemoteException {
    if (!super.initFinalInner()) {
      return false;
    }

    maxDistanceBox = new LineDrawing("TransectGlyph_" + (typeCnt++));
    maxDistanceBox.setLineWidth(getLineWidth());
    maxDistanceBox.setColor(getColor());
    addDisplayable(maxDistanceBox);

    if (showText) {
      startTextType = TextType.getTextType("TransectGlyphText_" + (typeCnt++));
      startTextDisplayable = new TextDisplayable("start text_" + (typeCnt++), startTextType);
      startTextDisplayable.setTextSize(control.getDisplayScale() * 2.0f);
      endTextType = TextType.getTextType("TransectGlyphText_" + (typeCnt++));
      endTextDisplayable = new TextDisplayable("end text_" + (typeCnt++), endTextType);
      endTextDisplayable.setTextSize(control.getDisplayScale() * 2.0f);
      addDisplayable(startTextDisplayable);
      addDisplayable(endTextDisplayable);
    }
    return true;
  }