Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

de.hunsicker.swing.util
Class SwingHelper  view SwingHelper download SwingHelper.java

java.lang.Object
  extended byde.hunsicker.swing.util.SwingHelper

public final class SwingHelper
extends java.lang.Object

UI related helper functions.

Version:
$Revision: 1.2 $

Constructor Summary
private SwingHelper()
          Creates a new SwingHelper object.
 
Method Summary
static javax.swing.JButton createButton(java.lang.String text)
          Creates a new button with the given text.
static javax.swing.JButton createButton(java.lang.String text, boolean parse)
          Creates a new button with the given text.
static java.awt.Frame getOwnerFrame(java.awt.Component component)
          Returns the frame that contains the given component.
static int getTableHeight(javax.swing.JTable table)
          Returns the visual height of the given table.
static java.awt.GridBagConstraints setConstraints(java.awt.GridBagConstraints constraints, int gridx, int gridy, int gridwidth, int gridheight, double weightx, double weighty, int anchor, int fill, java.awt.Insets insets, int ipadx, int ipady)
          Sets the constraints for the given constraints object.
static void setMenuText(javax.swing.AbstractButton item, java.lang.String text, boolean useMnemonic)
          DOCUMENT ME!
static int showJFileChooser(javax.swing.JFileChooser chooser, java.awt.Component parent, java.lang.String approveButtonText)
          Displays the given file chooser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingHelper

private SwingHelper()
Creates a new SwingHelper object.

Method Detail

setConstraints

public static java.awt.GridBagConstraints setConstraints(java.awt.GridBagConstraints constraints,
                                                         int gridx,
                                                         int gridy,
                                                         int gridwidth,
                                                         int gridheight,
                                                         double weightx,
                                                         double weighty,
                                                         int anchor,
                                                         int fill,
                                                         java.awt.Insets insets,
                                                         int ipadx,
                                                         int ipady)
Sets the constraints for the given constraints object. Helper function to be able to reuse a constraints object.


setMenuText

public static void setMenuText(javax.swing.AbstractButton item,
                               java.lang.String text,
                               boolean useMnemonic)
DOCUMENT ME!


getOwnerFrame

public static java.awt.Frame getOwnerFrame(java.awt.Component component)
Returns the frame that contains the given component.


getTableHeight

public static int getTableHeight(javax.swing.JTable table)
Returns the visual height of the given table.


createButton

public static javax.swing.JButton createButton(java.lang.String text,
                                               boolean parse)
Creates a new button with the given text.

Since:
1.0b9

createButton

public static javax.swing.JButton createButton(java.lang.String text)
Creates a new button with the given text.

Since:
1.0b9

showJFileChooser

public static final int showJFileChooser(javax.swing.JFileChooser chooser,
                                         java.awt.Component parent,
                                         java.lang.String approveButtonText)
Displays the given file chooser. Utility method for avoiding of memory leak in JDK 1.3 JFileChooser.showDialog(java.awt.Component, java.lang.String)>JFileChooser.showDialog(java.awt.Component, java.lang.String) 55 .