ilog.views.sdm.graphic
Class IlvGeneralNode

java.lang.Object
  extended by ilog.views.IlvGraphic
      extended by ilog.views.graphic.IlvGraphicSet
          extended by ilog.views.sdm.graphic.IlvGeneralNode
All Implemented Interfaces:
GraphicBagHierarchyEventReceiver, ManagerViewsHierarchyEventReceiver, IlvGraphicBag, IlvLabelInterface, IlvPersistentObject, ilog.views.sdm.internal.labellayout.IlvSDMLabeledNode, Transferable, Serializable
Direct Known Subclasses:
IlvDefaultLaneGraphic, IlvSwimLanesRenderer.DefaultSwimLaneGraphic

public class IlvGeneralNode
extends IlvGraphicSet
implements IlvLabelInterface, ilog.views.sdm.internal.labellayout.IlvSDMLabeledNode

The class IlvGeneralNode is a general-purpose graphic object with a geometric shape (square, circle, diamond, or similar), a label, and an icon, each being optional.

The label can be zoomable and can become invisible below a given zoom level to avoid overloaded displays. Labels can contain several lines (separated by '\n' characters). The general node supports automatic word wrapping or truncation of the label.

The shape and the icon can be defined as SVG files.

Note: In JViews 6.0, performance and graphic improvements have been made to this class that may introduce slight changes in bounding boxes. See setUseIlvText(boolean) for more details.

Since:
JViews 4.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class ilog.views.graphic.IlvGraphicSet
IlvGraphicSet.DelegateObjectInteractor
 
Field Summary
static int CUSTOM
          The shape type for a custom shape.
static int DIAMOND
          The shape type for a diamond.
static int ELLIPSE
          The shape type for an ellipse.
static int EXPAND_ONLY
          The auto-resize policy that allows the general node shape to be expanded to fit the labels or icon but not to be shrunk.
static int EXPAND_OR_SHRINK
          The auto-resize policy that allows the general node shape to be expanded or shrunk to fit the labels or icon.
static boolean High_Quality_Icons
          Forces setHighQualityRendering(true) on subicons.
protected  IlvGraphic icon
          The icon of the general node.
static int LABEL_UNCHANGED
          The label mode that leaves the label unchanged.
protected  IlvGraphic[] labels
          The labels of the general node.
protected  boolean layoutNeeded
          This boolean indicates that a property of the general node has been modified and that the layout must be recomputed.
static int LINEAR_GRADIENT
          The paint style that fills the shape with a linear gradient.
static int MARKER
          The shape type for a marker (a cross).
static int NO_AUTO_RESIZE
          The auto-resize policy that does not allow the general node shape to be resized at all.
static int NO_FILL
          The paint style is transparent.
static int RADIAL_GRADIENT
          The paint style that fills the shape with a radial gradient.
protected  boolean realizeNeeded
          This boolean indicates that a property of the general node has been modified and that the graphic objects must be reconstructed.
static int RECTANGLE
          The shape type for a rectangle.
static int ROUND_RECTANGLE
          The shape type for a rectangle with rounded corners.
protected  IlvGraphic shape
          The basic shape of the general node.
static int SHRINK_ONLY
          The auto-resize policy that allows the general node shape to be shrunk to fit the labels or icon but not to be expanded.
static int SOLID_COLOR
          The paint style that fills a shape with a solid color.
static int TEXTURE
          The paint style that fills the shape with a texture.
static int TRIANGLE_DOWN
          The shape type for a triangle pointing down.
static int TRIANGLE_LEFT
          The shape type for a triangle pointing left.
static int TRIANGLE_RIGHT
          The shape type for a triangle pointing right.
static int TRIANGLE_UP
          The shape type for a triangle pointing up.
static int TRUNCATE
          The label mode that truncates the label so that it fits in the width of the shape.
static int WORD_WRAP
          The label mode that spreads the label on multiple lines so that it fits in the width of the shape.
 
Fields inherited from class ilog.views.graphic.IlvGraphicSet
list
 
Constructor Summary
IlvGeneralNode()
          Creates a new general node with a 20-pixel square shape, located in (0,0), and with a default label.
IlvGeneralNode(IlvGeneralNode source)
          Creates a new general node that is a copy of an existing one.
IlvGeneralNode(IlvInputStream stream)
          Reads a general node from an input stream.
IlvGeneralNode(IlvPoint p, float size, String label)
          Creates a new general node with a square shape of a given size.
IlvGeneralNode(IlvPoint p, String label)
          Creates a new general node with a 20-pixel square shape.
IlvGeneralNode(IlvRect rect)
          Creates a new general node with a rectangular shape.
IlvGeneralNode(IlvRect rect, int shapeType, String label)
          Creates a new general node with a predefined shape.
IlvGeneralNode(IlvRect rect, String label)
          Creates a new general node with a rectangular shape.
 
Method Summary
 void applyTransform(IlvTransformer t)
          Applies a transformation to the object.
 IlvRect boundingBox(IlvTransformer t)
          Returns the bounding rectangle of this general node.
 IlvGraphic copy()
          Returns a copy of this general node.
protected  void doLayout()
          Computes the relative positions and sizes of the different parts of the general node: shape, labels, icon, and decorations.
protected  void drawCore(Graphics2D dst, IlvTransformer t)
          Draws the object.
 int getAnchor()
          Returns the anchor position of the node, that is, the point that is left unchanged by the setShapeWidth(float), setShapeHeight(float), and setShapeAspectRatio(float) methods.
 IlvRect getBaseBoundingBox(IlvTransformer t)
          Returns the smallest rectangle that encloses the shape and the icon of this general node.
 IlvGraphic[] getDecorations()
          Returns the decoration objects.
 IlvGraphic getDecorations(int index)
          Returns the decoration object at the specified index.
 float getFillAngle()
          Returns the angle (in degrees) of the gradient used to fill the shape.
 Color getFillColor1()
          Returns the first color used to compute the gradient that fills the shape of the general node.
 Color getFillColor2()
          Returns the second color used to compute the gradient that fills the shape of the general node.
 float getFillEnd()
          Returns the position where the gradient ends, that is, where the color is the first color set by setFillColor2(java.awt.Color).
 float getFillStart()
          Returns the position where the gradient starts, that is, where the color is the first color set by setFillColor1(java.awt.Color).
 int getFillStyle()
          Returns the style used to fill the shape.
 String getFillTexture()
          Returns the texture used to fill the shape of the general node.
 float getHorizontalAutoResizeMargin()
          Returns the margin that is left on both sides of the shape when it is auto-resized horizontally.
 int getHorizontalAutoResizeMode()
          Returns the horizontal auto-resize mode.
 String getIcon()
          Returns the icon of the general node.
 int getIconPosition()
          Returns the position of the icon with respect to the label.
 String getLabel()
          Returns the label of the general node.
 int getLabelAlignment()
          Returns the alignment used for multiline labels.
 IlvRect getLabelBBox(IlvTransformer t)
          Implementation of IlvLabelInterface.
 Color getLabelColor()
          Returns the color of the label of the general node.
 Font getLabelFont()
          Returns the font of the label of the general node.
 float getLabelMargin()
          Returns the margin that will be kept between the labels and the edges of the shape when performing word wrapping or label truncation.
 int getLabelMode()
          Returns the label mode of this general node.
 int getLabelPosition()
          Returns the position of the label with respect to the shape.
 double getLabelScaleFactor()
          Returns the scale factor of the label(s) of the general node.
 float getLabelSpacing()
          Returns the spacing between the shape and the label.
 float getLineSpacing()
          Returns the spacing between the lines of multiline labels.
 double getMaxLabelZoom()
          Returns the zoom level above which the label becomes invisible.
 double getMinLabelZoom()
          Returns the zoom level below which the label becomes invisible.
 IlvGraphic getShape()
          Returns the shape of this general node.
 float getShapeAspectRatio()
          Returns the aspect ratio of the shape.
protected  IlvRect getShapeBBox()
          Returns the bounding box of the general node's shape.
 float getShapeHeight()
          Returns the height of the shape.
 int getShapeType()
          Returns the type of shape for this general node.
 float getShapeWidth()
          Returns the width of the shape.
 Color getStrokeColor()
          Returns the color of the stroke of the node shape.
 float[] getStrokeDashArray()
          Returns the dash array of the shape stroke.
 float getStrokeDashPhase()
          Returns the dash phase of the shape stroke.
 int getStrokeEndCaps()
          Returns the end cap style of the shape stroke.
 int getStrokeLineJoins()
          Returns the line join style of the shape stroke.
 float getStrokeMiterLimit()
          Returns the miter limit of the shape stroke.
 float getStrokeWidth()
          Returns the width of the shape stroke.
 float getVerticalAutoResizeMargin()
          Returns the margin that is left on both sides of the shape when it is auto-resized vertically.
 int getVerticalAutoResizeMode()
          Returns the vertical auto-resize mode.
 String getWordWrapChars()
          Returns the characters which allow wordwrapping when the label is implemented using IlvZoomableLabel objects.
 float getWordWrapMargin()
          Deprecated. Since JViews 5.5, this method is renamed into getLabelMargin().
 boolean getWordWrapMode()
          Deprecated. Since JViews 5.5, this method is replaced by getLabelMode().
 boolean isKeepingAspectRatio()
          Sets the flag that specifies whether the width/height ratio is preserved by the methods setShapeWidth(float) and setShapeHeight(float).
 boolean isLabelAntialiasing()
          Returns the anti-aliasing mode of the label of the general node.
 boolean isLabelZoomable()
          Returns the flag specifying whether the label should be zoomable.
 String isTruncatedLabelSuffix()
          Returns the string that is appended to the label when it is truncated to fit in the shape's width.
 boolean isUseIlvText()
          Returns the flag specifying whether the label of this general node is an IlvText or an IlvZoomableLabel.
static boolean isUseIlvTextDefault()
          Returns the default value of the "use IlvText" flag.
 void moveLabel(float x, float y, IlvTransformer t)
          Moves the label(s) of the node to the specified position.
 void moveResize(IlvRect rect)
          Moves and resizes the general node's shape to the specified rectangle.
protected  void realize()
          This method creates all the components of the general node.
 void setAnchor(int position)
          Sets the anchor position of the node, that is, the point that will be left unchanged by the setShapeWidth(float), setShapeHeight(float), and setShapeAspectRatio(float) methods.
 void setBackground(Color c)
          Sets the background color of the node shape.
 void setDecorations(IlvGraphic[] decorations)
          Sets the decoration objects.
 void setDecorations(int index, IlvGraphic deco)
          Sets the decoration object at the specified index.
 void setFillAngle(float angle)
          Sets the angle (in degrees) of the gradient used to fill the shape.
 void setFillColor1(Color color)
          Sets the first color used to compute the gradient that fills the shape of the general node.
 void setFillColor2(Color color)
          Sets the second color used to compute the gradient that fills the shape of the general node.
 void setFillEnd(float end)
          Sets the position where the gradient ends, that is, where the color is the first color set by setFillColor2(java.awt.Color).
 void setFillStart(float start)
          Sets the position where the gradient starts, that is, where the color is the first color set by setFillColor1(java.awt.Color).
 void setFillStyle(int fillStyle)
          Sets the style used to fill the shape.
 void setFillTexture(String texture)
          Sets the texture used to fill the shape of the general node.
 void setForeground(Color c)
          Sets the foreground color of the node shape.
 void setHorizontalAutoResizeMargin(float margin)
          Sets the margin that is left on both sides of the shape when it is auto-resized horizontally.
 void setHorizontalAutoResizeMode(int mode)
          Sets the horizontal auto-resize mode.
 void setIcon(String icon)
          Sets the URL of the general node's icon.
 void setIconPosition(int position)
          Sets the position of the icon with respect to the label.
 void setKeepingAspectRatio(boolean keeping)
          Sets the flag that specifies whether the width/height ratio is preserved by the methods setShapeWidth(float) and setShapeHeight(float).
 void setLabel(String label)
          Sets the label of the general node.
 void setLabelAlignment(int alignment)
          Sets the alignment of multiline labels.
 void setLabelAntialiasing(boolean labelAntialiasing)
          Sets the anti-aliasing mode of the label of the general node.
 void setLabelColor(Color labelColor)
          Sets the color of the label of the general node.
 void setLabelFont(Font labelFont)
          Sets the font of the label of the general node.
 void setLabelMargin(float margin)
          Sets the margin that will be kept between the labels and the edges of the shape when performing word wrapping or label truncation.
 void setLabelMode(int mode)
          Sets the label mode of this general node.
 void setLabelPosition(int position)
          Sets the position of the label with respect to the shape.
 void setLabelScaleFactor(double labelScaleFactor)
          Sets the scale factor of the label of the general node.
 void setLabelSpacing(float spacing)
          Sets the spacing between the shape and the label.
 void setLabelZoomable(boolean zoomable)
          Specifies whether the label should be zoomable.
 void setLineSpacing(float spacing)
          Sets the spacing between the lines of multiline labels.
 void setMaxLabelZoom(double zoom)
          Sets the zoom level above which the label becomes invisible.
 void setMinLabelZoom(double zoom)
          Sets the zoom level below which the label becomes invisible.
 void setShape(IlvGraphic shape)
          Sets the shape of this general node.
 void setShapeAspectRatio(float aspectRatio)
          Changes the aspect ratio of the shape.
 void setShapeHeight(float height)
          Changes the height of the shape.
 void setShapeType(int shapeType)
          Changes the type of shape for this general node.
 void setShapeWidth(float width)
          Changes the width of the shape.
 void setStrokeColor(Color c)
          Sets the color of the stroke (that is, the border) of the node shape.
 void setStrokeDashArray(float[] dashArray)
          Sets the dash array of the shape stroke.
 void setStrokeDashPhase(float dashPhase)
          Sets the dash phase of the shape stroke.
 void setStrokeEndCaps(int endCaps)
          Sets the end cap style of the shape stroke.
 void setStrokeLineJoins(int lineJoins)
          Sets the line join style of the shape stroke.
 void setStrokeMiterLimit(float miterLimit)
          Sets the miter limit of the shape stroke.
 void setStrokeWidth(float width)
          Sets the width of the shape stroke (that is, the border).
 void setTruncatedLabelSuffix(String suffix)
          Sets the string that is appended to the label when it is truncated to fit in the shape's width.
 void setUseIlvText(boolean useIlvText)
          Specifies whether the label of the general node will be an IlvText or an IlvZoomableLabel.
static void setUseIlvTextDefault(boolean useIlvText)
          Changes the default value of the "use IlvText" flag.
 void setVerticalAutoResizeMargin(float margin)
          Sets the margin that is left on both sides of the shape when it is auto-resized vertically.
 void setVerticalAutoResizeMode(int mode)
          Sets the vertical auto-resize mode.
 void setWordWrapChars(String chars)
          Specifies which characters allow wordwrapping when the label is implemented using IlvZoomableLabel objects.
 void setWordWrapMargin(float margin)
          Deprecated. Since JViews 5.5, this method is renamed into setLabelMargin(float).
 void setWordWrapMode(boolean wrap)
          Deprecated. Since JViews 5.5, this method is replaced by setLabelMode(int).
 boolean supportMultiline()
          Implementation of IlvLabelInterface.
 void updateLabelingModel(IlvSDMEngine engine, IlvAnnealingLabelLayout layout, ilog.views.sdm.internal.labellayout.IlvSDMLabelingModel model, Object node, IlvGraphic graphic)
          You should not call this method.
 void write(IlvOutputStream stream)
          Writes this general node to an output stream.
 boolean zoomable()
          The general node is zoomable if and only if the label is zoomable, so this method returns the value of isLabelZoomable().
 
Methods inherited from class ilog.views.graphic.IlvGraphicSet
addGraphicBagHierarchyListener, addManagerViewsHierarchyListener, addObject, addObjectAt, applyToObject, contains, contains, draw, enableGraphicBagHierarchyEventForwarding, enableManagerViewsHierarchyEventForwarding, fireGraphicBagHierarchyEvent, fireManagerViewsHierarchyEvent, firstContains, getAlpha, getCardinal, getClip, getIndex, getIntersectionWithOutline, getObject, getObject, getObjectName, getObjects, getOriginalPopupMenu, getPopupMenu, getToolTipText, isPersistent, moveObject, needsGraphicBagHierarchyEvent, needsManagerViewsHierarchyEvent, reDrawObj, reDrawRegion, removeAll, removeGraphicBagHierarchyListener, removeManagerViewsHierarchyListener, removeObject, removeObjectAt, reshapeObject, setAlpha, setClip, setGraphicBag, setObjectName
 
Methods inherited from class ilog.views.IlvGraphic
addActionListener, addNamedPropertyListener, boundingBox, getAndAssociateObjectInteractor, getCenter, getDefaultInteractor, getGraphicBag, GetGraphicObject, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenuName, getProperty, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, hasProperty, inside, intersects, isDataFlavorSupported, isEditable, isInApplyToObject, isMovable, isSelectable, isVisible, makeSelection, move, move, notifyObjectInteractorToManager, processActionEvent, reDraw, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setEditable, setFillOn, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipText, setVisible, toString, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ilog.views.IlvGraphicBag
getGraphicBag
 

Field Detail

CUSTOM

public static final int CUSTOM
The shape type for a custom shape.

See Also:
setShapeType(int), Constant Field Values

RECTANGLE

public static final int RECTANGLE
The shape type for a rectangle.

See Also:
setShapeType(int), Constant Field Values

ROUND_RECTANGLE

public static final int ROUND_RECTANGLE
The shape type for a rectangle with rounded corners.

See Also:
setShapeType(int), Constant Field Values

ELLIPSE

public static final int ELLIPSE
The shape type for an ellipse.

See Also:
setShapeType(int), Constant Field Values

DIAMOND

public static final int DIAMOND
The shape type for a diamond.

See Also:
setShapeType(int), Constant Field Values

TRIANGLE_UP

public static final int TRIANGLE_UP
The shape type for a triangle pointing up.

See Also:
setShapeType(int), Constant Field Values

TRIANGLE_DOWN

public static final int TRIANGLE_DOWN
The shape type for a triangle pointing down.

See Also:
setShapeType(int), Constant Field Values

TRIANGLE_LEFT

public static final int TRIANGLE_LEFT
The shape type for a triangle pointing left.

See Also:
setShapeType(int), Constant Field Values

TRIANGLE_RIGHT

public static final int TRIANGLE_RIGHT
The shape type for a triangle pointing right.

See Also:
setShapeType(int), Constant Field Values

MARKER

public static final int MARKER
The shape type for a marker (a cross).

See Also:
setShapeType(int), Constant Field Values

NO_AUTO_RESIZE

public static final int NO_AUTO_RESIZE
The auto-resize policy that does not allow the general node shape to be resized at all.

See Also:
setHorizontalAutoResizeMode(int), setVerticalAutoResizeMode(int), Constant Field Values

EXPAND_ONLY

public static final int EXPAND_ONLY
The auto-resize policy that allows the general node shape to be expanded to fit the labels or icon but not to be shrunk.

See Also:
setHorizontalAutoResizeMode(int), setVerticalAutoResizeMode(int), Constant Field Values

SHRINK_ONLY

public static final int SHRINK_ONLY
The auto-resize policy that allows the general node shape to be shrunk to fit the labels or icon but not to be expanded.

See Also:
setHorizontalAutoResizeMode(int), setVerticalAutoResizeMode(int), Constant Field Values

EXPAND_OR_SHRINK

public static final int EXPAND_OR_SHRINK
The auto-resize policy that allows the general node shape to be expanded or shrunk to fit the labels or icon.

See Also:
setHorizontalAutoResizeMode(int), setVerticalAutoResizeMode(int), Constant Field Values

NO_FILL

public static final int NO_FILL
The paint style is transparent.

See Also:
setFillStyle(int), Constant Field Values

SOLID_COLOR

public static final int SOLID_COLOR
The paint style that fills a shape with a solid color.

See Also:
setFillStyle(int), Constant Field Values

LINEAR_GRADIENT

public static final int LINEAR_GRADIENT
The paint style that fills the shape with a linear gradient.

See Also:
setFillStyle(int), Constant Field Values

RADIAL_GRADIENT

public static final int RADIAL_GRADIENT
The paint style that fills the shape with a radial gradient.

See Also:
setFillStyle(int), Constant Field Values

TEXTURE

public static final int TEXTURE
The paint style that fills the shape with a texture.

See Also:
setFillStyle(int), Constant Field Values

LABEL_UNCHANGED

public static final int LABEL_UNCHANGED
The label mode that leaves the label unchanged.

Since:
JViews 5.5
See Also:
setLabelMode(int), Constant Field Values

WORD_WRAP

public static final int WORD_WRAP
The label mode that spreads the label on multiple lines so that it fits in the width of the shape.

Since:
JViews 5.5
See Also:
setLabelMode(int), Constant Field Values

TRUNCATE

public static final int TRUNCATE
The label mode that truncates the label so that it fits in the width of the shape.

Since:
JViews 5.5
See Also:
setLabelMode(int), Constant Field Values

High_Quality_Icons

public static boolean High_Quality_Icons
Forces setHighQualityRendering(true) on subicons. The default value is true.

Since:
JViews 5.0
See Also:
IlvIcon

shape

protected IlvGraphic shape
The basic shape of the general node.

Since:
JViews 5.5

labels

protected IlvGraphic[] labels
The labels of the general node. There is one label object for each line of the general node's label.

Since:
JViews 5.5

icon

protected IlvGraphic icon
The icon of the general node.

Since:
JViews 5.5

realizeNeeded

protected boolean realizeNeeded
This boolean indicates that a property of the general node has been modified and that the graphic objects must be reconstructed.

Since:
JViews 5.5

layoutNeeded

protected boolean layoutNeeded
This boolean indicates that a property of the general node has been modified and that the layout must be recomputed.

Since:
JViews 5.5
Constructor Detail

IlvGeneralNode

public IlvGeneralNode(IlvRect rect,
                      int shapeType,
                      String label)
Creates a new general node with a predefined shape.

Parameters:
rect - The rectangle defining the shape.
shapeType - The shape type, which must be one of:
label - The label text. If this parameter is null, the node has no label.

IlvGeneralNode

public IlvGeneralNode(IlvRect rect,
                      String label)
Creates a new general node with a rectangular shape.

Parameters:
rect - The rectangle defining the shape.
label - The label text.

IlvGeneralNode

public IlvGeneralNode(IlvRect rect)
Creates a new general node with a rectangular shape.

Parameters:
rect - The rectangle defining the shape.

IlvGeneralNode

public IlvGeneralNode(IlvPoint p,
                      float size,
                      String label)
Creates a new general node with a square shape of a given size.

Parameters:
p - The point defining the center of the square.
size - The square size.
label - The label text.

IlvGeneralNode

public IlvGeneralNode(IlvPoint p,
                      String label)
Creates a new general node with a 20-pixel square shape.

Parameters:
p - The point defining the center of the square.
label - The label text.

IlvGeneralNode

public IlvGeneralNode()
Creates a new general node with a 20-pixel square shape, located in (0,0), and with a default label.


IlvGeneralNode

public IlvGeneralNode(IlvGeneralNode source)
Creates a new general node that is a copy of an existing one.

Parameters:
source - The general node whose contents will be copied to the new general node.

IlvGeneralNode

public IlvGeneralNode(IlvInputStream stream)
               throws IlvReadFileException
Reads a general node from an input stream.

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

copy

public IlvGraphic copy()
Returns a copy of this general node.

Overrides:
copy in class IlvGraphicSet
Returns:
A new general node that is a copy of this one.
See Also:
IlvGraphic

write

public void write(IlvOutputStream stream)
           throws IOException
Writes this general node to an output stream.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvGraphicSet
Parameters:
stream - The output stream.
Throws:
IOException - if a write error occurred.

boundingBox

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

Overrides:
boundingBox in class IlvGraphicSet
Parameters:
t - The transformer used to draw the object.
See Also:
IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer), IlvGraphic.zoomable(), IlvGraphic

zoomable

public boolean zoomable()
The general node is zoomable if and only if the label is zoomable, so this method returns the value of isLabelZoomable().

Overrides:
zoomable in class IlvGraphicSet
See Also:
IlvGraphic, IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer), IlvGraphic.boundingBox(IlvTransformer), IlvManager

moveResize

public void moveResize(IlvRect rect)
Moves and resizes the general node's shape to the specified rectangle.

Note that this may change the bounding rectangle of the node. For this reason, if the node is contained inside a manager, you should modify the node using the applyToObject method of the manager.

Overrides:
moveResize in class IlvGraphic
Parameters:
rect - The new bounding box of the general node's shape.
Since:
JViews 5.5
See Also:
IlvGraphic, IlvGraphic.applyTransform(IlvTransformer)

applyTransform

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

Note that this may change the bounding rectangle of the node. For this reason, if the node is contained inside a manager, you should modify the node using the applyToObject method of the manager.

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

drawCore

protected void drawCore(Graphics2D dst,
                        IlvTransformer t)
Draws the object. This method is called from IlvGraphicSet.draw(java.awt.Graphics, ilog.views.IlvTransformer) after processing the alpha transparency. It can be overridden in subclasses.

Overrides:
drawCore in class IlvGraphicSet
Parameters:
dst - The destination Graphics.
t - The transformation used to draw the object.
Since:
JViews 8.1
See Also:
IlvGraphicSet.setAlpha(float)

realize

protected void realize()
This method creates all the components of the general node. It is called once all the properties have been set, just before the layout is computed.

The realize method first removes all the objects from the graphic set, and re-creates them according to the current properties of the general node. You need to override this method is you want to add new components to the general node.


doLayout

protected void doLayout()
Computes the relative positions and sizes of the different parts of the general node: shape, labels, icon, and decorations. You may need to override this method if you add new graphic objects to the node.


setForeground

public void setForeground(Color c)
Sets the foreground color of the node shape.

Note that this may change the bounding rectangle of the node. For this reason, if the node is contained inside a manager, you should modify the node using the applyToObject method of the manager.

Overrides:
setForeground in class IlvGraphic
Parameters:
c - The new foreground color.
See Also:
IlvGraphic.draw(Graphics, IlvTransformer), IlvGraphic.setBackground(Color), IlvGraphic.setFillOn(boolean), IlvGraphic.setStrokeOn(boolean), IlvGraphic

setBackground

public void setBackground(Color c)
Sets the background color of the node shape.

Note that this may change the bounding rectangle of the node. For this reason, if the node is contained inside a manager, you should modify the node using the applyToObject method of the manager.

Overrides:
setBackground in class IlvGraphic
Parameters:
c - The new