|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.levigo.util.swing.infobar.RollingMessagePanel
public class RollingMessagePanel
The fancy message panel is used to present the user with messages which can be received from various sources:
Nested Class Summary | |
---|---|
static class |
RollingMessagePanel.OrderBy
|
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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Nested classes/interfaces inherited from interface com.levigo.util.swing.infobar.MessageConsumer |
---|
MessageConsumer.Message |
Field Summary |
---|
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 | |
---|---|
RollingMessagePanel()
Creates a simple panel for showing received messages. |
|
RollingMessagePanel(int numberOfMessagesToDisplay)
Creates a simple panel for showing received messages. |
Method Summary | |
---|---|
void |
clearHistory()
Clear the history of messages presented by this message widget. |
static RollingMessagePanel |
createForFlyout()
Create a RollingMessagePanel pre-configured for use as a flyout panel. |
static RollingMessagePanel |
createForStatusBar()
Create a RollingMessagePanel pre-configured for use in a status bar. |
protected void |
doShowMessage(MessageConsumer.Message message)
|
int |
getHistoryDepth()
Returns the maximum number of messages the message widget presents. |
int |
getHistorySize()
Return the number of messages currently being presented by this message widget. |
void |
handleMessage(MessageConsumer.Message message)
Adds a message to the message panel and shows it. |
void |
setHistoryDepth(int count)
Sets the maximum number of messages the message widget presents. |
protected void |
showMessageDetails(MessageConsumer.Message m,
int x,
int y)
|
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 |
Constructor Detail |
---|
public RollingMessagePanel()
The latest message will be shown, by clicking on this panel a drop-down list appears, containing a history of by default five latest received messages.
public RollingMessagePanel(int numberOfMessagesToDisplay)
The latest message will be shown, by clicking on this panel a drop-down list appears,
containing a history of numberOfMessagesToDisplay
latest received messages:
numberOfMessagesToDisplay
- number of stored messagesMethod Detail |
---|
public static RollingMessagePanel createForFlyout()
RollingMessagePanel
pre-configured for use as a flyout panel.
public static RollingMessagePanel createForStatusBar()
RollingMessagePanel
pre-configured for use in a status bar.
public void setHistoryDepth(int count)
MessageWidget
setHistoryDepth
in interface MessageWidget
count
- an integer specifying the maximum number of messages to displaypublic int getHistoryDepth()
MessageWidget
getHistoryDepth
in interface MessageWidget
public void clearHistory()
MessageWidget
clearHistory
in interface MessageWidget
public void handleMessage(MessageConsumer.Message message)
handleMessage
in interface MessageConsumer
message
- and
,
contained in the message panel, the oldest will
be removed.
protected void doShowMessage(MessageConsumer.Message message)
public int getHistorySize()
MessageWidget
getHistorySize
in interface MessageWidget
protected void showMessageDetails(MessageConsumer.Message m, int x, int y)
m
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |