com.ibm.di.admin.ui
Class Util

java.lang.Object
  extended by com.ibm.di.admin.ui.Util

public class Util
extends Object


Field Summary
static org.apache.log4j.Logger logger
           
static JFileChooser sharedFileChooser
           
 
Constructor Summary
Util()
           
 
Method Summary
static JButton addButton(ActionListener listener, String prefix)
           
static JButton addButton(ActionListener listener, String prefix, boolean iconOnly)
           
static JButton addButton(ActionListener listener, String prefix, String command)
           
static JCheckBox addCheckBox(ActionListener listener, String prefix)
           
static JCheckBox addCheckBox(ActionListener listener, String prefix, boolean iconOnly)
           
static CheckBoxUI addCheckBox(GSConfig gsc, String prefix)
           
static void addConnectorNames(MetamergeConfig local, Vector v, boolean parser)
           
static ArrayList addDeleteEntry(Object[] contents)
           
static void addFolderNames(MetamergeConfig local, MetamergeConfig mc, int type, Vector v)
           
static void addTabButton(JTabbedPane tp, String resource, Component c)
           
static TextFieldUI addTitledTextField(GSConfig gsc, String prefix, JComponent component)
           
static TextFieldUI addTitledTextField(GSConfig gsc, String prefix, JComponent component, boolean iconOnly)
           
static Vector array2vector(Object[] data)
           
static boolean ask(String prompt)
           
static int askWithComponent(String prompt, JComponent comp)
           
static String chooseClass(String jarFile, String prompt)
           
static int confirm(String prompt)
           
static boolean connectorUsesLinkCriteria(ConnectorConfig config)
           
static JPanel createCommandBar(ActionListener listener, String toolbarResource)
           
static ALMappingConfig createInheritedALMap(ALMappingConfig config)
           
static ALMappingConfig createInheritedALMap(MetamergeConfig referent, ALMappingConfig config)
           
static ConnectorConfig createInheritedConnector(ConnectorConfig config)
           
static ConnectorConfig createInheritedConnector(MetamergeConfig referent, ConnectorConfig config)
           
static EventHandlerConfig createInheritedEventHandler(EventHandlerConfig config)
           
static EventHandlerConfig createInheritedEventHandler(MetamergeConfig referent, EventHandlerConfig config)
           
static FunctionConfig createInheritedFunction(FunctionConfig config)
           
static FunctionConfig createInheritedFunction(MetamergeConfig referent, FunctionConfig config)
           
static ParserConfig createInheritedParser(MetamergeConfig referent, ParserConfig config)
           
static ParserConfig createInheritedParser(ParserConfig config)
           
static BaseConfiguration createNewConfigObject(MetamergeConfig mc, String type, String prompt, String cmd)
           
static ConnectorConfig createScriptConnector(MetamergeConfig config, String name)
           
static JToolBar createToolBar(ActionListener listener, String toolbarResource)
           
static JToolBar createToolBar(ActionListener listener, String toolbarResource, Hashtable comps)
           
static JToolBar createToolBar(ActionListener listener, String toolbarResource, Hashtable comps, ActionMap map)
           
static JToolBar createToolBar(ActionListener listener, String toolbarResource, Hashtable comps, ActionMap map, JToolBar tool)
           
static JToolBar createToolBar(Object target)
           
static JToolBar createToolBar(Object target, ActionMap map)
           
static Vector getAlConnectorList(Name name, AssemblyLineConfig parent)
           
static Hashtable getAlConnectorList2(Name name, AssemblyLineConfig parent)
           
static Vector getAvailableSystemComponents(BaseConfiguration config, int type)
           
static Object getClientProperty(Object name)
           
static Vector getConfigDriverNames()
           
static Vector getConfigDrivers()
           
static int getErrFont()
          Returns font used for errors, e.g.
static FormUI getForm(BaseConfiguration config, String formName)
           
static FormUI getForm(BaseConfiguration config, String formName, TreeMap runtimeParam)
           
static Font getGoodFont(String spec)
           
static Vector getGoodFonts()
           
static JFrame getMainFrame()
           
static JRadioButton getRadioButton(ActionListener listener, String prefix, String command)
           
static Vector getReuseConnectors(BaseConfiguration config)
           
static JComponent getUserCommentPanel(BaseConfiguration config)
           
static String inputChoice(String prompt, JComboBox choices)
           
static boolean inputFilePassword(Hashtable env)
           
static void inputForm(BaseConfiguration config, String formName)
           
static void inputForm(BaseConfiguration config, String formName, TreeMap runtimeParam)
           
static int inputFormOKCancel(BaseConfiguration config, String formName)
           
static int inputFormOKCancel(BaseConfiguration config, String formName, String helpFile)
           
static int inputFormOKCancel(BaseConfiguration config, String formName, TreeMap runtime, String button)
           
static int inputFormOKCancel(BaseConfiguration config, String formName, TreeMap runtime, String button, String helpFile)
           
static String inputText(String prompt)
           
static String inputText(String prompt, String defval)
           
static String inputText(String prompt, Vector v)
           
static String inputTextArea(String prompt, String defval)
           
static Vector list2vector(List data)
           
static BaseConfiguration locateForm(String formName)
           
static void logdebug(String msg)
           
static void logerror(String msg, Throwable error)
           
static void logmsg(String msg)
           
static void logwarn(String msg)
           
static String makeNewComp(String prompt, String helpfile)
           
static void messageError(String str)
           
static void messageError(String str, Throwable e)
           
static void messageError(Throwable e)
           
static void messageInfo(String str)
           
static EventHandlerConfig newEventHandler(MetamergeConfig mc)
           
static ParserConfig newParser(MetamergeConfig mc)
           
static void openBrowser(String url)
           
static boolean openEditorFor(File path, boolean wait)
           
static String openEditorFor(String str, boolean wait, boolean confirm)
           
static void putClientProperty(Object name, Object obj)
           
static Object radioInputDialog(String title, Object radioItems)
           
static BaseConfiguration selectConfigComponent(MetamergeConfig mc, AssemblyLineConfig alconfig, int type)
           
static MetamergeConfig selectConfigDriver(MetamergeConfig old, boolean forWriting)
           
static ConnectorConfig selectConnector(MetamergeConfig config)
           
static ConnectorConfig selectConnector(MetamergeConfig config, AssemblyLineConfig parent)
           
static void setLookAndFeel(String newLF, String theme)
           
static void setMainFrame(Component c)
           
static void setStatusText(String text)
           
static void showAPIHelp()
           
static boolean showHelp(String name)
          These are the functions that call a web browser to bring up a html page first it checks to see what platform you are on and than calls the proper function according to which one you are on.
static String showMultipleFilesDialog()
           
static File showOpenFileDialog()
           
static File showOpenFileDialog(String path, String filter)
           
static File[] showOpenMultipleFilesDialog(String path, String filter)
           
static void showURL(String url)
           
static JPanel springBox(JComponent content)
           
static JPanel springBox(String label, JComponent content)
           
static void stopHelp()
           
static void tryToOpenOnUnix(String url, String browser)
           
static void tryToOpenOnWindows(String url, String browser)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static org.apache.log4j.Logger logger

sharedFileChooser

public static JFileChooser sharedFileChooser
Constructor Detail

Util

public Util()
Method Detail

setMainFrame

public static void setMainFrame(Component c)

getMainFrame

public static JFrame getMainFrame()

setStatusText

public static void setStatusText(String text)

getClientProperty

public static Object getClientProperty(Object name)

putClientProperty

public static void putClientProperty(Object name,
                                     Object obj)

showOpenFileDialog

public static File showOpenFileDialog()

showOpenFileDialog

public static File showOpenFileDialog(String path,
                                      String filter)

showMultipleFilesDialog

public static String showMultipleFilesDialog()

showOpenMultipleFilesDialog

public static File[] showOpenMultipleFilesDialog(String path,
                                                 String filter)

getGoodFonts

public static Vector getGoodFonts()

getGoodFont

public static Font getGoodFont(String spec)

getErrFont

public static int getErrFont()
Returns font used for errors, e.g. Font.BOLD|Font.ITALIC


getForm

public static FormUI getForm(BaseConfiguration config,
                             String formName)
                      throws Exception
Throws:
Exception

getForm

public static FormUI getForm(BaseConfiguration config,
                             String formName,
                             TreeMap runtimeParam)
                      throws Exception
Throws:
Exception

locateForm

public static BaseConfiguration locateForm(String formName)

createScriptConnector

public static ConnectorConfig createScriptConnector(MetamergeConfig config,
                                                    String name)
                                             throws Exception
Throws:
Exception

newEventHandler

public static EventHandlerConfig newEventHandler(MetamergeConfig mc)
                                          throws Exception
Throws:
Exception

createInheritedEventHandler

public static EventHandlerConfig createInheritedEventHandler(EventHandlerConfig config)
                                                      throws Exception
Throws:
Exception

createInheritedEventHandler

public static EventHandlerConfig createInheritedEventHandler(MetamergeConfig referent,
                                                             EventHandlerConfig config)
                                                      throws Exception
Throws:
Exception

createInheritedParser

public static ParserConfig createInheritedParser(ParserConfig config)
                                          throws Exception
Throws:
Exception

createInheritedParser

public static ParserConfig createInheritedParser(MetamergeConfig referent,
                                                 ParserConfig config)
                                          throws Exception
Throws:
Exception

newParser

public static ParserConfig newParser(MetamergeConfig mc)
                              throws Exception
Throws:
Exception

selectConnector

public static ConnectorConfig selectConnector(MetamergeConfig config)
                                       throws Exception
Throws:
Exception

getAlConnectorList

public static Vector getAlConnectorList(Name name,
                                        AssemblyLineConfig parent)

getAlConnectorList2

public static Hashtable getAlConnectorList2(Name name,
                                            AssemblyLineConfig parent)

getReuseConnectors

public static Vector getReuseConnectors(BaseConfiguration config)

selectConnector

public static ConnectorConfig selectConnector(MetamergeConfig config,
                                              AssemblyLineConfig parent)
                                       throws Exception
Throws:
Exception

createInheritedConnector

public static ConnectorConfig createInheritedConnector(ConnectorConfig config)
                                                throws Exception
Throws:
Exception

createInheritedConnector

public static ConnectorConfig createInheritedConnector(MetamergeConfig referent,
                                                       ConnectorConfig config)
                                                throws Exception
Throws:
Exception

createInheritedFunction

public static FunctionConfig createInheritedFunction(FunctionConfig config)
                                              throws Exception
Throws:
Exception

createInheritedFunction

public static FunctionConfig createInheritedFunction(MetamergeConfig referent,
                                                     FunctionConfig config)
                                              throws Exception
Throws:
Exception

createInheritedALMap

public static ALMappingConfig createInheritedALMap(ALMappingConfig config)
                                            throws Exception
Throws:
Exception

createInheritedALMap

public static ALMappingConfig createInheritedALMap(MetamergeConfig referent,
                                                   ALMappingConfig config)
                                            throws Exception
Throws:
Exception

inputForm

public static void inputForm(BaseConfiguration config,
                             String formName)
                      throws Exception
Throws:
Exception

inputForm

public static void inputForm(BaseConfiguration config,
                             String formName,
                             TreeMap runtimeParam)
                      throws Exception
Throws:
Exception

inputFormOKCancel

public static int inputFormOKCancel(BaseConfiguration config,
                                    String formName)
                             throws Exception
Throws:
Exception

inputFormOKCancel

public static int inputFormOKCancel(BaseConfiguration config,
                                    String formName,
                                    String helpFile)
                             throws Exception
Throws:
Exception

inputFormOKCancel

public static int inputFormOKCancel(BaseConfiguration config,
                                    String formName,
                                    TreeMap runtime,
                                    String button)
                             throws Exception
Throws:
Exception

inputFormOKCancel

public static int inputFormOKCancel(BaseConfiguration config,
                                    String formName,
                                    TreeMap runtime,
                                    String button,
                                    String helpFile)
                             throws Exception
Throws:
Exception

messageError

public static void messageError(String str)

messageError

public static void messageError(Throwable e)

messageError

public static void messageError(String str,
                                Throwable e)

messageInfo

public static void messageInfo(String str)

createToolBar

public static JToolBar createToolBar(Object target)

createToolBar

public static JToolBar createToolBar(Object target,
                                     ActionMap map)

createToolBar

public static JToolBar createToolBar(ActionListener listener,
                                     String toolbarResource)

createToolBar

public static JToolBar createToolBar(ActionListener listener,
                                     String toolbarResource,
                                     Hashtable comps)

createToolBar

public static JToolBar createToolBar(ActionListener listener,
                                     String toolbarResource,
                                     Hashtable comps,
                                     ActionMap map)

createToolBar

public static JToolBar createToolBar(ActionListener listener,
                                     String toolbarResource,
                                     Hashtable comps,
                                     ActionMap map,
                                     JToolBar tool)

createCommandBar

public static JPanel createCommandBar(ActionListener listener,
                                      String toolbarResource)

getRadioButton

public static JRadioButton getRadioButton(ActionListener listener,
                                          String prefix,
                                          String command)

addButton

public static JButton addButton(ActionListener listener,
                                String prefix,
                                String command)

addButton

public static JButton addButton(ActionListener listener,
                                String prefix)

addButton

public static JButton addButton(ActionListener listener,
                                String prefix,
                                boolean iconOnly)

addTabButton

public static void addTabButton(JTabbedPane tp,
                                String resource,
                                Component c)

addCheckBox

public static JCheckBox addCheckBox(ActionListener listener,
                                    String prefix)

addCheckBox

public static JCheckBox addCheckBox(ActionListener listener,
                                    String prefix,
                                    boolean iconOnly)

addCheckBox

public static CheckBoxUI addCheckBox(GSConfig gsc,
                                     String prefix)

addTitledTextField

public static TextFieldUI addTitledTextField(GSConfig gsc,
                                             String prefix,
                                             JComponent component)

addTitledTextField

public static TextFieldUI addTitledTextField(GSConfig gsc,
                                             String prefix,
                                             JComponent component,
                                             boolean iconOnly)

springBox

public static JPanel springBox(JComponent content)

springBox

public static JPanel springBox(String label,
                               JComponent content)

askWithComponent

public static int askWithComponent(String prompt,
                                   JComponent comp)

ask

public static boolean ask(String prompt)

confirm

public static int confirm(String prompt)

inputText

public static String inputText(String prompt)

inputText

public static String inputText(String prompt,
                               String defval)

inputText

public static String inputText(String prompt,
                               Vector v)

makeNewComp

public static String makeNewComp(String prompt,
                                 String helpfile)

inputTextArea

public static String inputTextArea(String prompt,
                                   String defval)

addDeleteEntry

public static ArrayList addDeleteEntry(Object[] contents)

inputFilePassword

public static boolean inputFilePassword(Hashtable env)

openBrowser

public static void openBrowser(String url)

inputChoice

public static String inputChoice(String prompt,
                                 JComboBox choices)

connectorUsesLinkCriteria

public static boolean connectorUsesLinkCriteria(ConnectorConfig config)

list2vector

public static Vector list2vector(List data)

array2vector

public static Vector array2vector(Object[] data)

addFolderNames

public static void addFolderNames(MetamergeConfig local,
                                  MetamergeConfig mc,
                                  int type,
                                  Vector v)

addConnectorNames

public static void addConnectorNames(MetamergeConfig local,
                                     Vector v,
                                     boolean parser)

getAvailableSystemComponents

public static Vector getAvailableSystemComponents(BaseConfiguration config,
                                                  int type)

getConfigDriverNames

public static Vector getConfigDriverNames()
                                   throws Exception
Throws:
Exception

getConfigDrivers

public static Vector getConfigDrivers()
                               throws Exception
Throws:
Exception

selectConfigDriver

public static MetamergeConfig selectConfigDriver(MetamergeConfig old,
                                                 boolean forWriting)
                                          throws Exception
Throws:
Exception

radioInputDialog

public static Object radioInputDialog(String title,
                                      Object radioItems)

createNewConfigObject

public static BaseConfiguration createNewConfigObject(MetamergeConfig mc,
                                                      String type,
                                                      String prompt,
                                                      String cmd)
                                               throws Exception
Throws:
Exception

logmsg

public static void logmsg(String msg)

logerror

public static void logerror(String msg,
                            Throwable error)

logdebug

public static void logdebug(String msg)

logwarn

public static void logwarn(String msg)

setLookAndFeel

public static void setLookAndFeel(String newLF,
                                  String theme)

openEditorFor

public static String openEditorFor(String str,
                                   boolean wait,
                                   boolean confirm)

openEditorFor

public static boolean openEditorFor(File path,
                                    boolean wait)

showHelp

public static boolean showHelp(String name)
These are the functions that call a web browser to bring up a html page first it checks to see what platform you are on and than calls the proper function according to which one you are on.


stopHelp

public static void stopHelp()

showAPIHelp

public static void showAPIHelp()

showURL

public static void showURL(String url)

tryToOpenOnWindows

public static void tryToOpenOnWindows(String url,
                                      String browser)

tryToOpenOnUnix

public static void tryToOpenOnUnix(String url,
                                   String browser)

selectConfigComponent

public static BaseConfiguration selectConfigComponent(MetamergeConfig mc,
                                                      AssemblyLineConfig alconfig,
                                                      int type)
                                               throws Exception
Throws:
Exception

getUserCommentPanel

public static JComponent getUserCommentPanel(BaseConfiguration config)

chooseClass

public static String chooseClass(String jarFile,
                                 String prompt)