ilog.cpl.graphic
Class IlpAbstractGraphic

java.lang.Object
  extended by ilog.cpl.graphic.IlpAbstractGraphic
All Implemented Interfaces:
IlpAttachable, IlpGraphic, IlpGraphicContainment
Direct Known Subclasses:
IlpCompositeGraphic, IlpLeafGraphic

public abstract class IlpAbstractGraphic
extends Object
implements IlpGraphic

This class models an abstract graphic. This graphic can be used to create complex graphic representations for objects and attributes.

Since:
JTGO 3.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
IlpAbstractGraphic(IlpGraphicView view, IlpRepresentationObject object)
          Creates a graphic to represent the given object inside the given view.
IlpAbstractGraphic(IlpGraphicView view, IlpRepresentationObject object, IlpAttribute attribute)
          Creates a graphic to represent an attribute in the given object inside the given view.
 
Method Summary
 void addGraphicChangeListener(GraphicChangeListener l)
          Adds a new listener to this graphic.
 boolean contains(Point p)
          Checks whether this component "contains" the specified point, which is defined relative to the coordinate system of this component.
 void fireEvent(GraphicChangeEvent ev)
          Fires a change event to the listeners.
 IlpAttachmentManager getAttachmentManager()
          Returns the current attachment manager.
protected  IlpRect getAttachmentRect()
           
 IlpAttribute getAttribute()
          Returns the attribute being represented by this graphic.
 IlpGraphic getParent()
          Returns the parent graphic or null if this graphic is not inside another graphic.
 IlpRepresentationObject getRepresentationObject()
          Returns the object being represented by this graphic.
 IlpGraphic getRoot()
          Returns the root graphic in the hierarchy.
 IlpGraphicView getView()
          Returns the view in which the graphic is being displayed.
protected  void invalidateAttachmentRect()
          Resets the attachment bounds.
 void removeGraphicChangeListener(GraphicChangeListener l)
          Removes a listener from the list.
protected  void setAttachmentManager(IlpAttachmentManager mgr)
          Sets a new attachment manager to this graphic.
protected  void setAttachmentRect(IlpRect r)
           
protected  void setAttribute(IlpAttribute a)
          Sets the business attribute represented by this graphic.
protected  void setComponent(JComponent c)
          Sets the component responsible for the drawing of this graphic.
protected  void setComponentNoInvalidate(JComponent c)
          Sets the component responsible for the drawing of this graphic.
 void setParent(IlpGraphic parent)
          Sets a new parent graphic for this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.cpl.graphic.IlpGraphic
getComponent
 
Methods inherited from interface ilog.cpl.graphic.attachment.IlpAttachable
computeAttachmentCoordinates, computeFixedCoordinates, getAttachmentBounds
 
Methods inherited from interface ilog.cpl.graphic.IlpGraphicContainment
addChild, getChildCount, getChildren, removeChild, removeChildren
 

Constructor Detail

IlpAbstractGraphic

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

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

IlpAbstractGraphic

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

Parameters:
view - The 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

getRoot

public IlpGraphic getRoot()
Returns the root graphic in the hierarchy.


setComponentNoInvalidate

protected void setComponentNoInvalidate(JComponent c)
Sets the component responsible for the drawing of this graphic.

Internal method or field: do not use!

setComponent

protected void setComponent(JComponent c)
Sets the component responsible for the drawing of this graphic.


contains

public boolean contains(Point p)
Checks whether this component "contains" the specified point, which is defined relative to the coordinate system of this component.

Specified by:
contains in interface IlpGraphic

getAttachmentManager

public IlpAttachmentManager getAttachmentManager()
Returns the current attachment manager.

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

setAttachmentManager

protected void setAttachmentManager(IlpAttachmentManager mgr)
Sets a new attachment manager to this graphic.

Internal method or field: do not use!

invalidateAttachmentRect

protected void invalidateAttachmentRect()
Resets the attachment bounds.

Internal method or field: do not use!

setAttachmentRect

protected void setAttachmentRect(IlpRect r)

getAttachmentRect

protected IlpRect getAttachmentRect()

getView

public IlpGraphicView getView()
Returns the view in which the graphic is being displayed.

Specified by:
getView in interface IlpGraphic

getRepresentationObject

public IlpRepresentationObject getRepresentationObject()
Returns the object being represented by this graphic.

Specified by:
getRepresentationObject in interface IlpGraphic

getAttribute

public IlpAttribute getAttribute()
Returns the attribute being represented by this graphic.

Specified by:
getAttribute in interface IlpGraphic

setAttribute

protected void setAttribute(IlpAttribute a)
Sets the business attribute represented by this graphic.

Parameters:
a - Business attribute
Since:
JViews 7.5

getParent

public IlpGraphic getParent()
Returns the parent graphic or null if this graphic is not inside another graphic.

Specified by:
getParent in interface IlpGraphic

setParent

public void setParent(IlpGraphic parent)
Sets a new parent graphic for this instance.

Specified by:
setParent in interface IlpGraphic

addGraphicChangeListener

public void addGraphicChangeListener(GraphicChangeListener l)
Adds a new listener to this graphic.

Specified by:
addGraphicChangeListener in interface IlpGraphic

removeGraphicChangeListener

public void removeGraphicChangeListener(GraphicChangeListener l)
Removes a listener from the list.

Specified by:
removeGraphicChangeListener in interface IlpGraphic

fireEvent

public void fireEvent(GraphicChangeEvent ev)
Fires a change event to the listeners.

Specified by:
fireEvent in interface IlpGraphic


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