Class CountryFillLayer

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

public class CountryFillLayer extends Layer
Layer that renders country polygon interiors.
  • Constructor Details

    • CountryFillLayer

      public CountryFillLayer(IContainer container, String name, Supplier<CountryRenderer> rendererSupplier)
      Creates a layer that draws country interiors with the renderer supplied at draw time.
      Parameters:
      container - owning rendering container
      name - layer display name
      rendererSupplier - supplier of the current country renderer
      Throws:
      NullPointerException - if container or rendererSupplier is null
  • Method Details

    • beforeDraw

      public void beforeDraw(Graphics2D g2, IContainer container)
      Hook for subclasses to perform custom drawing before the items are drawn.

      The default implementation is a no-op.

      Overrides:
      beforeDraw in class Layer
      Parameters:
      g2 - the graphics context
      container - the container being rendered
    • edit

      public void edit(Component parentComponent)
      Edit the layer-level parameters of this layer.

      The default implementation is a no-op. Subclasses may override to provide a custom editing dialog or panel.

      Overrides:
      edit in class Layer
      Parameters:
      parentComponent - the parent component for any dialogs; may be null