visad
Class TextControl

java.lang.Object
  extended by visad.Control
      extended by visad.TextControl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class TextControl
extends Control

TextControl is the VisAD class for controlling Text display scalars.

See Also:
Serialized Form

Nested Class Summary
static class TextControl.Justification
          Class to represent the different types of justification Use a class so the user can't just pass in an arbitrary integer abcd 5 February 2001
 
Constructor Summary
TextControl(DisplayImpl d)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 boolean getCenter()
          return the centering flag
 java.awt.Font getFont()
          return the java.awt.Font
 HersheyFont getHersheyFont()
          return the HersheyFont
 TextControl.Justification getJustification()
          Return the justification value abcd 5 February 2001
 java.text.NumberFormat getNumberFormat()
           
 double getRotation()
          Get the rotation abcd 1 February 2001
 java.lang.String getSaveString()
          get a string that can be used to reconstruct this control later
 double getSize()
          return the size
 boolean getSphere()
           
 void nullControl()
          end this control
 void setAutoSize(boolean auto)
           
 void setCenter(boolean c)
          set the centering flag; if true, text will be centered at mapped locations; if false, text will be to the right of mapped locations
 void setFont(java.lang.Object f)
          set the font; in the initial release this has no effect
 void setJustification(TextControl.Justification newJustification)
          Set the justifcation flag Possible values are TextControl.Justification.LEFT, TextControl.Justification.CENTER and TextControl.Justification.RIGHT abcd 5 February 2001
 void setNumberFormat(java.text.NumberFormat f)
           
 void setRotation(double newRotation)
          Set the rotation abcd 1 February 2001
 void setSaveString(java.lang.String save)
          reconstruct this control using the specified save string
 void setSize(double s)
          set the size of characters; the default is 1.0
 void setSphere(boolean s)
           
 void syncControl(Control rmt)
          copy the state of a remote control to this control
 
Methods inherited from class visad.Control
addControlListener, animation_string, changeControl, checkTicks, clone, getDisplay, getDisplayRenderer, getInstanceNumber, incTick, peekTicks, removeControlListener, resetTicks, setTicks, subCheckTicks, subPeekTicks, subResetTicks, subSetTicks, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextControl

public TextControl(DisplayImpl d)
Method Detail

setAutoSize

public void setAutoSize(boolean auto)
                 throws VisADException
Throws:
VisADException

nullControl

public void nullControl()
Description copied from class: Control
end this control

Overrides:
nullControl in class Control

setFont

public void setFont(java.lang.Object f)
             throws VisADException,
                    java.rmi.RemoteException
set the font; in the initial release this has no effect

Parameters:
f - is the java.awt.Font or the visad.util.HersheyFont
Throws:
VisADException
java.rmi.RemoteException

getFont

public java.awt.Font getFont()
return the java.awt.Font

Returns:
the java.awt.Font if the font is of that type; otherwise, null

getHersheyFont

public HersheyFont getHersheyFont()
return the HersheyFont

Returns:
the visad.util.HersheyFont if the font is of that type; otherwise, null

setCenter

public void setCenter(boolean c)
               throws VisADException,
                      java.rmi.RemoteException
set the centering flag; if true, text will be centered at mapped locations; if false, text will be to the right of mapped locations

Throws:
VisADException
java.rmi.RemoteException

getCenter

public boolean getCenter()
return the centering flag


setJustification

public void setJustification(TextControl.Justification newJustification)
                      throws VisADException,
                             java.rmi.RemoteException
Set the justifcation flag Possible values are TextControl.Justification.LEFT, TextControl.Justification.CENTER and TextControl.Justification.RIGHT abcd 5 February 2001

Throws:
VisADException
java.rmi.RemoteException

getJustification

public TextControl.Justification getJustification()
Return the justification value abcd 5 February 2001


setSize

public void setSize(double s)
             throws VisADException,
                    java.rmi.RemoteException
set the size of characters; the default is 1.0

Throws:
VisADException
java.rmi.RemoteException

getSize

public double getSize()
return the size


setSphere

public void setSphere(boolean s)
               throws VisADException,
                      java.rmi.RemoteException
Throws:
VisADException
java.rmi.RemoteException

getSphere

public boolean getSphere()

setNumberFormat

public void setNumberFormat(java.text.NumberFormat f)
                     throws VisADException,
                            java.rmi.RemoteException
Throws:
VisADException
java.rmi.RemoteException

getNumberFormat

public java.text.NumberFormat getNumberFormat()

setRotation

public void setRotation(double newRotation)
                 throws VisADException,
                        java.rmi.RemoteException
Set the rotation abcd 1 February 2001

Throws:
VisADException
java.rmi.RemoteException

getRotation

public double getRotation()
Get the rotation abcd 1 February 2001


getSaveString

public java.lang.String getSaveString()
get a string that can be used to reconstruct this control later

Specified by:
getSaveString in class Control

setSaveString

public void setSaveString(java.lang.String save)
                   throws VisADException,
                          java.rmi.RemoteException
reconstruct this control using the specified save string

Specified by:
setSaveString in class Control
Throws:
VisADException
java.rmi.RemoteException

syncControl

public void syncControl(Control rmt)
                 throws VisADException
copy the state of a remote control to this control

Specified by:
syncControl in class Control
Throws:
VisADException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class Control