http://www.jgoodies.com/freeware/forms/index.html
I understand that we can extend BasicLayoutAssistant to add a custom layout,
and I looked at the RowLayoutAssistant example. Is there any more API
documentation or a more extensive example on how to add custom layouts to
the designer? Perhaps JavaDoc for BasicLayoutAssistant and the
LayoutAssistant interface?
Bruce
It seems to me that it would be a very large amount
of work to get the Designer to work with JGoodies Forms.
There is no documentation that I know of for the Designer,
let alone BasicLayoutAssistant. And the problem is more
than just extending the layout assistant. You would have
to be able to (somehow?!) get the Designer to understand that
you are adding some components to a DefaultFormBuilder and
not just a regular panel. See the source code for any of
say Cayenne Modeler's tab panels, such as DbEntityTab.
The question becomes not one of providing a layout assistant,
but of how you would have the Designer write something like
the following:
DefaultFormBuilder builder = new DefaultFormBuilder(layout);
builder.append("DbEntity Name: ", name.getComponent());
builder.append("Schema: ", schema.getComponent());
???
If you started working on such an Open Tool at 8:00 am tomorrow
morning, you'd have barely figured out how to extend the layout
assistant by noon, and by that time, your time valued at even
$25/hr would have been sufficient to have paid for 2/3 of
the cost of
http://www.jformdesigner.com/buy
I think the math is greatly against writing an Open Tool on this.
I've thought about writing an Open Tool which would be a shell
around the Cayenne Modeler, for example, and have always come
away with the conclusion that if it were simply a matter of
learning more about the OTAPI, maybe, but if it were a matter
of increasing my productivity, well, the most effective thing
to do is to go to Tools > Configure External Tools ..." and
add
Title: Open with Cayenne Modeler
Program: <path-to-cayenne-modeler here>
Parameters: ($FilePath)
OK
That will launch Cayenne Modeler, and if the file which
is focused in the JBuilder editor is "cayenne.xml", I'm
ready and modeling in some 10 seconds.
I'd suggest you evaluate JForm Designer and do the same
as I have done to launch it if you go with it. You'll
be productive sooner, concentrating on the things which
really matter.
--
Paul Furbacher (TeamB)
Save time, search the archives:
http://info.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
So nevermind the notes in the documentation suggesting we can add custom
layouts to the designer then? How do I request support for JGoodies
FormLayout and TableLayout (https://tablelayout.dev.java.net/) in the
designer for a future version of JBuilder, especially if it moves to
Eclipse?
Can I hand-code or paste-in code for my layout and have the designer display
it?
What draws me to the JBuilder UI designer is the way I can drag and drop
dbSwing widgets into the designer, view live data, and it writes the code
for me. I'm not sure how well dbSwing would work outside of the Borland
designer.
All Paul is saying is that it might be a more efficient use of your time
to just buy something. As you've already noticed, layout managers are
one of the more poorly documented and at the same time complex areas of
the OpenTools API, so it may not be a quick thing.
Of course, that ignores the sense of personal satisfaction you might get
from learning something new and creating a useful tool for yourself. It
also doesn't consider how widely you might use this. Is this a one time
tool or something you might use for years? Consider that in your decision.
The best (only, I think) documentation I've seen on layout managers is
in Keith Wood's book on the OpenTools API. It's a bit out of date at
this point, but that might not matter much in this case.
http://www.booksurge.com/author.php3?accountID=IMPR02092
> How do I request support for JGoodies
> FormLayout and TableLayout (https://tablelayout.dev.java.net/) in the
> designer for a future version of JBuilder, especially if it moves to
> Eclipse?
Enter a report in QualityCentral. If enough people show support by
voting for it, Borland will do it. I have no idea how many is "enough."
> Can I hand-code or paste-in code for my layout and have the designer display
> it?
I think so. Try it, but I think it should work. You won't get the
beauty of drag and drop and the fancy designer UI, but I think the
designer is robust enough to work with 3rd party layout managers. It
can certainly work with 3rd party components, so I would expect a layout
manager to work similarly.
You'll probably need to put the code in the jbInit() method along with
the other initialization code and also more or less follow the same
pattern that the designer does with its code (Bean setters and getters).
Otherwise the designer won't be able to parse your code properly, and
the live instance won't look correct.
--
Gillmer J. Derge [TeamB]
Bruce
My guess is that dbSwing components, which are subclasses of
Swing components, should work just fine in other designers as
long as those other designers allow you the ability to add
components to their palettes (which I'm pretty sure they do).
> So nevermind the notes in the documentation suggesting we can add custom
> layouts to the designer then? ...
Okay, I've done some more research on several fronts.
1. JGoodies Forms supports the standard Swing way of setting
a container's layout and adding components to that layout, albeit
with a special Forms constraint called CellConstraint. This is
in addition to the non-standard DefaultFormBuilder approach which
I only saw in the code for Cayenne Modeler, the only place I've
seen JGoodies Forms in use. So this is good news.
2. Gillmer brought up Keith Wood's book on the JBuilder OTAPI.
It is out-of-date, and it's expensive, but fortunately for you,
if you visit his personal Web site, you can download material
which was not included in the book because a) his publisher
printed it on really heavy stock and b) limited it to just
some 600+ pages (still nearly 2-inches thick!). And, best
news of all, one of the chapters is on Layout Assistants. And
to top it off, he presents a fairly sophisticated example called
"BorderCornerLayoutAssistant". Look at Chapter 22 for the layout
assistant discussion. Preceding chapters (20, 21) discuss the
Editors and Viewers, which are concepts that are relevant to the
Designer and layout assistants.
So, you may just be in luck.
http://home.iprimus.com.au/kbwood/JBOpenTools/index.html
See the link to additional chapters.
The PDF is only about $7 or $8, but yeah, the print version ain't cheap.
> Paul Furbacher [TeamB] wrote:
>
>> 2. Gillmer brought up Keith Wood's book on the JBuilder OTAPI.
>> It is out-of-date, and it's expensive,
>
> The PDF is only about $7 or $8,....
And it's not searchable because of the way the
publishers translated the Word docs into PDF --
all individual characters. Grrrr! (I've spoken
to Keith about this issued, via email, but it's
not in his hands supposedly.)
This may be a different thread, but I noticed the comments about Cayenne.
Is there anything to recommend it to develop Swing apps over
DataExpress/dbSwing?
Bruce
> This may be a different thread, but I noticed the comments about Cayenne.
Yes, what about them with regard to your general
problem of plugging data into UI components?
You can use either the DataView components in Cayenne,
or you can simply create custom models for things like
JTable which get their data from a collection of either
CayenneDataObject subclasses or DataRows. I've done
the latter for a Java Users Group demo for a Cayenne
talk -- pretty easy and straightforward.
> Is there anything to recommend it to develop Swing apps over
> DataExpress/dbSwing?
As for using Cayenne vs. DataExpress, the former is an
ORM and the latter is a resultset enhancer. DataExpress
never turns rows into objects (other than ReadWriteRows).
I've been getting up to speed with a complex Hibernate
project this past week, and I can say that Cayenne is
lightyears ahead in ease of use and productivity. Despite
what Gavin King would argue about GUI tools, the majority
are most productive using such tools because a) they visually
show us what we are doing, and b) they formalize the
generation of the underlying code, providing error checking
and preventing incorrect output. Hand coding Cayenne or
Hibernate XML files (or even annotations in Java source
for the latter) is extremely error prone, and difficult
to debug and maintain.
Cayenne Modeler is a breeze to use, is much more powerful
than say Middlegen (how clumsy can you get?), and does much
more than the DataAccess modeler in JBuilder's Designer.
(Note that I've never had a commissioned project in which
I could use Cayenne or Hibernate -- just prototypes and
studies.)