com.eviware.soapui.support
Class UISupport

java.lang.Object
  extended by com.eviware.soapui.support.UISupport

public class UISupport
extends java.lang.Object

Facade for common UI-related tasks

Author:
Ole.Matzura

Field Summary
static java.lang.String DEFAULT_EDITOR_FONT
           
static int DEFAULT_EDITOR_FONT_SIZE
           
static javax.swing.ImageIcon HELP_ICON
           
static javax.swing.ImageIcon OPTIONS_ICON
           
static java.lang.String OPTIONS_ICON_PATH
           
static javax.swing.ImageIcon TOOL_ICON
           
static java.lang.String TOOL_ICON_PATH
           
static java.awt.Dimension TOOLBAR_BUTTON_DIMENSION
           
 
Constructor Summary
UISupport()
           
 
Method Summary
static void addClassLoader(java.lang.ClassLoader loader)
          Add a classloader to find resources.
static PreviewCorner addPreviewCorner(javax.swing.JScrollPane scrollPane, boolean forceScrollbars)
           
static
<T extends javax.swing.JComponent>
T
addTitledBorder(T component, java.lang.String title)
           
static void beep()
           
static DescriptionPanel buildDescription(java.lang.String title, java.lang.String string, javax.swing.ImageIcon icon)
           
static javax.swing.JPanel buildPanelWithToolbar(javax.swing.JComponent top, javax.swing.JComponent content)
           
static javax.swing.JPanel buildPanelWithToolbarAndStatusBar(javax.swing.JComponent top, javax.swing.JComponent content, javax.swing.JComponent bottom)
           
static void centerDialog(java.awt.Window dialog)
           
static void centerDialog(java.awt.Window dialog, java.awt.Window owner)
           
static boolean confirm(java.lang.String question, java.lang.String title)
           
static boolean confirmExtendedInfo(java.lang.String title, java.lang.String description, java.lang.String content, java.awt.Dimension size)
           
static java.lang.Boolean confirmOrCancel(java.lang.String question, java.lang.String title)
           
static java.lang.Boolean confirmOrCancelExtendedInfo(java.lang.String title, java.lang.String description, java.lang.String content, java.awt.Dimension size)
           
static javax.swing.JButton createActionButton(javax.swing.Action action, boolean enabled)
           
static ConfigurationDialog createConfigurationDialog(java.lang.String name)
          Deprecated. use XForm related classes instead
static ConfigurationDialog createConfigurationDialog(java.lang.String name, java.lang.String helpUrl)
          Deprecated. use XForm related classes instead
static ConfigurationDialog createConfigurationDialog(java.lang.String name, java.lang.String helpUrl, java.lang.String description, javax.swing.ImageIcon icon)
          Deprecated. use XForm related classes instead
static javax.swing.JSplitPane createHorizontalSplit()
           
static javax.swing.JSplitPane createHorizontalSplit(java.awt.Component leftComponent, java.awt.Component rightComponent)
           
static javax.swing.ImageIcon createImageIcon(java.lang.String path)
           
static javax.swing.JPanel createProgressBarPanel(javax.swing.JProgressBar progressBar, int space, boolean indeterimate)
           
static JXToolBar createSmallToolbar()
           
static javax.swing.JPanel createTabPanel(javax.swing.JTabbedPane tabs, boolean addBorder)
           
static JXToolBar createToolbar()
           
static javax.swing.JButton createToolbarButton(javax.swing.Action action)
           
static javax.swing.JButton createToolbarButton(javax.swing.Action action, boolean enabled)
           
static javax.swing.JButton createToolbarButton(javax.swing.ImageIcon icon)
           
static javax.swing.JSplitPane createVerticalSplit()
           
static javax.swing.JSplitPane createVerticalSplit(java.awt.Component topComponent, java.awt.Component bottomComponent)
           
static java.net.URL findSplash(java.lang.String filename)
           
static com.eviware.x.dialogs.XDialogs getDialogs()
           
static java.awt.Font getEditorFont()
           
static java.awt.Font getEditorFont(Settings settings)
           
static com.eviware.x.dialogs.XFileDialogs getFileDialogs()
           
static javax.swing.KeyStroke getKeyStroke(java.lang.String keyStroke)
          Replaces "menu" in the keyStroke with ctrl or meta depending on getMenuShortcutKeyMask
static java.awt.Frame getMainFrame()
           
static java.awt.Frame getParentFrame(java.awt.Component component)
           
static java.awt.Dimension getPreferredButtonSize()
           
static ToolHost getToolHost()
           
static JButtonBar initDialogActions(ActionList actions, javax.swing.JDialog dialog)
           
static void initDialogActions(javax.swing.JDialog dialog, javax.swing.Action helpAction, javax.swing.JButton defaultButton)
           
static JButtonBar initFrameActions(ActionList actions, javax.swing.JFrame frame)
           
static void invokeAndWait(java.lang.Runnable runnable)
           
static void invokeLater(java.lang.Runnable runnable)
           
static boolean isHeadless()
           
static boolean isWindows()
           
static java.lang.String prompt(java.lang.String question, java.lang.String title)
          Deprecated. use prompt(String question, String title, String value) instead
static
<T> T
prompt(java.lang.String question, java.lang.String title, java.util.List<T> objects)
           
static
<T> T
prompt(java.lang.String question, java.lang.String title, java.util.List<T> objects, java.lang.String value)
           
static java.lang.String prompt(java.lang.String question, java.lang.String title, java.lang.String value)
           
static
<T> T
prompt(java.lang.String question, java.lang.String title, T[] objects)
           
static
<T> T
prompt(java.lang.String question, java.lang.String title, T[] objects, java.lang.String value)
           
static char[] promptPassword(java.lang.String question, java.lang.String title)
           
static void resetCursor()
           
static void select(ModelItem modelItem)
           
static DesktopPanel selectAndShow(ModelItem modelItem)
           
static java.lang.String selectXPath(java.lang.String title, java.lang.String info, java.lang.String xml, java.lang.String xpath)
           
static void setDialogs(com.eviware.x.dialogs.XDialogs xDialogs)
           
static void setFileDialogs(com.eviware.x.dialogs.XFileDialogs xFileDialogs)
           
static void setFixedColumnSize(javax.swing.table.TableColumn column, int width)
           
static
<T extends javax.swing.JComponent>
T
setFixedSize(T component, java.awt.Dimension size)
           
static
<T extends javax.swing.JComponent>
T
setFixedSize(T component, int i, int j)
           
static void setHourglassCursor()
           
static void setMainFrame(java.awt.Component frame)
          Set the main frame of this application.
static void setPreferredHeight(java.awt.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(javax.swing.JDialog dialog)
           
static void showErrorMessage(java.lang.String message)
           
static void showErrorMessage(java.lang.Throwable ex)
           
static void showExtendedInfo(java.lang.String title, java.lang.String description, java.lang.String content, java.awt.Dimension size)
           
static void showInfoMessage(java.lang.String message)
           
static void showInfoMessage(java.lang.String message, java.lang.String title)
           
static void showPopup(javax.swing.JPopupMenu popup, javax.swing.JComponent invoker, java.awt.Point p)
           
static boolean stopCellEditing(javax.swing.JTable table)
           
static java.awt.Component wrapInEmptyPanel(javax.swing.JComponent component, javax.swing.border.Border border)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOOL_ICON_PATH

public static final java.lang.String TOOL_ICON_PATH
See Also:
Constant Field Values

OPTIONS_ICON_PATH

public static final java.lang.String OPTIONS_ICON_PATH
See Also:
Constant Field Values

TOOLBAR_BUTTON_DIMENSION

public static java.awt.Dimension TOOLBAR_BUTTON_DIMENSION

DEFAULT_EDITOR_FONT

public static final java.lang.String DEFAULT_EDITOR_FONT
See Also:
Constant Field Values

DEFAULT_EDITOR_FONT_SIZE

public static final int DEFAULT_EDITOR_FONT_SIZE
See Also:
Constant Field Values

TOOL_ICON

public static javax.swing.ImageIcon TOOL_ICON

OPTIONS_ICON

public static javax.swing.ImageIcon OPTIONS_ICON

HELP_ICON

public static javax.swing.ImageIcon HELP_ICON
Constructor Detail

UISupport

public UISupport()
Method Detail

addClassLoader

public static void addClassLoader(java.lang.ClassLoader loader)
Add a classloader to find resources.

Parameters:
loader -

setMainFrame

public static void setMainFrame(java.awt.Component frame)
Set the main frame of this application. This is only used when running under Swing.

Parameters:
frame -

setDialogs

public static void setDialogs(com.eviware.x.dialogs.XDialogs xDialogs)

setFileDialogs

public static void setFileDialogs(com.eviware.x.dialogs.XFileDialogs xFileDialogs)

getToolHost

public static ToolHost getToolHost()

setToolHost

public static void setToolHost(ToolHost host)

getMainFrame

public static java.awt.Frame getMainFrame()

getParentFrame

public static java.awt.Frame getParentFrame(java.awt.Component component)

getDialogs

public static com.eviware.x.dialogs.XDialogs getDialogs()

getFileDialogs

public static com.eviware.x.dialogs.XFileDialogs getFileDialogs()

createConfigurationDialog

@Deprecated
public static ConfigurationDialog createConfigurationDialog(java.lang.String name,
                                                                       java.lang.String helpUrl,
                                                                       java.lang.String description,
                                                                       javax.swing.ImageIcon icon)
Deprecated. use XForm related classes instead


createConfigurationDialog

@Deprecated
public static ConfigurationDialog createConfigurationDialog(java.lang.String name,
                                                                       java.lang.String helpUrl)
Deprecated. use XForm related classes instead


createConfigurationDialog

@Deprecated
public static ConfigurationDialog createConfigurationDialog(java.lang.String name)
Deprecated. use XForm related classes instead


showErrorMessage

public static void showErrorMessage(java.lang.String message)

confirm

public static boolean confirm(java.lang.String question,
                              java.lang.String title)

prompt

public static java.lang.String prompt(java.lang.String question,
                                      java.lang.String title,
                                      java.lang.String value)

prompt

@Deprecated
public static java.lang.String prompt(java.lang.String question,
                                                 java.lang.String title)
Deprecated. use prompt(String question, String title, String value) instead


stopCellEditing

public static boolean stopCellEditing(javax.swing.JTable table)

createProgressBarPanel

public static javax.swing.JPanel createProgressBarPanel(javax.swing.JProgressBar progressBar,
                                                        int space,
                                                        boolean indeterimate)

createHorizontalSplit

public static javax.swing.JSplitPane createHorizontalSplit()

createHorizontalSplit

public static javax.swing.JSplitPane createHorizontalSplit(java.awt.Component leftComponent,
                                                           java.awt.Component rightComponent)

createVerticalSplit

public static javax.swing.JSplitPane createVerticalSplit()

createVerticalSplit

public static javax.swing.JSplitPane createVerticalSplit(java.awt.Component topComponent,
                                                         java.awt.Component bottomComponent)

centerDialog

public static void centerDialog(java.awt.Window dialog)

centerDialog

public static void centerDialog(java.awt.Window dialog,
                                java.awt.Window owner)

showDialog

public static void showDialog(javax.swing.JDialog dialog)

createImageIcon

public static javax.swing.ImageIcon createImageIcon(java.lang.String path)

isHeadless

public static boolean isHeadless()

showInfoMessage

public static void showInfoMessage(java.lang.String message)

showInfoMessage

public static void showInfoMessage(java.lang.String message,
                                   java.lang.String title)

prompt

public static <T> T prompt(java.lang.String question,
                           java.lang.String title,
                           T[] objects)

prompt

public static <T> T prompt(java.lang.String question,
                           java.lang.String title,
                           T[] objects,
                           java.lang.String value)

createToolbarButton

public static javax.swing.JButton createToolbarButton(javax.swing.Action action)

createToolbarButton

public static javax.swing.JButton createToolbarButton(javax.swing.Action action,
                                                      boolean enabled)

createTabPanel

public static javax.swing.JPanel createTabPanel(javax.swing.JTabbedPane tabs,
                                                boolean addBorder)

showPopup

public static void showPopup(javax.swing.JPopupMenu popup,
                             javax.swing.JComponent invoker,
                             java.awt.Point p)

selectAndShow

public static DesktopPanel selectAndShow(ModelItem modelItem)

showDesktopPanel

public static DesktopPanel showDesktopPanel(ModelItem modelItem)

showDesktopPanel

public static DesktopPanel showDesktopPanel(DesktopPanel desktopPanel)

confirmOrCancel

public static java.lang.Boolean confirmOrCancel(java.lang.String question,
                                                java.lang.String title)

buildPanelWithToolbar

public static javax.swing.JPanel buildPanelWithToolbar(javax.swing.JComponent top,
                                                       javax.swing.JComponent content)

buildPanelWithToolbarAndStatusBar

public static javax.swing.JPanel buildPanelWithToolbarAndStatusBar(javax.swing.JComponent top,
                                                                   javax.swing.JComponent content,
                                                                   javax.swing.JComponent bottom)

getPreferredButtonSize

public static java.awt.Dimension getPreferredButtonSize()

showErrorMessage

public static void showErrorMessage(java.lang.Throwable ex)

wrapInEmptyPanel

public static java.awt.Component wrapInEmptyPanel(javax.swing.JComponent component,
                                                  javax.swing.border.Border border)

isWindows

public static boolean isWindows()

setHourglassCursor

public static void setHourglassCursor()

resetCursor

public static void resetCursor()

setUIUtils

public static void setUIUtils(UIUtils utils)

invokeLater

public static void invokeLater(java.lang.Runnable runnable)

invokeAndWait

public static void invokeAndWait(java.lang.Runnable runnable)
                          throws java.lang.Exception
Throws:
java.lang.Exception

createToolbar

public static JXToolBar createToolbar()

createSmallToolbar

public static JXToolBar createSmallToolbar()

getKeyStroke

public static javax.swing.KeyStroke getKeyStroke(java.lang.String keyStroke)
Replaces "menu" in the keyStroke with ctrl or meta depending on getMenuShortcutKeyMask


buildDescription

public static DescriptionPanel buildDescription(java.lang.String title,
                                                java.lang.String string,
                                                javax.swing.ImageIcon icon)

setPreferredHeight

public static void setPreferredHeight(java.awt.Component component,
                                      int heigth)

initDialogActions

public static JButtonBar initDialogActions(ActionList actions,
                                           javax.swing.JDialog dialog)

initFrameActions

public static JButtonBar initFrameActions(ActionList actions,
                                          javax.swing.JFrame frame)

initDialogActions

public static void initDialogActions(javax.swing.JDialog dialog,
                                     javax.swing.Action helpAction,
                                     javax.swing.JButton defaultButton)

addTitledBorder

public static <T extends javax.swing.JComponent> T addTitledBorder(T component,
                                                                   java.lang.String title)

beep

public static void beep()

prompt

public static <T> T prompt(java.lang.String question,
                           java.lang.String title,
                           java.util.List<T> objects)

prompt

public static <T> T prompt(java.lang.String question,
                           java.lang.String title,
                           java.util.List<T> objects,
                           java.lang.String value)

showExtendedInfo

public static void showExtendedInfo(java.lang.String title,
                                    java.lang.String description,
                                    java.lang.String content,
                                    java.awt.Dimension size)

confirmExtendedInfo

public static boolean confirmExtendedInfo(java.lang.String title,
                                          java.lang.String description,
                                          java.lang.String content,
                                          java.awt.Dimension size)

confirmOrCancelExtendedInfo

public static java.lang.Boolean confirmOrCancelExtendedInfo(java.lang.String title,
                                                            java.lang.String description,
                                                            java.lang.String content,
                                                            java.awt.Dimension size)

select

public static void select(ModelItem modelItem)

createActionButton

public static javax.swing.JButton createActionButton(javax.swing.Action action,
                                                     boolean enabled)

findSplash

public static java.net.URL findSplash(java.lang.String filename)

selectXPath

public static java.lang.String selectXPath(java.lang.String title,
                                           java.lang.String info,
                                           java.lang.String xml,
                                           java.lang.String xpath)

addPreviewCorner

public static PreviewCorner addPreviewCorner(javax.swing.JScrollPane scrollPane,
                                             boolean forceScrollbars)

setFixedSize

public static <T extends javax.swing.JComponent> T setFixedSize(T component,
                                                                java.awt.Dimension size)

setFixedSize

public static <T extends javax.swing.JComponent> T setFixedSize(T component,
                                                                int i,
                                                                int j)

setFixedColumnSize

public static void setFixedColumnSize(javax.swing.table.TableColumn column,
                                      int width)

createToolbarButton

public static javax.swing.JButton createToolbarButton(javax.swing.ImageIcon icon)

getEditorFont

public static java.awt.Font getEditorFont()

getEditorFont

public static java.awt.Font getEditorFont(Settings settings)

promptPassword

public static char[] promptPassword(java.lang.String question,
                                    java.lang.String title)


Copyright © 2005-2008 eviware.com. All Rights Reserved.