Class TLcdGXYScaleIndicator

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

public class TLcdGXYScaleIndicator extends ALcdScaleIndicator

An ALcdScaleIndicator implementation for ILcdGXYView instances.

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
    TLcdGXYScaleIndicator scaleIndicator = new TLcdGXYScaleIndicator(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 overlay container of a GXY view.
    //Add the scale indicator in an overlay panel that is placed on top of the view
    //This ensures that the scale label is placed on top of the map
    viewOverlayPanel.add(scaleIndicator.getLabel(), TLcdOverlayLayout.Location.SOUTH_EAST);
Since:
2012.0
See Also:
  • Constructor Details

    • TLcdGXYScaleIndicator

      public TLcdGXYScaleIndicator(ILcdGXYView aView)
      Creates a new TLcdGXYScaleIndicator for the specified ILcdGXYView
      Parameters:
      aView - the specified view
  • Method Details