jgoodies-forms-1.6.0/ 0000755 0001750 0001750 00000000000 12052333511 013204 5 ustar tony tony jgoodies-forms-1.6.0/LICENSE.txt 0000644 0001750 0001750 00000003232 12003555436 015037 0 ustar tony tony The BSD License for the JGoodies Forms ====================================== Copyright (c) 2002-2012 JGoodies Karsten Lentzsch. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: o Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. o Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. o Neither the name of JGoodies Karsten Lentzsch nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. jgoodies-forms-1.6.0/README.html 0000644 0001750 0001750 00000013310 12003555436 015035 0 ustar tony tony
![]() |
|||
General
:: Readme :: Release Notes :: License :: Whitepaper :: Visual Builders :: References :: Tips & Tricks :: FAQ
Reference
Web Pages
|
![]() |
|
|
(c) 2012 JGoodies
|
|||
tags to improve readability.
o Docs: Added examples to FormLayout constructors.
o Docs: Corrected JavaDoc @throws texts in ColumnSpec and RowSpec.
o Docs: Corrected and extended JavaDocs regarding the mnemonic marker
in ComponentFactory, DefaultComponentFactory, PanelBuilder.
o Docs: Refreshed the list of visual builder tools.
o Docs: Added a bunch of TODOs for future versions.
o Dist: Fixed broken package information in the JAR manifest.
o Build:Set 'build.compile.source' and 'build.compile.target' to '1.4'
in the default.properties; build.xml honors the source setting.
o Tut.: Main methods use the new JGoodies Looks 1.3 package names.
o Test: Added tests for the DefaultComponentFactory.
---------------------------------------------------------------------------
Find below the change history for older releases.
JGoodies Forms, Version 1.0.5
Release Notes
INTRODUCTION
This maintenance release fixes bugs, adds features, and brings
minor improvements for the code, documentation and tutorial.
NEW FEATURES
o Added FormLayout#setColumnSpec(int, ColumnSpec)
o Added FormLayout#setRowSpec(int, ColumnSpec)
BUGS FIXED
o Titled separator on Aqua not aligned along the label's font baseline.
o Button minimum width too wide on MacLayoutStyle.
o Related gap too narrow in MacLayoutStyle.
o DefaultFormBuilder ignores the current row span set by #setRowSpan.
o AbstractFormBuilder#createLeftAdjustedConstraints(int)
ignores the current row span.
o DefaultComponentFactory can register L&fChangeHandler multiple times.
OTHER CHANGES
o Code: Builders avoid the creation of obsolete FlowLayout instances.
o Code: Overhauled builder constructors; marked some as deprecated.
o Code: Changed separators created by the DefaultComponentFactory
to be opaque.
o Code: Renamed DefaultUnitConverter#LAFChangeHandler to
LookAndFeelChangeHandler.
o Code: Removed unused code in class BoundedSize.
o Code: Minor code cleanup: removed unused else.
o Tut.: Added pitfall example for vertically non-filled component.
o Tut.: Added pitfall example for the ever-growing text area.
o Docs: Improved FormDebugPanel's constructor JavaDocs.
o Docs: Added overview information to the JavaDocs.
o Docs: Refreshed links to visual builders that support the FormLayout.
o Docs: Refreshed some FAQ items.
o Docs: Added FAQ #2.6: How to remove a component from the layout?
o Docs: Added FAQ #3.6: Why do some text areas grow and never shrink?
o Docs: Added a reference to the SWT port by the SwtForms project.
o Docs: Added a reference to Gerald Rosenberg's JFormComposer.
o Docs: Clarified the semantics and use case for CellConstraint insets.
o Docs: Indicated that FormFactory factory methods may be removed.
o Dist: Corrected implementation title and vendor in the JAR manifest.
o Dist: Added project name tag to the ANT build file.
o Dist: Overhauled the README.html.
---------------------------------------------------------------------------
Find below the change history for older releases.
JGoodies Forms, Version 1.0.4
Release Notes
INTRODUCTION
This maintenance release fixes bugs, comes with a simpler API,
and provides more JavaDoc examples for frequently used methods.
API INCOMPATIBILITIES
o ColumnSpec and RowSpec are now immutable. This won't affect
the typical Forms usage, but may affect visual builder tools.
o Removed method ButtonStackBuilder#addGriddedNarrow(JComponent)
VISUAL INCOMPATIBILITIES
o In rare cases the container size may be smaller than before.
Bug #4 has been fixed (see below). In 1.0.4 the container
will be expanded only if components span cols/rows that can grow.
In 1.0.3 the container could be expanded if *any* col/row grows.
So some wrong 1.0.3 container expansions won't happen in 1.0.4.
NEW FEATURES
o Added the CellConstraints#xyw method set.
o Added FormLayoutUtils to the Extras.
BUGS FIXED
o DefaultUnitConverter#setDefaultDialogFont throws NPE.
o DefaultUnitConverter#setAverageCharacterWidthTestString throws NPE.
o Invalid sample code in PanelBuilder JavaDocs.
o (Bug #4) In some cases components that span multiple columns/rows
can expand the container size, although none of the spanned
columns/rows are allowed to grow.
OTHER CHANGES
o Extended and corrected JavaDoc class comments.
o Added examples to the JavaDocs of frequently used methods.
o Refreshed README and FAQ
o Refreshed whitepaper to demonstrate CellConstraints#xyw.
o Added two HTML pages: Visual Builders and References.
---------------------------------------------------------------------------
Find below the change history for older releases.
JGoodies Forms, Version 1.0.3
Release Notes
INTRODUCTION
This maintenance release contains new core classes, adds methods,
and comes with improved JavaDocs and an extended tutorial and FAQ.
The DefaultFormBuilder has been moved from the extras to the core.
Also, the support for the Mac OS X has been improved significantly:
the DefaultComponentFactory has been adjusted for the Aqua look&feel,
the new MacLayoutStyle describes the Mac and Aqua styles guide lines,
and the ButtonBarBuilder and ButtonBarFactory now honor a button order.
VISUAL INCOMPATIBILITIES
On the Mac OS X platform Forms 1.0.3 changes the button order;
other platforms are not affected. In most cases this will improve
the user experience of your applications. It is recommended to
check your ButtonBarBuilder invocation to use a fixed left to right
order where necessary.
ButtonBarBuilder methods that create sequences of buttons now honor
the LayoutStyle's button order. On Mac OS X this is right to left.
Builder methods that add individual buttons are not affected.
See the ButtonOrderExample in the tutorial for details on how to
use or ignore the LayoutStyle's button order.
API INCOMPATIBILITIES
o Removed deprecated methods from the ButtonBarBuilder class:
#addGriddedNarrow(JButton)
#addGriddedNarrowButtons(JButton[])
#addGriddedGrowingNarrow(JComponent)
NEW FEATURES
o Moved DefaultFormBuilder and I15dPanelBuilder to the core.
o FormLayout is serializable.
o AbstractFormBuilder#appendLabelComponentGapColumn()
o AbstractFormBuilder#appendParagraphGapRow()
o AbstractFormBuilder#setComponentFactory(...) now public
o I15dPanelBuilder#addI15dLabel(String, CellConstraints,
Component, CellConstraints)
o LayoutStyle#getTabbedDialogMarginX()
o LayoutStyle#getTabbedDialogMarginY()
o LayoutStyle#getButtonBarPad()
o LayoutStyle#isLeftToRightButtonOrder()
o FormFactory#LABEL_COMPONENT_COLSPEC
o MacLayoutStyle
o AbstractFormBuilder#createLeftAdjustedConstraints(int)
o ColumnSpec#decodeSpecs(String encodedColumnSpecs) (final)
o RowSpec#decodeSpecs(String encodedRowSpecs) (final)
o FormSpec.DefaultAlignment now visible (final)
o Borders.EmptyBorder provides methods for the 4 sizes.
BUGS FIXED
o PanelBuilder fails to build right-to-left if column span > 1.
o DefaultFormBuilder fails to build right-to-left if column span > 1.
o Deserialization fails in 1.0.3 preview.
KNOWN ISSUES
o In some cases components that span multiple columns/rows
can expand the container size, although none of the spanned
columns/rows are allowed to grow. See the FAQ for details.
OTHER CHANGES
o Code: Added safety check for invalid constraints in PanelBuilder
#add(JLabel, CellConstraints, Component, CellConstraints)
#add(String, CellConstraints, Component, CellConstraints)
o Code: DefaultComponentFactory#setTextAndMnemonic(JLabel) now private
o Code: DefaultUnitConverter refers indirectly to ToolKit#getFontMetrics
o Code: Marked ButtonStackBuilder#addGriddedNarrow as deprecated
o JavaDocs: Extended and corrected
o JavaDocs: Clarified some semantics
o Docs: Fixed spelling and grammar errors
o Docs: Extended and reorganized the FAQ
o Tutorial: Improved alignment texts in custom row and custom areas example
o Tutorial: Added ButtonOrderExample
o Tutorial: Added ComponentOrientationExample
o Tutorial: Added OrientationUtils to ComponentOrientationExample
--------------------------------------------------------------------------
Find below the change history for older releases.
JGoodies Forms, Version 1.0.2
Release Notes
INTRODUCTION
This release is a maintenance update that fixes bugs, comes with
a new example and a slightly improved and extended documentation.
DISTRIBUTION CHANGES
o Added a list of FAQ.
o Added JavaDoc version tags to all class comments.
NEW FEATURES
o DefaultUnitConverter provides bound Bean properties for the
default dialog font and the average character width test string.
BUGS FIXED
o Fixed broken button font lookup in DefaultUnitConverter
that failed to find a font for GTKLookAndFeel, and more
generally, SynthLookAndFeel subclasses.
o Fixed #minimumLayoutSize that measured components that span
multiple columns/rows with the preferredSize, now the minimumsize.
o Patched the container expansion forced by components that span
multiple columns/rows for the case that no column or row can grow.
This expansion shall be performed if and only if the component spans
an area that can grow. The old behavior performed this action ALWAYS;
the patch check whether A column/row can grow;
the upcoming fix will check the growing behavior of the spanned area.
This problem is reflected by the FormLayout unit tests, where currently
one out of three tests fails, see FormLayoutTests.test*ExtraExpansion*
OTHER CHANGES
o Main: Removed the final marker from FormDebugPanel;
see the class comment for details
o Main: Removed FormDebugPanel features that are available
in the FormDebugUtils
o Main: Extended JavaDoc for the DefaultUnitConverter
o Main: Extended JavaDoc for the DefaultFormBuilder
o Main: Border.BUTTON_BAR_GAP_BORDER uses dlu only.
o Main: Faster conversion of sizes with a 0 value.
o Tutorial: Added example for custom areas with DefautFormBuilder
o Tutorial: Changed some text field widths from 'default' to 'min'
o Tutorial: Corrected frame titles
o Tests: Added tests for components that span multiple columns
o Tests: Specialized some exceptions in catch clauses
o Docs: Improved grouping diagrams
o Docs: Fixed invalid link to a tutorial pdf
o All code: Documented empty blocks.
---------------------------------------------------------------------------
Find below the change history for older releases.
JGoodies Forms, Version 1.0.1
Release Notes
INTRODUCTION
This release is primarily a documentation and distribution update;
it fixes a bug (with maximum sizes) and contains no API changes.
DISTRIBUTION CHANGES
o Added tips & tricks
o Added a tutorial
o Added a programmer's reference
o Library sources ship as a single ZIP file
BUGS FIXED
o Main: Fixed broken maximum sizes that had the same effect as minimum
o Main: Fixed FormFactory.BUTTON_COLSPEC to use a lower, not upper bound
o Tutorial: Corrected FormDebugExample.main
OTHER CHANGES
o Main: Added sanity checks for invalid CellConstraints alignments
o Main: Minor code cleanup: removed obsolete casts and semicolons
o Main: Minor improvement: parameter names made more consistent
o Main: Library compiled against 1.3 but with Sun's javac 1.4.2
o Main: FormFactory.GROWING_BUTTON_COLSPEC honors LayoutStyle
o Main: All FormFactory specs are now unmodifyable
o Tutorial: Added Quick Start example
o Tutorial: Added example for component sizes
o Tutorial: Added example for custom rows and DefaultFormBuilder
o Test: Added tests for invalid CellConstraints alignments
o Test: Added tests for bounded sizes
o Docs: Removed comparison with HIGLayout from the whitepaper
o Docs: Some throws clauses added to the JavaDocs
o Build: process reflects the distribution changes
---------------------------------------------------------------------------
1.0 (July-18-2003)
o Compiled with Sun javac 1.3.1_08
o Distribution changed:
+ forms.pdf renamed to whitepaper.pdf
+ demo removed
+ build overhauled
+ readme.txt simplified
1.0rc (June-20-2003)
o Code is now available under the BSD license
o Fixed bug in DefaultFormBuilder.appendI15dTitle
o Corrected JavaDoc for ButtonStackBuilder
o Improved whitepaper
o Packaging reflects the new license
o Library jar is unobfuscated
o Library jar is unsigned
jgoodies-forms-1.6.0/docs/ 0000755 0001750 0001750 00000000000 12003555436 014144 5 ustar tony tony jgoodies-forms-1.6.0/docs/visualbuilders.html 0000644 0001750 0001750 00000014661 12003555436 020077 0 ustar tony tony
JGoodies Forms :: Visual Builders

General
:: Readme
:: Release Notes
:: License
:: Whitepaper
:: Visual Builders
:: References
:: Tips & Tricks
:: FAQ
Reference
:: Alignments
:: Constant Sizes
:: Component Sizes
:: Bounded Sizes
:: Cols & Rows
:: Cell Constraints
:: Groups
:: Layout Variables
Web Pages
:: Project Home
:: Download
:: Archive
:: Mailing Lists
:: Issue Tracker

:: Visual Builders ::
Find here a list of visual builder tools that support the JGoodies FormLayout.
These vary in price, concepts, general features, visual feedback,
and support for additional Forms features like factories and non-visual builders.
Commercial Builders
JFormDesigner
is an advanced visual designer that supports the FormLayout and other
layout managers. It supports several Forms helper classes.
Plug-ins for Eclipse and IntelliJ IDEA are available, plug-ins
for NetBeans, JDeveloper, and JBuilder are under development.
Mindsilver's GUIDE is an advanced
GUI builder for Swing.
Intellij IDEA
includes an advanced GUI designer that support the JGoodies FormLayout
and other layout managers.
JAXFront
generates dynamic user interfaces based on an XML schema.
The Jigloo
GUI builder is a plugin for Eclipse and WebSphere Studio.
It supports the FormLayout and other layout managers.
Jigloo is free for non-commercial use, but commercial use requires
purchasing a Professional License.
Free Builders
Google's WindowBuilder Pro
is an advanced visual designer for Swing and SWT that supports
the FormLayout and the Forms helper classes, as well as a bunch of
other layout managers for Swing and SWT. The WindowBuilder Pro
comes as an Eclipse plugin.
Abeille Forms Designer
is a GUI builder that supports the FormLayout.
Form Layout Maker
supports the FormLayout and generates XML files that contain all constraints.
The Mogwai FormMaker
is another visual form editing tool for developing Swing forms using the JGoodies FormLayout.
(c) 2012 JGoodies
jgoodies-forms-1.6.0/docs/references.html 0000644 0001750 0001750 00000020101 12003555436 017145 0 ustar tony tony
JGoodies Forms :: References

General
:: Readme
:: Release Notes
:: License
:: Whitepaper
:: Visual Builders
:: References
:: Tips & Tricks
:: FAQ
Reference
:: Alignments
:: Constant Sizes
:: Component Sizes
:: Bounded Sizes
:: Cols & Rows
:: Cell Constraints
:: Groups
:: Layout Variables
Web Pages
:: Project Home
:: Download
:: Archive
:: Mailing Lists
:: Issue Tracker

:: References ::
Find here a list of references useful for Java layout.
Layout Systems
ExplicitLayout
complements the FormLayout when it comes to non-rectangular layouts
and other complex non-form-oriented designs.
It is a powerful general purpose layout manager that
provides many features to specify the location and size of a component.
ExplicitLayout offers other useful features:
styles, external UI specification and layout reuse.
ExplicitLayout is licensed under the GNU LGPL and ships with a
user guide and well chosen examples.
The Explicit Table Builder
adds a few things that the pure ExplicitLayout is missing
such as builders, layout styles, support for Dialog Units (dlu),
and a nice debug panel.
The Matisse visual builder (integrated with Netbeans)
makes it easy for many people to get layouts done quickly.
It seems that Matisse has been designed for visual building,
but the underlying GroupLayout can be used without Matisse.
Although the FormLayout is intended to replace the GridBagLayout,
the latter is still a resonable choice, if you cannot add a third party
layout manager like the FormLayout to your project.
The Packer simplifies
the use of GridBagLayout.
SwtForms is an SWT port
of the JGoodies FormLayout and some Forms builder done by Florian Fankhauser.
JGoodies Forms Cheat Sheet
Robert Blixt provides a
Forms cheat sheet
that summarizes information about Forms' sizes, units, constraints,
and the string encoding syntax.
Articles
Microsoft's
Design Specifications and Guidelines - Visual Design
describe how to layout on the Microsoft platform.
Since the dimensions are specified in a non-pixel size dlu
it is quite useful for multiplatform screen design.
The Apple
Human Interface Guidelines
provide a lot of tips & tricks for good design.
I provide articles and presentations
about Swing, apperance, and layout.
Books
A recommended reading is
Designing Visual Interfaces
by Kevin Mullet & Darrel Sano. If you read 100 pages of this book,
you will learn the most valuable basics of user interface design,
and more generally, design. It is useful for the daily work of every
GUI developer.
If you either need an introduction or reference about do's and don'ts
in GUI design, read Jeff Johnson's
GUI Bloopers. If you are busy
and can't find the time to read 500 pages, just look at the book's
contents and check whether you have an idea what all the topics are about.
In this case, I guess, a medium skilled GUI designer will read about 50 pages.
There are several tutorials and books that can help you get started
with the Swing widget toolkit, widgets, and basic configuration.
The Swing book by
Robinson and Vorobiev is one of the better books.
(c) 2012 JGoodies
jgoodies-forms-1.6.0/docs/style.css 0000644 0001750 0001750 00000001543 12003555436 016021 0 ustar tony tony body, p, td, li, h1, h2, h3 { font-family: Verdana, Arial, Helvetica, Geneva, sans-serif; }
body, p, td, li, h2, h3 { font-size: 12px; }
h1, h2, h3 { font-weight: bold; color:#323777; margin-bottom: 11px; }
h1 { font-size:14px; }
h2, h3 { margin-top: 17px; }
.header { font-weight: bold; color:#323777; margin-bottom: 11px; }
p { margin-top: 14px; }
a { text-decoration: none; color:#323788; }
a:hover { text-decoration: underline; }
a.nav { text-decoration: none; color:#000000; }
a.nav:hover { text-decoration: underline; }
pre { font-family:Courier New, Courier, monospace; font-size:12px; }
ul { list-style-type: square; margin-top: 2px; }
td.header { color: #FFFFFF; background-color:#323777; }
td.cell { background-color:#FFFFFF; } jgoodies-forms-1.6.0/docs/reference/ 0000755 0001750 0001750 00000000000 12003555436 016102 5 ustar tony tony jgoodies-forms-1.6.0/docs/reference/componentsizes.html 0000644 0001750 0001750 00000013447 12003555436 022061 0 ustar tony tony
JGoodies Forms :: Reference :: Component Sizes

General
:: Readme
:: Release Notes
:: License
:: Whitepaper
:: Visual Builders
:: References
:: Tips & Tricks
:: FAQ
Reference
:: Alignments
:: Constant Sizes
:: Component Sizes
:: Bounded Sizes
:: Cols & Rows
:: Cell Constraints
:: Groups
:: Layout Variables
Web Pages
:: Project Home
:: Download
:: Archive
:: Mailing Lists
:: Issue Tracker

:: Reference :: Component Sizes ::
The component sizes min, pref, default are used
to set column and row sizes that reflect the minimum
or preferred sizes of the contained components.
If you specify a column size as min sized, FormLayout will
ask all components in that column for their minimum width
and chooses the largest width as the column width.
The same applies to rows and the pref component size.
The default size aims to give a column the width
of the largest preferred width. If container space is scarce,
it shrinks the column down to the largest minimum width.
String Representations
I recommend to specify column and row sizes in
the FormLayout constructor using string representations.
These strings will be accepted by the FormLayout,
ColumnSpec, RowSpec and Borders classes.
componentSize ::= MIN | PREF | DEFAULT | M | P | D
Examples
new ColumnSpec("min");
new ColumnSpec("m");
new ColumnSpec("default");
new ColumnSpec("d");
new ColumnSpec("pref");
new ColumnSpec("p");
new RowSpec("min");
new RowSpec("m");
new FormLayout("left:pref, 4dlu, fill:default",
"p, 3dlu, p, 3dlu, p");
(c) 2012 JGoodies
jgoodies-forms-1.6.0/docs/reference/constantsizes.html 0000644 0001750 0001750 00000021526 12003555436 021705 0 ustar tony tony
JGoodies Forms :: Reference :: Constant Sizes

General
:: Readme
:: Release Notes
:: License
:: Whitepaper
:: Visual Builders
:: References
:: Tips & Tricks
:: FAQ
Reference
:: Alignments
:: Constant Sizes
:: Component Sizes
:: Bounded Sizes
:: Cols & Rows
:: Cell Constraints
:: Groups
:: Layout Variables
Web Pages
:: Project Home
:: Download
:: Archive
:: Mailing Lists
:: Issue Tracker

:: Reference :: Constant Sizes ::
Constant sizes are used to set the size of gaps
and other fixed layout elements. They can also be used
in bounded sizes as lower or upper bound.
Units
Constant sizes are specified by a value plus unit that is one of:
Pixel, Points, Inches, Millimeter, Centimeter and Dialog Units.
In string representations the units are abbreviated as:
px, pt, in, mm, cm and dlu.
Constant Non-Pixel Sizes
Constant sizes are constant for a given dialog font, font size and screen resolution.
Pixel sizes map to a fixed dimension in pixels - even if these
parameters change. This is undesired in screen design, especially
in multi-platform environments.
Therefore you should favor non-pixel sizes over pixel sizes.
If you move an application from Windows to Mac or Linux, you want
to retain the overall appearance and layout propertions.
And if you just change your Windows desktop font settings,
you want all layout elements grow appropriately: labels, fields,
buttons, but also: gaps, borders, minimum sizes and dialog dimensions.
Layout managers have been designed to address this issues.
Nevertheless, most of them fail to retain proportions
if you specify dimensions in pixel, which is often the case
for gaps, borders, dialog sizes, and custom minimum and preferred sizes.
For example, a well designed OK button shall have a minimum width;
75px is appropriate for an 8pt Tahoma font on Windows with 96dpi.
But on 120dpi and 10pt Arial, 75 pixels are perceived
as quite narrow.
Dialog Units allow to specify such a size
in a way that it grows and shrinks with the environment. For example,
the MS layout style guide suggests a command button minimum width
of 50dlu, which maps to 75px in the first context and to 100px in the second.
Points, Inches, Millimeters and Centimeters
are intended for sizes that shall grow with the screen resolution
but that are independent of the font and font size.
Unit Conversion
Class Sizes provides methods to convert non-pixel sizes
to pixels. The actual mapping is performed by a customizable
Unit converter.
Prototype Sizes
You can describe a column width or row height by providing a
string prototype, for example
new FormLayout("right:pref, 3dlu, '+49-89-32168'").
Prototype sizes scale better than Dialog Units if
the content consists only of special characters, for example digits.
Logical Constant Sizes
Logical sizes can be used to specify a size that changes
with the current platform or style guide.
For example, if you want to specify a button's minimum width,
you may want to use 50dlu on Windows and 68px on a Mac.
Or you define the gap between two related text field rows
as 3dlu on Windows and 4px on a Mac.
The Forms layout system supports logical sizes in builder
classes, via the Layout Style and the FormFactory
constants.
Since version 1.2 you can use logical sizes in encoded
column and row specifications too, by means of layout variables.
For example new FormLayout("right:pref, $lcgap, pref")
uses the short name of the variable $label-component-gap
that describes the platform-specific gap between a label and
its associated component.
The ButtonBarFactory, ButtonBarBuilder and
ButtonStackBuilder
use logical sizes and in turn style guide-specific logical sizes
for frequently used gaps and minimum widths and heights.
For example the ButtonBarBuilder uses logical sizes
to honor style guide settings for button minimum width, and gaps
between related and unrelated components.
If you develop a custom builder class, you can refer to the
logical sizes using the current Layout Style or
the FormFactory constants.
String Representations
I recommend to specify column and row sizes in
the FormLayout constructor using string representations.
These strings will be accepted by the FormLayout,
ColumnSpec, RowSpec and Borders classes.
constantSize ::= integerUnit | doubleUnit
integerUnit ::= PX | PT | DLU
doubleUnit ::= IN | MM | CM
Examples
new ColumnSpec("50dlu");
new ColumnSpec("75px");
new ColumnSpec("'xxx-MMM-000-xxx'");
new RowSpec("2in");
new RowSpec("100px");
new FormLayout("100dlu, 4dlu, 200dlu",
" 14dlu, 3dlu, 14dlu");
(c) 2012 JGoodies
jgoodies-forms-1.6.0/docs/reference/cells.html 0000644 0001750 0001750 00000015716 12003555436 020104 0 ustar tony tony
JGoodies Forms :: Reference :: Cell Constraints

General
:: Readme
:: Release Notes
:: License
:: Whitepaper
:: Visual Builders
:: References
:: Tips & Tricks
:: FAQ
Reference
:: Alignments
:: Constant Sizes
:: Component Sizes
:: Bounded Sizes
:: Cols & Rows
:: Cell Constraints
:: Groups
:: Layout Variables
Web Pages
:: Project Home
:: Download
:: Archive
:: Mailing Lists
:: Issue Tracker

:: Reference :: Cell Constraints ::
Each component managed by a FormLayout is associated with an instance
of CellConstraints that specifies a component’s
display area and alignment.
The column and row origins are mandatory, but as we will see later, often
a non-visual builder will automatically create the CellConstraints for you.
By default the column and row span is just 1, and the alignments
are inherited from the related column and row. If possible you should
specify the aligment for the column and row, not for the component;
this way you can reduce the amount of alignment specifications
significantly.
CellConstraints objects can be constructed in different ways using
a mixture of ints, objects and strings. I recommend to specify
the origin and span using ints and the alignment with strings -
just to increase the code readability.
Reusing CellConstraints
You can reuse CellConstraints objects because they are cloned
internally by the FormLayout. Hence you can write a condensed form
CellConstraints cc = new CellConstraints();
builder.addLabel("Name", cc.xy(1, 1));
builder.add(nameField, cc.xy(3, 1));
builder.addLabel("Age", cc.xy(1, 3));
builder.add(ageField, cc.xy(3, 3));
Spanning Multiple Columns/Rows
You can let components span multiple columns or rows,
for example by using the CellConstraints method
#xywh where you specify the x and y position
of the leading cell and the width and height of the display area.
Note: these components do not affect the size of
the spanned columns or rows, nevertheless, they may expand
the whole container. See also the FAQ
for details and how to handle this situation.
Examples
1) Creation methods intended for use by humans
CellConstraints cc = new CellConstraints();
cc.xy(2, 1); // second col, first row
cc.xy(2, 1, "right, bottom"); // aligned to right and bottom
cc.xy(2, 1, "r, b"); // abbreviated alignment
cc.xywh(2, 1, 4, 3); // spans 4 cols, 3 rows
cc.xywh(2, 1, 4, 3, "right, bottom");
cc.xywh(2, 1, 4, 3, "r, b");
2) Constructors intended for builders
new CellConstraints(); // first col, first row
new CellConstraints(2, 1);
new CellConstraints(2, 1, 4, 3);
new CellConstraints(2, 1, CellConstraints.RIGHT,
CellConstraints.BOTTOM);
3) Constructors intended for building UIs from XML
CellConstraints cc = new CellConstraints();
new CellConstraints("2, 1");
new CellConstraints("2, 1, r, b");
new CellConstraints("2, 1, 4, 3");
new CellConstraints("2, 1, 4, 3, r, b");
(c) 2012 JGoodies
jgoodies-forms-1.6.0/docs/reference/colsandrows.html 0000644 0001750 0001750 00000013006 12003555436 021326 0 ustar tony tony
JGoodies Forms :: Reference :: Columns & Rows

General
:: Readme
:: Release Notes
:: License
:: Whitepaper
:: Visual Builders
:: References
:: Tips & Tricks
:: FAQ
Reference
:: Alignments
:: Constant Sizes
:: Component Sizes
:: Bounded Sizes
:: Cols & Rows
:: Cell Constraints
:: Groups
:: Layout Variables
Web Pages
:: Project Home
:: Download
:: Archive
:: Mailing Lists
:: Issue Tracker

:: Reference :: Columns & Rows ::
Columns and rows are specified by three parts:
- a mandatory initial size
- an optional default alignment
- an optional resizing behavior
For example, you can specify that a column is left aligned,
has an initial size of 50 Dialog Units and grows:
new ColumnSpec("left:50dlu:grow");
Resizing Behavior
Columns and rows can grow if the layout container becomes larger
than the preferred size. By default, columns and rows won’t resize.
The extra space is distributed over the columns and rows that
have a resize weight larger than 0.0, where each column gets a space
proportional to its weight.
String Representations
String representations for column and row specifications
can be used in the FormLayout constructors as well as in classes
ColumnSpec, RowSpec.
columnSpec ::= [columnAlignment:] size [:resizeBehavior]
rowSpec ::= [rowAlignment :] size [:resizeBehavior]
resizeBehavior ::= NONE | GROW | GROW() | G()
Examples
new ColumnSpec("16px");
new ColumnSpec("left:16px");
new ColumnSpec("left:16px:grow");
new FormLayout("right:max(50dlu;pref), 4dlu, max(100dlu;min)",
"p, 3dlu, p, 3dlu, fill:200dlu:grow");
(c) 2012 JGoodies
jgoodies-forms-1.6.0/docs/reference/boundedsizes.html 0000644 0001750 0001750 00000014257 12003555436 021477 0 ustar tony tony
JGoodies Forms :: Reference :: Bounded Sizes

General
:: Readme
:: Release Notes
:: License
:: Whitepaper
:: Visual Builders
:: References
:: Tips & Tricks
:: FAQ
Reference
:: Alignments
:: Constant Sizes
:: Component Sizes
:: Bounded Sizes
:: Cols & Rows
:: Cell Constraints
:: Groups
:: Layout Variables
Web Pages
:: Project Home
:: Download
:: Archive
:: Mailing Lists
:: Issue Tracker

:: Reference :: Bounded Sizes ::
Bounded sizes are used to restrict a layout element's initial size.
They add context related layout information that the element
does not or cannot provide.
To use a bounded size, you typically combine a component size
(min, pref or default) with a constant size as lower or upper bound.
For example, a well designed command button honors the
button's label and icon size, but also uses a minimum width.
The latter increases the design consistency and often
makes it easier to click on buttons with short labels.
A Swing JButton is used in different contexts:
form, button bar, button stack, toolbar with icons, toolbar with texts,
toolbar in large button mode, etc. Since the JButton (or the
ButtonUI) can only provide a single preferredSize
that often lacks the context. And so, the button lacks information
about context-related layout requirements.
String Representations
String representations for bounded sizes are used in
the FormLayout constructors as well as in classes
ColumnSpec, RowSpec and Border.
The string encodings allow to set only a lower or
upper bound, where the related Java objects allow to set both
bounds at the same time, which is needed rarely.
boundedSize ::= [constantSize,componentSize] // lower bound
| [componentSize,constantSize] // upper bound
| [constantSize,componentSize,constantSize] // lower and upper
| MAX(constantSize;componentSize) // lower bound (old)
| MIN(constantSize;componentSize) // upper bound (old)
Examples
ColumnSpec.decode("[50dlu,pref]"); // pref size with lower bound 50dlu
RowSpec.decode("[pref,80dlu]"); // pref size with upper bound 80dlu
new FormLayout("[50dlu,pref], 4dlu, [100dlu,min]",
"p, 3dlu, p, 3dlu, [200dlu,p]:grow");
(c) 2012 JGoodies
jgoodies-forms-1.6.0/docs/reference/alignments.html 0000644 0001750 0001750 00000014750 12003555436 021140 0 ustar tony tony
JGoodies Forms :: Reference :: Alignments

General
:: Readme
:: Release Notes
:: License
:: Whitepaper
:: Visual Builders
:: References
:: Tips & Tricks
:: FAQ
Reference
:: Alignments
:: Constant Sizes
:: Component Sizes
:: Bounded Sizes
:: Cols & Rows
:: Cell Constraints
:: Groups
:: Layout Variables
Web Pages
:: Project Home
:: Download
:: Archive
:: Mailing Lists
:: Issue Tracker

:: Reference :: Alignments ::
Column alignments are: left, center, right, fill.
And row alignments are: top, center, bottom, fill.
The fill alignment expands a component to span
its display area, so that the component's left-hand side
is left-aligned, and the right-hand side is right-aligned.
The same applies to top/bottom for rows.
Applying Defaults
FormLayout aims to minimize the effort to specificy alignments.
Therefore it 1) tries to reuse alignments, 2) provide good defaults
for form oriented layouts.
1) The column and row alignments are applied to all components
that are located in a single cell of that column/row.
A component can override its column/row alignment by
setting an individual alignment via a CellConstraints
object.
2) By default, the column alignment is set to fill.
The implicit alignment for rows is center.
And so, if you don't specify column and row alignments,
your components will be horizontally filled and vertically centered.
This is a good default for most text fields, combo boxes, buttons
and it works fine with labels too.
Alignment Constants
The classes ColumnSpec, RowSpec provide
constant values for the alignment values mentioned above.
String Representations
I recommend to specify column and row alignments in
the FormLayout constructor using string representations.
These strings will be accepted by the FormLayout,
ColumnSpec, RowSpec and CellConstraints
classes and by many builder methods.
columnAlignment ::= LEFT | CENTER | RIGHT | FILL | L | C | R | F
rowAlignment ::= TOP | CENTER | BOTTOM | FILL | T | C | B | F
Examples
ColumnSpec.LEFT;
ColumnSpec.FILL;
new ColumnSpec("left");
new ColumnSpec("f");
RowSpec.BOTTOM;
RowSpec.CENTER;
new RowSpec("bottom");
new RowSpec("c");
new FormLayout("left:pref, 4dlu, fill:pref",
" top:pref, 3dlu, center:pref");
new CellConstraints(2, 3, ColumnSpec.LEFT, RowSpec.TOP);
new CellConstraints(2, 3, "left, top");
new CellConstraints(2, 3, "l, t");
CellConstraints cc = new CellConstraints();
builder.add(component, cc.xy(2, 3, "left, top");
(c) 2012 JGoodies
jgoodies-forms-1.6.0/docs/reference/variables.html 0000644 0001750 0001750 00000021053 12003555436 020741 0 ustar tony tony
JGoodies Forms :: Reference :: Layout Variables

General
:: Readme
:: Release Notes
:: License
:: Whitepaper
:: Visual Builders
:: References
:: Tips & Tricks
:: FAQ
Reference
:: Alignments
:: Constant Sizes
:: Component Sizes
:: Bounded Sizes
:: Cols & Rows
:: Cell Constraints
:: Groups
:: Layout Variables
Web Pages
:: Project Home
:: Download
:: Archive
:: Mailing Lists
:: Issue Tracker

:: Reference :: Layout Variables ::
Layout variables are used to use improve the design consistency.
Predefined and custom variables start with a dollar sign ($)
and can be surrounded by braces ({ … }). For example $lcgap,
${label-component-gap}, $myvariable1,
${myvariable1}, ${my variable with white space}.
If surrounded by braces the variable name can contain hyphens
and white-space.
variable ::= $<alphanumeric> | ${<string>}
Predefined Variables
Predefined variables provide access to
logical sizes in the Forms' string
language. Their values are requested from the current Layout Style.
columnVariable ::= ${label-component-gap} | $lcgap | $lcg
${related-gap} | $rgap | $rg
${unrelated-gap} | $ugap | $ug
$button | $b
${growing-button} | $gb
${dialog-margin} | $dmargin | $dm
${tabbed-dialog-margin} | $tdmargin | $tdm
$glue
rowVariable ::= ${label-component-gap} | $lcgap | $lcg
${related-gap} | $rgap | $rg
${unrelated-gap} | $ugap | $ug
${narrow-line-gap} | $nlgap | $nlg
${line-gap} | $lgap | $lg
${paragaph-gap} | $pgap | $pg
${dialog-margin} | $dmargin | $dm
${tabbed-dialog-margin} | $tdmargin | $tdm
$button | $b
$glue
Custom Variables
Custom variables further reduce the costs to achieve
consistent design in teams and when implementing many screens.
Let's say you want right-aligned labels in all your screens.
You would repeat "right:pref" in every individual
FormLayout construction.
If you introduce a custom variable $label by
setting it in the shared root LayoutMap you could
later refer to it in the FormLayout constructor
LayoutMap.getRoot().columnPut("label", "right:pref");
new FormLayout("$label, $lcgap, pref", …);
If you setup custom variables, you can honor the platform,
locale, and other context information. Let's say you want
to ensure a consistent width of all label columns using
"right:[85dlu,pref]". The 85dlu will likely
waste space in Chinese.
String width = <compute width per Locale>; // e.g. "85dlu" vs. "25dlu"
LayoutMap.getRoot().columnPut("label", "right:[" + width + ", pref]");
Overriding and Changing Variable Values
You can change a predefined variable value globally or locally.
Layout variable values are requested from LayoutMaps. There's
a shared root LayoutMap available via LayoutMap.getRoot()
that is used by default by the FormLayout constructor and other
methods that use encoded column and row specifications.
If you re-define a variable value in the root LayoutMap,
the change will affect all layouts that use the default LayoutMap.
For example: LayoutMap.getRoot().columnPut("lcgap", "1dlu");.
As an alternative you can create a child LayoutMap and use this
change locally.
LayoutMap childMap = new LayoutMap(); // has the root map as parent
childMap.columnPut("lcgap", "1dlu");
new FormLayout("&hellip", "&hellip", childMap); // uses the child map
Examples
LayoutMap map = LayoutMap.getRoot();
map.columnPut("label", "right:[85dlu,pref]");
map.rowPut ("table", "fill:100dlu:grow");
new FormLayout("right:[85dlu,pref], 3dlu, pref, 3dlu, 50dlu", // no var
"p, 3dlu, p, 3dlu, fill:100dlu:grow");
new FormLayout("right:[85dlu,pref], $lcgap, pref, $rgap, $button", // vars
"p, $lgap, p, $lgap, fill:100dlu:grow");
new FormLayout("right:[85dlu,pref], $lcg, pref, $rg, $b", // short
"p, $lg, p, $lg, fill:100dlu:grow");
new FormLayout("$label, $lcgap, pref, $rgap, $button", // custom vars
"p, $lgap, p, $lgap, $table");
(c) 2012 JGoodies
jgoodies-forms-1.6.0/docs/reference/groups.html 0000644 0001750 0001750 00000011403 12003555436 020306 0 ustar tony tony
JGoodies Forms :: Reference :: Groups

General
:: Readme
:: Release Notes
:: License
:: Whitepaper
:: Visual Builders
:: References
:: Tips & Tricks
:: FAQ
Reference
:: Alignments
:: Constant Sizes
:: Component Sizes
:: Bounded Sizes
:: Cols & Rows
:: Cell Constraints
:: Groups
:: Layout Variables
Web Pages
:: Project Home
:: Download
:: Archive
:: Mailing Lists
:: Issue Tracker

:: Reference :: Groups ::
Column and row groups are used to specifiy that a set of columns or rows
will get the same width or height. This is an essential feature
to implement symmetric, and more generally, balanced design.
Example
In the following example it is ensured that columns 2 and 4
get the same width, rows 1 and 4 get the same height
as well as rows 2 and 3:
FormLayout layout = new FormLayout("p, d, p, d", "p, p, p, p");
layout.setColumnGroups(new int[][]{ {2, 4} });
layout.setRowGroups (new int[][]{ {1, 4}, {2, 3} });
(c) 2012 JGoodies
jgoodies-forms-1.6.0/docs/images/ 0000755 0001750 0001750 00000000000 12003555436 015411 5 ustar tony tony jgoodies-forms-1.6.0/docs/images/quickstart-grid_sm.jpg 0000644 0001750 0001750 00000012306 12003555436 021731 0 ustar tony tony ÿØÿà JFIF d d ÿì Ducky <