My only real question would be who is paying for this, and do they support
this activity?

After all, once your programmers get into Java (unless they are resisting to
do even that?), they will probably start using GridBagLayout, and your work
will have been wasted. More importantly, the money used to pay you to
develop it will have been wasted, also.

I disagree that it is worth your time, in the strongest sense. There is a
very good description of GridBagLayout and GridBagConstraints in Geary's
"Graphic Java", volume one (covers the AWT). Show them that. After a few
hours they should have enough knowledge to use it for simple tasks. Or try
worked examples that introduce them to each part of GBL and GBC, one by one.

If you have to work on something, work on training, rather than some
throwaway class.

As far as the code goes, looks fine to me.. But then, I haven't implemented
by own layout manager, nor would I, unless I needed one to support a custom
component. I would suggest using the type-safe enumerator pattern - instead
of static final ints - and ask if your EMPTY_* fields should not be final,
though.

-----Original Message-----
From: Steve Barrett <[EMAIL PROTECTED]>
To: Greg Munt <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, April 02, 2001 11:42
Subject: Re: super layout manager help


>You are preaching to the choir, there's simply no
>substitute for training and a bit of self-motivation..
>
>On the other hand if I can make life a bit simpler for
>folks it is certainly worth my time.
>
>I don't know if you had time or the motivation to look
>through the code or the example, but if you did did
>you see anything obviously wrong?  I have fixed
>several bugs down in Layout.getCalculatedSize(), and
>simplified writing constraints a bit.  I added an
>interface to support what GridColumn was doing so that
>it is now necessary to only pass the prior component.
>That eliminated the need to pass the current component
>as part of the constraint in GridColumn (that was
>ugly).  I have also added several more simple
>constraints.
>
>You are the about only one responding so far, so I
>will probably just keep on testing (hey, thats what
>coffee is for right?).
>
>
>
>--- Greg Munt <[EMAIL PROTECTED]> wrote:
>> Get your 'old programmers' to read up on layout
>> managers.
>>
>> If they are too lazy to do so, I don't see that as
>> justification for what is
>> effectively reinventing a GridBagLayout. Use of an
>> IDE's GUI editor would be
>> better, IMO. GridBagLayout is a complex layout
>> manager. Complex components
>> are just that: complex. If you want nearly (you say
>> 95%) all of the
>> functionality of a complex component, then you will
>> eventually end up with
>> something just as complex, and maybe even more
>> complex. The JDK developers
>> aren't in the habit of designing complex classes for
>> the fun of it, you
>> know..
>>
>> -----Original Message-----
>> From: Steve Barrett <[EMAIL PROTECTED]>
>> To: Greg Munt <[EMAIL PROTECTED]>; govind
>> <[EMAIL PROTECTED]>
>> Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>> Date: Monday, April 02, 2001 05:19
>> Subject: Re: super layout manager help
>>
>>
>> >Fair enough.  We are porting a legacy DOS
>> application
>> >and we are finding one of the single biggest
>> >impediments to getting our old programmers up to
>> speed
>> >is the layout managers.  Even in an IDE these
>> things
>> >are difficult to use, they behave differently for
>> >different components and each require knowledge of
>> a
>> >seperate syntax.  One of the things my layout
>> manager
>> >does is allow the coders to use a coordinate system
>> >that is familiar, if they want.  The coordinate
>> system
>> >is not absolute positioning though, it just makes a
>> >grid where the interstaces are proportional to the
>> >container (so only the white space grows, or
>> shrinks).
>> > Components are not constrained by the grid and can
>> >span cells, the grid is just for positioning.  The
>> >layout manager can also mimic the behavior of many
>> >different layout managers without nesting panels,
>> >another concept that seems to mess up our newbies.
>> My
>> >other big goal was to make the layout manager super
>> >easy to use.  So far all the constraints take
>> either a
>> >coordinate or a simple reference to another
>> component.
>> >Even the exceptions just take another component
>> >reference or another pair of coordinates.  I am
>> hoping
>> >the similarity in constraint arguments will make it
>> >easy to master.  On the other hand writing a new
>> >Constraint is tricky, but it can be done on the
>> fly.
>> >I am not really trying to succeed GridBagLayout in
>> >functionality (I'll be happy if get 95% of GBL
>> >functionality), I do want something with all the
>> power
>> >of GBL but much easier to use.
>> >
>> >--- Greg Munt <[EMAIL PROTECTED]> wrote:
>> >> What does this layout manager do that
>> >> java.awt.GridBagLayout does not?
>> >>
>> >> Fixed positioning is achieved with a null layout.
>> >>
>> >> Why would you want to simulate other layout
>> >> managers? Just use the layout
>> >> manager you need, rather than reimplementing it.
>> >> This seems like a waste of
>> >> effort to me.
>> >>
>> >> -----Original Message-----
>> >> From: Steve Barrett <[EMAIL PROTECTED]>
>> >> To: govind <[EMAIL PROTECTED]>
>> >> Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>> >> Date: Sunday, April 01, 2001 08:47
>> >> Subject: Re: super layout manager help
>> >>
>> >>
>> >> >Of course, you are right, I need to explain a
>> bit
>> >> >more.
>> >> >Ok, the goal was to have a layout manager that
>> >> could
>> >> >do positioning and sizing based on some kind of
>> >> fixed
>> >> >coordinates, as well as based on relationships
>> to
>> >> >other components.
>> >> >The examples illustrate using 1) using fixed
>> >> >coordinate positioning  2) relational
>> positioning
>> >> 3)
>> >> >simulating the behavior of other lay out
>> managers.
>> >> >The code has the layout manager Layout, the
>> >> abstract
>> >> >Constraint class, and the 3 non-public
>> Constraint
>> >> >classes written so far.
>> >> >What is important to me is that when the
>> finished
>> >> >product is used, it is simply a matter of adding
>> a
>> >> >component to a container, with a simple one or
>> two
>> >> >parameter constraint.  My other goal is that
>> >> >specialized constraints can be added on the fly.
>> >> >I hope this description helps.
>> >> >
>> >> >
>> >> >--- govind <[EMAIL PROTECTED]> wrote:
>> >> >> Hi steve,
>> >> >>
>> >> >> You can give a brief description of what the
>> >> >> example does so that it is
>> >> >> not required for somebody to go thru the code
>> and
>> >> >> know what the test
>> >> >> program does.If i miss something or if i am
>> wrong
>> >> >> please apologize and let
>> >> >> me know.
>> >> >>
>> >> >> Thanks and Regards
>> >> >> govind
>> >> >> At 12:04 AM 4/1/01 -0800, you wrote:
>> >> >> >Attached is source for a layout manager I am
>> >> >> working
>> >> >> >on.  Its intended to be fairly simply to use
>> and
>> >> >> very
>> >> >> >extensible.  My approach was to write a
>> layout
>> >> >> manager
>> >> >> >than can handle all kinds of customized
>> >> constraint
>> >> >> >objects.  I want to provide a useful set of
>> >> >> constraint
>> >> >> >objects to go with it.  I've only written
>> three
>> >> so
>> >> >> >far.
>> >> >> >It's not even beta, but I would appreciate
>> >> testing,
>> >> >> >suggestions, etc.
>> >> >> >SO any help would be appreciated.
>> >> >> >Thanks in advance, Steve Barrett
>> >> >> >
>> >> >>
>> >>
>> >__________________________________________________
>> >> >> >Do You Yahoo!?
>> >> >> >Get email at your own domain with Yahoo!
>> Mail.
>> >> >> >http://personal.mail.yahoo.com/?.refer=text
>> >> >> >
>> >> >
>> >> >
>> >>
>> >__________________________________________________
>> >> >Do You Yahoo!?
>> >> >Get email at your own domain with Yahoo! Mail.
>> >> >http://personal.mail.yahoo.com/?.refer=text
>> >> >_______________________________________________
>> >> >Advanced-swing mailing list
>> >> >[EMAIL PROTECTED]
>> >> >http://eos.dk/mailman/listinfo/advanced-swing
>> >>
>> >
>> >
>> >__________________________________________________
>> >Do You Yahoo!?
>> >Get email at your own domain with Yahoo! Mail.
>> >http://personal.mail.yahoo.com/?.refer=text
>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Get email at your own domain with Yahoo! Mail.
>http://personal.mail.yahoo.com/?.refer=text
>_______________________________________________
>Advanced-swing mailing list
>[EMAIL PROTECTED]
>http://eos.dk/mailman/listinfo/advanced-swing

_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to