Package ucar.unidata.idv.control.drawing
Class TextGlyph
java.lang.Object
ucar.unidata.idv.control.drawing.DrawingGlyph
ucar.unidata.idv.control.drawing.TextGlyph
Class TextGlyph Draws text
- Version:
- $Revision: 1.52 $
- Author:
- IDV Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
xml attr namesstatic final String
xml attr namesstatic final String
xml attr namesstatic final String
xml attr namesstatic final String
xml attr namesstatic final String
xml attr namesstatic final String
xml attr namesstatic final String
xml attr namesstatic final String
Justification namestatic final String
Justification namestatic final String
Justification namestatic final String
Justification namestatic final String
Justification nameprotected double
marker scaleprotected String
marker typeprotected boolean
Show the markerFields inherited from class ucar.unidata.idv.control.drawing.DrawingGlyph
actualPoints, ATTR_BGCOLOR, ATTR_COLOR, ATTR_COORDTYPE, ATTR_FILLED, ATTR_FULLLATLON, ATTR_LINEWIDTH, ATTR_NAME, ATTR_PICKABLE, ATTR_POINTS, ATTR_TEXT, ATTR_TIMEFORMAT, ATTR_TIMES, ATTR_ZPOSITION, control, COORD_LABELS, COORD_LATLON, COORD_LATLONALT, COORD_LONLAT, COORD_NONE, COORD_TYPENAMES, COORD_TYPES, COORD_XY, COORD_XYZ, coordType, firstMoveEarthLocation, firstMoveLocation, IDX_ALT, IDX_LAT, IDX_LON, IDX_X, IDX_Y, IDX_Z, oldVisibility, parentDisplayable, points, propDialog, propertiesUp, PT_X, PT_Y, PT_Z, selectionDisplayable, stretchIndex, tabbedPane, TAG_ARROW, TAG_FRONT, TAG_HIGH, TAG_IMAGE, TAG_LOW, TAG_MOVIE, TAG_POLYGON, TAG_SHAPE, TAG_SYMBOL, TAG_TEXT, uniqueCnt, zPosition
-
Constructor Summary
ConstructorsConstructorDescriptionctorTextGlyph
(DrawingControl control, DisplayEvent event, String text) ctor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Populate the xml node with attrsprotected boolean
applyProperties
(Hashtable compMap) Handle the property apply.Get the extra descripition used in the JTable listinggetFont()
Get the Font property.Get the Justification property.int
Get the HtmlWidth property.boolean
is this glyph a rasterdouble
Get the MarkerScale property.Get the MarkerType property.protected void
getPropertiesComponents
(List comps, Hashtable compMap) Make the properties widgetsFboolean
Get the ShowMarker property.The tag to use in the xmlgetText()
Get the Text property.Get the name of this glyph typeGet the VerticalJustification property.handleCreation
(DisplayEvent event) Initialize after creationhandleMouseMoved
(DisplayEvent event) Handle eventhandleMousePressed
(DisplayEvent event) Handle eventprotected boolean
Do the final initializationboolean
initFromUser
(DrawingControl control, DisplayEvent event) User created me.void
initFromXml
(DrawingControl control, Element node) Xml created meboolean
mousePressed
(DisplayEvent event) Handle the eventvoid
Projection changed.void
setBeenRemoved
(boolean value) Has this glyph been removedvoid
Set the Font property.void
setHorizontalJustification
(String value) Set the Justification property.void
setHtmlWidth
(int value) Set the HtmlWidth property.void
setMarkerScale
(double value) Set the MarkerScale property.void
setMarkerType
(String value) Set the MarkerType property.void
setShowMarker
(boolean value) Set the ShowMarker property.void
Set the Text property.void
setVerticalJustification
(String value) Set the VerticalJustification property.protected boolean
_more_void
Handle glyph movedvoid
Viewpoint changed.Methods inherited from class ucar.unidata.idv.control.drawing.DrawingGlyph
addDisplayable, addTime, canShowArea, canShowDistance, checkTimeVisibility, checkVisibility, closestPoint, constrainedTo2D, distance, distanceBetween, distanceBetween, doDeletePoint, doInterpolatedStretch, doMove, doneBeingCreated, doStretch, evaluateJython, getArea, getAreaString, getBeenRemoved, getBeingCreated, getBgcolor, getBoundingBox, getBoxPoint, getBoxPoint, getBoxPoint, getColor, getCoordType, getCreatedByUser, getDefaultZPosition, getDescription, getDisplayable, getDistance, getEditable, getElement, getFilled, getFixedAltitude, getFullLatLon, getLatLons, getLatLons, getName, getParent, getPickable, getPoint, getPoints, getPointValues, getPointValues, getPointValuesDouble, getPointValuesDouble, getSelectionPoints, getTimeField, getTimePropertiesComponents, getTimeValues, getVisibleFlag, getZPosition, handleKeyPressed, handleMouseDragged, handleMouseReleased, hide, initFinal, initFromBundle, initMove, initStretch, isFrontDisplay, isInFlatSpace, isInLatLonSpace, isInXYSpace, isSelectable, isValid, isVisible, makePoint, moveTo, processPointStrings, processPointStrings, removeDisplayable, setActualPoints, setBgcolor, setColor, setColor, setCoordType, setCreatedByUser, setEditable, setFilled, setFullLatLon, setName, setPickable, setPoints, setProperties, setSelected, setTimeValues, setVisible, setVisibleFlag, setZPosition, shouldShowColorSelector, show, smoothCurve, squared, swap, swap, toLatLonAlt, toString, tryToFill, writePoints
-
Field Details
-
JUST_LEFT
Justification name- See Also:
-
JUST_CENTER
Justification name- See Also:
-
JUST_RIGHT
Justification name- See Also:
-
JUST_TOP
Justification name- See Also:
-
JUST_BOTTOM
Justification name- See Also:
-
ATTR_MARKER
xml attr names- See Also:
-
ATTR_MARKERSCALE
xml attr names- See Also:
-
ATTR_SHOWMARKER
xml attr names- See Also:
-
ATTR_JUSTIFICATION
xml attr names- See Also:
-
ATTR_FONTSIZE
xml attr names- See Also:
-
ATTR_FONTFACE
xml attr names- See Also:
-
ATTR_FONTSTRING
xml attr names- See Also:
-
ATTR_FONT
xml attr names- See Also:
-
showMarker
protected boolean showMarkerShow the marker -
markerScale
protected double markerScalemarker scale -
markerType
marker type
-
-
Constructor Details
-
TextGlyph
public TextGlyph()ctor -
TextGlyph
ctor- Parameters:
control
- The control I'm inevent
- The event when I was createdtext
- Initial text
-
-
Method Details
-
getIsRaster
public boolean getIsRaster()is this glyph a raster- Overrides:
getIsRaster
in classDrawingGlyph
- Returns:
- is raster
-
getExtraDescription
Get the extra descripition used in the JTable listing- Overrides:
getExtraDescription
in classDrawingGlyph
- Returns:
- extra description
-
handleCreation
Initialize after creation- Overrides:
handleCreation
in classDrawingGlyph
- Parameters:
event
- The event- Returns:
- this
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
initFromUser
public boolean initFromUser(DrawingControl control, DisplayEvent event) throws VisADException, RemoteException User created me.- Overrides:
initFromUser
in classDrawingGlyph
- Parameters:
control
- The control I'm inevent
- The event- Returns:
- ok
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
mousePressed
Handle the event- Overrides:
mousePressed
in classDrawingGlyph
- Parameters:
event
- the event- Returns:
- Did we handle this event
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
initFromXml
public void initFromXml(DrawingControl control, Element node) throws VisADException, RemoteException Xml created me- Overrides:
initFromXml
in classDrawingGlyph
- Parameters:
control
- The controlnode
- The xml- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getTagName
The tag to use in the xml- Specified by:
getTagName
in classDrawingGlyph
- Returns:
- Xml tag name
-
addAttributes
Populate the xml node with attrs- Overrides:
addAttributes
in classDrawingGlyph
- Parameters:
e
- Xml node
-
setBeenRemoved
public void setBeenRemoved(boolean value) Has this glyph been removed- Overrides:
setBeenRemoved
in classDrawingGlyph
- Parameters:
value
- been removed
-
initFinalInner
Do the final initialization- Overrides:
initFinalInner
in classDrawingGlyph
- Returns:
- Successful
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
handleMousePressed
Handle event- Overrides:
handleMousePressed
in classDrawingGlyph
- Parameters:
event
- The event- Returns:
- This or null
- Throws:
RemoteException
- When bad things happenVisADException
- When bad things happen
-
handleMouseMoved
Handle event- Overrides:
handleMouseMoved
in classDrawingGlyph
- Parameters:
event
- The event- Returns:
- This or null
- Throws:
RemoteException
- When bad things happenVisADException
- When bad things happen
-
setFont
Set the Font property.- Parameters:
value
- The new value for Font
-
getFont
Get the Font property.- Returns:
- The Font
-
shouldShowBgColorSelector
protected boolean shouldShowBgColorSelector()_more_- Overrides:
shouldShowBgColorSelector
in classDrawingGlyph
- Returns:
- _more_
-
applyProperties
Handle the property apply.- Overrides:
applyProperties
in classDrawingGlyph
- Parameters:
compMap
- Holds property widgets- Returns:
- success
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
viewpointChanged
Viewpoint changed. Update the image if needed- Overrides:
viewpointChanged
in classDrawingGlyph
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
projectionChanged
Projection changed. Update the image.- Overrides:
projectionChanged
in classDrawingGlyph
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getPropertiesComponents
Make the properties widgetsF- Overrides:
getPropertiesComponents
in classDrawingGlyph
- Parameters:
comps
- List of componentscompMap
- Map to hold name to widget
-
getTypeName
Get the name of this glyph type- Specified by:
getTypeName
in classDrawingGlyph
- Returns:
- The name
-
updateLocation
Handle glyph moved- Overrides:
updateLocation
in classDrawingGlyph
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
setText
Set the Text property.- Parameters:
value
- The new value for Text
-
getText
Get the Text property.- Returns:
- The Text
-
setHorizontalJustification
Set the Justification property.- Parameters:
value
- The new value for Justification
-
getHorizontalJustification
Get the Justification property.- Returns:
- The Justification
-
setVerticalJustification
Set the VerticalJustification property.- Parameters:
value
- The new value for VerticalJustification
-
getVerticalJustification
Get the VerticalJustification property.- Returns:
- The VerticalJustification
-
setShowMarker
Set the ShowMarker property.- Parameters:
value
- The new value for ShowMarker- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getShowMarker
public boolean getShowMarker()Get the ShowMarker property.- Returns:
- The ShowMarker
-
setMarkerType
Set the MarkerType property.- Parameters:
value
- The new value for MarkerType- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getMarkerType
Get the MarkerType property.- Returns:
- The MarkerType
-
setMarkerScale
Set the MarkerScale property.- Parameters:
value
- The new value for MarkerScale- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getMarkerScale
public double getMarkerScale()Get the MarkerScale property.- Returns:
- The MarkerScale
-
setHtmlWidth
public void setHtmlWidth(int value) Set the HtmlWidth property.- Parameters:
value
- The new value for HtmlWidth
-
getHtmlWidth
public int getHtmlWidth()Get the HtmlWidth property.- Returns:
- The HtmlWidth
-