Class GraticuleLayer

java.lang.Object
edu.cnu.mdi.item.Layer
edu.cnu.mdi.mapping.layer.GraticuleLayer

public class GraticuleLayer extends Layer
Layer that renders and edits the standard map graticule.
  • Constructor Details

    • GraticuleLayer

      public GraticuleLayer(IContainer container, String name, Supplier<GraticuleRenderer> rendererSupplier, BooleanSupplier enabledSupplier)
      Creates a graticule layer.
      Parameters:
      container - owning container
      name - layer name
      rendererSupplier - supplier of the current renderer
      enabledSupplier - supplier of the standard-graticule policy
  • Method Details

    • beforeDraw

      public void beforeDraw(Graphics2D g2, IContainer container)
      Renders the graticule when permitted by the owning view.
      Overrides:
      beforeDraw in class Layer
      Parameters:
      g2 - the graphics context
      container - the container being rendered
    • edit

      public void edit(Component parentComponent)
      Opens the graticule editor.
      Overrides:
      edit in class Layer
      Parameters:
      parentComponent - the parent component for any dialogs; may be null