public interface ILcdGXYPainterProvider<T extends ILcdGXYPainter> extends Serializable, ILcdCloneable
ILcdGXYLayer
with an ILcdGXYPainter
to represent
the objects in the layers model.
An ILcdGXYPainterProvider
is part of a ILcdGXYLayer
and is responsible to
provide a suitable painter for every object that is in the layers model.
Since painters are stateful with regard to the object they are painting, their state has to be updated
by the painter provider before it is returned to the layer that will use the painter to put a representation
of the object on a view. An implementation of the getGXYPainter
method therefore
should have the following structure:
public ILcdGXYPainter getGXYPainter(Object aObject) {
ILcdGXYPainter painter = ... // find the painter for the object
if( painter != null ){
painter.setObject( aObject );
}
return painter;
}
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Redefines
Object.clone to make it public. |
T |
getGXYPainter(Object aObject)
Finds an
ILcdGXYPainter that can be used to paint or locate the object passed. |
T getGXYPainter(Object aObject)
ILcdGXYPainter
that can be used to paint or locate the object passed.
The painter provider is responsible for setting the object to the painter before returning the painter. An implementation should therefore have the following structure:
public ILcdGXYPainter getGXYPainter(Object aObject) {
ILcdGXYPainter painter = ... // find the painter for the object
if (painter != null) {
painter.setObject(aObject);
}
return painter;
}
aObject
- the object to find a painter forObject clone()
Object.clone
to make it public.clone
in interface ILcdCloneable
Object.clone()