Class TLcdVVJPanel
- All Implemented Interfaces:
ILcdPropertyChangeSource
,ImageObserver
,MenuContainer
,Serializable
,Accessible
JPanel
allows to display one vertical profile (for example
a 3D polyline of lon/lat/height points) and a number of sub-profiles
that are associated to the main profile. A sub-profile is divided
into sub-profile steps. The number of steps of each sub-profile is equal
to the number of points it contains minus one.
A sub-profile step has a ratio, that is the
percentage on the x-axis it represents, relatively to the main-profile (e.g.
the sum of all the ratios for one sub-profile is exactly 1).- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
This property change will be thrown When a newILcdVVModel
is set to thisTLcdVVJPanel
When theILcdVVModel
throws a change eventstatic final String
static final String
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a listener that should be notified if the vertical cursor has moved.Returns the unit to use when displaying altitudes.double
Returns the lowest altitude (in meters) to take into account when calculating the altitude range to be painted.int
double
int
Deprecated.double
Returns the highest altitude in model coordinates which is painted in the panel.double
Returns the lowest altitude in model coordinates which is painted in the panel.double
int
Deprecated.use #getEndingPointIndexint
Returns the sensitivity when interacting with altitude points and the vertical cursor.int
Returns the index of the point in the model at which drawing begins.double
Returns the highest altitude (in meters) to take into account when calculating the altitude range to be displayed.int
Returns the index of the main profile point, that, together with the point to the right of it, defines the X-axis positions between which the vertical cursor is positioned.double
Returns the cursor's relative distance between the getVerticalCursorPosition() and the profile point to the right of the position.Returns the main profile point, that, together with the point to the right of it, defines the X-axis positions between which the vertical cursor is positioned.Returns the grid-line ordinate provider used for the vertical view grid.boolean
Returns whether an extra grid-line is painted if the min value is equal to the bottom grid-line.boolean
Returns whether an extra grid-line is painted if the max value is equal to the top grid-line.boolean
Returns whether caching of the profiles and grid-lines is on or off.static boolean
Deprecated.This method has been deprecated.boolean
Returns whether all labels should painted or only the label of the point on which the mouse is located.boolean
Should the label of the point being edited be painted.boolean
Returns whether the vertical view should snap to the grid or not.final boolean
boolean
Deprecated.This method has been deprecated.boolean
boolean
void
The main entry point for this class.void
No longer notifies a listener of changes to the vertical cursor.double
retrieveMaximumAltitude
(boolean aUseSubProfiles) Retrieves the minimum altitude of the model points in the vertical view.double
retrieveMinimumAltitude
(boolean aUseSubProfiles) Retrieves the minimum altitude of the points in the vertical view.void
setAdjustBottomGridLineWhenEqual
(boolean aBoolean) void
setAdjustTopGridLineWhenEqual
(boolean aBoolean) void
setAltitudeUnit
(TLcdAltitudeUnit aAltitudeUnit) Sets the unit to use when displaying altitudes.void
setBuffered
(boolean aBuffered) Turns caching of the profiles and grid-lines on or off.static void
setClassTraceOn
(boolean aClassTraceOn) Deprecated.This method has been deprecated.void
void
setEndingPointIndex
(int aEndingPointIndex) Sets the index of the last point of the mode which should be painted.void
setLeftOffset
(double aLeftOffset) void
setPaintAllLabels
(boolean aBoolean) Sets whether a label should be painted for the point touched by the mouse or for all points in the main profile.void
setPaintEditedLabel
(boolean aPaintEditedLabel) Sets whether the point which is being edited should be labeled while editing.void
setRightOffset
(double aRightOffset) void
setSensitivity
(int aSensitivity) Configures the sensitivity when interacting with altitude points and the vertical cursor.void
setSnapViewToGrid
(boolean aSnapToGrid) Sets whether the vertical view should snap to the grid or not.void
setStartingPointIndex
(int aStartingPointIndex) Sets the index of the first point of the model which should be rendered.final void
setSubProfileScaled
(boolean aBoolean) When the ordinate is constructed, should the values of the sub-profiles be taken into account?void
setTopBottomOffsets
(double aTopOffset, double aBottomOffset, boolean aRepaint) Sets the top and bottom offset in meters.void
setTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.void
setVerticalCursorLeftPointIndex
(int aMainProfileIndex) Moves the vertical cursor to the location of the main profile point at the given index in the view.void
setVerticalCursorPercentage
(double aPercentage) Moves the vertical cursor to a location between getVerticalCursorPosition() and the profile point to the right of the position.void
setVerticalCursorPosition
(ILcdPoint aPoint) Moves the vertical cursor to the location of the given main profile point in the view.void
setVerticalCursorVisible
(boolean aBoolean) void
setVVGridLineOrdinateProvider
(ILcdVVGridLineOrdinateProvider aVVGridLineOrdinateProvider) Sets the grid-line ordinate provider used for the vertical view grid.void
setVVGridRenderer
(ILcdVVGridRenderer aGridRenderer) Sets a newILcdVVGridRenderer
void
setVVModel
(ILcdVVModel aNewVVModel) void
setVVRenderer
(ILcdVVRenderer aNewVVRenderer) void
setVVXAxisRenderer
(ILcdVVXAxisRenderer aXAxisRenderer) Set theILcdVVXAxisRenderer
responsible for decorating the X-axis.void
setXAxisLabeled
(boolean aBoolean) Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.luciad.util.ILcdPropertyChangeSource
addPropertyChangeListener, removePropertyChangeListener
-
Field Details
-
BOTTOM_OFFSET
- See Also:
-
TOP_OFFSET
- See Also:
-
LEFT_OFFSET
- See Also:
-
RIGHT_OFFSET
- See Also:
-
LEFT_RIGHT_INDEX
- See Also:
-
MODEL
This property change will be thrown- When a new
ILcdVVModel
is set to thisTLcdVVJPanel
- When the
ILcdVVModel
throws a change event
- See Also:
- When a new
-
-
Constructor Details
-
TLcdVVJPanel
public TLcdVVJPanel()Default constructor, noILcdVVModel
is set. The default renderer is used.
-
-
Method Details
-
setClassTraceOn
public static void setClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istrue
then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn
- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-
isClassTraceOn
public static boolean isClassTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrue
if tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
setTraceOn
public void setTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn
has not been called. If the argument isfalse
then only the informative, warning and error log messages are recorded.- Parameters:
aTraceOn
- if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
-
isTraceOn
public boolean isTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrue
if tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
getAltitudeUnit
Returns the unit to use when displaying altitudes.- Returns:
- the unit to use when displaying altitudes.
-
setAltitudeUnit
Sets the unit to use when displaying altitudes. The unit is taken into account when computing the number of grid-lines and the labels painted for the ordinates.Note: To have a coherent view of the data, the altitude unit should be the same on the view as on the grid renderer. As long as the grid renderer on the view is not changed, the altitude unit is passed on directly to the grid renderer.
- Parameters:
aAltitudeUnit
- the unit to use when displaying altitudes.
-
setAdjustTopGridLineWhenEqual
public void setAdjustTopGridLineWhenEqual(boolean aBoolean) - Parameters:
aBoolean
- to indicate if you want to see an extra grid-line if the max value is equal to the top grid-line.
-
isAdjustTopGridLineWhenEqual
public boolean isAdjustTopGridLineWhenEqual()Returns whether an extra grid-line is painted if the max value is equal to the top grid-line.- Returns:
- whether an extra grid-line is painted if the max value is equal to the top grid-line.
-
setAdjustBottomGridLineWhenEqual
public void setAdjustBottomGridLineWhenEqual(boolean aBoolean) - Parameters:
aBoolean
- to indicate if you want to see an extra grid-line if the min value is equal to the bottom grid-line.
-
isAdjustBottomGridLineWhenEqual
public boolean isAdjustBottomGridLineWhenEqual()Returns whether an extra grid-line is painted if the min value is equal to the bottom grid-line.- Returns:
- true if an extra grid-line is painted if the min value is equal to the bottom grid-line.
-
setPaintAllLabels
public void setPaintAllLabels(boolean aBoolean) Sets whether a label should be painted for the point touched by the mouse or for all points in the main profile.- Parameters:
aBoolean
- indicates whether all the point-icons should be labeled or just the point that the mouse is over- See Also:
-
isPaintAllLabels
public boolean isPaintAllLabels()Returns whether all labels should painted or only the label of the point on which the mouse is located.- Returns:
- false to only have a label painted on the point touched by the mouse, true to have labels painted for all points. Default value is false.
- See Also:
-
isPaintEditedLabel
public boolean isPaintEditedLabel()Should the label of the point being edited be painted.- Returns:
- whether the point being edited should be labeled. Default value is true.
- See Also:
-
setPaintEditedLabel
public void setPaintEditedLabel(boolean aPaintEditedLabel) Sets whether the point which is being edited should be labeled while editing.- Parameters:
aPaintEditedLabel
- true to display the label of the point being edited.- See Also:
-
addCursorChangeListener
Adds a listener that should be notified if the vertical cursor has moved.- Parameters:
aListener
- to be notified when the vertical cursor has moved.- See Also:
-
removeCursorChangeListener
No longer notifies a listener of changes to the vertical cursor.- Parameters:
aListener
- the listener that should no longer be notified of changes to the vertical cursor.- See Also:
-
setStartingPointIndex
public void setStartingPointIndex(int aStartingPointIndex) Sets the index of the first point of the model which should be rendered. This enables a visual filter on the model. The default value is 0.- Parameters:
aStartingPointIndex
- the first point of the underlyingILcdVVModel
to take into account when rendering.
Note:This is taken into account when calling theILcdVVGridRenderer
when painting the labels, but not when painting the points, i.e.ILcdVVRenderer.paintPointIcon(java.awt.Graphics, TLcdVVJPanel, int, int, java.awt.Rectangle)
is not called with absolute model index of the point, but with the index relative to the starting point index.ILcdVVRenderer.paintPointLabel(java.awt.Graphics, TLcdVVJPanel, int, int, int)
is called with the absolute model index.- See Also:
-
setEndingPointIndex
public void setEndingPointIndex(int aEndingPointIndex) Sets the index of the last point of the mode which should be painted. This enables a visual filter on the model.- Parameters:
aEndingPointIndex
- the last point of the underlyingILcdVVModel
to take into account when drawing.- See Also:
-
getLeftScalingIndex
public int getLeftScalingIndex()Deprecated.- Returns:
- the starting point index.
-
getStartingPointIndex
public int getStartingPointIndex()Returns the index of the point in the model at which drawing begins. For example, when the starting point index is 1 the left most point and first segment is not painted. When a model change occurs, this parameter is reset.- Returns:
- the index of the point in the model at which drawing begins.
- See Also:
-
getRightScalingIndex
public int getRightScalingIndex()Deprecated.use #getEndingPointIndex- Returns:
- the ending point index.
-
getEndingPointIndex
public int getEndingPointIndex()- Returns:
- The index of the
ILcdVVModel
point to stop rendering at. Default value is -1, meaning that all points starting from the starting point index should be taken into account for rendering. When a model change occurs, this parameter is reset.
-
setLeftOffset
public void setLeftOffset(double aLeftOffset) - Parameters:
aLeftOffset
- a fraction [0-1[ of theILcdVVModel
data "width" to be hidden on the left side of thisTLcdVVJPanel
.
-
getLeftOffset
public double getLeftOffset()- Returns:
- the fraction of the model, between the starting point and the ending point, that should not be taken into account, from the starting point on.
- See Also:
-
setRightOffset
public void setRightOffset(double aRightOffset) - Parameters:
aRightOffset
- a ratio [0,1[ of theILcdVVModel
data "width" to be hidden on the right side of thisTLcdVVJPanel
.
-
getRightOffset
public double getRightOffset()- See Also:
-
setSubProfileScaled
public final void setSubProfileScaled(boolean aBoolean) When the ordinate is constructed, should the values of the sub-profiles be taken into account?- Parameters:
aBoolean
- False => only the points of the main-profile are used to construct the ordinate.
-
isSubProfileScaled
public final boolean isSubProfileScaled()- See Also:
-
setTopBottomOffsets
public void setTopBottomOffsets(double aTopOffset, double aBottomOffset, boolean aRepaint) Sets the top and bottom offset in meters. Only altitudes in this range will be taken into account when calculating the highest and lowest altitude to be painted.- Parameters:
aTopOffset
- the top altitude to be painted. Setting this value to Double.MAX_VALUE will blank this property, returning the maximum value of the model whenever it is required.aBottomOffset
- the bottom altitude to be painted. Setting this value to -Double.MAX_VALUE will blank this property, returning the maximum value of the model whenever it is required.aRepaint
- whether or not the view should be repainted.
-
getBottomOffset
public double getBottomOffset()Returns the lowest altitude (in meters) to take into account when calculating the altitude range to be painted. This is not necessarily equal to the actuallowest displayed altitude
. If the property is set to-Double.MAX_VALUE
, theminimum altitude
of the current model is returned.- Returns:
- the minimum altitude of the model (if it's not empty) if this property was set to -Double.MAX_VALUE, the value of the property otherwise.
- See Also:
-
getTopOffset
public double getTopOffset()Returns the highest altitude (in meters) to take into account when calculating the altitude range to be displayed. This is not necessarily equal to the actualhighest displayed altitude
. If the property is set to-Double.MAX_VALUE
, themaximum altitude
of the current model is returned.- Returns:
- the maximum altitude of the model (if it's not empty) if this property was set to -Double.MAX_VALUE, the value of the property otherwise.
- See Also:
-
getMinimumViewAltitude
public double getMinimumViewAltitude()Returns the lowest altitude in model coordinates which is painted in the panel. Note: this can be different from the bottom offset of the view, since the altitude range painted can vary due to snapping to the horizontal grid-lines and setting of the properties adjustBottomGridLineWhenEqual.- Returns:
- the lowest altitude in model coordinates which is painted in the panel.
- See Also:
-
getMaximumViewAltitude
public double getMaximumViewAltitude()Returns the highest altitude in model coordinates which is painted in the panel. Note: this can be different from the top offset of the view, since the altitude range painted can vary due to snapping to the horizontal grid-lines and setting of the properties adjustTopGridLineWhenEqual.- Returns:
- the highest altitude in model coordinates which is painted in the panel.
- See Also:
-
setVVModel
- Parameters:
aNewVVModel
- The underlyingILcdVVModel
that contains all the information for displaying profile on thatTLcdVVJPanel
.- See Also:
-
getVVModel
- See Also:
-
setVVRenderer
- Parameters:
aNewVVRenderer
- the new renderer to use for displaying profile data.
-
getVVRenderer
- See Also:
-
setVVGridRenderer
Sets a newILcdVVGridRenderer
-
getVVGridRenderer
- See Also:
-
setVVGridLineOrdinateProvider
public void setVVGridLineOrdinateProvider(ILcdVVGridLineOrdinateProvider aVVGridLineOrdinateProvider) Sets the grid-line ordinate provider used for the vertical view grid.- Parameters:
aVVGridLineOrdinateProvider
- The new grid-line ordinate provider.- See Also:
-
getVVGridLineOrdinateProvider
Returns the grid-line ordinate provider used for the vertical view grid.- Returns:
- the grid-line ordinate provider used for the vertical view grid.
- See Also:
-
getVVGridCoordinates
-
setVVXAxisRenderer
Set theILcdVVXAxisRenderer
responsible for decorating the X-axis. -
getVVXAxisRenderer
- Returns:
- the
ILcdVVXAxisRenderer
responsible for decorating the X-axis, null if no ILcdVVXAxisRenderer is set.
-
isVerticalCursorVisible
public boolean isVerticalCursorVisible()- Returns:
- true if the vertical cursor is shown, false otherwise.
-
isXAxisLabeled
public boolean isXAxisLabeled()- Returns:
- true is the ILcdXAxisRenderer is used or not to decorate the XAxis. When true is returned, but no ILcdVVXAxisRenderer is set, no painting on the X-axis is being done.
-
setXAxisLabeled
public void setXAxisLabeled(boolean aBoolean) - See Also:
-
setVerticalCursorVisible
public void setVerticalCursorVisible(boolean aBoolean) - Parameters:
aBoolean
- indicating whether the Vertical Cursor should be shown.
-
setVerticalCursorPosition
Moves the vertical cursor to the location of the given main profile point in the view. If the point is not one of the points of the main profile, the cursor won't be moved.This method resets the vertical cursor's percentage.
- Parameters:
aPoint
- a point of the main profile, so one of the points returned bygetVVModel.getPoint(int aIndex)
.- See Also:
-
getVerticalCursorPosition
Returns the main profile point, that, together with the point to the right of it, defines the X-axis positions between which the vertical cursor is positioned. The vertical cursor is positioned relatively between the X-axis positions of the returned point and point to the right of it.- Returns:
- the main profile point defining the vertical cursor's location
- See Also:
-
setVerticalCursorLeftPointIndex
public void setVerticalCursorLeftPointIndex(int aMainProfileIndex) Moves the vertical cursor to the location of the main profile point at the given index in the view. This method resets the vertical cursor's percentage.- Parameters:
aMainProfileIndex
- index of a point of the main profile- See Also:
-
getVerticalCursorLeftPointIndex
public int getVerticalCursorLeftPointIndex()Returns the index of the main profile point, that, together with the point to the right of it, defines the X-axis positions between which the vertical cursor is positioned.- Returns:
- the index of the main profile point located at the left of the vertical cursor, or -1 if the cursor is not visible
- See Also:
-
getSensitivity
public int getSensitivity()Returns the sensitivity when interacting with altitude points and the vertical cursor. It defines how far (in screen coordinates) the input location (mouse cursor, etc...) can be from the visual representation of an object on the screen and still interact with it.- Returns:
- the sensitivity to be used when interacting with altitude points and the vertical cursor
- Since:
- 2017.0
- See Also:
-
setSensitivity
public void setSensitivity(int aSensitivity) Configures the sensitivity when interacting with altitude points and the vertical cursor. It defines how far (in screen coordinates) the input location (mouse cursor, etc...) can be from the visual representation of an object on the screen and still interact with it.- Parameters:
aSensitivity
- the new sensitivity to be used when interacting with altitude points and the vertical cursor- Since:
- 2017.0
- See Also:
-
setVerticalCursorPercentage
public void setVerticalCursorPercentage(double aPercentage) Moves the vertical cursor to a location between getVerticalCursorPosition() and the profile point to the right of the position.- Parameters:
aPercentage
- a real value between 0 and 1 defining the cursor's relative distance between getVerticalCursorPosition() and the point to its right- See Also:
-
getVerticalCursorPercentage
public double getVerticalCursorPercentage()Returns the cursor's relative distance between the getVerticalCursorPosition() and the profile point to the right of the position.- Returns:
- a real value between 0 and 1 defining the cursor's relative distance between getVerticalCursorPosition() and the point to its right
- See Also:
-
isBuffered
public boolean isBuffered()Returns whether caching of the profiles and grid-lines is on or off.- Returns:
- true if caching of the profiles and grid-lines is on, false otherwise.
- See Also:
-
setBuffered
public void setBuffered(boolean aBuffered) Turns caching of the profiles and grid-lines on or off.- Parameters:
aBuffered
- true to cache the grid-lines, the main profile and the sub profile in an image, thus improving performance.- See Also:
-
setSnapViewToGrid
public void setSnapViewToGrid(boolean aSnapToGrid) Sets whether the vertical view should snap to the grid or not.
If this property is set to
true
, the vertical view will not display the bottom offset as a minimum and the top offset as a maximum, but instead it will use the methodILcdVVGridLineOrdinateProvider.getSnappedRange(double, com.luciad.util.ILcdInterval, com.luciad.util.TLcdAltitudeUnit)
to determine the interval to show.The default value of this property is
true
for backward compatibility reasons.- Parameters:
aSnapToGrid
- the flag indicating if the vertical view snaps to the grid or not.- See Also:
-
isSnapViewToGrid
public boolean isSnapViewToGrid()Returns whether the vertical view should snap to the grid or not.- Returns:
- whether the vertical view should snap to the grid or not.
- See Also:
-
paintComponent
The main entry point for this class. Will only be executed when a VVModel has been set and the VVModel has points.- Overrides:
paintComponent
in classJComponent
- Parameters:
g
- the Graphics the component should be painted on.
-
retrieveMinimumAltitude
public double retrieveMinimumAltitude(boolean aUseSubProfiles) Retrieves the minimum altitude of the points in the vertical view. Depending on the value of the parameter passed the sub profiles are taken into account too. This method can also be used to determine the minimum altitude to display in a vertical view (seegetBottomOffset()
).- Parameters:
aUseSubProfiles
- whether or not to take the sub profiles into account.- Returns:
- the minimum altitude of the points in the vertical view.
-
retrieveMaximumAltitude
public double retrieveMaximumAltitude(boolean aUseSubProfiles) Retrieves the minimum altitude of the model points in the vertical view. Depending on the value of the parameter passed the sub profiles are taken into account too. This method can also be used to determine the maximum altitude to display in a vertical view (seegetTopOffset()
).- Parameters:
aUseSubProfiles
- whether or not to take the sub profiles into account.- Returns:
- the minimum altitude of the points in the vertical view.
-
setCursor
-
getStartingPointIndex()
.