public class TLcyDrawingStyleRepository extends Object
A repository for SLD styles to contain styles which are permanently available. Hence, the styles in this repository are created, stored and restored, even when there is no domain object which actually uses the style.
ILcyDrawingStyleRepositoryListener
s can be registered to this class. These
listeners are notified when a style from the repository is added, removed or changed.
Constructor and Description |
---|
TLcyDrawingStyleRepository()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addDrawingStyleRepositoryListener(ILcyDrawingStyleRepositoryListener aListener)
Adds the given listener to the list of listeners, so that it will receive change
events.
|
void |
addStyle(Object aStyle)
Add a style to this repository
|
Object |
getStyle(int aIndex)
Retrieve the style at index
aIndex |
int |
getStyleCount()
Returns the number of styles in this repository
|
void |
removeDrawingStyleRepositoryListener(ILcyDrawingStyleRepositoryListener aListener)
Removes the given listener so that it no longer receives change events.
|
boolean |
removeStyle(Object aStyle)
Remove a style from this repository
|
void |
styleChanged(Object aStyle)
Notify that a style object has changed.
|
public TLcyDrawingStyleRepository()
public void addDrawingStyleRepositoryListener(ILcyDrawingStyleRepositoryListener aListener)
aListener
- The listener to add.public void removeDrawingStyleRepositoryListener(ILcyDrawingStyleRepositoryListener aListener)
aListener
- The listener to remove.public void addStyle(Object aStyle)
aStyle
- the style to be addedpublic boolean removeStyle(Object aStyle)
aStyle
- the style to be removedtrue
if this repository containted the style aStyle
public void styleChanged(Object aStyle)
aStyle
- The style that has changed.public int getStyleCount()
public Object getStyle(int aIndex)
aIndex
aIndex
- the index of the searched styleaIndex
in this repository