cmu.survey.gui.table
Class TablePanelManager

java.lang.Object
  extended by cmu.survey.gui.table.TablePanelManager
All Implemented Interfaces:
HasMenus

public class TablePanelManager
extends java.lang.Object
implements HasMenus

Manages the focused TablePanel. Create one of these, for example, when you have a window that you want to have one set of menus for, one set of find/replace dialogs for, and just one focused TablePanel within that window that will get the top commands.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.browsecode.helpers.menus.HasMenus
HasMenus.ActiveListener
 
Constructor Summary
TablePanelManager()
           
 
Method Summary
 void addActiveListener(HasMenus.ActiveListener listener)
           
 void addMenusTo(MenuBarHelper menuBarHelper)
           
 void addTableList(DatabaseEditor editor)
           
 void fireSetActiveEvent(int active)
           
 FindReplace getFindReplace()
          The JMenu to add to a window for this set of TablePanels.
 TablePanel getFocusedTablePanel()
           
 Preferences getPreferences()
           
 UndoHandler getUndoHandler()
           
 void removeTableList(DatabaseEditor editor)
           
 void setFocusedTablePanel(TablePanel tablePanel)
           
 void setPreferences(Preferences preferences)
           
 void setUndoHandler(UndoHandler undoHandler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TablePanelManager

public TablePanelManager()
Method Detail

setFocusedTablePanel

public void setFocusedTablePanel(TablePanel tablePanel)

getFocusedTablePanel

public TablePanel getFocusedTablePanel()

addTableList

public void addTableList(DatabaseEditor editor)

removeTableList

public void removeTableList(DatabaseEditor editor)

getFindReplace

public FindReplace getFindReplace()
The JMenu to add to a window for this set of TablePanels. It will be updated automatically. You may add other menu items to this, if appropriate, but be warned that they'll be disabled if there is no active TablePanel. For example, a recommended one to add is a "refresh all tables and list of tables" item under "F5". This is used in the database editor.

Returns:

addMenusTo

public void addMenusTo(MenuBarHelper menuBarHelper)
Specified by:
addMenusTo in interface HasMenus

fireSetActiveEvent

public void fireSetActiveEvent(int active)

addActiveListener

public void addActiveListener(HasMenus.ActiveListener listener)
Specified by:
addActiveListener in interface HasMenus

getUndoHandler

public UndoHandler getUndoHandler()
Returns:
Returns the undoHandler.

setUndoHandler

public void setUndoHandler(UndoHandler undoHandler)
Parameters:
undoHandler - The undoHandler to set.

getPreferences

public Preferences getPreferences()

setPreferences

public void setPreferences(Preferences preferences)