You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by lello <rb...@gmail.com> on 2011/04/05 09:52:10 UTC
TabPane corner and button style
Hi all,
this is a double question/problem:
First: I am trying to use the "corner" component of a tabpane to display a
menubutton. However I noticed that if I open a large number of tabs, the
corner component gets hidden by the tabs, is this a bug?
Second: is it possible to have all the tab buttons with the same size?
Thanks,
Lello
--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2778983.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by lello <rb...@gmail.com>.
Greg Brown-2 wrote:
>
> Via a JIRA ticket.
>
Could you please check the ticket I have just created?
--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2785526.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by Greg Brown <gk...@verizon.net>.
Via a JIRA ticket.
On Apr 6, 2011, at 10:51 AM, lello wrote:
> Ok, I have the patch how do I submit it?
>
>
> Greg Brown-2 wrote:
>>
>> I think it is worth exploring the possibility of changing tab pane to work
>> as you describe (where the corner's preferred size is not ignored).
>>
>> On Apr 6, 2011, at 9:28 AM, lello wrote:
>>
>>> Do you mean a patch with my fixes or with the getButtonPanorama() method?
>>>
>>>
>>> Greg Brown-2 wrote:
>>>>
>>>> OK. So it seems like buttonPanorama should probably be protected instead
>>>> of private. Alternatively, maybe you could just fix the existing
>>>> TerraTabPaneSkin and submit a patch?
>>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2784957.html
>>> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
>>
>
>
> --
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2785302.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by lello <rb...@gmail.com>.
Ok, I have the patch how do I submit it?
Greg Brown-2 wrote:
>
> I think it is worth exploring the possibility of changing tab pane to work
> as you describe (where the corner's preferred size is not ignored).
>
> On Apr 6, 2011, at 9:28 AM, lello wrote:
>
>> Do you mean a patch with my fixes or with the getButtonPanorama() method?
>>
>>
>> Greg Brown-2 wrote:
>>>
>>> OK. So it seems like buttonPanorama should probably be protected instead
>>> of private. Alternatively, maybe you could just fix the existing
>>> TerraTabPaneSkin and submit a patch?
>>>
>>
>>
>> --
>> View this message in context:
>> http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2784957.html
>> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
>
--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2785302.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by Greg Brown <gk...@verizon.net>.
I think it is worth exploring the possibility of changing tab pane to work as you describe (where the corner's preferred size is not ignored).
On Apr 6, 2011, at 9:28 AM, lello wrote:
> Do you mean a patch with my fixes or with the getButtonPanorama() method?
>
>
> Greg Brown-2 wrote:
>>
>> OK. So it seems like buttonPanorama should probably be protected instead
>> of private. Alternatively, maybe you could just fix the existing
>> TerraTabPaneSkin and submit a patch?
>>
>
>
> --
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2784957.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by lello <rb...@gmail.com>.
Do you mean a patch with my fixes or with the getButtonPanorama() method?
Greg Brown-2 wrote:
>
> OK. So it seems like buttonPanorama should probably be protected instead
> of private. Alternatively, maybe you could just fix the existing
> TerraTabPaneSkin and submit a patch?
>
--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2784957.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by Greg Brown <gk...@verizon.net>.
OK. So it seems like buttonPanorama should probably be protected instead of private. Alternatively, maybe you could just fix the existing TerraTabPaneSkin and submit a patch?
On Apr 6, 2011, at 8:08 AM, lello wrote:
> I need to access buttonPanorama because layout() calls
>
> buttonPanorama.setLocation() and
> buttonPanorama.setSize()
>
>
>
> Greg Brown-2 wrote:
>>
>> Why do you need access to the button panorama? Maybe there is another way
>> to solve your problem?
>>
>> On Apr 6, 2011, at 6:26 AM, lello wrote:
>>
>>> Again my mistake.
>>> The width of the corner component is perfect.
>>> Now the only open question is how to avoid introducing a
>>> getButtonPanorma()
>>> method
>>> in the TerraTabPaneSkin. (apart from copying the entire skin and then
>>> modify
>>> it accordingly).
>>>
>>>
>>>
>>> lello wrote:
>>>>
>>>> Sorry I gave a wrong information,
>>>> the right arrow is not hidden, it's there. So the only problem is the
>>>> size
>>>> of the corner component
>>>> which is almost the double of its actual component, and of course the
>>>> fact
>>>> that I had to add
>>>> a new method to the basic skin, unless I want to copy/rewrite the entire
>>>> skin.
>>>>
>>>>
>>>> lello wrote:
>>>>>
>>>>> Unfortunately the problem is not so simple to solve.
>>>>>
>>>>> First, I have modified TerraTabPaneSkin adding a getButtonPanorama()
>>>>> method,
>>>>> as I need to access the buttonPanorama.
>>>>> Second, following your suggestion I used the code:
>>>>>
>>>>> int cornerWidth = corner.getPreferredSize().width;
>>>>> int buttonPanoramaWidth = width - cornerWidth;
>>>>>
>>>>> The final layout is a bit weird, with a very large area for the corner
>>>>> component, and,
>>>>> furthermore, I loose the right arrow which allows me to move along the
>>>>> opened tabs
>>>>> (the arrow that appears when you have completely filled the width of
>>>>> the
>>>>> tabPane).
>>>>>
>>>>> Do you think it is possible to change the design of the basic
>>>>> TerraTabPaneSkin to meet the
>>>>> requirement that the corner component should never be hidden?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Greg Brown-2 wrote:
>>>>>>
>>>>>>>>> First: I am trying to use the "corner" component of a tabpane to
>>>>>>>>> display
>>>>>>>>> a
>>>>>>>>> menubutton. However I noticed that if I open a large number of
>>>>>>>>> tabs,
>>>>>>>>> the
>>>>>>>>> corner component gets hidden by the tabs, is this a bug?
>>>>>>>>
>>>>>>>> Possibly. It was originally done this way by design, but that may
>>>>>>>> not
>>>>>>>> have
>>>>>>>> been the right approach.
>>>>>>>>
>>>>>>>
>>>>>>> Could you suggest me a simple way to modify/extend TabPaneSkin so to
>>>>>>> have
>>>>>>> the desired behaviour?
>>>>>>> Or just the functions that I have to override.
>>>>>>
>>>>>> You'll have to modify TerraTabPaneSkin#layout(). The corner width is
>>>>>> currently determined as follows:
>>>>>>
>>>>>> int buttonPanoramaWidth = Math.min(width, buttonPanoramaSize.width);
>>>>>> ...
>>>>>> int cornerWidth = width - buttonPanoramaWidth;
>>>>>>
>>>>>> You'll probably want to calculate the corner width first (by calling
>>>>>> corner.getPreferredSize()) and then calculate the panorama width from
>>>>>> that.
>>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2784447.html
>>> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
>>
>
>
> --
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2784697.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by lello <rb...@gmail.com>.
I need to access buttonPanorama because layout() calls
buttonPanorama.setLocation() and
buttonPanorama.setSize()
Greg Brown-2 wrote:
>
> Why do you need access to the button panorama? Maybe there is another way
> to solve your problem?
>
> On Apr 6, 2011, at 6:26 AM, lello wrote:
>
>> Again my mistake.
>> The width of the corner component is perfect.
>> Now the only open question is how to avoid introducing a
>> getButtonPanorma()
>> method
>> in the TerraTabPaneSkin. (apart from copying the entire skin and then
>> modify
>> it accordingly).
>>
>>
>>
>> lello wrote:
>>>
>>> Sorry I gave a wrong information,
>>> the right arrow is not hidden, it's there. So the only problem is the
>>> size
>>> of the corner component
>>> which is almost the double of its actual component, and of course the
>>> fact
>>> that I had to add
>>> a new method to the basic skin, unless I want to copy/rewrite the entire
>>> skin.
>>>
>>>
>>> lello wrote:
>>>>
>>>> Unfortunately the problem is not so simple to solve.
>>>>
>>>> First, I have modified TerraTabPaneSkin adding a getButtonPanorama()
>>>> method,
>>>> as I need to access the buttonPanorama.
>>>> Second, following your suggestion I used the code:
>>>>
>>>> int cornerWidth = corner.getPreferredSize().width;
>>>> int buttonPanoramaWidth = width - cornerWidth;
>>>>
>>>> The final layout is a bit weird, with a very large area for the corner
>>>> component, and,
>>>> furthermore, I loose the right arrow which allows me to move along the
>>>> opened tabs
>>>> (the arrow that appears when you have completely filled the width of
>>>> the
>>>> tabPane).
>>>>
>>>> Do you think it is possible to change the design of the basic
>>>> TerraTabPaneSkin to meet the
>>>> requirement that the corner component should never be hidden?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Greg Brown-2 wrote:
>>>>>
>>>>>>>> First: I am trying to use the "corner" component of a tabpane to
>>>>>>>> display
>>>>>>>> a
>>>>>>>> menubutton. However I noticed that if I open a large number of
>>>>>>>> tabs,
>>>>>>>> the
>>>>>>>> corner component gets hidden by the tabs, is this a bug?
>>>>>>>
>>>>>>> Possibly. It was originally done this way by design, but that may
>>>>>>> not
>>>>>>> have
>>>>>>> been the right approach.
>>>>>>>
>>>>>>
>>>>>> Could you suggest me a simple way to modify/extend TabPaneSkin so to
>>>>>> have
>>>>>> the desired behaviour?
>>>>>> Or just the functions that I have to override.
>>>>>
>>>>> You'll have to modify TerraTabPaneSkin#layout(). The corner width is
>>>>> currently determined as follows:
>>>>>
>>>>> int buttonPanoramaWidth = Math.min(width, buttonPanoramaSize.width);
>>>>> ...
>>>>> int cornerWidth = width - buttonPanoramaWidth;
>>>>>
>>>>> You'll probably want to calculate the corner width first (by calling
>>>>> corner.getPreferredSize()) and then calculate the panorama width from
>>>>> that.
>>>>>
>>>>
>>>
>>
>>
>> --
>> View this message in context:
>> http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2784447.html
>> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
>
--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2784697.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by Greg Brown <gk...@verizon.net>.
Why do you need access to the button panorama? Maybe there is another way to solve your problem?
On Apr 6, 2011, at 6:26 AM, lello wrote:
> Again my mistake.
> The width of the corner component is perfect.
> Now the only open question is how to avoid introducing a getButtonPanorma()
> method
> in the TerraTabPaneSkin. (apart from copying the entire skin and then modify
> it accordingly).
>
>
>
> lello wrote:
>>
>> Sorry I gave a wrong information,
>> the right arrow is not hidden, it's there. So the only problem is the size
>> of the corner component
>> which is almost the double of its actual component, and of course the fact
>> that I had to add
>> a new method to the basic skin, unless I want to copy/rewrite the entire
>> skin.
>>
>>
>> lello wrote:
>>>
>>> Unfortunately the problem is not so simple to solve.
>>>
>>> First, I have modified TerraTabPaneSkin adding a getButtonPanorama()
>>> method,
>>> as I need to access the buttonPanorama.
>>> Second, following your suggestion I used the code:
>>>
>>> int cornerWidth = corner.getPreferredSize().width;
>>> int buttonPanoramaWidth = width - cornerWidth;
>>>
>>> The final layout is a bit weird, with a very large area for the corner
>>> component, and,
>>> furthermore, I loose the right arrow which allows me to move along the
>>> opened tabs
>>> (the arrow that appears when you have completely filled the width of the
>>> tabPane).
>>>
>>> Do you think it is possible to change the design of the basic
>>> TerraTabPaneSkin to meet the
>>> requirement that the corner component should never be hidden?
>>>
>>>
>>>
>>>
>>>
>>> Greg Brown-2 wrote:
>>>>
>>>>>>> First: I am trying to use the "corner" component of a tabpane to
>>>>>>> display
>>>>>>> a
>>>>>>> menubutton. However I noticed that if I open a large number of tabs,
>>>>>>> the
>>>>>>> corner component gets hidden by the tabs, is this a bug?
>>>>>>
>>>>>> Possibly. It was originally done this way by design, but that may not
>>>>>> have
>>>>>> been the right approach.
>>>>>>
>>>>>
>>>>> Could you suggest me a simple way to modify/extend TabPaneSkin so to
>>>>> have
>>>>> the desired behaviour?
>>>>> Or just the functions that I have to override.
>>>>
>>>> You'll have to modify TerraTabPaneSkin#layout(). The corner width is
>>>> currently determined as follows:
>>>>
>>>> int buttonPanoramaWidth = Math.min(width, buttonPanoramaSize.width);
>>>> ...
>>>> int cornerWidth = width - buttonPanoramaWidth;
>>>>
>>>> You'll probably want to calculate the corner width first (by calling
>>>> corner.getPreferredSize()) and then calculate the panorama width from
>>>> that.
>>>>
>>>
>>
>
>
> --
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2784447.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by lello <rb...@gmail.com>.
Again my mistake.
The width of the corner component is perfect.
Now the only open question is how to avoid introducing a getButtonPanorma()
method
in the TerraTabPaneSkin. (apart from copying the entire skin and then modify
it accordingly).
lello wrote:
>
> Sorry I gave a wrong information,
> the right arrow is not hidden, it's there. So the only problem is the size
> of the corner component
> which is almost the double of its actual component, and of course the fact
> that I had to add
> a new method to the basic skin, unless I want to copy/rewrite the entire
> skin.
>
>
> lello wrote:
>>
>> Unfortunately the problem is not so simple to solve.
>>
>> First, I have modified TerraTabPaneSkin adding a getButtonPanorama()
>> method,
>> as I need to access the buttonPanorama.
>> Second, following your suggestion I used the code:
>>
>> int cornerWidth = corner.getPreferredSize().width;
>> int buttonPanoramaWidth = width - cornerWidth;
>>
>> The final layout is a bit weird, with a very large area for the corner
>> component, and,
>> furthermore, I loose the right arrow which allows me to move along the
>> opened tabs
>> (the arrow that appears when you have completely filled the width of the
>> tabPane).
>>
>> Do you think it is possible to change the design of the basic
>> TerraTabPaneSkin to meet the
>> requirement that the corner component should never be hidden?
>>
>>
>>
>>
>>
>> Greg Brown-2 wrote:
>>>
>>>>>> First: I am trying to use the "corner" component of a tabpane to
>>>>>> display
>>>>>> a
>>>>>> menubutton. However I noticed that if I open a large number of tabs,
>>>>>> the
>>>>>> corner component gets hidden by the tabs, is this a bug?
>>>>>
>>>>> Possibly. It was originally done this way by design, but that may not
>>>>> have
>>>>> been the right approach.
>>>>>
>>>>
>>>> Could you suggest me a simple way to modify/extend TabPaneSkin so to
>>>> have
>>>> the desired behaviour?
>>>> Or just the functions that I have to override.
>>>
>>> You'll have to modify TerraTabPaneSkin#layout(). The corner width is
>>> currently determined as follows:
>>>
>>> int buttonPanoramaWidth = Math.min(width, buttonPanoramaSize.width);
>>> ...
>>> int cornerWidth = width - buttonPanoramaWidth;
>>>
>>> You'll probably want to calculate the corner width first (by calling
>>> corner.getPreferredSize()) and then calculate the panorama width from
>>> that.
>>>
>>
>
--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2784447.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by lello <rb...@gmail.com>.
Sorry I gave a wrong information,
the right arrow is not hidden, it's there. So the only problem is the size
of the corner component
which is almost the double of its actual component, and of course the fact
that I had to add
a new method to the basic skin, unless I want to rewrite the entire skin.
lello wrote:
>
> Unfortunately the problem is not so simple to solve.
>
> First, I have modified TerraTabPaneSkin adding a getButtonPanorama()
> method,
> as I need to access the buttonPanorama.
> Second, following your suggestion I used the code:
>
> int cornerWidth = corner.getPreferredSize().width;
> int buttonPanoramaWidth = width - cornerWidth;
>
> The final layout is a bit weird, with a very large area for the corner
> component, and,
> furthermore, I loose the right arrow which allows me to move along the
> opened tabs
> (the arrow that appears when you have completely filled the width of the
> tabPane).
>
> Do you think it is possible to change the design of the basic
> TerraTabPaneSkin to meet the
> requirement that the corner component should never be hidden?
>
>
>
>
>
> Greg Brown-2 wrote:
>>
>>>>> First: I am trying to use the "corner" component of a tabpane to
>>>>> display
>>>>> a
>>>>> menubutton. However I noticed that if I open a large number of tabs,
>>>>> the
>>>>> corner component gets hidden by the tabs, is this a bug?
>>>>
>>>> Possibly. It was originally done this way by design, but that may not
>>>> have
>>>> been the right approach.
>>>>
>>>
>>> Could you suggest me a simple way to modify/extend TabPaneSkin so to
>>> have
>>> the desired behaviour?
>>> Or just the functions that I have to override.
>>
>> You'll have to modify TerraTabPaneSkin#layout(). The corner width is
>> currently determined as follows:
>>
>> int buttonPanoramaWidth = Math.min(width, buttonPanoramaSize.width);
>> ...
>> int cornerWidth = width - buttonPanoramaWidth;
>>
>> You'll probably want to calculate the corner width first (by calling
>> corner.getPreferredSize()) and then calculate the panorama width from
>> that.
>>
>
--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2784110.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by lello <rb...@gmail.com>.
Unfortunately the problem is not so simple to solve.
First, I have modified TerraTabPaneSkin adding a getButtonPanorama() method,
as I need to access the buttonPanorama.
Second, following your suggestion I used the code:
int cornerWidth = corner.getPreferredSize().width;
int buttonPanoramaWidth = width - cornerWidth;
The final layout is a bit weird, with a very large area for the corner
component, and,
furthermore, I loose the right arrow which allows me to move along the
opened tabs
(the arrow that appears when you have completely filled the width of the
tabPane).
Do you think it is possible to change the design of the basic
TerraTabPaneSkin to meet the
requirement that the corner component should never be hidden?
Greg Brown-2 wrote:
>
>>>> First: I am trying to use the "corner" component of a tabpane to
>>>> display
>>>> a
>>>> menubutton. However I noticed that if I open a large number of tabs,
>>>> the
>>>> corner component gets hidden by the tabs, is this a bug?
>>>
>>> Possibly. It was originally done this way by design, but that may not
>>> have
>>> been the right approach.
>>>
>>
>> Could you suggest me a simple way to modify/extend TabPaneSkin so to have
>> the desired behaviour?
>> Or just the functions that I have to override.
>
> You'll have to modify TerraTabPaneSkin#layout(). The corner width is
> currently determined as follows:
>
> int buttonPanoramaWidth = Math.min(width, buttonPanoramaSize.width);
> ...
> int cornerWidth = width - buttonPanoramaWidth;
>
> You'll probably want to calculate the corner width first (by calling
> corner.getPreferredSize()) and then calculate the panorama width from
> that.
>
--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2784105.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by Greg Brown <gk...@verizon.net>.
>>> First: I am trying to use the "corner" component of a tabpane to display
>>> a
>>> menubutton. However I noticed that if I open a large number of tabs, the
>>> corner component gets hidden by the tabs, is this a bug?
>>
>> Possibly. It was originally done this way by design, but that may not have
>> been the right approach.
>>
>
> Could you suggest me a simple way to modify/extend TabPaneSkin so to have
> the desired behaviour?
> Or just the functions that I have to override.
You'll have to modify TerraTabPaneSkin#layout(). The corner width is currently determined as follows:
int buttonPanoramaWidth = Math.min(width, buttonPanoramaSize.width);
...
int cornerWidth = width - buttonPanoramaWidth;
You'll probably want to calculate the corner width first (by calling corner.getPreferredSize()) and then calculate the panorama width from that.
Re: TabPane corner and button style
Posted by lello <rb...@gmail.com>.
Greg Brown-2 wrote:
>
>> First: I am trying to use the "corner" component of a tabpane to display
>> a
>> menubutton. However I noticed that if I open a large number of tabs, the
>> corner component gets hidden by the tabs, is this a bug?
>
> Possibly. It was originally done this way by design, but that may not have
> been the right approach.
>
Could you suggest me a simple way to modify/extend TabPaneSkin so to have
the desired behaviour?
Or just the functions that I have to override.
> Second: is it possible to have all the tab buttons with the same size?
There isn't any way to specify this via TabPane itself, but you could give
the tab pane's tab data renderer a fixed preferred width. That should have
the same effect.
G
--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2779741.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by lello <rb...@gmail.com>.
Greg Brown-2 wrote:
>
>> Never mind, I found out how to do it, I had forgotten to cast the
>> TabDataRenderer to a ButtonDataRenderer.
>>
>> However, the text is not displayed correctly, I mean it is centered
>> whereas
>> I want it to be left aligned.
>> I guess I have to write by ButtonDataRenderer.
>
> I'd suggest creating a new instance of ButtonDataRenderer and setting the
> horizontalAlignment style on it. Then call TabPane#setTabDataRenderer()
> with the new instance.
>
Thanks for the hint, in the end I wrote a new ButtonDataRenderer cause I
need a deeper control on the
tab button.
--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2790773.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by Greg Brown <gk...@verizon.net>.
> Never mind, I found out how to do it, I had forgotten to cast the
> TabDataRenderer to a ButtonDataRenderer.
>
> However, the text is not displayed correctly, I mean it is centered whereas
> I want it to be left aligned.
> I guess I have to write by ButtonDataRenderer.
I'd suggest creating a new instance of ButtonDataRenderer and setting the horizontalAlignment style on it. Then call TabPane#setTabDataRenderer() with the new instance.
Re: TabPane corner and button style
Posted by lello <rb...@gmail.com>.
Never mind, I found out how to do it, I had forgotten to cast the
TabDataRenderer to a ButtonDataRenderer.
However, the text is not displayed correctly, I mean it is centered whereas
I want it to be left aligned.
I guess I have to write by ButtonDataRenderer.
lello wrote:
>
>
> Greg Brown-2 wrote:
>>
>>> Second: is it possible to have all the tab buttons with the same size?
>>
>> There isn't any way to specify this via TabPane itself, but you could
>> give the tab pane's tab data renderer a fixed preferred width. That
>> should have the same effect.
>>
>> G
>>
> Ehm...sorry to ask, but how could I do that? there seems to be now
> setWidth() method in the the tab data renderer.
>
--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2789439.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by lello <rb...@gmail.com>.
Greg Brown-2 wrote:
>
>> Second: is it possible to have all the tab buttons with the same size?
>
> There isn't any way to specify this via TabPane itself, but you could give
> the tab pane's tab data renderer a fixed preferred width. That should have
> the same effect.
>
> G
>
Ehm...sorry to ask, but how could I do that? there seems to be now
setWidth() method in the the tab data renderer.
--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TabPane-corner-and-button-style-tp2778983p2789253.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
Re: TabPane corner and button style
Posted by Greg Brown <gk...@verizon.net>.
> First: I am trying to use the "corner" component of a tabpane to display a
> menubutton. However I noticed that if I open a large number of tabs, the
> corner component gets hidden by the tabs, is this a bug?
Possibly. It was originally done this way by design, but that may not have been the right approach.
> Second: is it possible to have all the tab buttons with the same size?
There isn't any way to specify this via TabPane itself, but you could give the tab pane's tab data renderer a fixed preferred width. That should have the same effect.
G