|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.ide.addin.BaseController
oracle.ide.log.AbstractLogManager
The AbstractLogManager
class provides the basic support
for managing and showing a log page's context menu. LogMangager
s
should extend this class in order to get the default context menu support.
The default context menu provides two menu items: Close and Clear.
Field Summary | |
protected static int |
CLEAR_LOG_CMD_ID
Clear command identifier. |
protected static int |
CLOSE_ALL_LOGS_CMD_ID
Close all logs command identifier. |
protected static int |
CLOSE_LOG_CMD_ID
Close command identifier. |
protected static int |
CLOSE_OTHER_LOGS_CMD_ID
Close other logs command identifier. |
Constructor Summary | |
AbstractLogManager()
|
Method Summary | |
void |
addPage(LogPage page)
Classes that extend the AbstractLogManager class should
override this method from where they should call this method to
install the appropriate mouse listener on the specified page . |
protected Context |
getContext(java.util.EventObject event)
Classes that extend the AbstractLogManager class should
override this method in order to return the appropriate context. |
ContextMenu |
getContextMenu()
Get the ContextMenu . |
int |
getPageCount()
Concrete implementations must override this method and return the number of opened pages. |
LogPage[] |
getPages()
Concrete implementations must override this method and return the list of opened pages. |
protected void |
installContextMenuListener()
The installContextMenuListener method adds a
ContextMenuListener to the ContextMenu . |
protected void |
installMouseListener(LogPage page)
The installMouseListener method adds a
MouseListener to the specified LogPage . |
void |
removePage(LogPage page)
Classes that extend the AbstractLogManager class should
override this method from where they should call this method to
install the remove any mouse listener installed on the specified
page |
protected void |
triggerPopup(java.awt.event.MouseEvent e)
The triggerPopup method is called from the menu
listener. |
boolean |
update(IdeAction action,
Context context)
This method updates the enabled status of the specified action within the specified context. |
Methods inherited from class oracle.ide.addin.BaseController |
checkCommands, checkToolbarCommands, checkToolbarCommands, getView, handleEvent, supervisor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.ide.log.LogManager |
getLogWindow, getMsgPage, getSelectedPage, hideLog, initialize, isLogVisible, showLog, shutdown, toggleLog |
Methods inherited from interface oracle.ide.addin.Controller |
checkCommands, handleEvent, supervisor |
Field Detail |
protected static final int CLOSE_LOG_CMD_ID
protected static final int CLEAR_LOG_CMD_ID
protected static final int CLOSE_OTHER_LOGS_CMD_ID
protected static final int CLOSE_ALL_LOGS_CMD_ID
Constructor Detail |
public AbstractLogManager()
Method Detail |
public void addPage(LogPage page)
AbstractLogManager
class should
override this method from where they should call this method to
install the appropriate mouse listener on the specified page
.
Installing the mouse listener is necessary for popping up the context
menu when the user clicks on the page.
addPage
in interface LogManager
page
- the page to add.public void removePage(LogPage page)
AbstractLogManager
class should
override this method from where they should call this method to
install the remove any mouse listener installed on the specified
page
removePage
in interface LogManager
page
- the page to removed.public ContextMenu getContextMenu()
LogManager
ContextMenu
. In general, subclasses should get the
context menu to add custom menu items.
getContextMenu
in interface LogManager
public int getPageCount()
getPageCount
in interface LogManager
public LogPage[] getPages()
getPages
in interface LogManager
public boolean update(IdeAction action, Context context)
Controller
update
in interface Controller
update
in class BaseController
action
- action whose command is to be executed.context
- the current context
protected Context getContext(java.util.EventObject event)
AbstractLogManager
class should
override this method in order to return the appropriate context.
This method is called just before the context menu is about to
be shown.
protected void triggerPopup(java.awt.event.MouseEvent e)
triggerPopup
method is called from the menu
listener. It is responsible from popping up the context menu.
Just before popping up a context menu, a call is made to the
getContext
method.
protected void installContextMenuListener()
installContextMenuListener
method adds a
ContextMenuListener
to the ContextMenu
.
The listener adds the Close and Clear menu items to the context menu.
protected void installMouseListener(LogPage page)
installMouseListener
method adds a
MouseListener
to the specified LogPage
.
The listener is reponsible for popping up the context menu when
the user clicks on the page
.
|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©1997, 2003, Oracle. All rights reserved.