ilog.cpl.graphic
Class IlpDefaultGraphicHolder

java.lang.Object
  extended by ilog.cpl.graphic.IlpDefaultGraphicHolder
All Implemented Interfaces:
IlpGraphicHolder

public class IlpDefaultGraphicHolder
extends Object
implements IlpGraphicHolder

This graphic holder stores the combinations and <, IlpGraphic>. The user may use it when defining renderers that do not recreate the graphic all the time, like in case of the network.

Since:
JTGO 3.0

Constructor Summary
IlpDefaultGraphicHolder()
          Default constructor.
 
Method Summary
 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 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpDefaultGraphicHolder

public IlpDefaultGraphicHolder()
Default constructor.

Method Detail

getGraphic

public IlpGraphic getGraphic(IlpRepresentationObject o)
Gets the graphic object associated with the given representation object. May be null if the object has graphics associated with individual attributes.

Specified by:
getGraphic in interface IlpGraphicHolder
Parameters:
o - Representation object which graphic representation is being requested

getGraphic

public IlpGraphic getGraphic(IlpRepresentationObject o,
                             IlpAttribute a)
Gets the graphic object associated with the given representation object and attribute. May be null if the attribute does not have a graphic representation.

Specified by:
getGraphic in interface IlpGraphicHolder
Parameters:
o - Representation object
a - Attribute which graphic representation is being requested

addGraphic

public void addGraphic(IlpRepresentationObject o,
                       IlpGraphic g)
Associates the given representation object with the given graphic representation.

Specified by:
addGraphic in interface IlpGraphicHolder
Parameters:
o - Representation object which graphic is being added
g - Graphic representation

addGraphic

public void addGraphic(IlpRepresentationObject o,
                       IlpAttribute a,
                       IlpGraphic g)
Associates the given representation object and attribute with the given graphic representation.

Specified by:
addGraphic in interface IlpGraphicHolder
Parameters:
o - Representation object
a - Attribute which graphic representation is being added
g - Graphic representation

getGraphics

public Collection getGraphics(IlpRepresentationObject o)
Returns the collection of all graphic instances associated with the given representation object, including the graphic instances related to attributes.


removeGraphic

public void removeGraphic(IlpRepresentationObject o)
Removes the graphic instance associated with the given representation object.

Specified by:
removeGraphic in interface IlpGraphicHolder
Parameters:
o - Representation object which graphic instance is being removed

removeGraphic

public void removeGraphic(IlpRepresentationObject o,
                          IlpAttribute a)
Removes the graphic instance associated with the given object representation and attribute.

Specified by:
removeGraphic in interface IlpGraphicHolder
Parameters:
o - Representation object which graphic instance is being removed
a - Attribute which graphic instance is being removed

removeGraphics

public void removeGraphics(IlpRepresentationObject o)
Removes all the graphic instances associated with this object representation, including the graphic instances related to attributes.


invalidateGraphic

public void invalidateGraphic(IlpRepresentationObject o)
Invalidates the graphic instance associated with the given representation object and with all its attribute graphics if they exist.

Specified by:
invalidateGraphic in interface IlpGraphicHolder
Parameters:
o - Representation object which graphic instance is being invalidated
Since:
JTGO 3.1

invalidateGraphic

public void invalidateGraphic(IlpRepresentationObject o,
                              IlpAttribute a)
Invalidates the graphic instance associated with the given representation object and attribute.

Specified by:
invalidateGraphic in interface IlpGraphicHolder
Parameters:
o - Representation object
a - Attribute which graphic instance is being invalidated
Since:
JTGO 3.1

invalidate

public void invalidate()
Invalidates all graphic instances present in this holder.

Specified by:
invalidate in interface IlpGraphicHolder
Since:
JTGO 3.5

validateGraphic

public void validateGraphic(IlpRepresentationObject o,
                            IlpGraphicRendererContext c)
Validates the graphic instance associated with the given representation object.

Specified by:
validateGraphic in interface IlpGraphicHolder
Parameters:
o - Representation object which graphic instance is being validated
c - 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.
Since:
JTGO 3.1

validateGraphic

public void validateGraphic(IlpRepresentationObject o,
                            IlpAttribute a,
                            IlpGraphicRendererContext c)
Validates the graphic instance associated with the given representation object and attribute.

Specified by:
validateGraphic in interface IlpGraphicHolder
Parameters:
o - Representation object
a - Attribute which graphic instance is being validated
c - 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.
Since:
JTGO 3.1

getRendererContext

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.

Specified by:
getRendererContext in interface IlpGraphicHolder
Parameters:
o - Representation object which graphic validity is being queried
Since:
JTGO 3.1
See Also:
validateGraphic(ilog.cpl.model.IlpRepresentationObject, ilog.cpl.graphic.IlpGraphicRendererContext)

getRendererContext

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.

Specified by:
getRendererContext in interface IlpGraphicHolder
Parameters:
o - Representation object which graphic validity is being queried
a - Attribute which graphic is being validated
Since:
JTGO 3.1
See Also:
validateGraphic(ilog.cpl.model.IlpRepresentationObject, ilog.cpl.graphic.IlpGraphicRendererContext)

isValid

public boolean isValid(IlpRepresentationObject o)
Returns whether the graphic instance associated with the given representation object is valid. Invalid graphic representations need to be updated.

Specified by:
isValid in interface IlpGraphicHolder
Parameters:
o - Representation object which graphic validity is being queried
Since:
JTGO 3.1

isValid

public boolean isValid(IlpRepresentationObject o,
                       IlpAttribute a)
Returns whether the graphic instance associated with the given representation object and attribute is valid. Invalid graphic representations need to be updated.

Specified by:
isValid in interface IlpGraphicHolder
Parameters:
o - Representation object
a - Attribute which graphic validity is being queried
Since:
JTGO 3.1


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.