|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.claudio.lib.DialogUtility
public final class DialogUtility
Module containing methods useful in GUIs.
Copyright (C) 2004-2007 Claudio Nieder <private@claudio.ch>, CH-8610 Uster
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Field Summary | |
---|---|
static java.awt.Insets |
defaultInsets
Default Inset value to use in the constraints. |
Method Summary | |
---|---|
static void |
addExitOnClose(java.awt.Frame frame)
Add a window listener which calls System.exit(1) when the user hits the close button of the window. |
static void |
main(java.lang.String[] args)
Print license. |
static java.awt.Button |
newButton(java.lang.String label,
java.awt.event.ActionListener listener)
Create a Button with an action listener |
static java.awt.GridBagConstraints |
newDefaultContraints()
Create a default GridBagConstraints instance prefilled in a useful manner. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.awt.Insets defaultInsets
Method Detail |
---|
public static final java.awt.GridBagConstraints newDefaultContraints()
Note: The weightx and weighty are prefilled with 1e-10. They are not filled with 1 as I assume most application have few areas which need to occupy large part of the gui. They are not filled with 0, as 0 is somehow special. If all weights are 0 then the components are not streched at all and extra space goes into the border around all components.
public static final java.awt.Button newButton(java.lang.String label, java.awt.event.ActionListener listener)
label
- Button labellistener
- Action to perform
public static final void addExitOnClose(java.awt.Frame frame)
frame
- to modifypublic static void main(java.lang.String[] args)
args
- ignored
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |