ilog.views.graphic.composite.layout
Class IlvAttachableGraphic

java.lang.Object
  extended by ilog.views.graphic.composite.layout.IlvAttachableGraphic
All Implemented Interfaces:
IlvAttachable

public class IlvAttachableGraphic
extends Object
implements IlvAttachable

The class IlvAttachableGraphic provides a concrete implementation of IlvAttachable. It allows to layout IlvGraphic objects which are contained in an IlvCompositeGraphic

Since:
JViews 6.0

Constructor Summary
IlvAttachableGraphic(IlvGraphic element, IlvCompositeGraphic parent)
          Creates an instance of IlvAttachableGraphic
 
Method Summary
 void center(IlvRect size, Insets insets)
          Moves and resizes the object.
 IlvAttachable[] getAttachables()
          Returns the children of this objects if any, otherwise returns an empty array.
 IlvRect getAttachmentBounds()
          Returns the "attachment rectangle".
 Object[] getConstraints()
          Returns the attachments of the children of this objects if any, otherwise returns an empty array.
 IlvGraphic getGraphic()
          Returns the IlvGraphic instance for this object.
 IlvPoint getHotSpot()
          Returns the hotspot.
 IlvPoint[] getLinkPoints()
          Returns the points that define this link.
 IlvPoint getOffset()
          Returns the offset for this object or NULL if none.
 IlvAttachable getPostOrderFirstChild()
          Returns the first child in the tree, according to the postorder traversal scheme.
 boolean isVisible()
          Returns true when this component is visible.
 void move(float x, float y)
          Moves the object.
 void resize(IlvPoint size)
          Resizes the object.
 void rotate(IlvPoint center, double angle)
          Rotates this object.
 void setOffset(IlvPoint offset)
          Defines an offset applied to the position defined with the move(float, float) method.
 void setVisible(boolean b)
          Shows or hides this component depending on the value of parameter b.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvAttachableGraphic

public IlvAttachableGraphic(IlvGraphic element,
                            IlvCompositeGraphic parent)
Creates an instance of IlvAttachableGraphic

Parameters:
element - IlvGraphic object wrapped by this object
parent - parent of the supplied element
Method Detail

getGraphic

public IlvGraphic getGraphic()
Returns the IlvGraphic instance for this object.


getAttachmentBounds

public IlvRect getAttachmentBounds()
Returns the "attachment rectangle". All attachments are relative to this rectangle. Attachment constraints modify the attachment rectangle to exert their effects.

Specified by:
getAttachmentBounds in interface IlvAttachable
Returns:
bound rectangle

getHotSpot

public IlvPoint getHotSpot()
Returns the hotspot. This is a particular point (for example,; the apex of an info-window). It is given in coordinates relative to the upper left corner of getAttachmentBounds().

Specified by:
getHotSpot in interface IlvAttachable

move

public void move(float x,
                 float y)
Moves the object. Moves the top-left corner of the attachment rectangle of the object to (x,y).

Specified by:
move in interface IlvAttachable
Parameters:
x - The new horizontal value.
y - The new vertical value.

center

public void center(IlvRect size,
                   Insets insets)
Moves and resizes the object. Moves the center of the attachment rectangle of the object to the center of the given rectangle. Resizes the object to the given rectangles expanded to its edges by the insets.

Specified by:
center in interface IlvAttachable
Parameters:
size - The new attachment rectangle.
insets - specifies the space that the object must leave at each of its edges.

getLinkPoints

public IlvPoint[] getLinkPoints()
Returns the points that define this link. If this object is not a link, an empty array is returned.

Specified by:
getLinkPoints in interface IlvAttachable
See Also:
IlvLinkImage.getLinkPoints(ilog.views.IlvTransformer)

setVisible

public void setVisible(boolean b)
Shows or hides this component depending on the value of parameter b.

Specified by:
setVisible in interface IlvAttachable
Parameters:
b - if true, shows this component; otherwise, hides this component

isVisible

public boolean isVisible()
Returns true when this component is visible.

Specified by:
isVisible in interface IlvAttachable
Since:
JViews 8.0

getPostOrderFirstChild

public IlvAttachable getPostOrderFirstChild()
Returns the first child in the tree, according to the postorder traversal scheme.

Specified by:
getPostOrderFirstChild in interface IlvAttachable

getAttachables

public IlvAttachable[] getAttachables()
Returns the children of this objects if any, otherwise returns an empty array.

Specified by:
getAttachables in interface IlvAttachable

getConstraints

public Object[] getConstraints()
Returns the attachments of the children of this objects if any, otherwise returns an empty array.

Specified by:
getConstraints in interface IlvAttachable
See Also:
IlvCompositeGraphic.getConstraints()

setOffset

public void setOffset(IlvPoint offset)
Defines an offset applied to the position defined with the move(float, float) method.

Specified by:
setOffset in interface IlvAttachable

getOffset

public IlvPoint getOffset()
Returns the offset for this object or NULL if none. The offset is applied to the position defined with the move(float, float) method.

Specified by:
getOffset in interface IlvAttachable

resize

public void resize(IlvPoint size)
Resizes the object. The bounding rectangle of the object is modified. It sets its new size as (size.x, size.y).

Specified by:
resize in interface IlvAttachable

rotate

public void rotate(IlvPoint center,
                   double angle)
Rotates this object. The object is rotated around the point specified by center and by an angle in degrees specified by angle.

Specified by:
rotate in interface IlvAttachable
Parameters:
center - The center of the rotation.
angle - The rotation angle in degrees.


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