public class SwingTools extends Object
Modifier and Type | Method and Description |
---|---|
static int |
appendFileToTextArea(File file,
JTextArea ta) |
static <D extends Message> |
ask(JFrame frame,
@Opt String windowtitle,
int messageType,
MessageStore<D> text,
String cancelbutton,
String okbutton) |
static boolean |
ask(JFrame frame,
@Opt String windowtitle,
int messageType,
Object[] text,
String cancelbutton,
String okbutton) |
static int |
loadPngsToButtons(JPanel container,
File directory,
String fileStem,
int numStart,
String numberFormat)
Load one or more ".png" files to JButtons and append them to the end of the
container.
|
static <C extends Container> |
nearestContainer(@Opt Component c,
Class<C> cl) |
static void |
setMaximumToPreferred(Component c) |
static <D extends Message> |
show(JFrame frame,
@Opt String windowtitle,
int messageType,
MessageStore<D> text,
String buttonText) |
static void |
show(JFrame frame,
@Opt String windowtitle,
int messageType,
Object[] text,
String buttonText)
ATTENTION: when calling "showXXDialog()",
the conversion to "Object[]" must be done explicitly,
because only then "vertical stacking" is applied to the
results of "toString()" separately!
|
public static void setMaximumToPreferred(Component c)
@Opt public static <C extends Container> C nearestContainer(@Opt @Opt Component c, Class<C> cl)
public static <D extends Message> void show(JFrame frame, @Opt @Opt String windowtitle, int messageType, MessageStore<D> text, String buttonText)
public static void show(JFrame frame, @Opt @Opt String windowtitle, int messageType, Object[] text, String buttonText)
public static <D extends Message> boolean ask(JFrame frame, @Opt @Opt String windowtitle, int messageType, MessageStore<D> text, String cancelbutton, String okbutton)
public static boolean ask(JFrame frame, @Opt @Opt String windowtitle, int messageType, Object[] text, String cancelbutton, String okbutton)
public static int appendFileToTextArea(File file, JTextArea ta) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public static int loadPngsToButtons(JPanel container, File directory, String fileStem, int numStart, String numberFormat)
see also the complete user documentation .