Changes between Initial Version and Version 1 of Ticket #12872, comment 8


Ignore:
Timestamp:
2016-05-26T21:04:20+02:00 (9 years ago)
Author:
michael2402

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12872, comment 8

    initial v1  
    33I would add the following method to the Layer class:
    44
     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}}}
    525
    626The sub-layers can then be reordered using the normal move operation.