It could - we do something similar in TerraTabPaneSkin to rotate the buttons.
I'm just saying I don't think it is worth the effort. Separator is more like a
one-dimensional Border. There are other (simpler) ways to get vertical divider
lines.
On Sep 10, 2010, at 3:38 PM, Chris Bartlett wrote:
> But could the rotation code be part of the Separator component's
> paint/layout/'whatever magic happens when painting' code?
>
> paint() {
>
> if (orientation = VERTICAL) {
> // Swap the width & height values for the purposed of painting
> // ie, 20x100 would be painted horizontally within the bounds of
> 100x20
> }
>
> // Draw the component horizontally as normal, but to an image/buffer
> rather than the GUI
>
> if (orientation = VERTICAL) {
> // Rotate and possibly re-align the previously rendered image
> }
>
> // Paint the image to the GUI
> }
>
> On 11 September 2010 02:26, Greg Brown <[email protected]> wrote:
> Good idea, but it wouldn't work. Decorators don't change the bounds of a
> component. They only augment its appearance.
>
> On Sep 10, 2010, at 3:22 PM, Chris Bartlett wrote:
>
>>
>> On 10 September 2010 19:05, Greg Brown <[email protected]> wrote:
>> I was actually thinking that a new BoxPane.Divider class might be a better
>> way to go. Separator has a "title" property that would be hard to support in
>> a vertical orientation. Divider could simply mirror the orientation of the
>> containing box pane.
>>
>> Is it worth considering using some sort of rotation decorator that would
>> rotate a horizontal Separator, including any title property +/- 90 degrees
>> to create a vertical one?
>>
>> Chris
>>
>
>