Extension SDK 10.1.2

oracle.ide.log
Class AbstractLogManager

java.lang.Object
  extended byoracle.ide.log.LogManager
      extended byoracle.ide.log.AbstractLogManager
All Implemented Interfaces:
Controller, Module

public abstract class AbstractLogManager
extends LogManager
implements Controller

The AbstractLogManager class provides the basic support for managing and showing a log page's context menu. LogManagers should extend this class in order to get the default context menu support. The default context menu provides three menu items: Close, Clear, and Open File.


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.
static int CLOSE_LOG_CMD_ID
          Close command identifier.
protected static int CLOSE_OTHER_LOGS_CMD_ID
          Close other logs command identifier.
protected static int OPEN_FILE_CMD_ID
          Open file 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.
protected  java.util.List getLogRecognizers()
          Gets the list of registered LogRecognizers
 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 registerLogRecognizer(LogRecognizer logRecognizer)
          Register a LogRecognizer Registered LogRecognizers determine what files can be opened in the log window and define what class will be used to present the data from the file.
 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.
 void unregisterLogRecognizer(LogRecognizer logRecognizer)
          Unregister a LogRecognizer.
 
Methods inherited from class oracle.ide.log.LogManager
getIdeLogWindow, getLogManager, getLogWindow, getMsgPage, getSelectedPage, hideLog, isLogVisible, setLogManager, showLog, shutdown, toggleLog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.ide.addin.Controller
handleEvent, update
 
Methods inherited from interface oracle.javatools.Module
initialize
 

Field Detail

CLOSE_LOG_CMD_ID

public static final int CLOSE_LOG_CMD_ID
Close command identifier.


CLEAR_LOG_CMD_ID

protected static final int CLEAR_LOG_CMD_ID
Clear command identifier.


CLOSE_OTHER_LOGS_CMD_ID

protected static final int CLOSE_OTHER_LOGS_CMD_ID
Close other logs command identifier.


CLOSE_ALL_LOGS_CMD_ID

protected static final int CLOSE_ALL_LOGS_CMD_ID
Close all logs command identifier.


OPEN_FILE_CMD_ID

protected static final int OPEN_FILE_CMD_ID
Open file command identifier. Currently not used as no log pages are registering themselves as LogRecognizers

Constructor Detail

AbstractLogManager

public AbstractLogManager()
Method Detail

addPage

public 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. Installing the mouse listener is necessary for popping up the context menu when the user clicks on the page.

Specified by:
addPage in class LogManager
Parameters:
page - the page to add.

removePage

public 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

Specified by:
removePage in class LogManager
Parameters:
page - the page to removed.

getContextMenu

public ContextMenu getContextMenu()
Description copied from class: LogManager
Get the ContextMenu. In general, subclasses should get the context menu to add custom menu items.

Specified by:
getContextMenu in class LogManager
Returns:
the context menu.

registerLogRecognizer

public void registerLogRecognizer(LogRecognizer logRecognizer)
Description copied from class: LogManager
Register a LogRecognizer Registered LogRecognizers determine what files can be opened in the log window and define what class will be used to present the data from the file.

Specified by:
registerLogRecognizer in class LogManager
Parameters:
logRecognizer - to register

unregisterLogRecognizer

public void unregisterLogRecognizer(LogRecognizer logRecognizer)
Description copied from class: LogManager
Unregister a LogRecognizer.

Specified by:
unregisterLogRecognizer in class LogManager
Parameters:
logRecognizer - to unregister

getPageCount

public int getPageCount()
Concrete implementations must override this method and return the number of opened pages. This implementation always returns zero.

Specified by:
getPageCount in class LogManager
Returns:
the number of log pages opened.

getPages

public LogPage[] getPages()
Concrete implementations must override this method and return the list of opened pages. This implementation always returns an empty array.

Specified by:
getPages in class LogManager
Returns:
The list of pages opened.

getContext

protected Context getContext(java.util.EventObject event)
Classes that extend the 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.


triggerPopup

protected void triggerPopup(java.awt.event.MouseEvent e)
The 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(java.util.EventObject) method.


installContextMenuListener

protected void installContextMenuListener()
The installContextMenuListener method adds a ContextMenuListener to the ContextMenu. The listener adds the Close and Clear menu items to the context menu.


installMouseListener

protected void installMouseListener(LogPage page)
The 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.


getLogRecognizers

protected java.util.List getLogRecognizers()
Gets the list of registered LogRecognizers

Returns:
list of registered LogRecognizers

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.