| 5 | {{{ |
| 6 | /** |
| 7 | * Returns a LayerManager that represents the sublayers of this layer. You can normally not add any sublayers directly to the list but this layer will provide methods to add supported sublayers. |
| 8 | * @return The layer manager. |
| 9 | */ |
| 10 | public LayerManager getSubLayers() { |
| 11 | if (layerManager == null) // better in constructor: |
| 12 | layerManager = createSubLayerManager(); |
| 13 | return layerManager; |
| 14 | } |
| 15 | |
| 16 | /** |
| 17 | * Create the {@link LayerManager} object to be used for sublayers. Called once after layer construction. |
| 18 | * |
| 19 | * @return A LayerManager instance. You may use your own implementation. |
| 20 | */ |
| 21 | protected LayerManager createSubLayerManager() { |
| 22 | return new LayerManager(); |
| 23 | } |
| 24 | }}} |