public class MessagePage extends AbstractLogPage
MessagePage class provides a log page based on a text
  area. The text area supports styled text.| Modifier and Type | Class and Description | 
|---|---|
| protected class  | MessagePage.CustomTextPane | 
| static class  | MessagePage.MessagePageEventThis class exists only to support unit testing. | 
| static interface  | MessagePage.MessagePageListenerThis interface exists only to support unit testing. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected JAutoScrollPane | _scrollPaneDeprecated. 
 with no replacement. This field should not have been exposed
    to subclasses. | 
| protected javax.swing.text.JTextComponent | _textComponentDeprecated. 
 with no replacement. This field should not have been exposed
    to subclasses. | 
| static java.lang.String | MESSAGE_PAGE_ID | 
EMPTY_SELECTION, PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP| Modifier | Constructor and Description | 
|---|---|
|   | MessagePage()Default constructor. | 
| protected  | MessagePage(ViewId viewId)Creates a  MessagePageusing thle specifiedViewId. | 
| protected  | MessagePage(ViewId viewId,
           javax.swing.Icon icon) | 
|   | MessagePage(ViewId viewId,
           javax.swing.Icon icon,
           boolean addPage) | 
| 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. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addHref(Href href)Adds the specified  Hrefto the message page. | 
| void | addListener(MessagePage.MessagePageListener l)This method exists only to support unit testing and may be removed or changed 
  at any time without warning. | 
| 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  StyledMessageto the message page
 
 The idea here is to maintain an ordered list of styles where the
 ordering is based on start offsets and none of the style ranges
 overlap. | 
| 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 | createToolbar()Create the toolbar for this view. | 
| protected void | deleteFromStartOfTextComponent(int linesToDelete,
                              int offset)Deletes the linesToDelete from the message page | 
| protected Href | findHrefByOffset(int offset) | 
| MenuToolButton | getActionButton() | 
| ContextMenu | getContextMenu()Gets the ContextMenu object, if any, managed by this instance. | 
| Controller | getController()Gets the  Controllerfor the message page | 
| protected boolean | getDisableAutoScrolling() | 
| java.awt.Component | getGUI()Gets the component that provides the UI for the message page. | 
| HelpInfo | getHelpInfo()Gets the  HelpInfoassociated with the message page | 
| protected java.lang.String | getText()Gets the content of the message page as a String | 
| Toolbar | getToolbar()Get the toolbar associated with this view. | 
| SearchField | getToolbarSearchField()Get the SearchField that searches the log. | 
| 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 | setDisableAutoScrolling(boolean autoscroll) | 
| protected void | setLogFileName(java.lang.String fn)Sets the name of the log file | 
| void | setToolbarVisible(boolean visible) | 
| protected void | setUnitTestMode(boolean unitTesting) | 
| protected void | setWrapLines(boolean wrap)Sets the line wrap policy for the message page | 
| protected void | updateToolTipText()Updates the tool tip text | 
| void | updateVisibleActions(UpdateMessage updateMessage)Called when the IDE or an extension requests that the  Viewupdates the enabled state of any actions 
 that are visible on screen. | 
close, getBottomComponent, getLogPageView, getTabIcon, getTabName, getTitleName, getToolTip, getTopComponent, isDisplayComponentScrollable, isVisible, log, log, logQuietly, requestShow, requestShow, setOwner, show, tabNameUpdatedactivate, addViewListener, addViewSelectionListener, addViewStateListener, deactivate, fireViewCollapsed, fireViewExpanded, fireViewSelectionChanged, getContext, getContext, getId, getSelection, getSelectionFromUI, getViewWithoutDecoration, loadLayout, loadManifestToolbar, loadManifestToolbar, newId, owner, removeViewListener, removeViewSelectionListener, removeViewStateListener, saveLayout, scheduleUpdateSelection, setId, setOwner, toString, updateSelection, updateSelectionImpl, updateTitle, updateToolbarActions, updateVisibleActionspublic static final java.lang.String MESSAGE_PAGE_ID
protected javax.swing.text.JTextComponent _textComponent
protected JAutoScrollPane _scrollPane
public MessagePage()
MessagePage using the
  message page view identifier.protected MessagePage(ViewId viewId, javax.swing.Icon icon)
public MessagePage(ViewId viewId, javax.swing.Icon icon, boolean addPage)
protected MessagePage(ViewId viewId, javax.swing.Icon icon, boolean addPage, boolean showStyledText)
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.
public void addListener(MessagePage.MessagePageListener l)
public final MenuToolButton getActionButton()
public ContextMenu getContextMenu()
getContextMenu in class Viewprotected boolean checkLogOpen()
protected void setLogFileName(java.lang.String fn)
fn - the name of the log filepublic void clearAll()
clearAll in interface LogPageclearAll in class AbstractLogPagepublic void addMouseListener(java.awt.event.MouseListener listener)
addMouseListener in interface LogPageaddMouseListener in class AbstractLogPagelistener - public void removeMouseListener(java.awt.event.MouseListener listener)
removeMouseListener in interface LogPageremoveMouseListener in class AbstractLogPagelistener - public java.awt.Component getGUI()
protected void createToolbar()
public HelpInfo getHelpInfo()
HelpInfo associated with the message pagegetHelpInfo in interface HelpablegetHelpInfo in class Viewpublic Controller getController()
Controller for the message pagegetController in interface ControllerProvidergetController in class AbstractLogPagepublic void setController(Controller controller)
protected void logMsg(java.lang.Object msg)
StyledMessage or a StringlogMsg in class AbstractLogPagemsg - protected MessagePage.CustomTextPane createStyledTextPane()
protected void updateToolTipText()
protected boolean getDisableAutoScrolling()
protected boolean getWrapLines()
protected void setDisableAutoScrolling(boolean autoscroll)
protected void setWrapLines(boolean wrap)
wrap - true to wrap lines; false otherwiseprotected final java.lang.String getText()
protected void appendToTextComponent(java.lang.String msg,
                                     int maxLogLines)
msg - the message to addmaxLogLines - the maximum number of lines to displayprotected void deleteFromStartOfTextComponent(int linesToDelete,
                                              int offset)
linesToDelete - offset - protected void replaceTextComponentDocument()
protected void clearTextComponent()
public void addHref(Href href)
Href to the message page.href - to add to the message pagepublic void addStyle(StyledMessage styledMessage)
StyledMessage to the message page
 
 The idea here is to maintain an ordered list of styles where the
 ordering is based on start offsets and none of the style ranges
 overlap.
 
 Each time the lines are trimmed in the log because there are too
 many lines, the style offsets are adjusted, see adjustStyleOffsetsstyledMessage - to add to the message pageprotected void setUnitTestMode(boolean unitTesting)
protected Href findHrefByOffset(int offset)
public Toolbar getToolbar()
ViewgetToolbar in class Viewpublic void setToolbarVisible(boolean visible)
setToolbarVisible in class Viewpublic void updateVisibleActions(UpdateMessage updateMessage)
ViewView updates the enabled state of any actions 
 that are visible on screen. Typically this will involve updating actions that are in visible toolbars.  If a 
 View contains or manages other nested instances of View, the outer call to 
 updateVisibleActions should propagate inward to call the updateVisibleActions of all 
 visible, nested Views.updateVisibleActions in class ViewupdateMessage - information on what is triggering the update.  Implementations may make use of this 
 information to decide whether or not an update is necessary, since updating the enabled state of a toolbar button 
 may be a lengthy operation.  For example, buttons that control a remote debugger would involve network I/O and 
 evaluating their updated state could be avoided if the updateMessage indicates that the source of the update is not 
 relevant to the debugger.public SearchField getToolbarSearchField()