Package edu.cnu.mdi.mapping.layer
Class CountryBoundaryLayer
java.lang.Object
edu.cnu.mdi.item.Layer
edu.cnu.mdi.mapping.layer.CountryBoundaryLayer
Layer that renders country political boundaries.
-
Constructor Summary
ConstructorsConstructorDescriptionCountryBoundaryLayer(IContainer container, String name, Supplier<CountryRenderer> rendererSupplier) Creates a layer that draws country boundaries with the renderer supplied at draw time. -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeDraw(Graphics2D g2, IContainer container) Hook for subclasses to perform custom drawing before the items are drawn.voidEdit the layer-level parameters of this layer.Methods inherited from class edu.cnu.mdi.item.Layer
add, addEnclosedItems, addItemChangeListener, addItemsAtPoint, addSelectedItems, afterDraw, anySelected, clearAllItems, contains, deleteItem, deleteSelectedItems, draw, equals, getAllItems, getContainer, getItemAtPoint, getItemsAtPoint, getName, getSelectedCount, getSelectedItems, hashCode, isEditable, isEmpty, isLocked, isVisible, notifyItemChangeListeners, remove, removeItemChangeListener, selectAllItems, selectAllItems, selectItem, sendBackward, sendForward, sendToBack, sendToFront, setDirty, setEditable, setLocked, setName, setVisible, size, toString
-
Constructor Details
-
CountryBoundaryLayer
public CountryBoundaryLayer(IContainer container, String name, Supplier<CountryRenderer> rendererSupplier) Creates a layer that draws country boundaries with the renderer supplied at draw time.- Parameters:
container- owning rendering containername- layer display namerendererSupplier- supplier of the current country renderer- Throws:
NullPointerException- ifcontainerorrendererSupplierisnull
-
-
Method Details
-
beforeDraw
Hook for subclasses to perform custom drawing before the items are drawn.The default implementation is a no-op.
- Overrides:
beforeDrawin classLayer- Parameters:
g2- the graphics contextcontainer- the container being rendered
-
edit
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.
-