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: | API: Missing vertical labels | ||
---|---|---|---|
Product: | platform | Reporter: | David Kaspar <dkaspar> |
Component: | Graph | Assignee: | apireviews <apireviews> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | joellelam, jsandusky |
Priority: | P3 | Keywords: | API_REVIEW_FAST |
Version: | 3.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: |
vertical text widget as it might be used in casa
Proposed patch for LabelWidget.orientation property |
Description
David Kaspar
2007-03-22 13:47:54 UTC
The feature could be implemented by adding a new setter/getter methods for specifying the rotation. E.g.: LabelWidget.Rotation LabelWidget.setRotation(LabelWidget.Rotation rotation); LabelWidget.Rotation LabelWidget.getRotation(); LabelWidget.Rotation is an enum with HORIZONTAL (default value), VERTICAL values. Joelle, does it suit to your requirements? Or is it necessary to support even HORIZONTAL_MIRROR, VERTICAL_MIRROR values? This is exactly what I need. The reason I need this particular function is so that I can add a label to an edge. The Service Assembly editor (CASA) in the Enterprise Pack could use this functionality as well. Currently, we generate our own custom buffered image with rotated text, but a widget that does this automatically would of course be quite nice. See attached images for an example. Created attachment 39848 [details]
vertical text widget as it might be used in casa
Setting the issue for fast API review. The patch is attached. The patch does not contain diff of documentation and the source code of test.label.LabelOrientationTest class. The patch support NORMAL and ROTATE_270 orientations only. Later there could be other orientations implemented (will not be included in current change). Yardo, from backward API-compatibility do you think that it would be better to define all (even unsupported) "LabelWidget.Orientation" enum values and the "LabelWidget.setOrientation" will thow "UnsupportedOperationException" while an unsupported value is used? Or should I use the current patch only where only supported orientations are used? Created attachment 39901 [details]
Proposed patch for LabelWidget.orientation property
Implemented by adding LabelWidget.orientation property. Horizontal and vertical labels supported. Spec. number increated to 2.1. test.label.LabelOrientationTest example added. apichanges.LabelOrientationTest automated test added. |