public class UISupport extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_EDITOR_FONT |
static int |
DEFAULT_EDITOR_FONT_SIZE |
static int |
EXTENDED_ERROR_MESSAGE_THRESHOLD |
static ImageIcon |
HELP_ICON |
static String |
IMAGES_RESOURCE_PATH |
static Color |
MAC_BACKGROUND_COLOR |
static Color |
MAC_PROGRESSBAR_BACKGROUND_COLOR |
static Color |
MAC_PROGRESSBAR_LINE_BORDER_COLOR |
static Color |
MAC_PROGRESSBAR_MATTE_BORDER_COLOR |
static ImageIcon |
OPTIONS_ICON |
static String |
OPTIONS_ICON_PATH |
static ImageIcon |
TOOL_ICON |
static String |
TOOL_ICON_PATH |
static Dimension |
TOOLBAR_BUTTON_DIMENSION |
Constructor and Description |
---|
UISupport() |
Modifier and Type | Method and Description |
---|---|
static void |
addClassLoader(ClassLoader loader)
Deprecated.
Use
addResourceClassLoader(ClassLoader) instead |
static PreviewCorner |
addPreviewCorner(JScrollPane scrollPane,
boolean forceScrollbars) |
static void |
addResourceClassLoader(ClassLoader loader)
Add a classloader to find resources.
|
static <T extends JComponent> |
addTitledBorder(T component,
String title) |
static JComboBox |
addTooltipListener(JComboBox combo,
String defaultTooltip) |
static void |
beep() |
static DescriptionPanel |
buildDescription(String title,
String string,
ImageIcon icon) |
static JPanel |
buildPanelWithToolbar(JComponent top,
JComponent content) |
static JPanel |
buildPanelWithToolbarAndStatusBar(JComponent top,
JComponent content,
JComponent bottom) |
static void |
centerDialog(Window dialog) |
static void |
centerDialog(Window dialog,
Window owner) |
static boolean |
confirm(String question,
String title) |
static boolean |
confirm(String question,
String title,
Component parent) |
static boolean |
confirmExtendedInfo(String title,
String description,
String content,
Dimension size) |
static Boolean |
confirmOrCancel(String question,
String title) |
static Boolean |
confirmOrCancelExtendedInfo(String title,
String description,
String content,
Dimension size) |
static JButton |
createActionButton(Action action,
boolean enabled) |
static ConfigurationDialog |
createConfigurationDialog(String name)
Deprecated.
use XForm related classes instead
|
static ConfigurationDialog |
createConfigurationDialog(String name,
String helpUrl)
Deprecated.
use XForm related classes instead
|
static ConfigurationDialog |
createConfigurationDialog(String name,
String helpUrl,
String description,
ImageIcon icon)
Deprecated.
use XForm related classes instead
|
static JPanel |
createEmptyPanel(int top,
int left,
int bottom,
int right) |
static JButton |
createFormButton(Action action) |
static JSplitPane |
createHorizontalSplit() |
static JSplitPane |
createHorizontalSplit(Component leftComponent,
Component rightComponent) |
static ImageIcon |
createImageIcon(String path) |
static JLabel |
createLabelLink(String url,
String labelText) |
static JPanel |
createProgressBarPanel(JProgressBar progressBar,
int space,
boolean indeterimate) |
static JXToolBar |
createSmallToolbar() |
static JPanel |
createTabPanel(JTabbedPane tabs,
boolean addBorder) |
static JXToolBar |
createToolbar() |
static JButton |
createToolbarButton(Action action) |
static JButton |
createToolbarButton(Action action,
boolean enabled) |
static JButton |
createToolbarButton(ImageIcon icon) |
static JSplitPane |
createVerticalSplit() |
static JSplitPane |
createVerticalSplit(Component topComponent,
Component bottomComponent) |
static <T> T |
findParentWithClass(Component startComponent,
Class<T> expectedClass) |
static URL |
findSplash(String filename) |
static XDialogs |
getDialogs() |
static EditorFactory |
getEditorFactory() |
static Font |
getEditorFont() |
static Font |
getEditorFont(Settings settings) |
static XFileDialogs |
getFileDialogs() |
static String |
getIconPath(ImageIcon icon) |
static KeyStroke |
getKeyStroke(String keyStroke)
Replaces "menu" in the keyStroke with ctrl or meta depending on
getMenuShortcutKeyMask
|
static Frame |
getMainFrame() |
static Frame |
getParentFrame(Component component) |
static Dimension |
getPreferredButtonSize() |
static ToolHost |
getToolHost() |
static UIUtils |
getUIUtils() |
static JButtonBar |
initDialogActions(ActionList actions,
JDialog dialog) |
static void |
initDialogActions(JDialog dialog,
Action helpAction,
JButton defaultButton) |
static JButtonBar |
initFrameActions(ActionList actions,
JFrame frame) |
static void |
invokeAndWait(Runnable runnable) |
static void |
invokeAndWaitIfNotInEDT(Runnable runnable) |
static void |
invokeLater(Runnable runnable) |
static boolean |
isEnoughSpaceAvailableBelowComponent(Point componentLocation,
int expandableDialogHeight,
int componentHeight) |
static boolean |
isHeadless() |
static boolean |
isIdePlugin() |
static boolean |
isMac() |
static boolean |
isUsingConsoleDialogs() |
static boolean |
isWindows() |
static String |
prompt(String question,
String title)
Deprecated.
use prompt(String question, String title, String value)
instead
|
static <T> T |
prompt(String question,
String title,
List<T> objects) |
static <T> T |
prompt(String question,
String title,
List<T> objects,
String value) |
static String |
prompt(String question,
String title,
String value) |
static <T> T |
prompt(String question,
String title,
T[] objects) |
static <T> T |
prompt(String question,
String title,
T[] objects,
String value) |
static char[] |
promptPassword(String question,
String title) |
static void |
resetCursor() |
static void |
select(ModelItem modelItem) |
static DesktopPanel |
selectAndShow(ModelItem modelItem) |
static String |
selectJsonPath(String title,
String info,
String json,
String jsonPath) |
static String |
selectXPath(String title,
String info,
String xml,
String xpath) |
static void |
setDialogs(XDialogs xDialogs) |
static void |
setFileDialogs(XFileDialogs xFileDialogs) |
static void |
setFixedColumnSize(TableColumn column,
int width) |
static <T extends JComponent> |
setFixedSize(T component,
Dimension size) |
static <T extends JComponent> |
setFixedSize(T component,
int i,
int j) |
static void |
setHourglassCursor() |
static void |
setMainFrame(Component frame)
Set the main frame of this application.
|
static void |
setPreferredHeight(Component component,
int heigth) |
static void |
setToolHost(ToolHost host) |
static void |
setUIUtils(UIUtils utils) |
static DesktopPanel |
showDesktopPanel(DesktopPanel desktopPanel) |
static DesktopPanel |
showDesktopPanel(ModelItem modelItem) |
static void |
showDialog(JDialog dialog) |
static void |
showErrorMessage(String message) |
static void |
showErrorMessage(Throwable ex) |
static void |
showExtendedInfo(String title,
String description,
String content,
Dimension size) |
static void |
showInfoMessage(String message) |
static void |
showInfoMessage(String message,
String title) |
static void |
showPopup(JPopupMenu popup,
JComponent invoker,
Point p) |
static boolean |
stopCellEditing(JTable table) |
static Component |
wrapInEmptyPanel(JComponent component,
Border border) |
static int |
yesYesToAllOrNo(String question,
String title) |
public static final String IMAGES_RESOURCE_PATH
public static final String TOOL_ICON_PATH
public static final String OPTIONS_ICON_PATH
public static final int EXTENDED_ERROR_MESSAGE_THRESHOLD
public static Dimension TOOLBAR_BUTTON_DIMENSION
public static final String DEFAULT_EDITOR_FONT
public static final int DEFAULT_EDITOR_FONT_SIZE
public static final Color MAC_BACKGROUND_COLOR
public static final Color MAC_PROGRESSBAR_BACKGROUND_COLOR
public static final Color MAC_PROGRESSBAR_MATTE_BORDER_COLOR
public static final Color MAC_PROGRESSBAR_LINE_BORDER_COLOR
public static ImageIcon TOOL_ICON
public static ImageIcon OPTIONS_ICON
public static ImageIcon HELP_ICON
public static void addClassLoader(ClassLoader loader)
addResourceClassLoader(ClassLoader)
insteadloader
- public static void addResourceClassLoader(ClassLoader loader)
loader
- public static void setMainFrame(Component frame)
frame
- public static void setDialogs(XDialogs xDialogs)
public static EditorFactory getEditorFactory()
public static void setFileDialogs(XFileDialogs xFileDialogs)
public static ToolHost getToolHost()
public static void setToolHost(ToolHost host)
public static Frame getMainFrame()
public static JComboBox addTooltipListener(JComboBox combo, String defaultTooltip)
public static XDialogs getDialogs()
public static XFileDialogs getFileDialogs()
@Deprecated public static ConfigurationDialog createConfigurationDialog(String name, String helpUrl, String description, ImageIcon icon)
@Deprecated public static ConfigurationDialog createConfigurationDialog(String name, String helpUrl)
@Deprecated public static ConfigurationDialog createConfigurationDialog(String name)
public static void showErrorMessage(String message)
@Deprecated public static String prompt(String question, String title)
public static boolean stopCellEditing(JTable table)
public static JPanel createProgressBarPanel(JProgressBar progressBar, int space, boolean indeterimate)
public static JSplitPane createHorizontalSplit()
public static JSplitPane createHorizontalSplit(Component leftComponent, Component rightComponent)
public static JSplitPane createVerticalSplit()
public static JSplitPane createVerticalSplit(Component topComponent, Component bottomComponent)
public static void centerDialog(Window dialog)
public static void showDialog(JDialog dialog)
public static boolean isHeadless()
public static void showInfoMessage(String message)
public static JPanel createTabPanel(JTabbedPane tabs, boolean addBorder)
public static void showPopup(JPopupMenu popup, JComponent invoker, Point p)
public static DesktopPanel selectAndShow(ModelItem modelItem)
public static DesktopPanel showDesktopPanel(ModelItem modelItem)
public static DesktopPanel showDesktopPanel(DesktopPanel desktopPanel)
public static JPanel buildPanelWithToolbar(JComponent top, JComponent content)
public static JPanel buildPanelWithToolbarAndStatusBar(JComponent top, JComponent content, JComponent bottom)
public static Dimension getPreferredButtonSize()
public static void showErrorMessage(Throwable ex)
public static Component wrapInEmptyPanel(JComponent component, Border border)
public static boolean isWindows()
public static boolean isMac()
public static void setHourglassCursor()
public static void resetCursor()
public static void setUIUtils(UIUtils utils)
public static UIUtils getUIUtils()
public static void invokeLater(Runnable runnable)
public static void invokeAndWait(Runnable runnable) throws Exception
Exception
public static void invokeAndWaitIfNotInEDT(Runnable runnable)
public static JXToolBar createToolbar()
public static JXToolBar createSmallToolbar()
public static KeyStroke getKeyStroke(String keyStroke)
public static DescriptionPanel buildDescription(String title, String string, ImageIcon icon)
public static void setPreferredHeight(Component component, int heigth)
public static JButtonBar initDialogActions(ActionList actions, JDialog dialog)
public static JButtonBar initFrameActions(ActionList actions, JFrame frame)
public static void initDialogActions(JDialog dialog, Action helpAction, JButton defaultButton)
public static <T extends JComponent> T addTitledBorder(T component, String title)
public static void beep()
public static void showExtendedInfo(String title, String description, String content, Dimension size)
public static boolean confirmExtendedInfo(String title, String description, String content, Dimension size)
public static Boolean confirmOrCancelExtendedInfo(String title, String description, String content, Dimension size)
public static void select(ModelItem modelItem)
public static String selectJsonPath(String title, String info, String json, String jsonPath)
public static PreviewCorner addPreviewCorner(JScrollPane scrollPane, boolean forceScrollbars)
public static <T extends JComponent> T setFixedSize(T component, Dimension size)
public static <T extends JComponent> T setFixedSize(T component, int i, int j)
public static void setFixedColumnSize(TableColumn column, int width)
public static Font getEditorFont()
public static <T> T findParentWithClass(Component startComponent, Class<T> expectedClass)
public static boolean isIdePlugin()
public static JPanel createEmptyPanel(int top, int left, int bottom, int right)
public static boolean isEnoughSpaceAvailableBelowComponent(Point componentLocation, int expandableDialogHeight, int componentHeight)
public static boolean isUsingConsoleDialogs()
Copyright © 2019. All Rights Reserved.