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 98641 - API: Missing vertical labels
Summary: API: Missing vertical labels
Alias: None
Product: platform
Classification: Unclassified
Component: Graph (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: apireviews
Depends on:
Reported: 2007-03-22 13:47 UTC by David Kaspar
Modified: 2007-04-17 22:29 UTC (History)
2 users (show)

See Also:
Exception Reporter:

vertical text widget as it might be used in casa (3.41 KB, application/octet-stream)
2007-03-22 23:36 UTC, Joshua Sandusky
Proposed patch for LabelWidget.orientation property (8.81 KB, application/octet-stream)
2007-03-23 23:19 UTC, David Kaspar

Note You need to log in before you can comment on or make changes to this bug.
Description David Kaspar 2007-03-22 13:47:54 UTC
Currently the LabelWidget is rendering labels horizontally only. Add a support
for vertical labels.
Comment 1 David Kaspar 2007-03-22 13:53:03 UTC
The feature could be implemented by adding a new setter/getter methods for
specifying the rotation.
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
Comment 2 Joelle Lam 2007-03-22 18:53:44 UTC
This is exactly what I need. The reason I need this particular function is so
that I can add a label to an edge.
Comment 3 Joshua Sandusky 2007-03-22 23:34:15 UTC
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.
Comment 4 Joshua Sandusky 2007-03-22 23:36:08 UTC
Created attachment 39848 [details]
vertical text widget as it might be used in casa
Comment 5 David Kaspar 2007-03-23 23:18:16 UTC
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?
Comment 6 David Kaspar 2007-03-23 23:19:11 UTC
Created attachment 39901 [details]
Proposed patch for LabelWidget.orientation property
Comment 7 David Kaspar 2007-04-03 16:14:24 UTC
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.