ArithmeticLayoutManager 1.0

ArithmeticLayoutManager is an arithmetic layout manager for Swing/AWT.

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
The Apache License 2.0 
USER RATING:
2.9/5 9
DEVELOPED BY:
Marco Slot
HOMEPAGE:
code.google.com
CATEGORY:
ROOT \ Science and Engineering \ Mathematics
ArithmeticLayoutManager is an arithmetic layout manager for Swing/AWT.

The ArithmeticLayoutManager is a layout manager which can be used to specify the bounds of a component as a series of mathematical expressions which are re-evaluated every time the parent is resized.

The expressions consist of simple arithmetics combined with references to fields of other components (the parent and siblings).

ArithmeticLayoutManager was born out of dissatisfaction with existing layout managers. Although some extremely powerful layout managers exist, most of them present the programmer with a horrendous amount of complexity by requiring intricate chains of invocations, an unintuive String syntax, or a complex configuration procedure (or all of the above). As a result most developers simply use the null layout, which decreases the usability of the program. ArithmeticLayoutManager aims combine an intuitive Java/CSS-like syntax with powerful arithmetic expressions.

Lets start by doing a trick that is extremely hard to do in most layout managers:

Container panel = getContentPane();
panel.setLayout(new ArithmeticLayoutManager());

JLabel nameLabel = new JLabel("Name:");
panel.add(nameLabel,
"name = nameLabel; "+
"top = 20; "+
"left = 20; ");

JTextField nameField = new JTextField();
panel.add(nameField,
"top = 20; "+
"left = nameLabel.rRight + 20; "+
"right = 20; ");

Requirements:

· Java Runtime Environment

Last updated on April 15th, 2008

requirements

#layout manager #arithmetic layout #Swing layout #Swing #AWT #arithmetic #layout

Add your review!

SUBMIT