pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill van Melle <bill.van.me...@gmail.com>
Subject Re: The patchwork that is Pivot layout
Date Fri, 18 Mar 2011 02:00:10 GMT
Thanks, Chris.

In order to make some of my BXML less verbose, I have subclassed Pivot
> Containers and added certain defaults and custom properties.  One example of
> this is what I called a StripPane, which is simply a subclassed TablePane
> which maintains an ordered list...

Cute idea.  I haven't been terribly adventurous in extending Pivot classes,
but I can see how some convenience classes might simplify things.  I tend to
do that in other systems to mold a framework in a direction that I'm
comfortable, so why not here.

I have gone through a few iterations of a BXML viewer tool which simply
> polls a BXML file for changes and then reloads and displays it, or whatever
> errors occurred.

That sounds useful for Pivot programmers everywhere!  I'd be happy to
"beta-test" such a thing.

> Um, are you aware of the Adapters which are provided for most Listeners
> with 2 or more methods?  They have minimal/no-op method bodies and are
> intended to be extended,

No, I wasn't.  Eclipse doesn't propose them as suggestions, so it would have
taken some exploring to find them.  But I bet that's a Java idiom, right?
 My java experience before coming to Pivot has been fairly lightweight.  I
withdraw my gripe about the weight of events.

Pivot's Listeners seem to follow a naming convention (not sure if it is
> formal or documented anywhere) whereby the class that defines the 'events'
> is used first, followed by a descriptive word categorizing the group of
> events (where applicable) and then the word 'Listener'
> eg
> ComponentMouseButtonListener  <- mouse button events defined at the
> Component level
> TablePaneListener <- events relating to the TablePane model

True, but if I look at the javadoc for TablePane, these are a bit scattered.
 I immediately see getTablePaneAttributeListeners and getTablePaneListeners,
then farther down see one inherited set (getContainerListeners,
getContainerMouseListeners), and then another (getComponentClassListeners,
getComponentDataListeners, getComponentDecoratorListeners,
getComponentKeyListeners, getComponentListeners,
getComponentMouseButtonListeners, getComponentMouseListeners,
getComponentMouseWheelListeners, getComponentStateListeners,
getComponentStyleListeners, getComponentTooltipListeners).  The names are
reasonably suggestive of where you'd find any particular event, though
sometimes I have to try a couple.  It would certainly be useful to have some
kind of condensed documentation where you could easily see in one place all
the listener interface methods, all the bean properties, and all the style

More later.

View raw message