Overview  Package   Class  Tree  Index 

be.lassi.ui.util
Class ComponentUtil

java.lang.Object
  extended by be.lassi.ui.util.ComponentUtil

public class ComponentUtil
extends java.lang.Object


Method Summary
static javax.swing.JButton buildButton(LassiAction action)
           
static javax.swing.JButton buildButton(LassiAction action, java.lang.String iconName)
          Builds a button showing both text and an icon (text on the right).
static javax.swing.JButton buildButton(LassiAction action, java.lang.String iconName, int textPosition)
          Builds a button showing both text and an icon.
static javax.swing.JCheckBox buildCheckBox(LassiAction action, boolean selected)
           
static javax.swing.JCheckBoxMenuItem buildCheckBoxMenuItem(LassiAction action, Holder<java.lang.Boolean> selected)
           
static javax.swing.JButton buildIconButton(LassiAction action, java.lang.String iconName)
          Builds a button showing an icon only (no text).
static void fixMinimumSize(java.awt.Component component)
           
static void setPreferredSize(java.awt.Component component, int x, int y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

buildButton

public static javax.swing.JButton buildButton(LassiAction action)

buildButton

public static javax.swing.JButton buildButton(LassiAction action,
                                              java.lang.String iconName)
Builds a button showing both text and an icon (text on the right).

Parameters:
action - the button action
iconName - the icon name
Returns:
the button

buildButton

public static javax.swing.JButton buildButton(LassiAction action,
                                              java.lang.String iconName,
                                              int textPosition)
Builds a button showing both text and an icon.

Parameters:
action - the button action
iconName - the icon name
textPosition - the horizontal position of the text relative to the icon
Returns:
the button

buildCheckBox

public static javax.swing.JCheckBox buildCheckBox(LassiAction action,
                                                  boolean selected)

buildCheckBoxMenuItem

public static javax.swing.JCheckBoxMenuItem buildCheckBoxMenuItem(LassiAction action,
                                                                  Holder<java.lang.Boolean> selected)

buildIconButton

public static javax.swing.JButton buildIconButton(LassiAction action,
                                                  java.lang.String iconName)
Builds a button showing an icon only (no text).

Parameters:
action - the button action
iconName - the icon name
Returns:
the button

fixMinimumSize

public static void fixMinimumSize(java.awt.Component component)

setPreferredSize

public static void setPreferredSize(java.awt.Component component,
                                    int x,
                                    int y)

Overview  Package   Class  Tree  Index 
Lighting Assistant 1.2