Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.objexcel.util
Class Util

    java.lang.Object
      |
      +--com.objexcel.util.Util

public final class Util
extends java.lang.Object

Util holds some miscellaneous functions

Field Summary
`static int` | `SFMODE_DIRECTORIES_ONLY` when selecting files, only allow directoy selection
`static int` | `SFMODE_FILES_AND_DIRECTORIES` when selecting files, allow file and directory selection
`static int` | `SFMODE_FILES_ONLY` when selecting files, only allow file selection
`static java.lang.String` | `SYS_PROP_BROWSER_COMMAND` name of the system property used to get the browser command.

Method Summary
`static Util` | `getInstance()` get our singleton
`static char[]` | `resizeArray(char[] array, int iNewBufferSize)` return an array with a length of iNewBufferSize containing as many elements from array as will fit.
`static int[]` | `resizeArray(int[] array, int iNewBufferSize)` return an array with a length of iNewBufferSize containing as many elements from array as will fit.
`static java.lang.Object[]` | `resizeArray(java.lang.Object[] array, int iNewBufferSize)` return an array with a length of iNewBufferSize containing as many elements from array as will fit.
`static java.lang.String[]` | `resizeArray(java.lang.String[] array, int iNewBufferSize)` return an array with a length of iNewBufferSize containing as many elements from array as will fit.
`java.io.File[]` | `selectFiles(java.awt.Component frame, java.lang.String title, java.io.File file, int mode, boolean multiselect, java.lang.String OKBtn)` let the user select a set of files.
`java.lang.Object` | `showInputDialog(java.awt.Component parentComponent, java.lang.Object message, java.lang.String title, int messageType, javax.swing.Icon icon, java.lang.Object[] selectionValues, java.lang.Object initialSelectionValue)` show an option dialog (per JOPtionPane)
`int` | `showOptionDialog(java.awt.Component parent, java.lang.Object message, java.lang.String title, int optionType, int messageType, javax.swing.Icon icon, java.lang.Object[] options, java.lang.Object initialValue)` show an option dialog (per JOPtionPane)
`void` | `showURL(java.lang.String sURL)` launch a browser to show the given url

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SYS_PROP_BROWSER_COMMAND

    public static java.lang.String SYS_PROP_BROWSER_COMMAND

  name of the system property used to get the browser command. Default is (love it or hate it) iexplore.exe

### SFMODE_FILES_ONLY

    public static final int SFMODE_FILES_ONLY

  when selecting files, only allow file selection

### SFMODE_DIRECTORIES_ONLY

    public static final int SFMODE_DIRECTORIES_ONLY

  when selecting files, only allow directoy selection

### SFMODE_FILES_AND_DIRECTORIES

    public static final int SFMODE_FILES_AND_DIRECTORIES

  when selecting files, allow file and directory selection

Method Detail

### getInstance

    public static Util getInstance()

  get our singleton

### selectFiles

    public java.io.File[] selectFiles(java.awt.Component frame,
                                      java.lang.String title,
                                      java.io.File file,
                                      int mode,
                                      boolean multiselect,
                                      java.lang.String OKBtn)

  let the user select a set of files.
  Parameters:
    `file` - is the starting directory or file
    `mode` - is one of the SFMODE_* variables
    `OKBtn` - specifies the text for the 'ok' button. E.g. save or send.

### showURL

    public void showURL(java.lang.String sURL)

  launch a browser to show the given url

### showOptionDialog

    public int showOptionDialog(java.awt.Component parent,
                                java.lang.Object message,
                                java.lang.String title,
                                int optionType,
                                int messageType,
                                javax.swing.Icon icon,
                                java.lang.Object[] options,
                                java.lang.Object initialValue)

  show an option dialog (per JOPtionPane)

### showInputDialog

    public java.lang.Object showInputDialog(java.awt.Component parentComponent,
                                            java.lang.Object message,
                                            java.lang.String title,
                                            int messageType,
                                            javax.swing.Icon icon,
                                            java.lang.Object[] selectionValues,
                                            java.lang.Object initialSelectionValue)

  show an option dialog (per JOPtionPane)

### resizeArray

    public static java.lang.Object[] resizeArray(java.lang.Object[] array,
                                                 int iNewBufferSize)

  return an array with a length of iNewBufferSize containing as many elements from array as will fit. Null padded.

### resizeArray

    public static java.lang.String[] resizeArray(java.lang.String[] array,
                                                 int iNewBufferSize)

  return an array with a length of iNewBufferSize containing as many elements from array as will fit. Null padded.

### resizeArray

    public static int[] resizeArray(int[] array,
                                    int iNewBufferSize)

  return an array with a length of iNewBufferSize containing as many elements from array as will fit. Null padded.

### resizeArray

    public static char[] resizeArray(char[] array,
                                     int iNewBufferSize)

  return an array with a length of iNewBufferSize containing as many elements from array as will fit. Null padded.

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD