This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | ConnectionWidget labels constraint should be able to specify the distance relative to the target anchor | ||
---|---|---|---|
Product: | platform | Reporter: | Trey Spiva <tspiva> |
Component: | Graph | Assignee: | Kris Richards <krichard> |
Status: | NEW --- | ||
Severity: | blocker | ||
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 105060 |
Description
Trey Spiva
2008-02-01 22:37:03 UTC
After looking at the code I have discovered that if the distance value is a negative number, that the distance is relative to the target end not the source end. This satisfies my request. The problem is that the Javadoc does not state this feature. The Javadoc says "placementAtDistance - the placement on a path in pixels as a distance from the source anchor". However, when the value is negative, the value is the number of pixels as a distance from the target anchor. In the matter of consistency, should we do the same thing for the percentage? Regarding percentage: The negative-value approach applies only to distance specified with "integer" value. It is due to possibility to express: I want to be placed 20px from the target location -> Then use "-20". For distance specified with "float" value, it is not necessary since you are able to say: I want to be placed 10% from the target location -> Then use "0.9f". Therefore I do not think it is important to have the same approach for "float" value. Additionally it would change semantics of the "setConstraint" method which is incompatible change. |