public class CrosshairLayer extends AbstractLayer
Constructor and Description |
---|
CrosshairLayer() |
CrosshairLayer(java.lang.String iconFilePath) |
Modifier and Type | Method and Description |
---|---|
protected void |
doRender(DrawContext dc) |
java.lang.String |
getIconFilePath()
Returns the layer's current icon file path.
|
double |
getIconScale()
Returns the icon scale factor.
|
Vec4 |
getLocationCenter()
Get the crosshair location inside the viewport.
|
java.lang.String |
getResizeBehavior()
Returns the crosshair icon's resize behavior.
|
double |
getToViewportScale()
Returns the layer's compass-to-viewport scale factor.
|
void |
setIconFilePath(java.lang.String iconFilePath)
Sets the crosshair icon's image location.
|
void |
setIconScale(double iconScale)
Sets the scale factor defining the displayed size of the crosshair icon relative to the icon's width and height
in its image file.
|
void |
setLocationCenter(Vec4 locationCenter)
Set the crosshair location inside the viewport.
|
void |
setResizeBehavior(java.lang.String resizeBehavior)
Sets the behavior the layer uses to size the crosshair icon when the viewport size changes, typically when the
WorldWind window is resized.
|
void |
setToViewportScale(double toViewportScale)
Sets the scale factor applied to the viewport size to determine the displayed size of the crosshair icon.
|
java.lang.String |
toString() |
createLayerConfigElements, dispose, doPick, doPreRender, getDataFileStore, getExpiryTime, getLayerConfigParams, getMaxActiveAltitude, getMaxEffectiveAltitude, getMinActiveAltitude, getMinEffectiveAltitude, getName, getOpacity, getRestorableState, getScale, getScreenCredit, isAtMaxResolution, isEnabled, isLayerActive, isLayerConfigDocument, isLayerInView, isMultiResolution, isNetworkRetrievalEnabled, isPickEnabled, pick, preRender, render, restoreState, setDataFileStore, setEnabled, setExpiryTime, setMaxActiveAltitude, setMinActiveAltitude, setName, setNetworkRetrievalEnabled, setOpacity, setPickEnabled, setScreenCredit
onMessage, propertyChange
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
onMessage
public CrosshairLayer()
public CrosshairLayer(java.lang.String iconFilePath)
protected void doRender(DrawContext dc)
doRender
in class AbstractLayer
public java.lang.String getIconFilePath()
public double getIconScale()
setIconScale(double)
for a description of the scale factor.public Vec4 getLocationCenter()
public java.lang.String getResizeBehavior()
public double getToViewportScale()
public void setIconFilePath(java.lang.String iconFilePath)
iconFilePath
- the path to the icon's image filepublic void setIconScale(double iconScale)
setToViewportScale(double)
and the current viewport size.iconScale
- the icon scale factorpublic void setLocationCenter(Vec4 locationCenter)
locationCenter
- the crosshair location inside the viewport.public void setResizeBehavior(java.lang.String resizeBehavior)
resizeBehavior
- the desired resize behaviorpublic void setToViewportScale(double toViewportScale)
toViewportScale
- the compass to viewport scale factorpublic java.lang.String toString()
toString
in class AbstractLayer