visad
Class TextControl
- java.lang.Object
-
- visad.Control
-
- 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
Nested Classes Modifier and Type Class and Description static classTextControl.JustificationA class to represent the different types of justification.
-
Constructor Summary
Constructors Constructor and Description TextControl(DisplayImpl d)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object o)Indicates whether or not this instance equals an ObjectbooleangetAutoSize()booleangetCenter()return the centering flagdoublegetCharacterRotation()Gets the value of characterRotationjava.awt.FontgetFont()return the java.awt.FontHersheyFontgetHersheyFont()return the HersheyFontTextControl.JustificationgetJustification()Return the justification valuejava.text.NumberFormatgetNumberFormat()double[]getOffset()Gets the value of offsetdoublegetRotation()Get the rotation abcd 1 February 2001java.lang.StringgetSaveString()get a string that can be used to reconstruct this control laterdoublegetScale()Gets the value of scaledoublegetSize()return the sizebooleangetSphere()TextControl.JustificationgetVerticalJustification()Return the vertical justification valuevoidnullControl()end this control (called by ScalarMap.nullDisplay())voidsetAutoSize(boolean auto)voidsetCenter(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 locationsvoidsetCharacterRotation(double argCharacterRotation)Sets the value of characterRotationvoidsetFont(java.lang.Object f)set the font; in the initial release this has no effectvoidsetJustification(TextControl.Justification newJustification)Set the justification flag Possible values are TextControl.Justification.LEFT, TextControl.Justification.CENTER and TextControl.Justification.RIGHTvoidsetNumberFormat(java.text.NumberFormat f)voidsetOffset(double[] argOffset)Sets the value of offsetvoidsetRotation(double newRotation)Set the rotation abcd 1 February 2001voidsetSaveString(java.lang.String save)reconstruct this control using the specified save stringvoidsetScale(double argScale)Sets the value of scalevoidsetSize(double s)set the size of characters; the default is 1.0voidsetSphere(boolean s)voidsetVerticalJustification(TextControl.Justification newJustification)Set the vertical justification flag Possible values are TextControl.Justification.TOP, TextControl.Justification.CENTER and TextControl.Justification.BOTTOMvoidsyncControl(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
-
-
-
-
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:Controlend this control (called by ScalarMap.nullDisplay())- Overrides:
nullControlin classControl
-
setFont
public void setFont(java.lang.Object f) throws VisADException, java.rmi.RemoteExceptionset the font; in the initial release this has no effect- Parameters:
f- is the java.awt.Font or the visad.util.HersheyFont- Throws:
VisADExceptionjava.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.RemoteExceptionset the centering flag; if true, text will be centered at mapped locations; if false, text will be to the right of mapped locations- Throws:
VisADExceptionjava.rmi.RemoteException
-
getCenter
public boolean getCenter()
return the centering flag
-
setJustification
public void setJustification(TextControl.Justification newJustification) throws VisADException, java.rmi.RemoteException
Set the justification flag Possible values are TextControl.Justification.LEFT, TextControl.Justification.CENTER and TextControl.Justification.RIGHT- Throws:
VisADExceptionjava.rmi.RemoteException
-
getJustification
public TextControl.Justification getJustification()
Return the justification value
-
setVerticalJustification
public void setVerticalJustification(TextControl.Justification newJustification) throws VisADException, java.rmi.RemoteException
Set the vertical justification flag Possible values are TextControl.Justification.TOP, TextControl.Justification.CENTER and TextControl.Justification.BOTTOM- Throws:
VisADExceptionjava.rmi.RemoteException
-
getVerticalJustification
public TextControl.Justification getVerticalJustification()
Return the vertical justification value
-
setSize
public void setSize(double s) throws VisADException, java.rmi.RemoteExceptionset the size of characters; the default is 1.0- Throws:
VisADExceptionjava.rmi.RemoteException
-
getSize
public double getSize()
return the size
-
setSphere
public void setSphere(boolean s) throws VisADException, java.rmi.RemoteException- Throws:
VisADExceptionjava.rmi.RemoteException
-
getSphere
public boolean getSphere()
-
setNumberFormat
public void setNumberFormat(java.text.NumberFormat f) throws VisADException, java.rmi.RemoteException- Throws:
VisADExceptionjava.rmi.RemoteException
-
getNumberFormat
public java.text.NumberFormat getNumberFormat()
-
setRotation
public void setRotation(double newRotation) throws VisADException, java.rmi.RemoteExceptionSet the rotation abcd 1 February 2001- Throws:
VisADExceptionjava.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:
getSaveStringin classControl- Returns:
- String representation of this Control
-
setSaveString
public void setSaveString(java.lang.String save) throws VisADException, java.rmi.RemoteExceptionreconstruct this control using the specified save string- Specified by:
setSaveStringin classControl- Parameters:
save- - String representation for reconstruction- Throws:
VisADException- if a VisAD error occursjava.rmi.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:
syncControlin classControl- Parameters:
rmt- remote Control whose state is copied- Throws:
VisADException- if a VisAD error occurs
-
equals
public boolean equals(java.lang.Object o)
Description copied from class:ControlIndicates whether or not this instance equals an Object
-
getCharacterRotation
public double getCharacterRotation()
Gets the value of characterRotation- Returns:
- the value of characterRotation
-
setCharacterRotation
public void setCharacterRotation(double argCharacterRotation) throws VisADException, java.rmi.RemoteExceptionSets the value of characterRotation- Parameters:
argCharacterRotation- Value to assign to this.characterRotation- Throws:
VisADExceptionjava.rmi.RemoteException
-
getScale
public double getScale()
Gets the value of scale- Returns:
- the value of scale
-
setScale
public void setScale(double argScale) throws VisADException, java.rmi.RemoteExceptionSets the value of scale- Parameters:
argScale- Value to assign to this.scale- Throws:
VisADExceptionjava.rmi.RemoteException
-
getOffset
public double[] getOffset()
Gets the value of offset- Returns:
- the value of offset
-
setOffset
public void setOffset(double[] argOffset) throws VisADException, java.rmi.RemoteExceptionSets the value of offset- Parameters:
argOffset- Value to assign to this.offset- Throws:
VisADExceptionjava.rmi.RemoteException
-
-
DMelt 3.0 © DataMelt by jWork.ORG