Extension SDK 10.1.2

oracle.ide.log
Class MessagePage

java.lang.Object
  extended byoracle.ide.addin.AbstractView
      extended byoracle.ide.log.AbstractLogPage
          extended byoracle.ide.log.MessagePage
All Implemented Interfaces:
ControllerProvider, Helpable, LogPage, View
Direct Known Subclasses:
RunLogPage

public class MessagePage
extends AbstractLogPage

The MessagePage class provides a simple text field where clients can log their messages.


Field Summary
protected  JAutoScrollPane _scrollPane
           
protected  javax.swing.text.JTextComponent _textComponent
           
static java.lang.String MESSAGE_PAGE_ID
           
 
Fields inherited from class oracle.ide.addin.AbstractView
owner, SEPARATOR, viewListeners, viewSelectionListeners
 
Fields inherited from interface oracle.ide.addin.View
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.
protected 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)
          Creates a MessagePage using the specified ViewId and Icon.
 
Method Summary
 void addHref(Href href)
           
 void addMouseListener(java.awt.event.MouseListener listener)
          This implemenation does nothing.
 void addStyle(StyledMessage styledMessage)
           
protected  void appendToTextComponent(java.lang.String msg, int maxLogLines)
           
protected  boolean checkLogOpen()
           
 void clearAll()
          Clear all currently displayed messages.
protected  void clearTextComponent()
           
protected  void deleteFromStartOfTextComponent(int linesToDelete, int offset)
           
 ContextMenu getContextMenu()
          Gets the ContextMenu object, if any, managed by this instance.
 Controller getController()
          Get the Controller associated with this view.
 java.awt.Component getGUI()
          Get the root graphical user interface component.
 HelpInfo getHelpInfo()
           
protected  java.lang.String getText()
           
protected  boolean getWrapLines()
           
protected  void logMsg(java.lang.Object msg)
          Display the specified msg.
 void removeMouseListener(java.awt.event.MouseListener listener)
          This implemenation does nothing.
protected  void replaceTextComponentDocument()
           
protected  void setLogFileName(java.lang.String fn)
           
protected  void setWrapLines(boolean wrap)
           
 
Methods inherited from class oracle.ide.log.AbstractLogPage
checkCommands, close, getContext, getTabIcon, getTabName, getTitleName, getToolTip, isVisible, log, requestShow, setOwner, show
 
Methods inherited from class oracle.ide.addin.AbstractView
activate, addViewListener, addViewSelectionListener, deactivate, fireViewActivated, fireViewClosed, fireViewDeactivated, fireViewSelectionChanged, getContext, getId, getSelection, getToolbar, loadToolbar, loadToolbar, newId, owner, removeViewListener, removeViewSelectionListener, setId, setOwner, setToolbarVisible, updateTitle, updateToolbarActions, updateVisibleActions, updateVisibleActions
 
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.View
activate, addViewListener, addViewSelectionListener, deactivate, getContext, getId, getSelection, getToolbar, owner, removeViewListener, removeViewSelectionListener, setToolbarVisible, updateTitle, updateVisibleActions
 

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

_scrollPane

protected JAutoScrollPane _scrollPane
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

protected 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)
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.

Specified by:
getContextMenu in interface View
Overrides:
getContextMenu in class AbstractView
Returns:
the ContextMenu, if any.

checkLogOpen

protected boolean checkLogOpen()

setLogFileName

protected void setLogFileName(java.lang.String fn)

clearAll

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

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

addMouseListener

public void addMouseListener(java.awt.event.MouseListener listener)
Description copied from class: AbstractLogPage
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
Overrides:
addMouseListener in class AbstractLogPage

removeMouseListener

public void removeMouseListener(java.awt.event.MouseListener listener)
Description copied from class: AbstractLogPage
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
Overrides:
removeMouseListener in class AbstractLogPage

getGUI

public java.awt.Component getGUI()
Description copied from interface: View
Get the root graphical user interface component.


getHelpInfo

public HelpInfo getHelpInfo()
Specified by:
getHelpInfo in interface Helpable
Overrides:
getHelpInfo in class AbstractView

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 AbstractLogPage

logMsg

protected void logMsg(java.lang.Object msg)
Description copied from class: AbstractLogPage
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.

Overrides:
logMsg in class AbstractLogPage
Parameters:
msg - the message to display.

getWrapLines

protected boolean getWrapLines()

setWrapLines

protected void setWrapLines(boolean wrap)

getText

protected final java.lang.String getText()

appendToTextComponent

protected void appendToTextComponent(java.lang.String msg,
                                     int maxLogLines)

deleteFromStartOfTextComponent

protected void deleteFromStartOfTextComponent(int linesToDelete,
                                              int offset)

replaceTextComponentDocument

protected void replaceTextComponentDocument()

clearTextComponent

protected void clearTextComponent()

addHref

public void addHref(Href href)

addStyle

public void addStyle(StyledMessage styledMessage)

Extension SDK

 

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