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
Since: Together 3.0
See Also: IdeWindowManagerAccess.getWindowManager(), IdeButtonType

Method Summary
 IdeDialogButtonGroupcreateButtonGroup()
          Creates a new empty IdeDialogButtonGroup.
 JPanelcreateButtonPanel(JComponent firstComponent, IdeDialogButtonGroup buttonGroup)
          Creates a new JPanel that contains component that is aligned to left side and
buttons from the specified group those are aligned to right side.
 JPanelcreateButtonPanel(IdeDialogButtonGroup buttonGroup, LayoutManager layoutManager)
          Creates a new JPanel that contains buttons from the specified group,
allocates the buttons according to the specified layout.
 JPanelcreateButtonPanel(IdeDialogButtonGroup buttonGroup)
          Creates a new JPanel that contains buttons from the specified group.
 JDialogcreateDialog(Component parent)
          Creates a new Together UI-consistent JDialog.
 IdeFileChoosercreateFileChooser(String currentDirectory)
          Creates an instance of IdeFileChooser in th specified directory.
 IdePathChoosercreatePathChooser()
          Creates an instance of IdePathChooser.
 IdePathChoosercreatePathChooser(String currentDirectory)
          Creates an instance of IdePathChooser.
 booleancustomize(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.ImagegetApplicationIconImage()
          Returns an image of the main window of the application.
 AbstractButtonsetupStandardButton(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).
 StringshowConfirmDialog(Component parent, String title, Object message, String[] buttons)
          Brings up a modal confirmation dialog.
 StringshowConfirmDialog(String title, Object message, String[] buttons)
          Brings up a modal confirmation dialog.
 VectorshowElementsSelectorDialog(RwiElement rwiElement, int selectorType)
          Brings up a modal selector dialog of the specified type.
 VectorshowElementsSelectorDialog(RwiElement rwiElement, String propertyName, int selectorType)
           
 VectorshowElementsSelectorDialog(RwiElement rwiElement, UnaryCondition displayFilter, UnaryCondition classFilter, boolean includeCurrentDiagram, UnaryCondition isMultiple, UnaryOperation title)
          Brings up a modal selector dialog with the specified filtering conditions.
 VectorshowElementsSelectorDialog(RwiElement rwiElement, String propertyName, UnaryCondition displayFilter, UnaryCondition classFilter, boolean includeCurrentDiagram, UnaryCondition isMultiple, UnaryOperation title)
           
 voidshowMessageDialog(Component parent, String title, int messageType, Object message)
          Displays a message in the dialog box that contains only "OK" button.
 voidshowMessageDialog(String title, int messageType, Object message)
          Displays a message in the dialog box containing only "OK" button.
 StringshowOptionDialog(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.
 AbstractButtonshowOptionDialog(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

createButtonPanel

public JPanel createButtonPanel(JComponent firstComponent, IdeDialogButtonGroup buttonGroup)
Creates a new JPanel that contains component that is aligned to left side and
buttons from the specified group those are aligned to right side.
Parameters:
firstComponent JComponent
buttonGroup IdeDialogButtonGroup object
Returns: JPanel

createButtonPanel

public JPanel createButtonPanel(IdeDialogButtonGroup buttonGroup, LayoutManager layoutManager)
Creates a new JPanel that contains buttons from the specified group,
allocates the buttons according to the specified layout.
Parameters:
buttonGroup IdeDialogButtonGroup object
layoutManager LayoutManager
Returns: JPanel

createButtonPanel

public JPanel createButtonPanel(IdeDialogButtonGroup buttonGroup)
Creates a new JPanel that contains buttons from the specified group.
Parameters:
buttonGroup IdeDialogButtonGroup object
Returns: JPanel

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

createPathChooser

public IdePathChooser createPathChooser()
Creates an instance of IdePathChooser.
Returns: IdePathChooser object
Since:
Together 5.0
See Also:
IdePathChooser

createPathChooser

public IdePathChooser createPathChooser(String currentDirectory)
Creates an instance of IdePathChooser.
Parameters:
currentDirectory String initial path for the path chooser
Returns: IdePathChooser object
Since:
Together 5.0
See Also:
IdePathChooser

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, String propertyName, int selectorType)
Since:
Together 5.0

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

showElementsSelectorDialog

public Vector showElementsSelectorDialog(RwiElement rwiElement, String propertyName, UnaryCondition displayFilter, UnaryCondition classFilter, boolean includeCurrentDiagram, UnaryCondition isMultiple, UnaryOperation title)
Since:
Together 5.0

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 IdeButtonType interface.
See Also:
IdeButtonType, IdeDialogType, #showOptionDialog(Component, String, int, Object, IdeDialogButtonGroup
buttonGroup, 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(Component, String, int, Object, String[]
buttons, String)