|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.ceryle.wiki.event.WikiEventMonitor
public class WikiEventMonitor
Extends JFrame to provide a monitor console for WikiEvents within the WikiEventManager.
An instance of this class is attached to the WikiEventManager by
calling setActive(true) (if this is permitted by the
compile-time flag WikiEventManager.c_permitMonitor).
| Nested Class Summary | |
|---|---|
class |
WikiEventMonitor.DialogDisposer
|
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected Color |
COLOR_BASE
UI Colors. |
protected Color |
COLOR_BUTTONS
UI Colors. |
protected Color |
COLOR_TEXT_BG
UI Colors. |
protected Color |
COLOR_TEXT_FG
UI Colors. |
protected Color |
COLOR_TEXT_SBG
UI Colors. |
protected Font |
FONT_LABEL
|
protected Font |
FONT_MSG
|
static String |
FTS_FORMAT
Friendly timestamp format "yyyy-MM-dd HH:mm:ss:SSSS", eg., "2007-04-14 14:23:55:0334". |
protected Style |
m_errorStyle
|
protected Dimension |
m_framesize
Size of the frame, can be set prior to calling initialize(). |
protected Style |
m_noiseStyle
|
protected Style |
m_normalStyle
|
protected static int |
maxOutputChars
The maximum number of characters to show on display at any time. |
| Fields inherited from class javax.swing.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
|---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
WikiEventMonitor()
Creates an event monitor console with default title. |
|
WikiEventMonitor(String title)
Creates an event monitor console with optional title. |
|
| Method Summary | |
|---|---|
protected void |
addStylesToDocument(StyledDocument doc)
Add some Swing Styles to the text area to permit colorized text. |
protected void |
appendBaseOutput(WikiEvent event,
Style style)
Append the basic output for any WikiEvent. |
protected void |
appendOutput(String text,
Style style)
Append a string to the output area. |
void |
borderize(JComponent component,
String title)
A UI utility method that attaches a titled, line border around the JComponent component, using the String title. |
protected void |
clearMessages()
|
protected JPanel |
createCenterPanel()
Returns the center panel. |
JCheckBox |
createCheckBox(String name,
String tooltip,
boolean checked,
ItemListener listener)
A UI utility method that returns a checkbox button provided with its features. |
JButton |
createDialogButton(String label,
String tooltip,
ActionListener listener)
A UI utility method that returns a dialog button provided its parameters. |
JLabel |
createLabel(String title,
String tooltip)
A UI utility method that returns a label, provided an optional title and optional tooltip text. |
protected JPanel |
createSouthPanel()
Returns the southernmost panel containing the close button. |
JPanel |
createXBoxPanel()
A UI utility method that returns a JPanel managed by an X axis BoxLayout. |
JPanel |
createYBoxPanel()
A UI utility method that returns a JPanel managed by a Y axis BoxLayout. |
void |
eventFired(WikiEvent event)
Note that an event has been fired. |
protected String |
getFriendlyTimeStamp(long when)
Returns a String representing the provided timestamp in the form "yyyy-MM-dd HH:mm:ss" in UTC. |
protected JPanel |
getMiscSettingsPanel()
Return the miscellaneous Settings panel. |
protected JPanel |
getOptionalSettingsPanel()
Return any supplemental Settings panel, null if none. |
protected JPanel |
getSettingsPanel()
Returns the northernmost panel. |
protected JPanel |
getWikiEventFiltersPanel()
Return the wiki event filters panel. |
protected void |
initialize()
Initialize the monitor's UI. |
void |
setActive(boolean active)
Set the monitor active: listening for events. |
void |
writeError(String message)
Write the contents of message to the monitor console as an error message. |
void |
writeMessage(String message)
Write the contents of message to the monitor console. |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
public static final String FTS_FORMAT
protected static int maxOutputChars
protected Color COLOR_BASE
protected Color COLOR_TEXT_FG
protected Color COLOR_TEXT_BG
protected Color COLOR_TEXT_SBG
protected Color COLOR_BUTTONS
protected Font FONT_LABEL
protected Font FONT_MSG
protected Dimension m_framesize
protected Style m_normalStyle
protected Style m_noiseStyle
protected Style m_errorStyle
| Constructor Detail |
|---|
public WikiEventMonitor()
public WikiEventMonitor(String title)
| Method Detail |
|---|
protected void initialize()
public void setActive(boolean active)
public void writeMessage(String message)
message - the message to writepublic void writeError(String message)
message - the error message to writepublic void eventFired(WikiEvent event)
event - the event fired
protected void appendBaseOutput(WikiEvent event,
Style style)
protected String getFriendlyTimeStamp(long when)
protected void clearMessages()
protected void appendOutput(String text,
Style style)
protected JPanel getSettingsPanel()
getWikiEventFiltersPanel(), getMiscSettingsPanel(),
and getOptionalSettingsPanel(), the latter optional (null
is permitted).
protected JPanel getWikiEventFiltersPanel()
protected JPanel getMiscSettingsPanel()
protected JPanel getOptionalSettingsPanel()
protected JPanel createCenterPanel()
protected JPanel createSouthPanel()
protected void addStylesToDocument(StyledDocument doc)
public JPanel createXBoxPanel()
public JPanel createYBoxPanel()
public void borderize(JComponent component,
String title)
component - the component to which to add the bordertitle - the title to add
public JCheckBox createCheckBox(String name,
String tooltip,
boolean checked,
ItemListener listener)
name - the menu item mnemonic identifiertooltip - the optional tool tip textchecked - the initial checked statelistener - the item listener used to respond to activity
public JButton createDialogButton(String label,
String tooltip,
ActionListener listener)
public JLabel createLabel(String title,
String tooltip)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||