|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.IlvGraphic
ilog.views.IlvLinkImage
ilog.views.gantt.graphic.IlvConstraintGraphic
public class IlvConstraintGraphic
The IlvConstraintGraphic class is used to represent constraints in an IlvGanttSheet.
| Field Summary | |
|---|---|
static int |
BOUNDING_BOX_CONNECTION
Indicates whether the link points should be computed from the bounding boxes of the associated activity graphics. |
static float |
DEFAULT_HORIZONTAL_EXTREMITY_SEGMENT_LENGTH
Defines the default length of fixed horizontal segments of the link in view pixels. |
static float |
DEFAULT_VERTICAL_EXTREMITY_SEGMENT_LENGTH
Defines the default length of fixed vertical segments of the link. |
static int |
TIME_INTERVAL_CONNECTION
Indicates whether the link points should be computed from the time intervals of the associated activities. |
| Constructor Summary | |
|---|---|
IlvConstraintGraphic()
Creates an IlvConstraintGraphic. |
|
IlvConstraintGraphic(IlvActivityGraphic from,
IlvActivityGraphic to,
IlvConstraint constraint)
Creates an IlvConstraintGraphic. |
|
| Method Summary | |
|---|---|
boolean |
allowsPointInsertion()
Indicates whether insertion of intermediate points is allowed. |
boolean |
allowsPointRemoval()
Indicates whether removal of intermediate points is allowed. |
IlvGraphic |
copy()
Copies the object. |
void |
draw(Graphics dst,
IlvTransformer t)
Overrides the draw method so that if one of the associated nodes is not
visible then this function will not draw the link. |
float |
getArrowSize()
Returns the size of the arrow in view coordinates. |
protected float |
getArrowSize(float lineWidth,
IlvTransformer t)
Returns the size of the arrow for the corresponding IlvTransformer and
lineWidth. |
void |
getConnectionPoints(IlvPoint src,
IlvPoint dst,
IlvTransformer t)
Computes the origin and destination points to draw the link. |
int |
getConnectionType()
Returns the link connection type. |
IlvConstraint |
getConstraint()
Returns the associated constraint of the graphic. |
float |
getHorizontalExtremitySegmentLength()
Returns the length of fixed horizontal segments of the link in view pixels. |
IlvPoint[] |
getLinkPoints(IlvTransformer t)
Returns the points that define the shape of the link. |
IlvPoint |
getPointAt(int index,
IlvTransformer t)
Returns the point at a specified index. |
int |
getPointsCardinal()
Returns the number of editable points. |
JPopupMenu |
getPopupMenu(IlvPoint p,
IlvTransformer t,
IlvManagerView view,
IlvPopupMenuManager popupManager)
Returns the Swing popup menu to display when the popup menu is triggered while the mouse pointer is at a specified location inside the constraint graphic object. |
String |
getToolTipText(IlvPoint p,
IlvTransformer t)
Returns the tool tip text to display when the mouse pointer is at a specified location inside the constraint graphic. |
boolean |
isVisible()
Returns true if the link is visible. |
IlvSelection |
makeSelection()
Creates a selection object for the constraint graphic. |
void |
setArrowSize(float arrowSize)
Sets the size of the arrow in view coordinates. |
void |
setConnectionType(int type)
Sets the link connection type. |
void |
setConstraint(IlvConstraint constraint)
Sets the associated constraint of the graphic. |
void |
setHorizontalExtremitySegmentLength(float length)
Sets the length of fixed horizontal segments of the link in view pixels. |
boolean |
zoomable()
Returns true if the object is zoomable, and false
otherwise. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final float DEFAULT_HORIZONTAL_EXTREMITY_SEGMENT_LENGTH
getHorizontalExtremitySegmentLength(),
setHorizontalExtremitySegmentLength(float),
Constant Field Valuespublic static final float DEFAULT_VERTICAL_EXTREMITY_SEGMENT_LENGTH
public static final int TIME_INTERVAL_CONNECTION
getConnectionType(),
setConnectionType(int),
Constant Field Valuespublic static final int BOUNDING_BOX_CONNECTION
getConnectionType(),
setConnectionType(int),
Constant Field Values| Constructor Detail |
|---|
public IlvConstraintGraphic()
IlvConstraintGraphic. A constraint graphic that is created
with this constructor can only be used to replace an existing constraint graphic in the Gantt sheet.
public IlvConstraintGraphic(IlvActivityGraphic from,
IlvActivityGraphic to,
IlvConstraint constraint)
IlvConstraintGraphic.
from - The activity graphic from which the link
starts.to - The activity graphic to which the link
points.constraint - Defines the type of the link.| Method Detail |
|---|
public IlvConstraint getConstraint()
constraint of the graphic.
public void setConstraint(IlvConstraint constraint)
constraint of the graphic.
constraint - The constraint.public float getHorizontalExtremitySegmentLength()
setHorizontalExtremitySegmentLength(float)public void setHorizontalExtremitySegmentLength(float length)
getHorizontalExtremitySegmentLength()
public void getConnectionPoints(IlvPoint src,
IlvPoint dst,
IlvTransformer t)
getConnectionPoints in class IlvLinkImagesrc - A point to store the origin.dst - A point to store the destination.t - The transformer used to draw the link.IlvLinkConnector.getConnectionPoint(ilog.views.IlvLinkImage, boolean, ilog.views.IlvTransformer)public int getPointsCardinal()
getPointsCardinal in interface IlvPolyPointsInterfacegetPointsCardinal in class IlvLinkImage
public IlvPoint getPointAt(int index,
IlvTransformer t)
index are 0 or
1 because the object defines a polypoint of 2 points even if the method
getLinkPoints returns more than 2 points. This is because only the
extremity points are to be edited.
getPointAt in interface IlvPolyPointsInterfacegetPointAt in class IlvLinkImageindex - The index of the point.t - The transformer through which the object is drawn.public IlvPoint[] getLinkPoints(IlvTransformer t)
This method calls the getConnectionPoints member function to compute the
points. It may return 2, 4, or 6 points depending on the position of the two
connected activity graphics.
getLinkPoints in class IlvLinkImage
public void draw(Graphics dst,
IlvTransformer t)
draw method so that if one of the associated nodes is not
visible then this function will not draw the link.
draw in class IlvLinkImagedst - The destination Graphics.t - The transformation used to draw the object.IlvGraphic.boundingBox(ilog.views.IlvTransformer),
IlvGraphic.zoomable(),
IlvGraphicpublic boolean allowsPointInsertion()
false.
allowsPointInsertion in interface IlvPolyPointsInterfaceallowsPointInsertion in class IlvLinkImagetrue if the insertion of intermediate points is
allowed and false otherwise.IlvLinkImage.insertPoint(int, float, float, ilog.views.IlvTransformer)public boolean allowsPointRemoval()
false.
allowsPointRemoval in interface IlvPolyPointsInterfaceallowsPointRemoval in class IlvLinkImagetrue if the removal of intermediate points is
allowed and false otherwise.IlvLinkImage.removePoint(int, ilog.views.IlvTransformer)public boolean isVisible()
true if the link is visible. The link is considered not visible
if one of the associated nodes is not visible.
isVisible in class IlvGraphictrue if this graphic object is visible.IlvGraphic.setVisible(boolean),
IlvGraphic.setSelectable(boolean),
IlvGraphic.setMovable(boolean),
IlvGraphic.setEditable(boolean)public boolean zoomable()
true if the object is zoomable, and false
otherwise. Constraint links are non-zoomable and this method always returns
false.
zoomable in class IlvLinkImageIlvGraphic.zoomable(),
IlvLinkConnector.zoomable()
protected float getArrowSize(float lineWidth,
IlvTransformer t)
IlvTransformer and
lineWidth. This implementation calls getArrowSize(). If you
have set a size by calling the setArrowSize(float) method, then that size is
returned. Otherwise, a value proportional to the horizontalExtremitySegmentLength: horizontalExtremitySegmentLength/3 is
returned. Since this method returns a size that is not proportional to the
transformer zoom factor, the zoomable() method returns false.
getArrowSize in class IlvLinkImagelineWidth - The line width in manager coordinates used to draw the object. This
implementation ignores this parameter.t - The transformer used to draw the object. This implementation ignores
this parameter.
t
and lineWidth.IlvLinkImage.getLineWidth()public float getArrowSize()
setArrowSize(float) method, then that size is returned. Otherwise, this
implementation returns a value proportional to the horizontalExtremitySegmentLength:
horizontalExtremitySegmentLength/3.
getArrowSize(float,IlvTransformer)public void setArrowSize(float arrowSize)
horizontalExtremitySegmentLength: horizontalExtremitySegmentLength/3.
arrowSize - The arrow size in view coordinates.getArrowSize()public int getConnectionType()
TIME_INTERVAL_CONNECTION.
TIME_INTERVAL_CONNECTION if the link points are computed from the
time intervals of the associated activities or BOUNDING_BOX_CONNECTION if the link points are computed from the bounding
boxes of the associated activity graphics.setConnectionType(int)public void setConnectionType(int type)
type - The connection type. The value must be either TIME_INTERVAL_CONNECTION, to indicate that the link points are computed
from the time intervals of the associated activities, or BOUNDING_BOX_CONNECTION, to indicate that the link points are computed
from the bounding boxes of the associated activity graphics.getConnectionType()public IlvSelection makeSelection()
IlvLinkImageSelection.
makeSelection in class IlvLinkImageIlvLinkImageSelection
public String getToolTipText(IlvPoint p,
IlvTransformer t)
IlvGraphic.setToolTipText(String) method, then that string is returned.
Otherwise, this method returns a default HTML string that contains the type of the
constraint, the name of the constraint's "from" activity, and the name of the
constraint's "to" activity on separate lines.
getToolTipText in class IlvGraphicp - The location of the mouse (in view coordinates).t - The transformer of the manager view in which the tool tip is about to be
displayed.
p for transformation
t, or null if no tool tip should be displayed.IlvGraphic,
IlvGraphic.getToolTipText(),
IlvGraphic.setToolTipText(String)
public JPopupMenu getPopupMenu(IlvPoint p,
IlvTransformer t,
IlvManagerView view,
IlvPopupMenuManager popupManager)
This method can return null to turn off the popup menu for the
constraint graphic object.
Note that you must enable the popup menu mechanism for the manager view by calling
the method IlvGanttSheet.setPopupMenusEnabled(boolean).
getPopupMenu in class IlvGraphicp - The location of the mouse (in view coordinates).t - The transformer that converts the coordinate system of this
object (the manager coordinates) into the coordinate system of
the manager view in which the tool tip is about to be displayed
(the view coordinates).view - The manager view that triggered the popup menu.popupManager - The popup menu manager.
null.IlvGraphic,
IlvPopupMenuManager.registerView(ilog.views.IlvManagerView),
IlvGraphic.getPopupMenu()public IlvGraphic copy()
IlvConstraintGraphic cannot be copied
with the copy method. This method returns null.
copy in class IlvLinkImageIlvGraphic instance.IlvGraphic
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||