ilog.views.graphic.linkbundle
Class IlvDefaultLinkBundleFrame

java.lang.Object
  extended by ilog.views.graphic.linkbundle.IlvDefaultLinkBundleFrame
All Implemented Interfaces:
IlvLinkBundleFrame, IlvPersistentObject, Serializable

public class IlvDefaultLinkBundleFrame
extends Object
implements IlvLinkBundleFrame, Serializable, IlvPersistentObject

The default frame for an IlvLinkBundle. The IlvDefaultLinkBundleFrame class defines the default frame that is drawn around an IlvLinkBundle when this link bundle is added into another link bundle or into a grapher.

Since:
JViews 8.0
See Also:
IlvLinkBundle.setFrame(ilog.views.graphic.linkbundle.IlvLinkBundleFrame), setBackground(java.awt.Paint), setMargin(float), Serialized Form

Constructor Summary
IlvDefaultLinkBundleFrame()
          Creates a default link bundle frame.
IlvDefaultLinkBundleFrame(IlvDefaultLinkBundleFrame source)
          Creates an IlvDefaultLinkBundleFrame by copying the specified one.
IlvDefaultLinkBundleFrame(IlvInputStream stream)
          Reads an IlvDefaultLinkBundleFrame from an IlvInputStream.
 
Method Summary
 IlvRect boundingBox(IlvLinkBundle linkBundle, IlvTransformer transformer)
          Returns the bounding rectangle of the frame for a given link bundle and transformer.
 boolean contains(IlvLinkBundle linkBundle, IlvPoint p, IlvPoint tp, IlvTransformer transformer)
          Tests if a point lies within the outline of the frame.
 IlvLinkBundleFrame copy()
          Creates an IlvDefaultLinkBundleFrame by copying this one.
 void draw(IlvLinkBundle linkBundle, Graphics g, IlvTransformer t)
          Draws the frame for a given link bundle.
 Paint getBackground()
          Returns the Paint object used to draw the background of the link bundle.
 float getMargin()
          Returns the margin.
 float getMargin(IlvLinkBundle linkBundle, IlvTransformer t)
          Returns the margin of the specified link bundle.
 void setBackground(Paint p)
          Changes the Paint object used to draw the background of the link bundle.
 void setMargin(float margin)
          Sets the margin.
 void write(IlvOutputStream stream)
          Writes the frame to an IlvOutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvDefaultLinkBundleFrame

public IlvDefaultLinkBundleFrame()
Creates a default link bundle frame.


IlvDefaultLinkBundleFrame

public IlvDefaultLinkBundleFrame(IlvDefaultLinkBundleFrame source)
Creates an IlvDefaultLinkBundleFrame by copying the specified one.

Parameters:
source - The origin of the copy.
See Also:
copy()

IlvDefaultLinkBundleFrame

public IlvDefaultLinkBundleFrame(IlvInputStream stream)
                          throws IOException,
                                 IlvReadFileException
Reads an IlvDefaultLinkBundleFrame from an IlvInputStream.

Parameters:
stream - The input stream.
Throws:
IOException
IlvReadFileException
Method Detail

copy

public IlvLinkBundleFrame copy()
Creates an IlvDefaultLinkBundleFrame by copying this one.

Specified by:
copy in interface IlvLinkBundleFrame

write

public void write(IlvOutputStream stream)
           throws IOException
Writes the frame to an IlvOutputStream.

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

getMargin

public float getMargin(IlvLinkBundle linkBundle,
                       IlvTransformer t)
Returns the margin of the specified link bundle.

Specified by:
getMargin in interface IlvLinkBundleFrame
Parameters:
linkBundle - The link bundle.
t - The transformer used to draw the link bundle and the frame.

boundingBox

public IlvRect boundingBox(IlvLinkBundle linkBundle,
                           IlvTransformer transformer)
Returns the bounding rectangle of the frame for a given link bundle and transformer.

Specified by:
boundingBox in interface IlvLinkBundleFrame
Parameters:
linkBundle - The link bundle.
transformer - The transformer used to draw the link bundle.

getMargin

public float getMargin()
Returns the margin.


setMargin

public void setMargin(float margin)
Sets the margin.


getBackground

public Paint getBackground()
Returns the Paint object used to draw the background of the link bundle.

See Also:
setBackground(java.awt.Paint)

setBackground

public void setBackground(Paint p)
Changes the Paint object used to draw the background of the link bundle.

See Also:
getBackground()

draw

public void draw(IlvLinkBundle linkBundle,
                 Graphics g,
                 IlvTransformer t)
Draws the frame for a given link bundle.

Specified by:
draw in interface IlvLinkBundleFrame
Parameters:
linkBundle - The link bundle.
g - The Graphics used to draw the frame.
t - The transformer used to draw the frame.

contains

public boolean contains(IlvLinkBundle linkBundle,
                        IlvPoint p,
                        IlvPoint tp,
                        IlvTransformer transformer)
Tests if a point lies within the outline of the frame.

Specified by:
contains in interface IlvLinkBundleFrame
Parameters:
linkBundle - The link bundle.
p - The point to be tested.
tp - The point p transformed by the transformer t.
transformer - The transformation that is used to draw the frame.


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