public interface CloseableWindow
This class provides a common interface for all RunnableWindows (and other windows) which may be closed. The purpose of this interface is to allow plugin menus to integrate themselves with PCD's widget code. Thus, a customized window (made using the plugin menus) can work with CommandThread, CommandButton, etc.
An additional feature of this class is that it allows access to the JFrame object corresponding to the parent window. The purpose of this is to provide modality to any child dialog windows created by the child widgets; however, this JFrame access could possibly be used for other purposes in the future. A good example of the 'getJFrame' method's utility is the AbstractFileChoser class. The AbstractFileChooser class creates a child file chooser dialog window to allow the user to select a file(s); however, this window should be modal (otherwise the window can get out of sync with the window enclosing the menu parameters). Thus, access to the JFrame object is essential for the AbstractFileChooser class.
Modifier and Type | Method and Description |
---|---|
void |
close()
Action for command buttons to close the window.
|
java.awt.Component |
getJFrame()
This method returns a Component object, such as
a JFrame or JDialog object, which can be used as
a parent window object for modal child windows.
|
void close()
java.awt.Component getJFrame()
This method returns a Component object, such as a JFrame or JDialog object, which can be used as a parent window object for modal child windows.
See AbstractFileChooser for an example.
Copyright © 2008-2022 University of Manitoba.