public class IlpDefaultGraphicHolder extends Object implements IlpGraphicHolder
<IlpRepresentationObject, IlpGraphic>
and <<IlpRepresentationObject, IlpAttribute>, IlpGraphic>
.
The user may use it when defining renderers that do not
recreate the graphic all the time, like in case of the network.Constructor and Description |
---|
IlpDefaultGraphicHolder()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addGraphic(IlpRepresentationObject o,
IlpAttribute a,
IlpGraphic g)
Associates the given representation object and attribute with
the given graphic representation.
|
void |
addGraphic(IlpRepresentationObject o,
IlpGraphic g)
Associates the given representation object with the given graphic representation.
|
IlpGraphic |
getGraphic(IlpRepresentationObject o)
Gets the graphic object associated with the given representation object.
|
IlpGraphic |
getGraphic(IlpRepresentationObject o,
IlpAttribute a)
Gets the graphic object associated with the given representation object
and attribute.
|
Collection<IlpGraphic> |
getGraphics(IlpRepresentationObject o)
Returns the collection of all graphic instances associated with
the given representation object, including the graphic instances related to
attributes.
|
IlpGraphicRendererContext |
getRendererContext(IlpRepresentationObject o)
Returns the renderer context associated with the graphic representation of
the given representation object.
|
IlpGraphicRendererContext |
getRendererContext(IlpRepresentationObject o,
IlpAttribute a)
Returns the renderer context associated with the graphic representation of
the given representation object and attribute.
|
void |
invalidate()
Invalidates all graphic instances present in this holder.
|
void |
invalidateGraphic(IlpRepresentationObject o)
Invalidates the graphic instance associated with the given representation object
and with all its attribute graphics if they exist.
|
void |
invalidateGraphic(IlpRepresentationObject o,
IlpAttribute a)
Invalidates the graphic instance associated with the given representation object
and attribute.
|
boolean |
isValid(IlpRepresentationObject o)
Returns whether the graphic instance associated with the given representation object
is valid.
|
boolean |
isValid(IlpRepresentationObject o,
IlpAttribute a)
Returns whether the graphic instance associated with the given representation object
and attribute is valid.
|
void |
removeGraphic(IlpRepresentationObject o)
Removes the graphic instance associated with the given representation object.
|
void |
removeGraphic(IlpRepresentationObject o,
IlpAttribute a)
Removes the graphic instance associated with the given object
representation and attribute.
|
void |
removeGraphics(IlpRepresentationObject o)
Removes all the graphic instances associated with this object
representation, including the graphic instances related to attributes.
|
void |
validateGraphic(IlpRepresentationObject o,
IlpAttribute a,
IlpGraphicRendererContext c)
Validates the graphic instance associated with the given representation object
and attribute.
|
void |
validateGraphic(IlpRepresentationObject o,
IlpGraphicRendererContext c)
Validates the graphic instance associated with the given representation object.
|
public IlpGraphic getGraphic(IlpRepresentationObject o)
null
if the object has graphics associated with
individual attributes.getGraphic
in interface IlpGraphicHolder
o
- Representation object which graphic representation is being requestedpublic IlpGraphic getGraphic(IlpRepresentationObject o, IlpAttribute a)
null
if the attribute does not have a graphic representation.getGraphic
in interface IlpGraphicHolder
o
- Representation objecta
- Attribute which graphic representation is being requestedpublic void addGraphic(IlpRepresentationObject o, IlpGraphic g)
addGraphic
in interface IlpGraphicHolder
o
- Representation object which graphic is being addedg
- Graphic representationpublic void addGraphic(IlpRepresentationObject o, IlpAttribute a, IlpGraphic g)
addGraphic
in interface IlpGraphicHolder
o
- Representation objecta
- Attribute which graphic representation is being addedg
- Graphic representationpublic Collection<IlpGraphic> getGraphics(IlpRepresentationObject o)
public void removeGraphic(IlpRepresentationObject o)
removeGraphic
in interface IlpGraphicHolder
o
- Representation object which graphic instance is being removedpublic void removeGraphic(IlpRepresentationObject o, IlpAttribute a)
removeGraphic
in interface IlpGraphicHolder
o
- Representation object which graphic instance is being removeda
- Attribute which graphic instance is being removedpublic void removeGraphics(IlpRepresentationObject o)
public void invalidateGraphic(IlpRepresentationObject o)
invalidateGraphic
in interface IlpGraphicHolder
o
- Representation object which graphic instance is being invalidatedpublic void invalidateGraphic(IlpRepresentationObject o, IlpAttribute a)
invalidateGraphic
in interface IlpGraphicHolder
o
- Representation objecta
- Attribute which graphic instance is being invalidatedpublic void invalidate()
invalidate
in interface IlpGraphicHolder
public void validateGraphic(IlpRepresentationObject o, IlpGraphicRendererContext c)
validateGraphic
in interface IlpGraphicHolder
o
- Representation object which graphic instance is being validatedc
- Renderer context information that is stored with the representation
object graphic. This information is later used to indicate whether the graphic
must be updated or not.public void validateGraphic(IlpRepresentationObject o, IlpAttribute a, IlpGraphicRendererContext c)
validateGraphic
in interface IlpGraphicHolder
o
- Representation objecta
- Attribute which graphic instance is being validatedc
- Renderer context information that is stored with the representation
object graphic. This information is later used to indicate whether the graphic
instance must be updated or not.public IlpGraphicRendererContext getRendererContext(IlpRepresentationObject o)
Returns the renderer context associated with the graphic representation of the given representation object.
May be null
if the graphic renderer context was not set.
getRendererContext
in interface IlpGraphicHolder
o
- Representation object which graphic validity is being queriedvalidateGraphic(ilog.cpl.model.IlpRepresentationObject, ilog.cpl.graphic.IlpGraphicRendererContext)
public IlpGraphicRendererContext getRendererContext(IlpRepresentationObject o, IlpAttribute a)
Returns the renderer context associated with the graphic representation of the given representation object and attribute.
May be null
if the graphic renderer context was not set.
getRendererContext
in interface IlpGraphicHolder
o
- Representation object which graphic validity is being querieda
- Attribute which graphic is being validatedvalidateGraphic(ilog.cpl.model.IlpRepresentationObject, ilog.cpl.graphic.IlpGraphicRendererContext)
public boolean isValid(IlpRepresentationObject o)
isValid
in interface IlpGraphicHolder
o
- Representation object which graphic validity is being queriedpublic boolean isValid(IlpRepresentationObject o, IlpAttribute a)
isValid
in interface IlpGraphicHolder
o
- Representation objecta
- Attribute which graphic validity is being queried© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.