|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.ceryle.ui.MessageView
public class MessageView
An extension of JTextArea to handle message view area, which tracks the caret to bottom of the text, clearing the content on a mouse click. Because this class implements the MessageWriter API, if registered as such it will receive message, warning and error messages from the MessageHandler.
MessageWriter,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| 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 | |
|---|---|
static boolean |
FIX_WINXP_BUG
Fix for ugly WinXP bug: fails to count newlines in JTextPane correctly, so length is off by that number. |
protected MessageViewPopupMenu |
m_popupmenu
The popup menu used with the MessageView. |
protected JTextPane |
m_ta
|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
MessageView(String title)
Constructor for a MessageView, an extension of JTextArea designed to receive write(String) events. |
|
| Method Summary | |
|---|---|
void |
caretUpdate(CaretEvent ce)
From the CaretListener API, listens for caret movements, positioning the caret at the end of the text, scrolling to that position. |
Document |
getDocument()
Returns the underlying Document. |
protected JPopupMenu |
getPopupMenu()
Return the JPopupMenu for the MessageView. |
void |
scrollToEnd()
Positions the caret at the end of the text, scrolling to that position. |
String |
writeMessage(int status,
String message)
This method is designed to receive writing events from an external source, appending the String message to the multi-line message area. |
void |
writeMessage(String message)
This method is designed to receive writing events from an external source, appending the String message to the multi-line message area. |
void |
writeStatus(String message)
This method is designed to receive writing events from an external source, appending the String message to the multi-line message area. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static boolean FIX_WINXP_BUG
protected MessageViewPopupMenu m_popupmenu
protected JTextPane m_ta
| Constructor Detail |
|---|
public MessageView(String title)
| Method Detail |
|---|
public Document getDocument()
public void scrollToEnd()
public void caretUpdate(CaretEvent ce)
caretUpdate in interface CaretListenerpublic void writeMessage(String message)
writeMessage in interface MessageWriter
public String writeMessage(int status,
String message)
writeMessage in interface MessageWriterMessageHandlerpublic void writeStatus(String message)
writeStatus in interface MessageWriterprotected JPopupMenu getPopupMenu()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||