Package org.eclipse.nebula.widgets.tiles
Class Decorator<T,U>
java.lang.Object
org.eclipse.nebula.widgets.tiles.Decorator<T,U>
- Type Parameters:
T
-U
-
- Direct Known Subclasses:
DecoratorColor
,DecoratorInteger
,DecoratorString
public abstract class Decorator<T,U>
extends java.lang.Object
This abstract base class represents a decorator and handles reference counting.
-
Constructor Summary
Constructors Constructor Description Decorator()
-
Method Summary
Modifier and Type Method Description void
addDecoratorListener(DecoratorListener listener)
Adds a decorator listenerabstract U
decorate(T t)
Implement this to decorate elementsprotected void
free()
Decreases the reference count and potentially disposes the elementvoid
removeDecoratorListener(DecoratorListener listener)
Removes a decorator listenerprotected void
use()
Increases the reference count
-
Constructor Details
-
Decorator
public Decorator()
-
-
Method Details
-
addDecoratorListener
Adds a decorator listener- Parameters:
listener
-
-
decorate
Implement this to decorate elements- Parameters:
t
-- Returns:
-
removeDecoratorListener
Removes a decorator listener- Parameters:
listener
-
-
free
protected final void free()Decreases the reference count and potentially disposes the element -
use
protected final void use()Increases the reference count
-