public class SwingTools extends Object
Constructor and Description |
---|
SwingTools() |
Modifier and Type | Method and Description |
---|---|
static void |
addAccelerator(Component source,
JComponent container,
ActionListener listener,
int key,
int modifiers)
Add a keyboard accelerator to a container.
|
static JPanel |
boxLayoutPanel(int alignment) |
static JButton |
button(String title,
String toolTip,
ActionListener listener,
Container addTo) |
static String |
getChoice(Component owner,
List<String> list,
String question,
String title) |
static JPanel |
horizontalPanel() |
static void |
invokeOnEDT(Runnable job) |
static JPanel |
label(String text,
Container addTo) |
static JPanel |
labelComponent(String text,
JComponent component,
Container addTo) |
static JPanel |
labelComponentRigid(String text,
JComponent component)
Uses a GridBagLayout to prevent odd resizing behaviours.
|
static JTextPane |
scrolledText(int width,
int height,
Iterable<String> list,
DocumentListener listener,
Container addTo) |
static JTextPane |
scrolledText(int width,
int height,
String text,
DocumentListener listener,
Container addTo) |
static JScrollPane |
scrollPane(Component component,
int width,
int height,
Container addTo) |
static void |
showMessageBox(Component owner,
String message,
int type) |
static boolean |
showQuestion(Component owner,
String title,
String question) |
static boolean |
showYesNoQuestion(Component owner,
String title,
String question) |
static JTabbedPane |
tab(Component component,
String title,
String tooltip,
int width,
int height,
Container addTo) |
static JPanel |
verticalPanel() |
static void |
waitForFakeDialog(String title,
Component component) |
public static JTabbedPane tab(Component component, String title, String tooltip, int width, int height, Container addTo)
public static JScrollPane scrollPane(Component component, int width, int height, Container addTo)
public static JPanel boxLayoutPanel(int alignment)
public static JPanel horizontalPanel()
public static JPanel verticalPanel()
public static JButton button(String title, String toolTip, ActionListener listener, Container addTo)
public static JPanel labelComponent(String text, JComponent component, Container addTo)
public static JPanel labelComponentRigid(String text, JComponent component)
public static JTextPane scrolledText(int width, int height, String text, DocumentListener listener, Container addTo)
public static JTextPane scrolledText(int width, int height, Iterable<String> list, DocumentListener listener, Container addTo)
public static void addAccelerator(Component source, JComponent container, ActionListener listener, int key, int modifiers)
public static boolean showYesNoQuestion(Component owner, String title, String question)
public static String getChoice(Component owner, List<String> list, String question, String title)
public static void invokeOnEDT(Runnable job)
Copyright © 2014–2022 ImageJ. All rights reserved.