public abstract class IlpAbstractBackground extends Object implements IlpBackground, IlvBatchable
IlpBackground
that should be directly
subclassed when non-IlvMapDataSource
backgrounds are to be introduced.
For IlvMapDataSource based backgrounds one should extend the \
IlpAbstractMapDataSourceBackground
.
Modifier and Type | Field and Description |
---|---|
protected List |
managerLayers
The list of
IlvManagerLayer instances that compose this IlpBackground . |
LOAD_ON_DEMAND_PROPERTY, THREADED_PROPERTY, URL_PROPERTY, VISIBLE_PROPERTY
Constructor and Description |
---|
IlpAbstractBackground()
Initializes the defaults values and internal variables.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addLayer(IlvManagerLayer layer)
Adds the provided layer to the end of a convenience internal list of
IlvManagerLayer instances.
|
protected void |
addLayers(List layers)
Adds the provided layers to the end of the convenience internal list of
IlvManagerLayer instances.
|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Implementation of IlpBackground.
|
void |
create(IlvManager manager,
int index,
IlpViewsView view)
Handles some of the common logistics behind creating a background, namely:
Update the visibility of the IlvManagerLayer instances based on the
properties of this background.
|
void |
dispose(IlvManager manager,
IlpViewsView view)
Performs the following actions:
Ensures that the area covered by the this background's layers are
scheduled for a redraw
Removes this background's layers from the provided IlvManager
Clears the IlvManagerLayer references
Subclasses should overwrite this method is further processing needs to be
take place.
|
void |
endBatch()
Implementation of the IlvBatchable.
|
IlvManagerLayer |
getManagerLayer(int index)
Implementation of IlpBackground.
|
List |
getManagerLayers()
Implementation of IlpBackground.
|
int |
getManagerLayersCount()
Implementation of IlpBackground.
|
Map |
getProperties()
Returns a readonly version of the properties of this background.
|
Object |
getProperty(String property)
Implementation of IlpBackground.getProperty.
|
String |
getUrl()
Returns the URL of this background.
|
boolean |
isLoadOnDemand()
Returns whether or not this background is using Load-On-Demand.
|
boolean |
isThreaded()
Returns whether or not this background is using multiple threads for
its internal processing.
|
boolean |
isVisible()
Returns whether the background will be visible.
|
protected void |
removeLayer(IlvManagerLayer layer)
Removes the provided layer from the convenience internal list of
IlvManagerLayer instances.
|
protected void |
removeLayers(List layers)
Removes the provided layers from the convenience internal list of
IlvManagerLayer instances.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Implementation of IlpBackground.
|
void |
setLoadOnDemand(boolean loadOnDemand)
Enables or disables load-on-demand for this background if it supports
load-on-demand.
|
void |
setProperty(String property,
Object propertyValue)
Implementation of IlpBackground.setProperty.
|
void |
setThreaded(boolean threaded)
Sets the property that enables the use of multiple threads for its internal
processing.
|
void |
setUrl(String url)
Sets the URL of this background.
|
void |
setVisible(boolean visible)
Changes the visibility of this background.
|
void |
startBatch()
Implementation of IlvBatchable.
|
protected List managerLayers
IlvManagerLayer
instances that compose this IlpBackground
.
It can be used by subclasses to have read and write access to the list of IlvManagerLayer
instances.public IlpAbstractBackground()
public void create(IlvManager manager, int index, IlpViewsView view) throws IlpBackgroundHandlingException
Subclasses should call this method after the graphic representation of the background is generated.
This method uses the IlpBackground#getManagerLayers() to handle the logistics, so subclasses should ensure that the layers are properly set after generation so that the call to this method takes effect.
create
in interface IlpBackground
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.IlpBackground.create(ilog.views.IlvManager, int, ilog.cpl.graphic.views.IlpViewsView)
public void dispose(IlvManager manager, IlpViewsView view) throws IlpBackgroundHandlingException
Subclasses should overwrite this method is further processing needs to be take place.
dispose
in interface IlpBackground
manager
- the manager where the graphics are being displayed.view
- the associated IlpViewsViewIlpBackgroundHandlingException
- in case there is a problem handling this operation.IlpBackground.dispose(ilog.views.IlvManager, ilog.cpl.graphic.views.IlpViewsView)
public List getManagerLayers()
getManagerLayers
in interface IlpBackground
IlpBackground.getManagerLayers()
public int getManagerLayersCount()
getManagerLayersCount
in interface IlpBackground
IlpBackground.getManagerLayersCount()
public IlvManagerLayer getManagerLayer(int index) throws IllegalArgumentException
getManagerLayer
in interface IlpBackground
index
- the IlvManagerLayer
at the provided index.IllegalArgumentException
- if an illegal index is provided.IlpBackground.getManagerLayer(int)
public void setProperty(String property, Object propertyValue)
setProperty
in interface IlpBackground
property
- The property namepropertyValue
- The property valueIlpBackground.setProperty(java.lang.String, java.lang.Object)
public Object getProperty(String property)
getProperty
in interface IlpBackground
property
- The propertyIlpBackground.getProperty(java.lang.String)
public Map getProperties()
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface IlpBackground
listener
- a PropertyChangeListener that will be
notified of property changes.IlpBackground.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in interface IlpBackground
listener
- a PropertyChangeListener that will be
no longer be notified of property changes.IlpBackground.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void setVisible(boolean visible)
visible
- Indicates if the background will be visible or not.public boolean isVisible()
public boolean isThreaded()
By default backgrounds are not threaded.
public void setThreaded(boolean threaded)
threaded
- if it is, and false otherwise.public boolean isLoadOnDemand()
By default backgrounds are not using load-on-demand.
public void setLoadOnDemand(boolean loadOnDemand)
loadOnDemand
- true enables, and false disables load-on-demandpublic String getUrl()
public void setUrl(String url)
url
- The url to set.public void startBatch()
When called, all property changes are batched.
startBatch
in interface IlvBatchable
IlvBatchable.startBatch()
public void endBatch()
When called, the property change batching is ended and the changes are put into effect.
endBatch
in interface IlvBatchable
IlvBatchable.endBatch()
protected void addLayers(List layers)
protected void removeLayers(List layers)
protected void addLayer(IlvManagerLayer layer)
protected void removeLayer(IlvManagerLayer layer)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.