Class TLspFXAltitudeExaggerationControl

java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.layout.Pane
com.luciad.view.lightspeed.javafx.navigationcontrols.TLspFXAltitudeExaggerationControl
All Implemented Interfaces:
Styleable, EventTarget

public class TLspFXAltitudeExaggerationControl extends Pane
A Node to control the altitude exaggeration of a TLspFXView. The user can set the value directly by clicking or dragging the slider or press the + and - buttons to increase and decrease the value.

Note: this controller will only be visible on a 3D view, since altitude exaggeration can only be applied in a 3D view.

Customizing the appearance

The appearance of this control is specified by a number of images. The active appearance is only used when the mouse hovers over the control.

The exact appearance is specified by the following images in png format:

  • zoom_slider_inactive.png: the main slider, when the control is inactive.
  • zoom_slider.png: the main slider, when the control is active.
  • zoom_indicator_inactive.png: The indicator that moves over the slider, when the control is inactive.
  • zoom_indicator.png: The indicator that moves over the slider, when the control is active.
  • zoom_plus_inactive.png: the plus button when the control is inactive.
  • zoom_min_inactive.png: the min button when the control is inactive.
  • zoom_plus.png: the plus button when the control is active.
  • zoom_min.png: the min button when the control is active.
  • zoom_plus_selected.png: the plus button when the mouse is hovering over the button.
  • zoom_min_selected.png: the min button when the mouse is hovering over the button.
To change the appearance of the control, you can replace these images with your own or you can specify the directory where your images are located with TLspFXAltitudeExaggerationControl(TLspFXView, double, double, String).

Example

The following snippet adds an altitude exaggeration control to the overlay panel of a view.
    //Create an altitude control for the view
    TLspFXAltitudeExaggerationControl altitudeExaggerationControl =
        new TLspFXAltitudeExaggerationControl(view, 1, 5);

    //Get the overlay panel from the view and add the control to it
    view.getOverlayNodes().stream()
        .filter(TLcdOverlayPane.class::isInstance)
        .map(TLcdOverlayPane.class::cast)
        .findFirst()
        .ifPresent(aOverlayPane -> aOverlayPane.add(altitudeExaggerationControl, TLcdOverlayPane.Location.WEST));
Since:
2021.0
  • Field Details

  • Constructor Details

    • TLspFXAltitudeExaggerationControl

      public TLspFXAltitudeExaggerationControl(TLspFXView aView, double aMinimum, double aMaximum) throws IOException
      Constructor for an altitude exaggeration control for an TLspFXView.
      Parameters:
      aView - The view to interact with
      aMinimum - The minimum altitude exaggeration factor
      aMaximum - The maximum altitude exaggeration factor
      Throws:
      IOException - when one of the necessary images is missing
    • TLspFXAltitudeExaggerationControl

      public TLspFXAltitudeExaggerationControl(TLspFXView aView, double aMinimum, double aMaximum, String aImagePath) throws IOException
      Constructor for an altitude exaggeration control for a TLspFXView using the given image path to load images for the visualization of this control. The default image path is the path to the root folder of the navigation controls + ZOOM_COMPONENT_DIR.
      Parameters:
      aView - The view to interact with
      aMinimum - The minimum altitude exaggeration factor, see ILspView.setAltitudeExaggerationFactor(double).
      aMaximum - The maximum altitude exaggeration factor, see ILspView.setAltitudeExaggerationFactor(double).
      aImagePath - The (relative or absolute) path to the directory where the images are stored.
      Throws:
      IOException - when one of the necessary images is missing