|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.tuwien.ifs.somtoolbox.util.UiUtils
public class UiUtils
This class provides utility methods for User-Interfaces.
Constructor Summary | |
---|---|
UiUtils()
|
Method Summary | |
---|---|
static void |
centerWindow(Component window)
Places the given component in the middle of the screen. Actually intended for JFrame and JDialog , but Component is superclass of both. |
static JButton |
createBrowseButton(JTextField txtInput,
Window parent,
boolean directoryBrowser)
|
static JPanel |
fillPanel(JPanel panel,
Component... components)
|
static ImageIcon |
getIcon(String imageName)
|
static ImageIcon |
getIcon(String path,
String imageName)
|
static Dimension |
getMaxUsableScreenSize()
|
static JPanel |
makeAndFillPanel(Component... components)
|
static JPanel |
makeBorderedPanel(LayoutManager layout,
String borderTitle)
|
static JPanel |
makeBorderedPanel(String borderTitle)
|
static JLabel |
makeLabelWithTooltip(String labelText,
String tooltipText)
|
static JRadioButton |
makeRadioButton(String text,
ButtonGroup buttonGroup)
|
static JRadioButton |
makeRadioButton(String text,
ButtonGroup buttonGroup,
boolean selected)
|
static JRadioButton |
makeRadioButton(String text,
String actionCommand,
ButtonGroup buttonGroup,
boolean selected)
|
static void |
packColumn(JTable table,
int vColIndex,
int margin)
Sets the preferred width of the visible column specified by vColIndex. |
static void |
packColumns(JTable table,
int margin)
Sets the preferred width of all visible columns, using packColumn(JTable, int, int) |
static void |
recursiveAddBorderToPanel(JComponent c)
|
static void |
reSizeColumn(TableColumn col,
int min,
int preferred,
int max)
|
static Font |
scaleFont(Component comp,
double scale)
|
static Font |
scaleFont(Font font,
double scale)
|
static void |
setSOMToolboxLookAndFeel()
|
static AbstractButton |
setToolbarButtonDetails(AbstractButton button,
ActionListener listener,
String imageName,
String toolTipText,
String altText,
boolean isSelected)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UiUtils()
Method Detail |
---|
public static void centerWindow(Component window)
JFrame
and JDialog
, but Component
is superclass of both.
public static void setSOMToolboxLookAndFeel()
public static void recursiveAddBorderToPanel(JComponent c)
public static ImageIcon getIcon(String imageName)
public static ImageIcon getIcon(String path, String imageName)
public static JLabel makeLabelWithTooltip(String labelText, String tooltipText)
public static JPanel makeAndFillPanel(Component... components)
public static JPanel fillPanel(JPanel panel, Component... components)
public static AbstractButton setToolbarButtonDetails(AbstractButton button, ActionListener listener, String imageName, String toolTipText, String altText, boolean isSelected)
public static JRadioButton makeRadioButton(String text, ButtonGroup buttonGroup)
public static JRadioButton makeRadioButton(String text, ButtonGroup buttonGroup, boolean selected)
public static JRadioButton makeRadioButton(String text, String actionCommand, ButtonGroup buttonGroup, boolean selected)
public static JPanel makeBorderedPanel(String borderTitle)
public static JPanel makeBorderedPanel(LayoutManager layout, String borderTitle)
public static Font scaleFont(Component comp, double scale)
public static Font scaleFont(Font font, double scale)
public static void packColumns(JTable table, int margin)
packColumn(JTable, int, int)
public static void packColumn(JTable table, int vColIndex, int margin)
public static void reSizeColumn(TableColumn col, int min, int preferred, int max)
public static Dimension getMaxUsableScreenSize()
public static JButton createBrowseButton(JTextField txtInput, Window parent, boolean directoryBrowser)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |