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.

Bug 98307 - API: Missing Widget parameter in Border.paint method
Summary: API: Missing Widget parameter in Border.paint method
Alias: None
Product: platform
Classification: Unclassified
Component: Graph (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: apireviews
Depends on:
Reported: 2007-03-20 11:41 UTC by David Kaspar
Modified: 2007-04-03 18:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

Proposed patch for introducing Widget.paintBorder method (2.25 KB, patch)
2007-03-20 11:45 UTC, David Kaspar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kaspar 2007-03-20 11:41:44 UTC
In the API the border painting is independent on a widget where a border is

The best solution would be to pass related-widget as an additional argument to a
Border.paint method.
Unforunately Border is an interface and therefore it would introduce
backward-incompatible change.

Therefore there is another proposal for API change:
Widget.paintBorder method is introduced with implementation:
border.paint (getGraphics (), bounds)

This is backward compatible. Later we can create a new WidgetBorder interface
with the "widget" parameter in its paint method.

More details:
Comment 1 David Kaspar 2007-03-20 11:45:19 UTC
Created attachment 39683 [details]
Proposed patch for introducing Widget.paintBorder method
Comment 2 Jan Lahoda 2007-03-20 13:16:12 UTC
Two notes:
-please increment spec version of the library (so that clients can depend on the
enhanced version of the library), use @since tag in the javadoc
-this change is IMO not compatible: if a custom Widget subclass defined "private
void paintBorder () {}" it will not be compilable
Comment 3 David Kaspar 2007-03-20 14:12:03 UTC
I agree that it is not 100% compatible.

Another solution could be to introduce WidgetBorder abstract class (derived from
Border) with additional paint method parameter.
Comment 4 Jaroslav Tulach 2007-03-20 20:17:21 UTC
Actually the change in 100% binary compatible. It is not source compatible. But source 
compatibility is unachievable anyway if the API gets modified from time to time...

I am big fan of final classes, but as this API looks like it looks, we'll probably have to live 
ocational method additions. Definitely it is ok until first official release - e.g. before 6.0.

Y01 Write test.
Y02 Increment spec version
Y03 Put note to apichanges.xml

Comment 5 David Kaspar 2007-04-03 18:01:23 UTC
The API change has been integrated:
Widget.paintBorder method has been introduced.
apichanges.WidgetPaintBorderTest visual test added.