ilog.views.graphic.composite.decoration
Class IlvBalloon

java.lang.Object
  extended by ilog.views.IlvGraphic
      extended by ilog.views.graphic.composite.decoration.IlvBalloon
All Implemented Interfaces:
IlvHotSpot, IlvPersistentObject, Transferable, Serializable
Direct Known Subclasses:
IlvRectBalloon, IlvRoundRectBalloon

public abstract class IlvBalloon
extends IlvGraphic
implements IlvHotSpot

IlvBalloon is the abstract base class for all graphic objects that represent a balloon. These classes are designed to be used as children of composite graphic objects; they can also be used as standard graphic objects.

In addition to the standard constructors, the following methods should be overridden to create a customized balloon:

The default settings for an IlvBalloon are as follows:

About Graphic Objects

IlvBalloon is a custom graphic object, that is, a subclass of IlvGraphic. Graphic objects are controlled using an IlvManager instance and displayed using one or more IlvManagerView instances in a Java Swing application. For information about generic features for graphic objects, see IlvGraphic.

Since:
JViews 6.0
See Also:
IlvManager, IlvManagerView, IlvRectBalloon, IlvRoundRectBalloon, IlvText, IlvPoint, Serialized Form

Constructor Summary
IlvBalloon()
          Creates a balloon with the default values.
IlvBalloon(IlvBalloon source)
          Creates a new IlvBalloon by copying an existing one.
IlvBalloon(IlvInputStream stream)
          Reads the object from an IlvInputStream.
IlvBalloon(int orientation, int pointerDepth, int shadowThickness, Color balloonColor, Color borderColor, Color shadowColor)
          Creates a balloon with the characteristics given by the supplied parameters.
 
Method Summary
 void applyTransform(IlvTransformer t)
          Applies a transformation to the shape of this object.
 IlvRect boundingBox(IlvTransformer t)
          Returns the bounding rectangle of this object.
 Color getBalloonColor()
          Returns the balloon color.
 Color getBorderColor()
          Returns the balloon color.
 Insets getInsets()
          Returns the insets.
 int getOrientation()
          Returns the orientation in which the balloon will be displayed.
 int getPointerDepth()
          Returns the pointer height.
 Color getShadowColor()
          Returns the shadow color.
 int getShadowThickness()
          Returns the shadow thickness.
 void moveResize(IlvRect size)
          Resizes the object.
 void setBalloonColor(Color balloonColor)
          Sets the balloon shadow color.
 void setBorderColor(Color balloonBorderColor)
          Sets the balloon shadow color.
 void setInsets(Insets insets)
          Returns the insets.
 void setOrientation(int orientation)
          Sets the orientation in which the balloon will be displayed.
 void setPointerDepth(int pointerDepth)
          Sets the pointer height.
 void setShadowColor(Color balloonShadowColor)
          Sets the balloon shadow color.
 void setShadowThickness(int shadowThickness)
          Sets the shadow thickness.
 void write(IlvOutputStream stream)
          Writes the object to an IlvOutputStream.
 
Methods inherited from class ilog.views.IlvGraphic
addActionListener, addNamedPropertyListener, boundingBox, contains, copy, draw, getAndAssociateObjectInteractor, getCenter, getDefaultInteractor, getGraphicBag, GetGraphicObject, getIntersectionWithOutline, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, hasProperty, inside, intersects, isDataFlavorSupported, isEditable, isInApplyToObject, isMovable, isPersistent, isSelectable, isVisible, makeSelection, move, move, notifyObjectInteractorToManager, processActionEvent, reDraw, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBackground, setEditable, setFillOn, setForeground, setGraphicBag, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipText, setVisible, toString, translate, zoomable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ilog.views.graphic.composite.decoration.IlvHotSpot
getHotSpot
 

Constructor Detail

IlvBalloon

public IlvBalloon()
Creates a balloon with the default values.


IlvBalloon

public IlvBalloon(IlvBalloon source)
Creates a new IlvBalloon by copying an existing one.


IlvBalloon

public IlvBalloon(IlvInputStream stream)
           throws IlvReadFileException
Reads the object from an IlvInputStream.

Parameters:
stream - The input stream.
Throws:
IlvReadFileException - if the format is not correct.

IlvBalloon

public IlvBalloon(int orientation,
                  int pointerDepth,
                  int shadowThickness,
                  Color balloonColor,
                  Color borderColor,
                  Color shadowColor)
Creates a balloon with the characteristics given by the supplied parameters.

Parameters:
orientation - The balloon orientation. The possible values are:
pointerDepth - Balloon pointer depth.
shadowThickness - Balloon shadow thickness.
balloonColor - Balloon background color.
borderColor - Balloon border color.
shadowColor - Balloon shadow color.
See Also:
setOrientation(int), setPointerDepth(int), setShadowThickness(int), setBalloonColor(java.awt.Color), setBorderColor(java.awt.Color), setShadowColor(java.awt.Color)
Method Detail

moveResize

public void moveResize(IlvRect size)
Resizes the object. The method sets the bounding rectangle of the object to the IlvRect parameter. This method calls the applyTransform method.

Overrides:
moveResize in class IlvGraphic
Parameters:
size - The new bounding rectangle of the object.
See Also:
IlvGraphic, IlvGraphic.applyTransform(IlvTransformer)

applyTransform

public void applyTransform(IlvTransformer t)
Applies a transformation to the shape of this object.

Specified by:
applyTransform in class IlvGraphic
Parameters:
t - The transformer to be applied.
See Also:
IlvGraphic

boundingBox

public IlvRect boundingBox(IlvTransformer t)
Returns the bounding rectangle of this object.

Specified by:
boundingBox in class IlvGraphic
Parameters:
t - The transformer used to draw the object. If the transformer is null, the bounding box for the identity transformer is returned.
See Also:
IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer), IlvGraphic.zoomable(), IlvGraphic

getOrientation

public int getOrientation()
Returns the orientation in which the balloon will be displayed.

The possible values are:


setOrientation

public void setOrientation(int orientation)
Sets the orientation in which the balloon will be displayed.

The possible values are:


getPointerDepth

public int getPointerDepth()
Returns the pointer height.


setPointerDepth

public void setPointerDepth(int pointerDepth)
Sets the pointer height.


getShadowThickness

public int getShadowThickness()
Returns the shadow thickness.


setShadowThickness

public void setShadowThickness(int shadowThickness)
Sets the shadow thickness.


getInsets

public Insets getInsets()
Returns the insets.


setInsets

public void setInsets(Insets insets)
Returns the insets.


getShadowColor

public Color getShadowColor()
Returns the shadow color.


setShadowColor

public void setShadowColor(Color balloonShadowColor)
Sets the balloon shadow color.


getBalloonColor

public Color getBalloonColor()
Returns the balloon color.


setBalloonColor

public void setBalloonColor(Color balloonColor)
Sets the balloon shadow color.


getBorderColor

public Color getBorderColor()
Returns the balloon color.


setBorderColor

public void setBorderColor(Color balloonBorderColor)
Sets the balloon shadow color.


write

public void write(IlvOutputStream stream)
           throws IOException
Writes the object to an IlvOutputStream. You should not call this method directly; instead, you should use the write methods of the manager.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvGraphic
Parameters:
stream - The output stream.
Throws:
IOException - thrown when an exception occurs during the write operation for this object.


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