Class TLcyDrawingStyleRepository
java.lang.Object
com.luciad.lucy.addons.drawing.model.TLcyDrawingStyleRepository
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.
- Since:
- 8.2
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the given listener to the list of listeners, so that it will receive change events.void
Add a style to this repositorygetStyle
(int aIndex) Retrieve the style at indexaIndex
int
Returns the number of styles in this repositoryvoid
Removes the given listener so that it no longer receives change events.boolean
removeStyle
(Object aStyle) Remove a style from this repositoryvoid
styleChanged
(Object aStyle) Notify that a style object has changed.
-
Constructor Details
-
TLcyDrawingStyleRepository
public TLcyDrawingStyleRepository()Default constructor.
-
-
Method Details
-
addDrawingStyleRepositoryListener
Adds the given listener to the list of listeners, so that it will receive change events. These change events occur when a style is added to or removed from the repository, or when a style from the repository is changed.- Parameters:
aListener
- The listener to add.
-
removeDrawingStyleRepositoryListener
Removes the given listener so that it no longer receives change events.- Parameters:
aListener
- The listener to remove.
-
addStyle
Add a style to this repository- Parameters:
aStyle
- the style to be added
-
removeStyle
Remove a style from this repository- Parameters:
aStyle
- the style to be removed- Returns:
true
if this repository containted the styleaStyle
-
styleChanged
Notify that a style object has changed.- Parameters:
aStyle
- The style that has changed.
-
getStyleCount
public int getStyleCount()Returns the number of styles in this repository- Returns:
- the number of styles in this repository
-
getStyle
Retrieve the style at indexaIndex
- Parameters:
aIndex
- the index of the searched style- Returns:
- the style at index
aIndex
in this repository
-