be.lassi.ui.util
Class ComponentUtil
java.lang.Object
be.lassi.ui.util.ComponentUtil
public class ComponentUtil
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 actioniconName
- 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 actioniconName
- the icon nametextPosition
- 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 actioniconName
- 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)