|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface IlvPolylineMergerDataSource.IlvGraphicIdentifier
This interface compares collections of features that are to be
merged as a single polyline. If the interface finds the same
java.lang.Object as the identifier for the two specified IlvGraphic, the
IlvPolylineMergerDataSource assumes that these two IlvGraphic can be merged
together as a single polyline if their extremities are close to one
another.
Example:
// Create an object that implements IlvPolylineMergerDataSource.IlvGraphicIdentifier
// For instance, the identifier returns the value of the field "STREETNAME" if any
IlvPolylineMergerDataSource.IlvGraphicIdentifier identifier = new
IlvPolylineMergerDataSource.IlvGraphicIdentifier() {
public String getIdentifierPropertyName() { return "STREETNAME"; }
public Object getIdentifier(IlvGraphic component) {
if (component != null) {
IlvAttributeProperty properties = (IlvAttributeProperty) component.getNamedProperty(IlvAttributeProperty.NAME);
if (properties instanceof IlvFeatureAttributeProperty) {
try {
return ((IlvFeatureAttributeProperty)properties).getAttribute(getIdentifierPropertyName());
} catch (IllegalArgumentException e){
// if property does not exist
}
}
}
return null;
}
IlvMapDataSource newSource=new IlvPolylineMergerDataSource(oldSource,identifier);
IlvMapDataSourceModel dsm = IlvMapDataSourceProperty.getMapDataSourceModel(manager);
dsm.addChild(reader);
| Method Summary | |
|---|---|
Object |
getIdentifier(IlvGraphic graphic)
Identifies this |
String |
getIdentifierPropertyName()
Returns the property name (to reintroduce into the merged object) |
| Method Detail |
|---|
Object getIdentifier(IlvGraphic graphic)
graphic - the object to identify
String getIdentifierPropertyName()
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||