Index: graph/lib/apichanges.xml
===================================================================
RCS file: /cvs/graph/lib/apichanges.xml,v
retrieving revision 1.21
diff -u -r1.21 apichanges.xml
--- graph/lib/apichanges.xml 8 Jun 2007 08:45:00 -0000 1.21
+++ graph/lib/apichanges.xml 13 Jun 2007 12:49:01 -0000
@@ -299,6 +299,26 @@
+
+
+
+ ConnectionWidget methods has been restricted
+
+
+
+
+
+ From beginning the ConnectionWidget.getTargetAnchorShapeRotation method was meant to be private.
+ Also many getter and setter methods in ConnectionWidget was meant to be final.
+ It had been there by mistake, therefore the getTargetAnchorShapeRotation was removed
+ and getSourceAnchorEntry, getTargetAnchorEntry, getSourceAnchorShape, setSourceAnchorShape,
+ getTargetAnchorShape, setTargetAnchorShape, getControlPointShape, setControlPointShape,
+ getEndPointShape, setEndPointShape, getControlPoints, getControlPoint, setControlPoints,
+ setConstraint, setConstraint, removeConstraint methods of the ConnectionWidget class were made final.
+
+
+
+
Index: graph/lib/manifest.mf
===================================================================
RCS file: /cvs/graph/lib/manifest.mf,v
retrieving revision 1.12
diff -u -r1.12 manifest.mf
--- graph/lib/manifest.mf 8 Jun 2007 08:02:48 -0000 1.12
+++ graph/lib/manifest.mf 13 Jun 2007 12:49:01 -0000
@@ -1,4 +1,4 @@
Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.api.visual
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/visual/resources/Bundle.properties
-OpenIDE-Module-Specification-Version: 2.4
+OpenIDE-Module-Specification-Version: 2.5
Index: graph/lib/src/org/netbeans/api/visual/widget/ConnectionWidget.java
===================================================================
RCS file: /cvs/graph/lib/src/org/netbeans/api/visual/widget/ConnectionWidget.java,v
retrieving revision 1.38
diff -u -r1.38 ConnectionWidget.java
--- graph/lib/src/org/netbeans/api/visual/widget/ConnectionWidget.java 5 Jun 2007 08:41:01 -0000 1.38
+++ graph/lib/src/org/netbeans/api/visual/widget/ConnectionWidget.java 13 Jun 2007 12:49:01 -0000
@@ -227,7 +227,7 @@
* Returns an anchor entry representing the source of the connection widget.
* @return the anchor entry representing the source of the connection widget
*/
- public Anchor.Entry getSourceAnchorEntry () {
+ public final Anchor.Entry getSourceAnchorEntry () {
return sourceEntry;
}
@@ -235,7 +235,7 @@
* Returns an anchor entry representing the target of the connection widget.
* @return the anchor entry representing the target of the connection widget
*/
- public Anchor.Entry getTargetAnchorEntry () {
+ public final Anchor.Entry getTargetAnchorEntry () {
return targetEntry;
}
@@ -243,7 +243,7 @@
* Returns an anchor shape of the source of the connection widget.
* @return the source anchor shape
*/
- public AnchorShape getSourceAnchorShape () {
+ public final AnchorShape getSourceAnchorShape () {
return sourceAnchorShape;
}
@@ -251,7 +251,7 @@
* Sets the anchor shape of the source of the connection widget.
* @param sourceAnchorShape the source anchor shape
*/
- public void setSourceAnchorShape (AnchorShape sourceAnchorShape) {
+ public final void setSourceAnchorShape (AnchorShape sourceAnchorShape) {
assert sourceAnchorShape != null;
boolean repaintOnly = this.sourceAnchorShape.getRadius () == sourceAnchorShape.getRadius ();
this.sourceAnchorShape = sourceAnchorShape;
@@ -262,7 +262,7 @@
* Returns an anchor shape of the target of the connection widget.
* @return the target anchor shape
*/
- public AnchorShape getTargetAnchorShape () {
+ public final AnchorShape getTargetAnchorShape () {
return targetAnchorShape;
}
@@ -270,7 +270,7 @@
* Sets the anchor shape of the target of the connection widget.
* @param targetAnchorShape the target anchor shape
*/
- public void setTargetAnchorShape (AnchorShape targetAnchorShape) {
+ public final void setTargetAnchorShape (AnchorShape targetAnchorShape) {
assert targetAnchorShape != null;
boolean repaintOnly = this.targetAnchorShape.getRadius () == targetAnchorShape.getRadius ();
this.targetAnchorShape = targetAnchorShape;
@@ -281,7 +281,7 @@
* Returns a point shape of control points of the connection widget.
* @return the control points shape
*/
- public PointShape getControlPointShape () {
+ public final PointShape getControlPointShape () {
return controlPointShape;
}
@@ -289,7 +289,7 @@
* Sets a point shape of control points of the connection widget.
* @param controlPointShape the control points shape
*/
- public void setControlPointShape (PointShape controlPointShape) {
+ public final void setControlPointShape (PointShape controlPointShape) {
assert controlPointShape != null;
boolean repaintOnly = this.controlPointShape.getRadius () == controlPointShape.getRadius ();
this.controlPointShape = controlPointShape;
@@ -300,7 +300,7 @@
* Returns a point shape of end points of the connection widget.
* @return the end points shape
*/
- public PointShape getEndPointShape () {
+ public final PointShape getEndPointShape () {
return endPointShape;
}
@@ -308,7 +308,7 @@
* Sets a point shape of end points of the connection widget.
* @param endPointShape the end points shape
*/
- public void setEndPointShape (PointShape endPointShape) {
+ public final void setEndPointShape (PointShape endPointShape) {
assert endPointShape != null;
boolean repaintOnly = this.endPointShape.getRadius () == endPointShape.getRadius ();
this.endPointShape = endPointShape;
@@ -336,17 +336,16 @@
* Returns a list of control points.
* @return the list of control points
*/
- public List getControlPoints () {
+ public final List getControlPoints () {
return controlPointsUm;
}
/**
* Returns a location of control point at the specified index in the list of control points.
- *
* @param index index of the control point to return
* @return the point; null if the control point does not exist
*/
- public Point getControlPoint (int index) {
+ public final Point getControlPoint (int index) {
if (index < 0 && index >= controlPoints.size ())
return null;
return new Point (controlPoints.get(index));
@@ -358,7 +357,7 @@
* @param sceneLocations if true, then controlPoints argyment is taken as a list of scene locations;
* if false, then controlPoints argument is taken as a list of local locations
*/
- public void setControlPoints (Collection controlPoints, boolean sceneLocations) {
+ public final void setControlPoints (Collection controlPoints, boolean sceneLocations) {
if (sceneLocations) {
Point translation = this.convertLocalToScene (new Point ());
ArrayList list = new ArrayList ();
@@ -378,7 +377,7 @@
* @param alignment the alignment specified relatively to the origin point
* @param placementInPercentage the placement on a path in percentage of the path length
*/
- public void setConstraint (Widget childWidget, LayoutFactory.ConnectionWidgetLayoutAlignment alignment, float placementInPercentage) {
+ public final void setConstraint (Widget childWidget, LayoutFactory.ConnectionWidgetLayoutAlignment alignment, float placementInPercentage) {
connectionWidgetLayout.setConstraint (childWidget, alignment, placementInPercentage);
}
@@ -388,7 +387,7 @@
* @param alignment the alignment specified relatively to the origin point
* @param placementAtDistance the placement on a path in pixels as a distance from the source anchor
*/
- public void setConstraint (Widget childWidget, LayoutFactory.ConnectionWidgetLayoutAlignment alignment, int placementAtDistance) {
+ public final void setConstraint (Widget childWidget, LayoutFactory.ConnectionWidgetLayoutAlignment alignment, int placementAtDistance) {
connectionWidgetLayout.setConstraint (childWidget, alignment, placementAtDistance);
}
@@ -396,7 +395,7 @@
* Removes a constraint for a child widget.
* @param childWidget the child widget
*/
- public void removeConstraint (Widget childWidget) {
+ public final void removeConstraint (Widget childWidget) {
connectionWidgetLayout.removeConstraint (childWidget);
}
@@ -514,7 +513,7 @@
* Returns the rotation of the target anchor shape.
* @return the target anchor shape rotation
*/
- public double getTargetAnchorShapeRotation () {
+ private double getTargetAnchorShapeRotation () {
int size = controlPoints.size ();
if (size <= 1)
return 0.0;
Index: graph/lib/src/org/netbeans/api/visual/widget/FreeConnectionWidget.java
===================================================================
RCS file: /cvs/graph/lib/src/org/netbeans/api/visual/widget/FreeConnectionWidget.java,v
retrieving revision 1.9
diff -u -r1.9 FreeConnectionWidget.java
--- graph/lib/src/org/netbeans/api/visual/widget/FreeConnectionWidget.java 9 Mar 2007 14:31:05 -0000 1.9
+++ graph/lib/src/org/netbeans/api/visual/widget/FreeConnectionWidget.java 13 Jun 2007 12:49:01 -0000
@@ -21,7 +21,6 @@
import java.awt.*;
import java.awt.geom.Line2D;
import java.util.ArrayList;
-import java.util.List;
/**
* This class is an extension of the ConnectionWidget. Primarily it is used with FreeRouter and optionally Free*Anchor.
@@ -85,18 +84,6 @@
}
}
return false;
- }
-
- /**
- * Returns a control point at a specific index.
- * @param index the index in the list of control points
- * @return the control point at specified index; null, if the connection widget does not have control points
- * @throws ArrayIndexOutOfBoundsException when index is out of bounds
- */
- public Point getControlPoint (int index) {
- List controlPoints=getControlPoints();
- if (controlPoints.size () <= 0) return null;
- return new Point (controlPoints.get (index));
}
/**