GUIDE FAQ
-
Does GUIDE support GroupLayout(Matisse) or SpringLayout?
Currently, GUIDE does not have first-class support for either GroupLayout or SpringLayout. One of our
goals when developing layout support in GUIDE was to make sure that user interactions were stable
and predictable. Both SpringLayout and GroupLayout require that the structure of layouts have an
obscure
series-parallel property that is not always present in free-form designs. When
this property is absent layout inference algorithms tend to behave in a way that does not make
sense to the user (components jump around when certain edges are aligned). This is discussed in
detail in an article on
Layout in GUIDE.
We will continue to research the support we have for these layout managers and will
retintroduce them in a future release if and when a stable and intuitive method of
inference is found.
-
How does GUIDE read and create Java archives?
GUIDE doesn't 'back-parse' or interpret Java source code. Instead, GUIDE loads the class file
(compiling if necessary) and executes the loaded code. User interfaces are then inflated either
by invoking static methods that return a Window or the constructors of Component subclasses.
When GUIDE saves a design, it will replace the method body with any Java code necessary
to recreate the interface that the user has produced.
-
Why doesn't GUIDE save in XML/JSON/Groovy/etc?
GUIDE can save your design in XMLEncoder compatible archives, but Java source code is the format
we recommend for both novices and experts. Not only is Java is easier to edit if you need to
do something unusual, it also allows your IDE to apply refactorings as you refactor the rest
of your codebase.
-
Should I be mucking around in GUIDE generated code?
You can edit code that is generated by GUIDE but we recommend that users make this the exception rather
than the rule. Generally it is easier to use a tool, like GUIDE, that is specifically designed to produce user
interfaces than more general editing tools. Sometimes however it may be simpler to quickly tweak something
in the generated code. GUIDE doesn't try to work out what you did inside the generated code, it
only analyses the Component that results from running the code. If you add loops or conditionals
to the code, only their side-effects will be preserved.
-
Can I import an existing design?
GUIDE can edit any static method or constructor that returns a JFrame, JDialog or JPanel. You may
be able to get GUIDE to load your design by creating a method that returns your existing design. Please
be aware that this area has not been extensively tested.
-
How is the "stretchiness" decided in FormLayout and GridBayLayout?
GUIDE infers the layout from natural alignments (highlighted by the snap guides). In particular, if
a component is at its preferred size, it is assumed to be non-stretchy. Any components not
at their preferred size are deemed candidates for resizing. Stretchable components will be
subject to resizing when they span the largest stretchable column or row.
-
How do I use controllers?
You can pass in a controller to your design to provide runtime data and handle user actions.
A controller's properties can be bound to components within your design, while controller methods can
be triggered in response to listener events. Adding a controller is as simple as adding a parameter to
your design's method signature. (See next question for controller requirements).
-
What are the requirements for a controller?
At minimum, a controller must be:
- Public
- Non-final
- Have a public, no-argument constructor.
If you want to bind your design to controller property change events, your controller will also have to
have
property change support. Property change support requires the following method signatures:
- addPropertyChangeListener(PropertyChangeListener):void
- removePropertyChangeListener(PropertyChangeListener):void
- getPropertyChangeListeners():PropertyChangeListener[]
-
Will GUIDE work on PowerPC/Java 5?
Unfortunately not. We're using several features of Java 6 which are not easily backported. If there
is sufficient demand for Java 5 compatability, we'll revist this topic.
Copyright © Mindsilver 2005-2010