visad
Class TextControl

java.lang.Object
  extended by visad.Control
      extended by visad.TextControl
All Implemented Interfaces:
Serializable, 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
          A class to represent the different types of justification.
 
Constructor Summary
TextControl(DisplayImpl d)
           
 
Method Summary
 boolean equals(Object o)
          Indicates whether or not this instance equals an Object
 boolean getAutoSize()
           
 boolean getCenter()
          return the centering flag
 double getCharacterRotation()
          Gets the value of characterRotation
 Font getFont()
          return the java.awt.Font
 HersheyFont getHersheyFont()
          return the HersheyFont
 TextControl.Justification getJustification()
          Return the justification value
 NumberFormat getNumberFormat()
           
 double[] getOffset()
          Gets the value of offset
 double getRotation()
          Get the rotation abcd 1 February 2001
 String getSaveString()
          get a string that can be used to reconstruct this control later
 double getScale()
          Gets the value of scale
 double getSize()
          return the size
 boolean getSphere()
           
 TextControl.Justification getVerticalJustification()
          Return the vertical justification value
 void nullControl()
          end this control (called by ScalarMap.nullDisplay())
 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 setCharacterRotation(double argCharacterRotation)
          Sets the value of characterRotation
 void setFont(Object f)
          set the font; in the initial release this has no effect
 void setJustification(TextControl.Justification newJustification)
          Set the justification flag Possible values are TextControl.Justification.LEFT, TextControl.Justification.CENTER and TextControl.Justification.RIGHT
 void setNumberFormat(NumberFormat f)
           
 void setOffset(double[] argOffset)
          Sets the value of offset
 void setRotation(double newRotation)
          Set the rotation abcd 1 February 2001
 void setSaveString(String save)
          reconstruct this control using the specified save string
 void setScale(double argScale)
          Sets the value of scale
 void setSize(double s)
          set the size of characters; the default is 1.0
 void setSphere(boolean s)
           
 void setVerticalJustification(TextControl.Justification newJustification)
          Set the vertical justification flag Possible values are TextControl.Justification.TOP, TextControl.Justification.CENTER and TextControl.Justification.BOTTOM
 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

getAutoSize

public boolean getAutoSize()

nullControl

public void nullControl()
Description copied from class: Control
end this control (called by ScalarMap.nullDisplay())

Overrides:
nullControl in class Control

setFont

public void setFont(Object f)
             throws VisADException,
                    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
RemoteException

getFont

public 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,
                      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
RemoteException

getCenter

public boolean getCenter()
return the centering flag


setJustification

public void setJustification(TextControl.Justification newJustification)
                      throws VisADException,
                             RemoteException
Set the justification flag Possible values are TextControl.Justification.LEFT, TextControl.Justification.CENTER and TextControl.Justification.RIGHT

Throws:
VisADException
RemoteException

getJustification

public TextControl.Justification getJustification()
Return the justification value


setVerticalJustification

public void setVerticalJustification(TextControl.Justification newJustification)
                              throws VisADException,
                                     RemoteException
Set the vertical justification flag Possible values are TextControl.Justification.TOP, TextControl.Justification.CENTER and TextControl.Justification.BOTTOM

Throws:
VisADException
RemoteException

getVerticalJustification

public TextControl.Justification getVerticalJustification()
Return the vertical justification value


setSize

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

Throws:
VisADException
RemoteException

getSize

public double getSize()
return the size


setSphere

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

getSphere

public boolean getSphere()

setNumberFormat

public void setNumberFormat(NumberFormat f)
                     throws VisADException,
                            RemoteException
Throws:
VisADException
RemoteException

getNumberFormat

public NumberFormat getNumberFormat()

setRotation

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

Throws:
VisADException
RemoteException

getRotation

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


getSaveString

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

Specified by:
getSaveString in class Control
Returns:
String representation of this Control

setSaveString

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

Specified by:
setSaveString in class Control
Parameters:
save - - String representation for reconstruction
Throws:
VisADException - if a VisAD error occurs
RemoteException - if an RMI error occurs

syncControl

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

Specified by:
syncControl in class Control
Parameters:
rmt - remote Control whose state is copied
Throws:
VisADException - if a VisAD error occurs

equals

public boolean equals(Object o)
Description copied from class: Control
Indicates whether or not this instance equals an Object

Overrides:
equals in class Control
Parameters:
o - an Object
Returns:
true if and only if this instance is equal to o

getCharacterRotation

public double getCharacterRotation()
Gets the value of characterRotation

Returns:
the value of characterRotation

setCharacterRotation

public void setCharacterRotation(double argCharacterRotation)
                          throws VisADException,
                                 RemoteException
Sets the value of characterRotation

Parameters:
argCharacterRotation - Value to assign to this.characterRotation
Throws:
VisADException
RemoteException

getScale

public double getScale()
Gets the value of scale

Returns:
the value of scale

setScale

public void setScale(double argScale)
              throws VisADException,
                     RemoteException
Sets the value of scale

Parameters:
argScale - Value to assign to this.scale
Throws:
VisADException
RemoteException

getOffset

public double[] getOffset()
Gets the value of offset

Returns:
the value of offset

setOffset

public void setOffset(double[] argOffset)
               throws VisADException,
                      RemoteException
Sets the value of offset

Parameters:
argOffset - Value to assign to this.offset
Throws:
VisADException
RemoteException