Exemplo n.º 1
0
  /**
   * Specify <CODE>DisplayImpl</CODE> to be rendered.
   *
   * @param d <CODE>Display</CODE> to render.
   * @exception VisADException If a <CODE>DisplayImpl</CODE> has already been specified.
   */
  public void setDisplay(DisplayImpl d) throws VisADException {
    if (display != null) {
      throw new DisplayException("DisplayRenderer.setDisplay: " + "display already set");
    }
    display = d;

    // reinitialize rendererControl
    if (rendererControl == null) {
      rendererControl = new RendererControl(display);
      initControl(rendererControl);
    } else {
      RendererControl rc = new RendererControl(display);
      rc.syncControl(rendererControl);
      rendererControl = rc;
    }
    rendererControl.addControlListener(this);
    display.addControl(rendererControl);
  }
Exemplo n.º 2
0
 /**
  * Set the cursor color. All specified values should be in the range <CODE>[0.0f - 1.0f]</CODE>.
  *
  * @param r Red value.
  * @param g Green value.
  * @param b Blue value.
  * @exception RemoteException If there was a problem making this change in a remote collaborative
  *     <CODE>DisplayRenderer</CODE>.
  * @exception VisADException If this renderer as not yet been assigned to a <CODE>Display</CODE>.
  */
 public void setCursorColor(float r, float g, float b) throws RemoteException, VisADException {
   if (rendererControl == null) {
     throw new VisADException("DisplayRenderer not yet assigned to a Display");
   }
   rendererControl.setCursorColor(r, g, b);
 }
Exemplo n.º 3
0
 /**
  * Get the cursor color.
  *
  * @return A 3 element array of <CODE>float</CODE> values in the range <CODE>[0.0f - 1.0f]</CODE>
  *     in the order <I>(Red, Green, Blue)</I>.
  * @exception RemoteException If there was a problem making this change in a remote collaborative
  *     <CODE>DisplayRenderer</CODE>.
  * @exception VisADException If this renderer as not yet been assigned to a <CODE>Display</CODE>.
  */
 public float[] getCursorColor() throws RemoteException, VisADException {
   if (rendererControl == null) {
     throw new VisADException("DisplayRenderer not yet assigned to a Display");
   }
   return rendererControl.getCursorColor();
 }
Exemplo n.º 4
0
 /**
  * Set the box visibility.
  *
  * @param on <CODE>true</CODE> if the box should be visible.
  * @exception RemoteException If there was a problem making this change in a remote collaborative
  *     <CODE>DisplayRenderer</CODE>.
  * @exception VisADException If this renderer as not yet been assigned to a <CODE>Display</CODE>.
  */
 public void setBoxOn(boolean on) throws RemoteException, VisADException {
   if (rendererControl == null) {
     throw new VisADException("DisplayRenderer not yet assigned to a Display");
   }
   rendererControl.setBoxOn(on);
 }
Exemplo n.º 5
0
 /**
  * Get the box visibility.
  *
  * @return <CODE>true</CODE> if the box is visible.
  */
 public boolean getBoxOn() throws RemoteException, VisADException {
   if (rendererControl == null) {
     throw new VisADException("DisplayRenderer not yet assigned to a Display");
   }
   return rendererControl.getBoxOn();
 }