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

## com.togethersoft.openapi.ide.window
Interface IdeWindowManager

public interface IdeWindowManager

Window manager is responsible for creating buttons and dialogs of various types.

The `createDialog` method creates a Together UI-consistent `JDialog` instance.

A newly created button can be transformed into any Together UI-consistent standard button type using `setupStandardButton` method. (Types of standard buttons are defined in `IdeButtonType` interface).

`createFileChooser` method creates `IdeFileChooser` instance very similar to `JFileChooser`.

`customize` method allows to create a bean properties inspector and to use it to work with bean's properties.

Current `IdeWindowManager` can be obtained via `IdeWindowManagerAccess.getWindowManager` method.

Author:
  TogetherSoft
See Also: IdeWindowManagerAccess.getWindowManager(), IdeButtonType

Method Summary
`IdeDialogButtonGroup` | `createButtonGroup()` Creates a new empty `IdeDialogButtonGroup`.
`JDialog` | `createDialog(Component parent)` Creates a new Together UI-consistent `JDialog`.
`IdeFileChooser` | `createFileChooser(String currentDirectory)` Creates an instance of `IdeFileChooser` in th specified directory.
`boolean` | `customize(Object bean, String title, String helpURL)` Creates a bean properties inspector for the given bean object and allows to use it for work with the bean's properties.
`java.awt.Image` | `getApplicationIconImage()` Returns an image of the main window of the application.
`AbstractButton` | `setupStandardButton(AbstractButton button, String buttonType)` Transforms the given button into the standard button of the specified type (sets title and icon, mnemonic and alt-mnemonic key, correct shortcut).
`String` | `showConfirmDialog(Component parent, String title, Object message, String[] buttons)` Brings up a modal confirmation dialog.
`String` | `showConfirmDialog(String title, Object message, String[] buttons)` Brings up a modal confirmation dialog.
`Vector` | `showElementsSelectorDialog(RwiElement rwiElement, int selectorType)` Brings up a modal selector dialog of the specified type.
`Vector` | `showElementsSelectorDialog(RwiElement rwiElement, UnaryCondition displayFilter, UnaryCondition classFilter, boolean includeCurrentDiagram, UnaryCondition isMultiple, UnaryOperation title)` Brings up a modal selector dialog with the specified filtering conditions.
`void` | `showMessageDialog(Component parent, String title, int messageType, Object message)` Displays a message in the dialog box that contains only "OK" button.
`void` | `showMessageDialog(String title, int messageType, Object message)` Displays a message in the dialog box containing only "OK" button.
`String` | `showOptionDialog(Component parent, String title, int messageType, Object message, String[] buttons, String helpURL)` Displays a message in the modal dialog box with the buttons, presented in the specified array.
`AbstractButton` | `showOptionDialog(Component parent, String title, int messageType, Object message, IdeDialogButtonGroup buttonGroup, String helpURL)` Displays a message in the modal dialog box with the buttons from the specified button group.

Method Detail

### createButtonGroup

    public IdeDialogButtonGroup createButtonGroup()

  Creates a new empty `IdeDialogButtonGroup`.
  Returns: `IdeDialogButtonGroup` object that represents a new button group
  See Also:
    IdeDialogButtonGroup

### createDialog

    public JDialog createDialog(Component parent)

  Creates a new Together UI-consistent `JDialog`.
  Parameters:
    parent - `Component` that determines the Frame where this dialog is displayed. If null, then Together's Frame is used.
  Returns: `JDialog` instance

### createFileChooser

    public IdeFileChooser createFileChooser(String currentDirectory)

  Creates an instance of `IdeFileChooser` in th specified directory.
  Parameters:
    currentDirectory - `String` initial path for the file chooser
  Returns: `IdeFileChooser` object
  See Also:
    IdeFileChooser

### customize

    public boolean customize(Object bean, String title, String helpURL)

  Creates a bean properties inspector for the given bean object and allows to use it for work with the bean's properties. If the bean object implements `IdeExpertPage` interface then it is possible to create a multi-page inspector for this bean.
  Parameters:
    bean - `Object` bean to be inspected
    title - `String` title of this inspector
    helpURL - `String` URL of the help info
  Returns: `true` if the bean was succesfully processed, `false` if an error occurred during bean customization
  See Also:
    IdeExpertPage

### getApplicationIconImage

    public java.awt.Image getApplicationIconImage()

  Returns an image of the main window of the application.
  Returns: `java.awt.Image` instance

### setupStandardButton

    public AbstractButton setupStandardButton(AbstractButton button, String buttonType)

  Transforms the given button into the standard button of the specified type (sets title and icon, mnemonic and alt-mnemonic key, correct shortcut).
  Parameters:
    button - `AbstractButton` object. If `null` then a new `JButton` will be returned.
    buttonType - `String` name of the button type. Predefined values are stored in the `IdeButtonType` interface.
  See Also:
    IdeButtonType

### showConfirmDialog

    public String showConfirmDialog(Component parent, String title, Object message, String[] buttons)

  Brings up a modal confirmation dialog.
  Parameters:
    parent - `Component` that determines the Frame where this dialog is displayed. If `null`, then Together's Frame is used.
    title - `String` title of this dialog.
    message - `Object` body of the message.
    buttons - `String[]` array containing the types of buttons to be inserted into the dialog. Predefined values are stored in `IdeButtonType` interface.
  Returns: `String` that indicates the button pressed by the user, or `null` if no button was pressed.
  See Also:
    IdeButtonType

### showConfirmDialog

    public String showConfirmDialog(String title, Object message, String[] buttons)

  Brings up a modal confirmation dialog.
  Parameters:
    title - the title string for the dialog
    message - The Object to display.
    buttons - The array of strings containing types of buttons to be inserted into the dialog. Predefined values are in `IdeButtonType` interface.
  Returns: the String indicating the button pressed by user, null if no button was pressed.
  See Also:
    IdeButtonType

### showElementsSelectorDialog

    public Vector showElementsSelectorDialog(RwiElement rwiElement, int selectorType)

  Brings up a modal selector dialog of the specified type.
  Parameters:
    rwiElement - `RwiElement` object
    `int` - type of the dialog
  Returns: `Vector`
  See Also:
    IdeSelectorDialogType

### showElementsSelectorDialog

    public Vector showElementsSelectorDialog(RwiElement rwiElement, UnaryCondition displayFilter, UnaryCondition classFilter, boolean includeCurrentDiagram, UnaryCondition isMultiple, UnaryOperation title)

  Brings up a modal selector dialog with the specified filtering conditions.
  Parameters:
    rwiElement - `RwiElement` object
    displayFilter - `UnaryCondition`
    classFilter - `UnaryCondition`
    includeCurrentDiagram - `boolean`
    isMultiple - `UnaryCondition`
    title - `UnaryOperation`
  Returns: `Vector`

### showMessageDialog

    public void showMessageDialog(Component parent, String title, int messageType, Object message)

  Displays a message in the dialog box that contains only "OK" button.
  Parameters:
    parent - `Component` that determines the Frame where this dialog is displayed. If `null`, then Together's Frame is used.
    title - `String` title of this dialog.
    messageType - `int` type of the message. Predefined values are stored in `IdeDialogType` interface.
    message - `Object` body of the message.
  See Also:
    IdeDialogType

### showMessageDialog

    public void showMessageDialog(String title, int messageType, Object message)

  Displays a message in the dialog box containing only "OK" button.
  Parameters:
    title - `String` title of this dialog.
    messageType - `int` type of the message. Predefined values are stored in `IdeDialogType` interface.
    message - `Object` body of the message.
  See Also:
    IdeDialogType

### showOptionDialog

    public String showOptionDialog(Component parent, String title, int messageType, Object message, String[] buttons, String helpURL)

  Displays a message in the modal dialog box with the buttons, presented in the specified array.
  Parameters:
    parent - `Comopnent` that determines the Frame where this dialog is displayed. If `null`, then Together's Frame is used.
    title - `String` title of this dialog
    messageType - `int` identifier of the message type. Predefined values are stored in `IdeDialogType` interface.
    message - `Object` that represents the message text
    buttons - `String[]` array with the types of buttons to be inserted into the dialog. Predefined values are stored in `IdeButtonType` interface.
    helpURL - `String` URL of help information for this dialog
  Returns: `String` name of the selected button. See `IdeButtonTypes` interface.
  See Also:
    IdeButtonType, IdeDialogType, showOptionDialog(java.awt.Component,java.lang.String,int,java.lang.Object,com.togethersoft.openapi.ide.window.IdeDialogButtonGroup,java.lang.String)

### showOptionDialog

    public AbstractButton showOptionDialog(Component parent, String title, int messageType, Object message, IdeDialogButtonGroup buttonGroup, String helpURL)

  Displays a message in the modal dialog box with the buttons from the specified button group.
  Parameters:
    parent - `Component` that determines the Frame where this dialog is displayed. If `null`, then Together's Frame is used.
    title - `String` title of this dialog
    messageType - `int` type of the message. Predefined values are stored in `IdeDialogType` interface.
    message - `Object` representing the message
    buttonGroup - `IdeDialogButtonGroup` that contains the buttons to be inserted into the dialog.
    helpURL - `String` URL of the help information for this dialog
  Returns: `AbstractButton` object that represents the pressed button.
  See Also:
    IdeDialogType, showOptionDialog(java.awt.Component,java.lang.String,int,java.lang.Object,java.lang.String[],java.lang.String)

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