ilog.cpl.graphic
Class IlpCompositeGraphic

java.lang.Object
  extended by ilog.cpl.graphic.IlpAbstractGraphic
      extended by ilog.cpl.graphic.IlpCompositeGraphic
All Implemented Interfaces:
IlpAttachable, IlpAttachmentManager, IlpGraphic, IlpGraphicContainment, ilog.cpl.graphic.internal.IlpComposite, ilog.cpl.graphic.internal.IlpGraphicModifier
Direct Known Subclasses:
IlpCentered, IlpStacker

Deprecated. Please use ILOG JViews Composite Graphics instead.

public class IlpCompositeGraphic
extends IlpAbstractGraphic
implements ilog.cpl.graphic.internal.IlpGraphicModifier, IlpAttachmentManager, ilog.cpl.graphic.internal.IlpComposite

This class models complex graphics, which can be composed of several other graphic instances.

In order to combine the child graphics, the user may define attachment rules.

Note: Composite graphics are now supported through ILOG JViews Composite Graphics. The new composite graphics are created using CSS. Please refer to samples.network.compositeGraphic for an example on how to create and customize the graphic representation of custom business objects using ILOG JViews Composite Graphics and Cascading Style Sheets.

Since:
JTGO 3.0
See Also:
IlvCompositeGraphic, IlvAttachmentLayout, IlvAttachmentConstraint
Deprecated Since:
JTGO 4.0

Field Summary
 
Fields inherited from interface ilog.cpl.graphic.IlpGraphic
AlarmBalloonBorderColor, AlarmBalloonColor, AlarmBalloonOrientation, AlarmBalloonPointerDepth, AlarmBalloonPointerDistance, AlarmBalloonRadius, AlarmBalloonShadowColor, AlarmBalloonShadowThickness, AlarmCountLabelBackgroundColor, AlarmCountOuterBorderColor, CenteredInsets, InfoBalloonBorderColor, InfoBalloonColor, InfoBalloonOrientation, InfoBalloonPointerDepth, InfoBalloonShadowColor, InfoBalloonShadowThickness, StackerAlignment, StackerOrientation, StackerSpacing
 
Constructor Summary
IlpCompositeGraphic(IlpGraphicView graphicView, IlpRepresentationObject object)
          Deprecated. Creates a graphic to represent the given object inside the given view.
IlpCompositeGraphic(IlpGraphicView graphicView, IlpRepresentationObject object, IlpAttribute attribute)
          Deprecated. Creates a graphic to represent an attribute in the given object inside the given view.
 
Method Summary
 void addBase(IlpGraphic base)
          Deprecated. Adds the given graphic as a child of this composite, and marks it as the base graphic.
 void addChild(IlpGraphic child)
          Deprecated. Adds a child to this graphic, creating a composite representation.
 void addChild(IlpGraphic graphic, IlpAttachment attachment)
          Deprecated. Adds a new child graphic with the given attachment rule.
 void apply(ilog.cpl.graphic.internal.IlpApplyToGraphic f)
          Deprecated. Applies the given function to all leaves in this graphic hierarchy, going down in this composite graphic.
 void apply(ilog.cpl.graphic.internal.IlpApplyToGraphic f, boolean postOrder)
          Deprecated. Recursively applies a function to all nodes inside this composite graphic hierarchy.
 Object call(ilog.cpl.graphic.internal.IlpCallOnGraphic f)
          Deprecated. Recursively applies a function to all leaves, and returns the first non-null value produced.
 void compute()
          Deprecated. Computes the composite graphic representation attaching the child graphics to their correct position.
 void computeAttachmentBounds()
          Deprecated. Computes the composite attachment bounds based on the child bounds.
 void computeAttachmentCoordinates()
          Deprecated. Computes the values of all attachments, recursively traversing the tree.
 void computeAttachmentCoordinates(IlpGraphic graphic)
          Deprecated. Computes the attachment coordinates of this composite graphic.
protected  void computeChildrenAttachmentCoordinates()
          Deprecated. Computes the attachment coordinates of the child graphics.
 void computeFixedCoordinates()
          Deprecated. This methods prepares the attachment rectangle.
protected  void createComponent()
          Deprecated. Creates a Java component representation of this composite.
 IlpAttachment getAttachment(IlpGraphic graphic)
          Deprecated. Returns the attachment of the given graphic object.
 IlpRect getAttachmentBounds()
          Deprecated. This method prepares the attachment bounds of this composite graphic, considering the bounds of its children.
 IlpGraphic getBase()
          Deprecated. Gets the base element.
 IlpRect getBaseRect(float centerx, float centery)
          Deprecated. Returns a rectangle with the location and dimension of the base graphic, if there is one.
 IlpPoint getCenterPoint(float rectx, float recty, float rectw, float recth)
          Deprecated. Returns the center point of the object considering the given base rectangle.
 IlpGraphic getChild(int index)
          Deprecated. Returns the child graphic at the given position.
 int getChildCount()
          Deprecated. Returns the number of child graphics.
 Collection getChildren()
          Deprecated. Returns a collection with all graphics present in this composite.
 JComponent getComponent()
          Deprecated. Returns the Java component responsible for the display of this graphic.
 IlpGraphic getInnermostGraphic(IlpPoint viewLocation)
          Deprecated. Returns the innermost graphic at the given position in this object.
 ilog.cpl.graphic.internal.IlpComponentSpecifics getSpecifics()
          Deprecated. Returns the instance responsible for the specific things in this component representation or null if there is no specific behavior defined.
 IlpPoint getTopLeftLocation(float centerx, float centery, float width, float height)
          Deprecated. Returns the location of the top left point of the graphic considering the given center point.
protected  void initResources()
          Deprecated. Initializes any resources needed by this graphic.
protected  void initSpecifics()
          Deprecated. Stores the specific information for the component.
 void removeChild(IlpGraphic child)
          Deprecated. Removes the given child from this composite graphic.
 void removeChildren()
          Deprecated. Removes all the children.
 void setAttachment(IlpGraphic graphic, IlpAttachment attachment)
          Deprecated. Attaches the corresponding graphic object to another one.
protected  void setSpecifics(ilog.cpl.graphic.internal.IlpComponentSpecifics spec)
          Deprecated. Set the characteristics that are specific to the component.
protected  void validateComponent()
          Deprecated. Validates the component after computing attachments.
 
Methods inherited from class ilog.cpl.graphic.IlpAbstractGraphic
addGraphicChangeListener, contains, fireEvent, getAttachmentManager, getAttachmentRect, getAttribute, getParent, getRepresentationObject, getRoot, getView, invalidateAttachmentRect, removeGraphicChangeListener, setAttachmentManager, setAttachmentRect, setAttribute, setComponent, setComponentNoInvalidate, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpCompositeGraphic

public IlpCompositeGraphic(IlpGraphicView graphicView,
                           IlpRepresentationObject object)
Deprecated. 
Creates a graphic to represent the given object inside the given view.

Parameters:
graphicView - View in which the object is being represented.
object - The object that is being represented by this graphic.

IlpCompositeGraphic

public IlpCompositeGraphic(IlpGraphicView graphicView,
                           IlpRepresentationObject object,
                           IlpAttribute attribute)
Deprecated. 
Creates a graphic to represent an attribute in the given object inside the given view.

Parameters:
graphicView - View in which the object is being represented.
object - The object that is being represented.
attribute - The attribute that is being represented by this graphic.
Method Detail

initResources

protected void initResources()
Deprecated. 
Initializes any resources needed by this graphic.

Internal method or field: do not use!

initSpecifics

protected void initSpecifics()
Deprecated. 
Stores the specific information for the component.

Internal method or field: do not use!

setSpecifics

protected void setSpecifics(ilog.cpl.graphic.internal.IlpComponentSpecifics spec)
Deprecated. 
Set the characteristics that are specific to the component. The specifics are used to create specific initialization for a graphic and to defined specific behavior for some operations, such as computeTransformer.

Internal method or field: do not use!

getSpecifics

public ilog.cpl.graphic.internal.IlpComponentSpecifics getSpecifics()
Deprecated. 
Returns the instance responsible for the specific things in this component representation or null if there is no specific behavior defined.

Internal method or field: do not use!

getBase

public IlpGraphic getBase()
Deprecated. 
Gets the base element.


addBase

public void addBase(IlpGraphic base)
Deprecated. 
Adds the given graphic as a child of this composite, and marks it as the base graphic.


addChild

public void addChild(IlpGraphic graphic,
                     IlpAttachment attachment)
Deprecated. 
Adds a new child graphic with the given attachment rule.


compute

public void compute()
Deprecated. 
Computes the composite graphic representation attaching the child graphics to their correct position.


getAttachmentBounds

public IlpRect getAttachmentBounds()
Deprecated. 
This method prepares the attachment bounds of this composite graphic, considering the bounds of its children.

Specified by:
getAttachmentBounds in interface IlpAttachable
Returns:
bound rectangle
Internal method or field: do not use!

computeFixedCoordinates

public void computeFixedCoordinates()
Deprecated. 
This methods prepares the attachment rectangle. All child graphics are verified and their attachment rectangle is set to its preferred size. The attachment rectangle always has the (x, y) position set to (0,0). Later, the method computeAttachmentCoordinates will calculate the appropriate (x,y) position based on the attachment rules.

Specified by:
computeFixedCoordinates in interface IlpAttachable
Internal method or field: do not use!

computeAttachmentCoordinates

public void computeAttachmentCoordinates()
Deprecated. 
Computes the values of all attachments, recursively traversing the tree. After the attachment coordinates for the child graphics have been calculated, the attachment rectangle for the composite graphic can be calculated and attached to the appropriate position. The composite graphic attachment rectangle will only be correct after calling this method.

Specified by:
computeAttachmentCoordinates in interface IlpAttachable
Internal method or field: do not use!

computeChildrenAttachmentCoordinates

protected void computeChildrenAttachmentCoordinates()
Deprecated. 
Computes the attachment coordinates of the child graphics.

Internal method or field: do not use!

computeAttachmentBounds

public void computeAttachmentBounds()
Deprecated. 
Computes the composite attachment bounds based on the child bounds. This method can only be called after computing the attachment coordinates of the child graphics.

Internal method or field: do not use!

validateComponent

protected void validateComponent()
Deprecated. 
Validates the component after computing attachments.

Internal method or field: do not use!

getAttachment

public IlpAttachment getAttachment(IlpGraphic graphic)
Deprecated. 
Returns the attachment of the given graphic object.

Specified by:
getAttachment in interface IlpAttachmentManager

setAttachment

public void setAttachment(IlpGraphic graphic,
                          IlpAttachment attachment)
Deprecated. 
Attaches the corresponding graphic object to another one.

Specified by:
setAttachment in interface IlpAttachmentManager

computeAttachmentCoordinates

public void computeAttachmentCoordinates(IlpGraphic graphic)
Deprecated. 
Computes the attachment coordinates of this composite graphic.

Specified by:
computeAttachmentCoordinates in interface IlpAttachmentManager
Internal method or field: do not use!

getComponent

public JComponent getComponent()
Deprecated. 
Returns the Java component responsible for the display of this graphic.

Specified by:
getComponent in interface IlpGraphic

createComponent

protected void createComponent()
Deprecated. 
Creates a Java component representation of this composite.

Internal method or field: do not use!

addChild

public void addChild(IlpGraphic child)
Deprecated. 
Adds a child to this graphic, creating a composite representation.

Specified by:
addChild in interface IlpGraphicContainment

removeChild

public void removeChild(IlpGraphic child)
Deprecated. 
Removes the given child from this composite graphic.

Specified by:
removeChild in interface IlpGraphicContainment

removeChildren

public void removeChildren()
Deprecated. 
Removes all the children.

Specified by:
removeChildren in interface IlpGraphicContainment

getChildren

public Collection getChildren()
Deprecated. 
Returns a collection with all graphics present in this composite.

Specified by:
getChildren in interface IlpGraphicContainment

getChild

public IlpGraphic getChild(int index)
Deprecated. 
Returns the child graphic at the given position.


getChildCount

public int getChildCount()
Deprecated. 
Returns the number of child graphics.

Specified by:
getChildCount in interface IlpGraphicContainment

apply

public void apply(ilog.cpl.graphic.internal.IlpApplyToGraphic f)
Deprecated. 
Applies the given function to all leaves in this graphic hierarchy, going down in this composite graphic.

Specified by:
apply in interface ilog.cpl.graphic.internal.IlpGraphicModifier
Internal method or field: do not use!

apply

public void apply(ilog.cpl.graphic.internal.IlpApplyToGraphic f,
                  boolean postOrder)
Deprecated. 
Recursively applies a function to all nodes inside this composite graphic hierarchy.

Specified by:
apply in interface ilog.cpl.graphic.internal.IlpGraphicModifier
Internal method or field: do not use!

call

public Object call(ilog.cpl.graphic.internal.IlpCallOnGraphic f)
Deprecated. 
Recursively applies a function to all leaves, and returns the first non-null value produced.

Specified by:
call in interface ilog.cpl.graphic.internal.IlpGraphicModifier
Internal method or field: do not use!

getInnermostGraphic

public IlpGraphic getInnermostGraphic(IlpPoint viewLocation)
Deprecated. 
Returns the innermost graphic at the given position in this object.

Specified by:
getInnermostGraphic in interface ilog.cpl.graphic.internal.IlpComposite
Parameters:
viewLocation - Location, in stationary coordinates, inside this composite graphic
Since:
JTGO 3.1

getBaseRect

public IlpRect getBaseRect(float centerx,
                           float centery)
Deprecated. 
Returns a rectangle with the location and dimension of the base graphic, if there is one. This is valid in case of IlpCompositeGraphic or IlvCompositeGraphic objects.

If the given graphic is not a composite one, this method returns null.

Specified by:
getBaseRect in interface ilog.cpl.graphic.internal.IlpComposite
Parameters:
centerx - X coordinate of the center point
centery - Y coordinate of the center point
Internal method or field: do not use!

getCenterPoint

public IlpPoint getCenterPoint(float rectx,
                               float recty,
                               float rectw,
                               float recth)
Deprecated. 
Returns the center point of the object considering the given base rectangle. The center point is the center of the base object in case of composite graphics.

Specified by:
getCenterPoint in interface ilog.cpl.graphic.internal.IlpComposite
Parameters:
rectx -
recty -
rectw -
recth -
Returns:
Center point
Internal method or field: do not use!

getTopLeftLocation

public IlpPoint getTopLeftLocation(float centerx,
                                   float centery,
                                   float width,
                                   float height)
Deprecated. 
Returns the location of the top left point of the graphic considering the given center point.

When the graphic is a composite graphic (IlpCompositeGraphic or IlvCompositeGraphic) the center point is considered the center of the base, and not the center of the whole composite.

Specified by:
getTopLeftLocation in interface ilog.cpl.graphic.internal.IlpComposite
Parameters:
centerx - X coordinate of the center point
centery - Y coordinate of the center point
width - Default graphic width
height - Default graphic height
Internal method or field: do not use!


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