ilog.views.graphic
Class IlvDefaultCollapsedGraphic

java.lang.Object
  extended by ilog.views.IlvGraphic
      extended by ilog.views.graphic.IlvGeneralPath
          extended by ilog.views.graphic.IlvDefaultCollapsedGraphic
All Implemented Interfaces:
IlvLabelInterface, IlvPolyPointsInterface, IlvPersistentObject, Transferable, Serializable

public class IlvDefaultCollapsedGraphic
extends IlvGeneralPath
implements IlvLabelInterface

A graphic object that shows a folder with a label underneath. This graphic object is the default graphic object that is used to represent a collapsed manager.
An IlvDefaultCollapsedGraphic

Since:
JViews 5.0
See Also:
IlvManager.setCollapsedGraphic(ilog.views.IlvGraphic), IlvManager.setCollapsed(boolean), Serialized Form

Constructor Summary
IlvDefaultCollapsedGraphic()
          Creates the graphic object.
IlvDefaultCollapsedGraphic(IlvDefaultCollapsedGraphic origin)
          Creates the graphic object by copying the specified one.
IlvDefaultCollapsedGraphic(IlvInputStream stream)
          Reads the object from an IlvInputStream.
 
Method Summary
 void applyTransform(IlvTransformer t)
          Applies a transformation to the shape of the object.
 IlvRect boundingBox(IlvTransformer t)
          Returns the bounding rectangle of the object.
 boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
          Tests if a point lies within the outline of the object.
 IlvGraphic copy()
          Copies the object.
 void draw(Graphics g, IlvTransformer t)
          Draws the object.
 Font getFont()
          Returns the font of the label.
 IlvPoint getIntersectionWithOutline(IlvPoint innerPoint, IlvPoint outerPoint, IlvTransformer t)
          Returns the intersection of the line segment from inner point to outer point with the shape of the graphic object.
 String getLabel()
          Returns the label of the object.
 IlvRect getLabelBBox(IlvTransformer t)
          Returns the area where the label is displayed.
 Paint getLabelFillPaint()
          Returns the paint object used to fill the label.
 void setFont(Font font)
          Changes the font of the label.
 void setLabel(String label)
          Changes the label.
 void setLabelFillPaint(Paint paint)
          Changes the paint object used to fill the label.
 boolean supportMultiline()
          Returns true if the label can be a multi-line label; false otherwise.
 void write(IlvOutputStream stream)
          Writes the object to an IlvOutputStream.
 
Methods inherited from class ilog.views.graphic.IlvGeneralPath
adaptPaint, allowsPointInsertion, allowsPointMove, allowsPointRemoval, calcBoundingBox, getAlpha, getClip, getFillPaint, getMaximumStrokeWidth, getPointAt, getPointsCardinal, getShape, getShapeBounds, getStroke, getStrokePaint, getTransformer, insertPoint, isContainsWhenNotFilled, isFillOn, isMovePointAllowed, isPaintAbsolute, isPaintZoomed, isPointEditionAllowed, isStrokeOn, isTransformedShapeMode, makeSelection, movePoint, moveResize, pointsInBBox, removePoint, resize, setAlpha, setBackground, setClip, setContainsWhenNotFilled, setFillOn, setFillPaint, setForeground, setInternalShape, setMaximumStrokeWidth, setMovePointAllowed, setPaintAbsolute, setPaintZoomed, setPointEditionAllowed, setShape, setShapeBounds, setStroke, setStrokeOn, setStrokePaint, setTransformedShapeMode, setTransformer
 
Methods inherited from class ilog.views.IlvGraphic
addActionListener, addNamedPropertyListener, boundingBox, getAndAssociateObjectInteractor, getCenter, getDefaultInteractor, getGraphicBag, GetGraphicObject, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, hasProperty, inside, intersects, isDataFlavorSupported, isEditable, isInApplyToObject, isMovable, isPersistent, isSelectable, isVisible, move, move, notifyObjectInteractorToManager, processActionEvent, reDraw, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, rotate, scale, setEditable, setGraphicBag, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setToolTipText, setVisible, toString, translate, zoomable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvDefaultCollapsedGraphic

public IlvDefaultCollapsedGraphic()
Creates the graphic object.


IlvDefaultCollapsedGraphic

public IlvDefaultCollapsedGraphic(IlvDefaultCollapsedGraphic origin)
Creates the graphic object by copying the specified one.

Parameters:
origin - The origin of the copy.

IlvDefaultCollapsedGraphic

public IlvDefaultCollapsedGraphic(IlvInputStream stream)
                           throws IOException,
                                  IlvReadFileException
Reads the object from an IlvInputStream.

Parameters:
stream - The input stream.
Throws:
IlvReadFileException - if the format is not correct.
IOException
See Also:
write(IlvOutputStream)
Method Detail

copy

public IlvGraphic copy()
Copies the object.

Overrides:
copy in class IlvGeneralPath
Returns:
A new IlvGeneralPath.
See Also:
IlvGraphic

write

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

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

setLabel

public void setLabel(String label)
Changes the label.

Specified by:
setLabel in interface IlvLabelInterface
Parameters:
label - The new label
See Also:
getLabel()

getLabel

public String getLabel()
Returns the label of the object.

Specified by:
getLabel in interface IlvLabelInterface
See Also:
setLabel(java.lang.String)

supportMultiline

public boolean supportMultiline()
Returns true if the label can be a multi-line label; false otherwise.

Specified by:
supportMultiline in interface IlvLabelInterface

getLabelBBox

public IlvRect getLabelBBox(IlvTransformer t)
Returns the area where the label is displayed.

Specified by:
getLabelBBox in interface IlvLabelInterface
Parameters:
t - the transformer used to draw the graphic object.

setFont

public void setFont(Font font)
Changes the font of the label.

Parameters:
font - The new font.
See Also:
getFont()

getFont

public Font getFont()
Returns the font of the label.

See Also:
setFont(java.awt.Font)

setLabelFillPaint

public void setLabelFillPaint(Paint paint)
Changes the paint object used to fill the label.

Parameters:
paint - the new filling object.
See Also:
getLabelFillPaint()

getLabelFillPaint

public Paint getLabelFillPaint()
Returns the paint object used to fill the label.

See Also:
setLabelFillPaint(java.awt.Paint)

draw

public void draw(Graphics g,
                 IlvTransformer t)
Draws the object.

Overrides:
draw in class IlvGeneralPath
Parameters:
g - The destination Graphics.
t - The transformation used to draw the object.
See Also:
IlvGraphic.boundingBox(ilog.views.IlvTransformer), IlvGraphic.zoomable(), IlvGraphic

applyTransform

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

Overrides:
applyTransform in class IlvGeneralPath
Parameters:
t - The transformer to be applied.
See Also:
IlvGeneralPath.setClip(java.awt.Shape)

contains

public boolean contains(IlvPoint p,
                        IlvPoint tp,
                        IlvTransformer t)
Tests if a point lies within the outline of the object.

Overrides:
contains in class IlvGeneralPath
Parameters:
p - The point to be tested.
tp - The point p transformed by the transformer t.
t - The transformation used to draw the object.
Returns:
true if the point lies inside this graphic object.
See Also:
IlvGeneralPath.isContainsWhenNotFilled()

boundingBox

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

Specified by:
boundingBox in interface IlvPolyPointsInterface
Overrides:
boundingBox in class IlvGeneralPath
Parameters:
t - The transformer used to draw the object.
See Also:
IlvGeneralPath.getShapeBounds(IlvTransformer)

getIntersectionWithOutline

public IlvPoint getIntersectionWithOutline(IlvPoint innerPoint,
                                           IlvPoint outerPoint,
                                           IlvTransformer t)
Returns the intersection of the line segment from inner point to outer point with the shape of the graphic object. This method is used the clip links against the shape of the node. The implementation of this method must be robust with respect to the input points: Even if innerPoint is not inside the graphic object, or if outerPoint is not outside the graphic object, it must return a valid point. For instance, if there is no intersection, it can return the start point.

Overrides:
getIntersectionWithOutline in class IlvGeneralPath
Parameters:
innerPoint - A point usually inside the graphic object, given in manager view coordinates.
outerPoint - A point usually outside of the graphic object, given in manager view coordinates.
t - The transformation used to draw the object.
Since:
JViews 8.1
See Also:
IlvClippingLinkConnector


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