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

E13403-02

oracle.ide.log
Class MessagePage

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

public class MessagePage
extends AbstractLogPage

The MessagePage class provides a log page based on a text area. The text area supports styled text.


Nested Class Summary
protected  class MessagePage.CustomTextPane
           
 
Field Summary
protected  JAutoScrollPane _scrollPane
          Deprecated. with no replacement. This field should not have been exposed to subclasses.
protected  javax.swing.text.JTextComponent _textComponent
          Deprecated. with no replacement. This field should not have been exposed to subclasses.
static java.lang.String MESSAGE_PAGE_ID
           
 
Fields inherited from class oracle.ide.view.View
EMPTY_SELECTION, PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP
 
Constructor Summary
  MessagePage()
          Default constructor.
protected MessagePage(ViewId viewId)
          Creates a MessagePage using thle specified ViewId.
protected MessagePage(ViewId viewId, javax.swing.Icon icon)
          Creates a MessagePage using the specified ViewId and Icon.
  MessagePage(ViewId viewId, javax.swing.Icon icon, boolean addPage)
          Creates a MessagePage using the specified ViewId and Icon.
protected MessagePage(ViewId viewId, javax.swing.Icon icon, boolean addPage, boolean showStyledText)
          Deprecated. use #MessagePage(ViewId,Icon,boolean). The showStyledText parameter has been deprecated, since all message pages are now capable of showing styled text by default.
 
Method Summary
 void addHref(Href href)
          Adds the specified Href to the message page.
 void addMouseListener(java.awt.event.MouseListener listener)
          Adds the mouse listener to the message page Note: despite the fact that it is not final, this method is not designed to be overridden by subclasses.
 void addStyle(StyledMessage styledMessage)
          Adds the specified StyledMessage to the message page
protected  void appendToTextComponent(java.lang.String msg, int maxLogLines)
          Adds the given message to the message page, removing lines from the top, if necessary, so it contains no more than maxLogLines
protected  boolean checkLogOpen()
          Makes sure the log file is open if it's name has been set
 void clearAll()
          Clears the message page * Note: despite the fact that it is not final, this method is not designed to be overridden by subclasses.
protected  void clearTextComponent()
          Clears the text component
protected  MessagePage.CustomTextPane createStyledTextPane()
           
protected  void deleteFromStartOfTextComponent(int linesToDelete, int offset)
          Deletes the linesToDelete from the message page
protected  Href findHrefByOffset(int offset)
           
 ContextMenu getContextMenu()
          Gets the ContextMenu object, if any, managed by this instance.
 Controller getController()
          Gets the Controller for the message page
 java.awt.Component getGUI()
          Gets the component that provides the UI for the message page.
 HelpInfo getHelpInfo()
          Gets the HelpInfo associated with the message page
protected  java.lang.String getText()
          Gets the content of the message page as a String
protected  boolean getWrapLines()
          Gets the line wrap policy for the message page
protected  void logMsg(java.lang.Object msg)
          Adds the given msg to the message page.
 void removeMouseListener(java.awt.event.MouseListener listener)
          Removes the mouse listener from the message page Note: despite the fact that it is not final, this method is not designed to be overridden by subclasses.
protected  void replaceTextComponentDocument()
          Replaces the document of the text component
 void setController(Controller controller)
           
protected  void setLogFileName(java.lang.String fn)
          Sets the name of the log file
protected  void setWrapLines(boolean wrap)
          Sets the line wrap policy for the message page
protected  void updateToolTipText()
          Updates the tool tip text
 
Methods inherited from class oracle.ide.log.AbstractLogPage
close, getBottomComponent, getLogPageView, getTabIcon, getTabName, getTitleName, getToolTip, getTopComponent, isDisplayComponentScrollable, isVisible, log, log, logQuietly, requestShow, requestShow, setOwner, show, tabNameUpdated
 
Methods inherited from class oracle.ide.view.View
activate, addViewListener, addViewSelectionListener, addViewStateListener, deactivate, fireViewCollapsed, fireViewExpanded, fireViewSelectionChanged, getContext, getContext, 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
 

Field Detail

MESSAGE_PAGE_ID

public static final java.lang.String MESSAGE_PAGE_ID
See Also:
Constant Field Values

_textComponent

protected javax.swing.text.JTextComponent _textComponent
Deprecated. with no replacement. This field should not have been exposed to subclasses.

_scrollPane

protected JAutoScrollPane _scrollPane
Deprecated. with no replacement. This field should not have been exposed to subclasses.
Constructor Detail

MessagePage

public MessagePage()
Default constructor. Creates a MessagePage using the message page view identifier.


MessagePage

protected MessagePage(ViewId viewId)
Creates a MessagePage using thle specified ViewId.


MessagePage

protected MessagePage(ViewId viewId,
                      javax.swing.Icon icon)
Creates a MessagePage using the specified ViewId and Icon.


MessagePage

public MessagePage(ViewId viewId,
                   javax.swing.Icon icon,
                   boolean addPage)
Creates a MessagePage using the specified ViewId and Icon.


MessagePage

protected MessagePage(ViewId viewId,
                      javax.swing.Icon icon,
                      boolean addPage,
                      boolean showStyledText)
Deprecated. use #MessagePage(ViewId,Icon,boolean). The showStyledText parameter has been deprecated, since all message pages are now capable of showing styled text by default.

Creates a MessagePage using the specified ViewId and Icon.

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.

Method Detail

getContextMenu

public ContextMenu getContextMenu()
Gets the ContextMenu object, if any, managed by this instance.

Overrides:
getContextMenu in class View
Returns:
the ContextMenu, if any.

checkLogOpen

protected boolean checkLogOpen()
Makes sure the log file is open if it's name has been set

Returns:
true if the log file's name has been set; false otherwise

setLogFileName

protected void setLogFileName(java.lang.String fn)
Sets the name of the log file

Parameters:
fn - the name of the log file

clearAll

public void clearAll()
Clears the message page * Note: despite the fact that it is not final, this method is not designed to be overridden by subclasses. It should be considered final.

Specified by:
clearAll in interface LogPage
Overrides:
clearAll in class AbstractLogPage

addMouseListener

public void addMouseListener(java.awt.event.MouseListener listener)
Adds the mouse listener to the message page Note: despite the fact that it is not final, this method is not designed to be overridden by subclasses. It should be considered final.

Specified by:
addMouseListener in interface LogPage
Overrides:
addMouseListener in class AbstractLogPage
Parameters:
listener -

removeMouseListener

public void removeMouseListener(java.awt.event.MouseListener listener)
Removes the mouse listener from the message page Note: despite the fact that it is not final, this method is not designed to be overridden by subclasses. It should be considered final.

Specified by:
removeMouseListener in interface LogPage
Overrides:
removeMouseListener in class AbstractLogPage
Parameters:
listener -

getGUI

public java.awt.Component getGUI()
Gets the component that provides the UI for the message page. Note: despite the fact that it is not final, this method is not designed to be overridden by subclasses. It should be considered final.

Specified by:
getGUI in class View
Returns:
component that provides the UI for the message page

getHelpInfo

public HelpInfo getHelpInfo()
Gets the HelpInfo associated with the message page

Specified by:
getHelpInfo in interface Helpable
Overrides:
getHelpInfo in class View
Returns:
the help info associated with the message page

getController

public Controller getController()
Gets the Controller for the message page

Specified by:
getController in interface ControllerProvider
Overrides:
getController in class AbstractLogPage
Returns:
the controller for the message page

setController

public void setController(Controller controller)

logMsg

protected void logMsg(java.lang.Object msg)
Adds the given msg to the message page. The msg object should be either a StyledMessage or a String

Overrides:
logMsg in class AbstractLogPage
Parameters:
msg -

createStyledTextPane

protected MessagePage.CustomTextPane createStyledTextPane()
Returns:
the text pane used for displaying styled text.

updateToolTipText

protected void updateToolTipText()
Updates the tool tip text


getWrapLines

protected boolean getWrapLines()
Gets the line wrap policy for the message page

Returns:
true if lines will be wrapped; false otherwise

setWrapLines

protected void setWrapLines(boolean wrap)
Sets the line wrap policy for the message page

Parameters:
wrap - true to wrap lines; false otherwise

getText

protected final java.lang.String getText()
Gets the content of the message page as a String

Returns:
string of the message page content

appendToTextComponent

protected void appendToTextComponent(java.lang.String msg,
                                     int maxLogLines)
Adds the given message to the message page, removing lines from the top, if necessary, so it contains no more than maxLogLines

Parameters:
msg - the message to add
maxLogLines - the maximum number of lines to display

deleteFromStartOfTextComponent

protected void deleteFromStartOfTextComponent(int linesToDelete,
                                              int offset)
Deletes the linesToDelete from the message page

Parameters:
linesToDelete -
offset -

replaceTextComponentDocument

protected void replaceTextComponentDocument()
Replaces the document of the text component


clearTextComponent

protected void clearTextComponent()
Clears the text component


addHref

public void addHref(Href href)
Adds the specified Href to the message page.

Parameters:
href - to add to the message page

addStyle

public void addStyle(StyledMessage styledMessage)
Adds the specified StyledMessage to the message page

Parameters:
styledMessage - to add to the message page

findHrefByOffset

protected Href findHrefByOffset(int offset)

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

E13403-02

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