public abstract class NotificationPanel
extends java.lang.Object
implements java.util.Observer
NotificationServiceInterface.| Modifier and Type | Field and Description |
|---|---|
protected NotificationCompositionFrame |
composeDialog
Diálogo de composição de notificações
|
protected javax.swing.JPanel |
mainPanel
Referência ao painel principal
|
protected javax.swing.JTextArea |
notificationArea
Área de notificações
|
protected java.util.LinkedList<csbase.logic.NotificationHandler> |
notificationHandlers
Lista de handlers que serão chamados quando ocorre uma notificação.
|
protected java.lang.Object |
userId
Id do usuário.
|
| Constructor and Description |
|---|
NotificationPanel()
Construtor padrão (sem escolha da ícones).
|
NotificationPanel(javax.swing.ImageIcon composeIcon,
javax.swing.ImageIcon clearIcon)
Construtor de escolha da ícones de mensagens.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNotificationHandler(csbase.logic.NotificationHandler handler)
Adiciona um handler para ser chamado quando a notificação chegar.
|
protected void |
clearPanel()
Limpeza da área de notificações
|
protected javax.swing.JToolBar |
createButtonsPanel(javax.swing.ImageIcon composeIcon,
javax.swing.ImageIcon clearIcon)
Construção do painel de notificação.
|
protected javax.swing.JPanel |
createMainPanel(javax.swing.ImageIcon composeIcon,
javax.swing.ImageIcon clearIcon)
Construção do painel de notificação.
|
javax.swing.JPanel |
getPanel()
Consulta ao painel.
|
abstract NotificationTranslator |
getTranslator()
Método de busca de um tradutor de notificações (objetos)
|
protected void |
openComposeDialog()
Abertura do diálogo de composiçào de notificações.
|
void |
setUser(csbase.logic.User user)
Altera o usuário corrente
|
void |
update(java.util.Observable observable,
java.lang.Object obj)
Recebimento de mensagens de observação.
|
protected void |
writeNotificationsLines(java.util.List<java.lang.String> lineList)
Adição de várias linhas (lista) de notificação.
|
protected NotificationCompositionFrame composeDialog
protected javax.swing.JTextArea notificationArea
protected javax.swing.JPanel mainPanel
protected java.lang.Object userId
protected java.util.LinkedList<csbase.logic.NotificationHandler> notificationHandlers
public NotificationPanel(javax.swing.ImageIcon composeIcon,
javax.swing.ImageIcon clearIcon)
composeIcon - ícone a ser atribuído ao botão de compor mensagemclearIcon - ícone a ser atribuído ao botão de limpar mensagempublic NotificationPanel()
protected final void writeNotificationsLines(java.util.List<java.lang.String> lineList)
lineList - a linha a ser colocada.protected final void openComposeDialog()
protected final javax.swing.JToolBar createButtonsPanel(javax.swing.ImageIcon composeIcon,
javax.swing.ImageIcon clearIcon)
composeIcon - ícone a ser atribuído ao botão de compor mensagemclearIcon - ícone a ser atribuído ao botão de limpar mensagemJPanelprotected final void clearPanel()
protected final javax.swing.JPanel createMainPanel(javax.swing.ImageIcon composeIcon,
javax.swing.ImageIcon clearIcon)
composeIcon - ícone do botão para criar uma mensagemclearIcon - ícone do botão para apagar a área de notificaçõesJPanelpublic final javax.swing.JPanel getPanel()
JPanelpublic final void update(java.util.Observable observable,
java.lang.Object obj)
update in interface java.util.Observerobservable - a fonte.obj - a informação.public void addNotificationHandler(csbase.logic.NotificationHandler handler)
handler - o método que será chamado.public final void setUser(csbase.logic.User user)
user - o objeto que representa o usuário.public abstract NotificationTranslator getTranslator()
Copyright © 2018. All Rights Reserved.