provides default window event handlers
Copyright (c) Taligent, Inc. 1996 - 1997.
Copyright (c) IBM Corporation 1996 - 1997.
All Rights Reserved.
-
GUIHandler(ComponentController)
-
-
actionPerformed(ActionEvent)
- Invoked when the menu items are selected or when the tool buttons
are pressed.
-
addAndDo(Command)
- A convenience method to add a command to the command processor and
perform the command.
-
getApplicationName()
- A convenience method to get the application name.
-
getCommandProcessor()
- A convenience method to get the command processor.
-
getComponentController()
- Return the component controller.
-
getComponentFrame()
- Return the component frame.
-
getModel()
- A convenience method to get the model.
-
getModelSelection()
- A convenience method to get the model selection.
-
getPopupMenu()
- Return the popup menu.
-
getView()
- A convenience method to get the view.
-
handleAbout()
- Invoked by the Help->About ...
-
handleClose()
- Invoked by handleConfirmClose.
-
handleConfirmClose()
- Invoked by a File->Close menu action.
-
handleConfirmExit()
- Invoked by the File->Exit menu action.
-
handleConfirmNewModel()
- Display a confirmation dialog to give the user a chance to save
model changes before invoking handleNewModel to create a new model
instance.
-
handleConfirmOpen()
- Invoked by a File->Open menu action.
-
handleCopy()
- Invoked by the Edit->Copy menu action.
-
handleCreateEditMenu()
- Invoked by the framework to create an edit menu.
-
handleCreateFileMenu()
- Invoked by the framework to create a file menu.
-
handleCreateHelpMenu()
- Invoked by the framework during initialization.
-
handleCreateMenuBar()
- Invoked by the framework during initialization.
-
handleCreateMenus(MenuBar)
- Invoked by the framework during initialization.
-
handleCreatePopupMenu(MenuBar)
- Create a popup menu based on the menubar.
-
handleCreateStatusBar()
- Invoked by the framework during initialization.
-
handleCreateToolBar()
- Invoked by the framework during initialization.
-
handleCreateToolButtons(TToolBar)
- Invoked by the framework during initialization.
-
handleCreateViewMenu()
- Invoked by the framework to create a view menu.
-
handleCut()
- Invoked by the Edit->Cut menu action.
-
handleDelete()
- Invoked by the Edit->Delete menu action.
-
handleExit()
- Invoked by handleConfirmExit.
-
handleNew()
- Invoked by a File->New menu action.
-
handleNewInstance()
- Create a new instance of the application.
-
handleNewModel()
- Re-initialize the application with a new model instance.
-
handleOpen()
- Invoked by handleConfirmOpen.
-
handlePaste()
- Invoked by the Edit->Paste menu action.
-
handleRedo()
- Invoked by the Edit->Redo menu action.
-
handleSave()
- Invoked by a File->Save menu action.
-
handleSaveAs()
- Invoked by a File->SaveAs menu action.
-
handleSelectAll()
- Invoked by the Edit->SelectAll menu action.
-
handleUndo()
- Invoked by the Edit->Undo menu action.
-
itemStateChanged(ItemEvent)
- Invoked when the checkbox menu items in the tool bar popup menu
change state.
-
mouseClicked(MouseEvent)
- Invoked when the mouse is clicked on the target.
-
mouseEntered(MouseEvent)
- Invoked when the mouse enters the target.
-
mouseExited(MouseEvent)
- Invoked when the mouse exits the target.
-
mousePressed(MouseEvent)
- Invoked when the mouse is pressed.
-
mouseReleased(MouseEvent)
- Invoked when the mouse is released.
-
setLocale(Locale)
- Change the locale of the program and update the GUI and the resource
bundle based on the new locale.
-
windowActivated(WindowEvent)
- Invoked when the window is activated.
-
windowClosed(WindowEvent)
- Invoked when the window closed.
-
windowClosing(WindowEvent)
- Invoked when the window is closing.
-
windowDeactivated(WindowEvent)
- Invoked when the window is deactivated.
-
windowDeiconified(WindowEvent)
- Invoked when the window is deiconified.
-
windowIconified(WindowEvent)
- Invoked when the window is iconified.
-
windowOpened(WindowEvent)
- Invoked when the window is opened.
GUIHandler
public GUIHandler(ComponentController controller)
getComponentController
public ComponentController getComponentController()
- Return the component controller.
getComponentFrame
public ComponentFrame getComponentFrame()
- Return the component frame.
getPopupMenu
public PopupMenu getPopupMenu()
- Return the popup menu.
getModel
public final IModel getModel()
- A convenience method to get the model.
getView
public final IView getView()
- A convenience method to get the view.
getModelSelection
public final ModelSelection getModelSelection()
- A convenience method to get the model selection.
getApplicationName
public final String getApplicationName()
- A convenience method to get the application name.
getCommandProcessor
public final ICommandProcessor getCommandProcessor()
- A convenience method to get the command processor.
addAndDo
public final void addAndDo(Command command)
- A convenience method to add a command to the command processor and
perform the command.
setLocale
public void setLocale(Locale locale)
- Change the locale of the program and update the GUI and the resource
bundle based on the new locale. Override this method to update
the client's resource bundle with the new locale before calling
super.setLocale(locale).
actionPerformed
public void actionPerformed(ActionEvent e)
- Invoked when the menu items are selected or when the tool buttons
are pressed.
itemStateChanged
public void itemStateChanged(ItemEvent e)
- Invoked when the checkbox menu items in the tool bar popup menu
change state.
mousePressed
public void mousePressed(MouseEvent e)
- Invoked when the mouse is pressed.
mouseReleased
public void mouseReleased(MouseEvent e)
- Invoked when the mouse is released.
mouseClicked
public void mouseClicked(MouseEvent e)
- Invoked when the mouse is clicked on the target.
mouseEntered
public void mouseEntered(MouseEvent e)
- Invoked when the mouse enters the target.
mouseExited
public void mouseExited(MouseEvent e)
- Invoked when the mouse exits the target.
windowClosed
public void windowClosed(WindowEvent evt)
- Invoked when the window closed.
windowClosing
public void windowClosing(WindowEvent e)
- Invoked when the window is closing.
windowDeiconified
public void windowDeiconified(WindowEvent e)
- Invoked when the window is deiconified.
windowIconified
public void windowIconified(WindowEvent e)
- Invoked when the window is iconified.
windowOpened
public void windowOpened(WindowEvent e)
- Invoked when the window is opened.
windowActivated
public void windowActivated(WindowEvent e)
- Invoked when the window is activated.
windowDeactivated
public void windowDeactivated(WindowEvent e)
- Invoked when the window is deactivated.
handleCreateMenuBar
protected MenuBar handleCreateMenuBar()
- Invoked by the framework during initialization. Override this
method to create custom menu bar. Default implementation creates
the File and Edit menus.
handleCreateFileMenu
protected Menu handleCreateFileMenu()
- Invoked by the framework to create a file menu. Default
implementation creates a default file menu. Override this method to
customize the default file menu or create your custom file menu.
handleCreateEditMenu
protected Menu handleCreateEditMenu()
- Invoked by the framework to create an edit menu. Default
implementation creates a default edit menu. Override this method to
customize the default edit menu or create your custom edit menu.
handleCreateViewMenu
protected Menu handleCreateViewMenu()
- Invoked by the framework to create a view menu. Default
implementation creates a default view menu. Override this method to
customize the default view menu or create your custom view menu.
handleCreateHelpMenu
protected Menu handleCreateHelpMenu()
- Invoked by the framework during initialization. Override this
method to customize the help menu. Default implementation adds an
about box menu item.
handleCreateMenus
protected void handleCreateMenus(MenuBar menubar)
- Invoked by the framework during initialization.
Override this method to add custom menus to the menu bar. There is
no default implementation.
handleCreateToolBar
protected TToolBar handleCreateToolBar()
- Invoked by the framework during initialization. Override this
method to create custom tool bar. Default implementation creates a
default tool bar.
handleCreateToolButtons
protected void handleCreateToolButtons(TToolBar toolbar)
- Invoked by the framework during initialization. Override this
method to add custom tool buttons to the tool bar. There is no
default implementation.
handleCreateStatusBar
protected TStatusBar handleCreateStatusBar()
- Invoked by the framework during initialization. Override this
method to create custom status bar. Default implementation creates a
default status bar.
handleCreatePopupMenu
protected PopupMenu handleCreatePopupMenu(MenuBar menubar)
- Create a popup menu based on the menubar.
handleNew
protected void handleNew()
- Invoked by a File->New menu action. Default implementation calls
handleNewInstance to create a new instance of the application. If
you want to re-initialize the application with a new model instance
instead, override this method and call handleConfirmNewModel.
handleNewInstance
protected void handleNewInstance()
- Create a new instance of the application.
handleConfirmNewModel
protected void handleConfirmNewModel()
- Display a confirmation dialog to give the user a chance to save
model changes before invoking handleNewModel to create a new model
instance.
handleNewModel
protected void handleNewModel()
- Re-initialize the application with a new model instance.
handleConfirmOpen
protected void handleConfirmOpen()
- Invoked by a File->Open menu action.
Default implementation displays a confirmation dialog to give the
user a chance to save changes if the model is changed; otherwise, it
displays a file open dialog and open a document.
handleOpen
protected void handleOpen()
- Invoked by handleConfirmOpen. Display the file open dialog and open
a document.
handleSave
protected void handleSave()
- Invoked by a File->Save menu action. Default implementation saves
the current document or saves contents as another document if there
is no current document.
handleSaveAs
protected void handleSaveAs()
- Invoked by a File->SaveAs menu action. Default implementation
displays the file save dialog to save contents as another document.
handleConfirmClose
protected void handleConfirmClose()
- Invoked by a File->Close menu action.
Default implementation displays a confirmation dialog to give the
user a chance to save changes if the model is changed; otherwise, it
calls handleClose to close the frame.
handleClose
protected void handleClose()
- Invoked by handleConfirmClose.
Default implementation hides the component frame and closes the
application window. Override this method to perform your own
cleanup.
handleConfirmExit
protected void handleConfirmExit()
- Invoked by the File->Exit menu action.
Default implementation displays a confirmation dialog to give the
user a chance to save changes if the model is changed; otherwise, it
calls handleExit to exit the application.
handleExit
protected void handleExit()
- Invoked by handleConfirmExit.
Default implementation calls handleClose and exits.
handleUndo
protected void handleUndo()
- Invoked by the Edit->Undo menu action.
Default implementation undo the previous command.
handleRedo
protected void handleRedo()
- Invoked by the Edit->Redo menu action.
Default implementation redo the previous undo command.
handleCut
protected void handleCut()
- Invoked by the Edit->Cut menu action.
Default implementation deletes the current model selection and gives
it to the clipboard.
handleCopy
protected void handleCopy()
- Invoked by the Edit->Copy menu action.
Default implementation copies the current model selection to the
clipboard.
handlePaste
protected void handlePaste()
- Invoked by the Edit->Paste menu action.
Default implementation pastes the object from the clipboard into the
current model selection.
handleDelete
protected void handleDelete()
- Invoked by the Edit->Delete menu action.
Default implementation deletes the current model selection.
handleSelectAll
protected void handleSelectAll()
- Invoked by the Edit->SelectAll menu action.
Override this method to select all objects in the model.
Default implementation asks the current model selection to select
all objects.
handleAbout
protected void handleAbout()
- Invoked by the Help->About ... menu action. Override this method to
show the about box. Default implementation displays a simple about
box using the Application, Version, and Copyright resource strings
from the resource file.
All Packages Class Hierarchy This Package Previous Next Index