I thought about this some more as well and was thinking about PIVOT-570. I have need for tab decoration in my pivotpad application to show dirty state and a close button and such. You have need for different text orientation. I was thinking back to the idea of component templates again as I was browsing through TabPane thinking about changing the buttons and reskinning.
I think that a very small amount of plumbing, all using standard pivot idioms (which means none of my usual tricks) could create simple templates for components. If a look at TabPane, tab button creation is buried in the skin. You could just yank that method out and allow more control over instantiation. You could also write a new skin or an extension of the skin (although with the creation and instantiation buried in the skin, it's still hard to override). You could also specify renderers as a parameter and such. All valid approaches. But with even a crude template, I think you can more richly customize components while still maintaining the skin concept...think of it as BXML specifications for skins that use component and data renderers for helping it do the skinning but no coding....all BXML unless you want to use coding. It implements the spirit of PIVOT-570 but a bit differently in that you specify 570's "data" and "renders" using a slightly different approach. The plumbing may be general purpose. I don't have any more time until late this week but I'll post it. My quick prototype of a template just now shows that it could work. Essentially, its a ComponentTemplate class that when accessed, produces a component from a BXML file each time its needed. Trivial sounding but I think the implementation pattern would enable the customization through BXML declaration. I'll rewrite TabPane using it to see if it's useful or post that a simple mechanism cannot work. At the very least it would provide a contrasting implementation around 570. Jul 11, 2010 09:16:52 AM, [email protected] wrote: =========================================== [ https://issues.apache.org/jira/browse/PIVOT-564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887196#action_12887196 ] André Thieme commented on PIVOT-564: ------------------------------------ Today I thought about it... the idea from the description can also be achieved by making a tab not displaying text, but instead a little graphics that displays the text in the way I want it to appear, for example as suggested in the issue description. The suggestion 2 is not uncommon, so we all have seen it. For example here in Jira, when we look to the left hand side. They are not tabs in the classical sense, but equivalent. Anyway, PIVOT-570 is pointing into a nice direction, and with being able to put a graphics into tabs vs. text, my idea 1 can also be easily solved. > Configurable Tab text orientation > --------------------------------- > > Key: PIVOT-564 > URL: https://issues.apache.org/jira/browse/PIVOT-564 > Project: Pivot > Issue Type: Improvement > Components: wtk > Reporter: André Thieme > Priority: Minor > > When displaying tabs on the left or right side (vs. top/bottom), then the tab > text is > turned 90 degrees (counter-) clockwise. > It would be nice if this were configurable, so that the text "Foobar" appears > as "F\no\no\nb\na\nr", i.e.: > F > o > o > b > a > r -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
