public class DefaultLogPage extends AbstractLogPage
| Modifier and Type | Field and Description |
|---|---|
protected static int |
FIX_SOURCE_CMD_ID |
protected static int |
GOTO_SOURCE_CMD_ID
Go To Source command identifier.
|
static int |
HIDE_ALL_MENUS |
static int |
HIDE_COPY_MENU |
static int |
HIDE_FIX_SOURCE_MENU |
static int |
HIDE_GOTO_SOURCE_MENU |
static int |
HIDE_NO_MENUS
Use these constants to indicate which popup menu items are
hidden.
|
static int |
HIDE_SAVE_AS_MENU |
protected java.awt.event.KeyAdapter |
keyAdapter |
protected java.awt.event.MouseAdapter |
mouseAdapter |
EMPTY_SELECTION, PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP| Modifier | Constructor and Description |
|---|---|
protected |
DefaultLogPage(ViewId id,
javax.swing.Icon icon,
boolean addPage) |
protected |
DefaultLogPage(ViewId id,
javax.swing.Icon icon,
boolean addPage,
int menuOptions)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
activateObject(java.lang.Object obj)
Respond to a message object activation originating from the GUI.
|
void |
addKeyListener(java.awt.event.KeyListener listener)
Add a KeyListener to the GUI.
|
void |
addMouseListener(java.awt.event.MouseListener listener)
Add a MouseListener to the GUI.
|
void |
asTextForTestingOnly(java.lang.StringBuilder buffer)
Saves the content of this page to the given buffer.
|
protected boolean |
canFixObject(javax.swing.tree.DefaultMutableTreeNode node)
Return
true if the violation associated with the
node can be fixed. |
void |
clearAll()
Remove all messages from the GUI.
|
protected void |
copy(java.lang.Object copyObject)
Copy the contents of the object to the clipboard.
|
protected javax.swing.JTree |
createTree() |
protected void |
fixObject(java.lang.Object obj)
Respond to a the fix command originating from the GUI.
|
protected void |
forceResizeNotification(java.awt.Component comp)
Notifies component listeners of a resize.
|
ContextMenu |
getContextMenu()
Gets the ContextMenu object, if any, managed by this instance.
|
Controller |
getController()
Get the
Controller associated with this view. |
protected java.awt.Component |
getCurrentView()
Get the object currently being displayed within the JScrollPane.
|
java.awt.Component |
getGUI()
Get the GUI to be used to display the state of this page.
|
protected javax.swing.tree.DefaultMutableTreeNode |
getSelectedTreeNode() |
protected javax.swing.JTextArea |
getTextArea()
Get the JTextArea used for display.
|
java.lang.String |
getTitleName()
Get the title to be displayed in the log window hosting this page.
|
protected javax.swing.JTree |
getTree()
Get the JTree used for display.
|
protected void |
logMsg(java.lang.Object msg)
Display a message in the GUI.
|
protected void |
logText(java.lang.String msg)
Display a String message in the GUI.
|
void |
removeKeyListener(java.awt.event.KeyListener listener)
Remove a KeyListener from the GUI.
|
void |
removeMouseListener(java.awt.event.MouseListener listener)
Remove a MouseListener from the GUI.
|
protected void |
saveToFile(Context context) |
protected void |
setCurrentView(java.awt.Component view)
Set the object to be currently displayed within the JScrollPane.
|
protected void |
setModel(javax.swing.tree.TreeModel model)
Set the tree model.
|
protected java.lang.String |
treeNodeToString(java.lang.Object treeNode)
Convert a tree node to a string.
|
protected void |
updateTreeModel(java.util.Collection message)
Update the model of the JTree based on the new Collection message object.
|
close, getBottomComponent, getLogPageView, getTabIcon, getTabName, getToolTip, getTopComponent, isDisplayComponentScrollable, isVisible, log, log, logQuietly, requestShow, requestShow, setOwner, show, tabNameUpdatedactivate, addViewListener, addViewSelectionListener, addViewStateListener, deactivate, fireViewCollapsed, fireViewExpanded, fireViewSelectionChanged, getContext, getContext, 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, updateVisibleActionspublic static final int HIDE_NO_MENUS
public static final int HIDE_COPY_MENU
public static final int HIDE_SAVE_AS_MENU
public static final int HIDE_GOTO_SOURCE_MENU
public static final int HIDE_FIX_SOURCE_MENU
public static final int HIDE_ALL_MENUS
protected static final int GOTO_SOURCE_CMD_ID
protected static final int FIX_SOURCE_CMD_ID
protected java.awt.event.MouseAdapter mouseAdapter
protected java.awt.event.KeyAdapter keyAdapter
protected DefaultLogPage(ViewId id, javax.swing.Icon icon, boolean addPage, int menuOptions)
id - a unique id for this log page view.icon - the icon to use for this log page. May be null.addPage - whether to add the page to the log manager. If true
then LogManager.getLogManager().addPage( this ) will be
called in this constructor implementation. If false the
page must be registered separately.menuOptions - a bit mask specifying which context menu items to hide.
May be any combination of HIDE_COPY_MENU, HIDE_SAVE_AS_MENU
HIDE_GOTO_SOURCE_MENU, HIDE_FIX_SOURCE_MENU.
HIDE_NO_MENUS specifies that all menu items should be present.
HIDE_ALL_MENUS specifies that all menu items should be
hidden.activateObject(Object)protected DefaultLogPage(ViewId id, javax.swing.Icon icon, boolean addPage)
protected void setModel(javax.swing.tree.TreeModel model)
public java.lang.String getTitleName()
LogPagegetTitleName in interface LogPagegetTitleName in class AbstractLogPagepublic java.awt.Component getGUI()
protected final javax.swing.tree.DefaultMutableTreeNode getSelectedTreeNode()
protected java.lang.String treeNodeToString(java.lang.Object treeNode)
This implementation returns String.valueOf( treeNode ). Subclasses may override this method to provide a different implementation.
treeNode - the userdata of a tree node.protected final void copy(java.lang.Object copyObject)
public void asTextForTestingOnly(java.lang.StringBuilder buffer)
buffer - the given buffer.protected void saveToFile(Context context)
public Controller getController()
ControllerProviderController associated with this view.getController in interface ControllerProvidergetController in class AbstractLogPagepublic ContextMenu getContextMenu()
getContextMenu in class Viewpublic void clearAll()
clearAll in interface LogPageclearAll in class AbstractLogPageprotected void forceResizeNotification(java.awt.Component comp)
comp - the component that is being resizedpublic void addMouseListener(java.awt.event.MouseListener listener)
addMouseListener in interface LogPageaddMouseListener in class AbstractLogPagelistener - mouse listener responsible for displaying a context menu.public void removeMouseListener(java.awt.event.MouseListener listener)
removeMouseListener in interface LogPageremoveMouseListener in class AbstractLogPagelistener - mouse listener responsible for displaying a context menu.public void addKeyListener(java.awt.event.KeyListener listener)
public void removeKeyListener(java.awt.event.KeyListener listener)
protected void logMsg(java.lang.Object msg)
logMsg in class AbstractLogPagemsg - the message to display.updateTreeModel(Collection),
logText(String)protected void logText(java.lang.String msg)
protected final java.awt.Component getCurrentView()
protected final void setCurrentView(java.awt.Component view)
protected javax.swing.JTree createTree()
protected final javax.swing.JTree getTree()
protected final javax.swing.JTextArea getTextArea()
protected void activateObject(java.lang.Object obj)
protected void fixObject(java.lang.Object obj)
protected boolean canFixObject(javax.swing.tree.DefaultMutableTreeNode node)
true if the violation associated with the
node can be fixed. Default return value is false.protected void updateTreeModel(java.util.Collection message)