Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.ide.log
Class AbstractLogPage

java.lang.Object
  extended by oracle.ide.view.View
      extended by oracle.ide.log.AbstractLogPage
All Implemented Interfaces:
ControllerProvider, Helpable, LogPage
Direct Known Subclasses:
AuditLogPage, DefaultLogPage, MessagePage, ProblemsPage

public abstract class AbstractLogPage
extends View
implements LogPage

The AbstractLogPage is a convenience class that should be extended by integrators that need to add their own LogPage to the LogWindow.


Field Summary
 
Fields inherited from class oracle.ide.view.View
EMPTY_SELECTION, PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP
 
Constructor Summary
protected AbstractLogPage(java.lang.String viewId, java.lang.String displayName, javax.swing.Icon icon, boolean addPage)
           
protected AbstractLogPage(ViewId viewId)
          Creates an AbstractLogPage.
protected AbstractLogPage(ViewId viewId, javax.swing.Icon icon)
          Creates an AbstractLogPage.
protected AbstractLogPage(ViewId viewId, javax.swing.Icon icon, boolean addPage)
          Creates an AbstractLogPage.
 
Method Summary
 void addMouseListener(java.awt.event.MouseListener listener)
          This implemenation does nothing.
 void clearAll()
          Clear all currently displayed messages.
 void close()
           
 java.awt.Component getBottomComponent()
          Gets the component to put in the bottom component position in the log page display.
 Controller getController()
          Get the Controller associated with this view.
 View getLogPageView()
          Returns the View implementation backing this LogPage.
 javax.swing.Icon getTabIcon()
          Get the icon to display when this page is tabbed.
 java.lang.String getTabName()
          Get the name to display when this page is tabbed.
 java.lang.String getTitleName()
          Get the title to be displayed in the log window hosting this page.
 java.lang.String getToolTip()
          Get the tooltip to display when this page is tabbed.
 java.awt.Component getTopComponent()
          Gets the component to put in the top component position in the log page display By default returns getLogPageView().getToolbar()
 boolean isDisplayComponentScrollable()
          Gets whether the component returned from getGUI should be treated as a scrollable component
 boolean isVisible()
           
 void log(java.lang.Object msg)
          Display the specified msg.
 void log(java.lang.Object msg, boolean forceDisplay)
          Display the specified msg.
protected  void logMsg(java.lang.Object msg)
          Display the specified msg.
 void logQuietly(java.lang.Object msg)
          Adds the specified msg as silently as possible.
 void removeMouseListener(java.awt.event.MouseListener listener)
          This implemenation does nothing.
protected  void requestShow()
          Show the log window only if it has not been closed by the user.
protected  void requestShow(boolean forceDisplay)
          Requests the show of the log window and log tab.
 void setOwner(LogOwner owner)
          Set the view that owns this page.
 void show()
          Shows the view if hidden.
 void tabNameUpdated()
          Notifies the LogWindow of the change TODO Not part of the LogPage interface (yet)
 
Methods inherited from class oracle.ide.view.View
activate, addViewListener, addViewSelectionListener, addViewStateListener, deactivate, fireViewCollapsed, fireViewExpanded, fireViewSelectionChanged, getContext, getContext, getContextMenu, getGUI, getHelpInfo, getId, getSelection, getSelectionFromUI, getToolbar, getViewWithoutDecoration, loadLayout, loadManifestToolbar, loadManifestToolbar, newId, owner, removeViewListener, removeViewSelectionListener, removeViewStateListener, saveLayout, scheduleUpdateSelection, setId, setOwner, setToolbarVisible, toString, updateSelection, updateSelectionImpl, updateTitle, updateToolbarActions, updateVisibleActions, updateVisibleActions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractLogPage

protected AbstractLogPage(java.lang.String viewId,
                          java.lang.String displayName,
                          javax.swing.Icon icon,
                          boolean addPage)

AbstractLogPage

protected AbstractLogPage(ViewId viewId,
                          javax.swing.Icon icon,
                          boolean addPage)
Creates an AbstractLogPage. If the addPage parameter is true it adds the page to LogWindow. It uses the ViewId.getDisplayName() method to determine the tab name used by this page.

Some subclasses will pass false for the addPage argument, which means DO NOT add the page to the log manager during the execution of the constructor. The reason why a subclass would pass false is because they are overriding methods which are called during the addPage process and the overriding methods depend on field initialization which does not take place until after the super constructor returns. For example, a subclass which overrides getToolTip will likely want to pass false for the addPage argument.

Parameters:
viewId - the ViewId identifying this view.
icon - the page icon to be displayed in a tab.
addPage - specifies whether this page should be immediately added to the LogWindow

AbstractLogPage

protected AbstractLogPage(ViewId viewId,
                          javax.swing.Icon icon)
Creates an AbstractLogPage. It uses the ViewId.getDisplayName() method to determine the tab name used by this page.

Parameters:
viewId - the ViewId identifying this view.
icon - the page icon to be displayed in a tab. to the LogWindow

AbstractLogPage

protected AbstractLogPage(ViewId viewId)
Creates an AbstractLogPage. It uses the ViewId.getDisplayName() method to determine the tab name used by this page.

Parameters:
viewId - the ViewId identifying this view. to the LogWindow
Method Detail

log

public void log(java.lang.Object msg)
Display the specified msg. This method first makes sure that the page is visible and then calls the logMsg method to do the actual displaying of the message. Subclasses should not override this method. Instead they should override the logMsgmethod.

Specified by:
log in interface LogPage
Parameters:
msg - the message to display.

log

public void log(java.lang.Object msg,
                boolean forceDisplay)
Display the specified msg. This method allows the caller to specify whether the log window should be forced to become visible.

Parameters:
msg - the message to display
forceDisplay - true if the log window and log page should be forced to display; false if the log window should only open if the user hasn't closed it and the log page's tab should just be highlighted. Subclasses should not override this method. Instead they should override the logMsgmethod.

logQuietly

public void logQuietly(java.lang.Object msg)
Adds the specified msg as silently as possible. That is, the log window will not be displayed if it is hidden and the tab will not highlight to indicate it's content has changed.

Parameters:
msg - the message to add to the display

clearAll

public void clearAll()
Description copied from interface: LogPage
Clear all currently displayed messages.

Specified by:
clearAll in interface LogPage

getTitleName

public java.lang.String getTitleName()
Description copied from interface: LogPage
Get the title to be displayed in the log window hosting this page.

Specified by:
getTitleName in interface LogPage
Returns:
the title to display in the host's title bar.

getTabName

public java.lang.String getTabName()
Description copied from interface: LogPage
Get the name to display when this page is tabbed.

Specified by:
getTabName in interface LogPage
Overrides:
getTabName in class View
Returns:
the name to display when tabbed.

tabNameUpdated

public void tabNameUpdated()
Notifies the LogWindow of the change TODO Not part of the LogPage interface (yet)


getTabIcon

public javax.swing.Icon getTabIcon()
Description copied from interface: LogPage
Get the icon to display when this page is tabbed.

Specified by:
getTabIcon in interface LogPage
Returns:
the icon to display when tabbed.

getToolTip

public java.lang.String getToolTip()
Description copied from interface: LogPage
Get the tooltip to display when this page is tabbed.

Specified by:
getToolTip in interface LogPage
Returns:
the tooltip to display when tabbed.

setOwner

public void setOwner(LogOwner owner)
Description copied from interface: LogPage
Set the view that owns this page.

Specified by:
setOwner in interface LogPage
Parameters:
owner - view the hosting view.

addMouseListener

public void addMouseListener(java.awt.event.MouseListener listener)
This implemenation does nothing. Subclasses must override this method in order to correctly set the specified listener on the graphical components that receive mouse events.

Specified by:
addMouseListener in interface LogPage
Parameters:
listener - mouse listener responsible for displaying a context menu.

removeMouseListener

public void removeMouseListener(java.awt.event.MouseListener listener)
This implemenation does nothing. Subclasses must override this method in order to correctly remove the specified listener from the graphical components that receive mouse events.

Specified by:
removeMouseListener in interface LogPage
Parameters:
listener - mouse listener responsible for displaying a context menu.

getLogPageView

public View getLogPageView()
Description copied from interface: LogPage
Returns the View implementation backing this LogPage. If the LogPage itself is a View, then getLogPageView should return this.

Specified by:
getLogPageView in interface LogPage

isDisplayComponentScrollable

public boolean isDisplayComponentScrollable()
Gets whether the component returned from getGUI should be treated as a scrollable component

Returns:
true if the getGUI() returns a component that should be treated as a scrollable; false otherwise

getTopComponent

public java.awt.Component getTopComponent()
Gets the component to put in the top component position in the log page display By default returns getLogPageView().getToolbar()

Returns:
the component to put in the top component position in the log page display

getBottomComponent

public java.awt.Component getBottomComponent()
Gets the component to put in the bottom component position in the log page display. By default returns null.

Returns:
the component to put in the bottom component position in the log page display

logMsg

protected void logMsg(java.lang.Object msg)
Display the specified msg. Subclasses must override this method instead of the log method. The log method makes sure that the page is visible before calling this method.

Parameters:
msg - the message to display.

requestShow

protected void requestShow(boolean forceDisplay)
Requests the show of the log window and log tab. If forceDisplay is true the log window will be displayed and the tab page will be made the top page. If forceDisplay is false, the log window will not be displayed if it was closed by the user and the log page's tab will be highlighted to indicate something on it has changed. Generally forceDisplay should be true only for things that really important to display to the user.

Parameters:
forceDisplay -

requestShow

protected void requestShow()
Show the log window only if it has not been closed by the user. This method is call from log method and it will make sure that this page is the selected page if the log window has not been closed by the user.


getController

public Controller getController()
Description copied from interface: ControllerProvider
Get the Controller associated with this view.

Specified by:
getController in interface ControllerProvider
Overrides:
getController in class View
Returns:
the Controller associated with this view.

show

public void show()
Description copied from class: View
Shows the view if hidden. Raises the view to the top if covered by other windows.

Overrides:
show in class View

close

public void close()
Overrides:
close in class View

isVisible

public boolean isVisible()
Overrides:
isVisible in class View

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

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