Class TLspScaleIndicator

java.lang.Object
com.luciad.view.swing.ALcdScaleIndicator
com.luciad.view.lightspeed.swing.TLspScaleIndicator
All Implemented Interfaces:
ILcdIcon, ILcdCloneable, Serializable, Cloneable

public class TLspScaleIndicator extends ALcdScaleIndicator

An ALcdScaleIndicator implementation for ILspView.

The BAR representation of the scale indicator
The BAR representation of the scale indicator.

The FRACTION representation of the scale indicator
The FRACTION representation of the scale indicator.

By default the indicator will only change if you zoom, not if you pan. Call ALcdScaleIndicator.setScaleAtCenterOfMap(boolean) to change this behavior.

The following snippet shows how to create a scale indicator:
    //Create a scale indicator for the view
    TLspScaleIndicator scaleIndicator = new TLspScaleIndicator(view);
    //Optionally, change some settings on the scale indicator.
    //Check the javadoc for all available customization options
    scaleIndicator.setBarColor(Color.DARK_GRAY);
    scaleIndicator.setAlternateBarColor(Color.LIGHT_GRAY);
which is then added to the south-east corner of an ILspAWTView.
    //Add the scale indicator in the overlay panel of the view
    //This ensures that the scale label is placed on top of the map
    view.getOverlayComponent().add(scaleIndicator.getLabel(), TLcdOverlayLayout.Location.SOUTH_EAST);
Since:
2012.0
See Also:
  • Constructor Details

    • TLspScaleIndicator

      public TLspScaleIndicator(ILspView aView)
      Creates a new instance of TLspScaleIndicator for the specified view.
      Parameters:
      aView - the specified view
  • Method Details