public interface IlpBackground
IlpBackgroundSupport
implementation.
It defines the contract that allows its implementation to handle the generation and maintenace of the underlying graphical structures that represent the background.
A background is typically represented by multiple instances of
IlvManagerLayer
that are contained in a given
Ilvmanager
, but it can be also represented in a single
IlvManagerLayer
if such is the requirement.
The two main methods of this interface are the create
and
the dispose
methods. The former has the responsibility of
populating the provided IlvManager with the appropriate graphics that
represent the background identified by the URL property of this background.
The latter is in responsible for disposing of such graphics to ensure that the
background specified by the URL property is no longer represented and any
resources associated with it are properly made disposed of.
For more details see each method's documentation.
A background allows to be customized by the use of properties. It defines a set of built-in properties that are to be taken into account during the process of generating and handling of its graphic representation. Users can define custom properties that may serve custom needs.
Modifier and Type | Field and Description |
---|---|
static String |
LOAD_ON_DEMAND_PROPERTY
The load-on-demand property.
|
static String |
THREADED_PROPERTY
The threaded property.
|
static String |
URL_PROPERTY
The url property.
|
static String |
VISIBLE_PROPERTY
The visible property.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to this background.
|
void |
create(IlvManager manager,
int index,
IlpViewsView view)
Called by the
IlpBackgroundSupport to indicate to this background
that it should create the provided IlvManager with the graphics that are to
represent the background. |
void |
dispose(IlvManager manager,
IlpViewsView view)
Called by the
IlpBackgroundSupport to indicate to this background
that it should dispose the graphics that are representing this background
from the provided IlvManager . |
IlvManagerLayer |
getManagerLayer(int index)
Return the
IlvManagerLayer at the provided index. |
List |
getManagerLayers()
Returns a read-only List that contains instances of IlvManagerLayer that
compose this background.
|
int |
getManagerLayersCount()
Returns the number of IlvManagerLayer instances that are used by this
background.
|
Object |
getProperty(String property)
Returns the value of a property of this background.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from this background.
|
void |
setProperty(String property,
Object propertyValue)
Sets the value of a property of this background.
|
static final String LOAD_ON_DEMAND_PROPERTY
Setting this property causes the background to be re-generated.
Note: Not all backgrounds support this property. See the documentation for details on which backgrounds support it and how they support it.
If a background supports lod-on-demand, it typically means that it provides some sort of tiling capability where the overall background is divided into smaller sub-regions that are loaded on demand as the user navigates the background area.
static final String THREADED_PROPERTY
Setting this property causes the background to be re-generated.
This property is used to indicate to a given background implementation that it should, or not, (if it can) take advantage of multi-threaded schemes to improve the overall performance of background processing.
This multi-threaded support can manifest itself in different ways, for example:
The precise meaning is left open so that background implementations can be free to expand on the possible improvements.
static final String URL_PROPERTY
Note: This is a readonly property, it should not be modified.
Contains the background URL.
static final String VISIBLE_PROPERTY
Determines if the background is visible or not.
void create(IlvManager manager, int index, IlpViewsView view) throws IlpBackgroundHandlingException
IlpBackgroundSupport
to indicate to this background
that it should create the provided IlvManager with the graphics that are to
represent the background.
This background should start inserting layers for its graphics in the manager at the given index.
Important: This background is expected to:
Important: This background is must not reuse, nor alter any of the IlvManagerLayer instances currently in the IlvManager. Instead it must insert in the provided IlvManager (at the specified index) the IlvManagerLayer instances that it uses. This guarantees that other graphic representations are not corrupted.
manager
- the manager where the graphics should be added toindex
- the IlvManagerLayer index in the manager from which this
background should start inserting the graphics.view
- the associated IlpViewsViewIlpBackgroundHandlingException
- in case there is a problem handling this operation.void dispose(IlvManager manager, IlpViewsView view) throws IlpBackgroundHandlingException
IlpBackgroundSupport
to indicate to this background
that it should dispose the graphics that are representing this background
from the provided IlvManager
.manager
- the manager where the graphics are being displayed.view
- the associated IlpViewsViewIlpBackgroundHandlingException
- in case there is a problem handling this operation.List getManagerLayers()
int getManagerLayersCount()
IlvManagerLayer getManagerLayer(int index) throws IllegalArgumentException
IlvManagerLayer
at the provided index.index
- the IlvManagerLayer
at the provided index.IllegalArgumentException
- if an illegal index is provided.void setProperty(String property, Object propertyValue)
If a null value is passed as the property value, the property is removed from the this background.
property
- The property namepropertyValue
- The property valueObject getProperty(String property)
property
- The propertyvoid addPropertyChangeListener(PropertyChangeListener listener)
listener
- a PropertyChangeListener that will be
notified of property changes.void removePropertyChangeListener(PropertyChangeListener listener)
listener
- a PropertyChangeListener that will be
no longer be notified of property changes.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.