Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] From Swing to SWT



Olivier Martin wrote:
you can use setData(String name, Object value)
to store name or properties
ok. I see where the posts are heading. You feel that you can use the generic map holder to hold the properties, eg, setData("properties", propertyList).

Fine. But, the widget has to do something with this method, not just store it in some map. This method sets the characteristics of the widget. That is what a Builder and a Runtimes do. They communicate thru a standard protocol a property pattern which is extensible from the widget writer's perspective. If I need (String urlPatternSource, boolean disable, int strokeSize), then I expose those to the builder through a specific method.

To implement a Builder, I need to go in and do some minor plumbing to the base widget. I believe I can do this without sacrificing backward compatibility. Or is the base class frozen?

-Lane


David Whiteman wrote:
Wednesday, January 15, 2003, 10:24:48 PM, Lane Sharman wrote:

  
Everytime I study the base class of SWT, I become more frustrated. For
example, it is very important that every widget have a local, relative 
name. There is no setName(), getName(). There is no 
setProperties(ProperyList), getProperties(PropertyList). Sigghhh.
    
There are setData() and getData() methods that allow you to store any
Object.  Could you use these to store a collection of properties?

David

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev

  

-- 
Lane Sharman
http://opendoors.com Conga, GoodTimes and Application Hosting Services
http://opendoors.com/lane.pdf BIO


Back to the top