Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.plugin.notificationconfiguration
Class NotificationsTable

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JScrollPane
                  extended by net.java.sip.communicator.plugin.notificationconfiguration.NotificationsTable
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ScrollPaneConstants, NotificationChangeListener

public class NotificationsTable
extends JScrollPane
implements NotificationChangeListener

Author:
Alexandre Maillard, Yana Stamcheva
See Also:
Serialized Form

Nested Class Summary
(package private) static class NotificationsTable.NotificationTable
          Extends the JTable to make easier to use with this plug-in.
 
Nested classes/interfaces inherited from class javax.swing.JScrollPane
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar
 
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
 
Field Summary
static String DISABLED
          The disabled state of the notification action.
static String ENABLED
          The enabled state of the notification action.
 
Fields inherited from class javax.swing.JScrollPane
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport
 
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 javax.swing.ScrollPaneConstants
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
NotificationsTable(Object[] columns, String[] columnToolTips, NotificationConfigurationPanel panel)
          Creates an instance of the NotificationsTable.
 
Method Summary
 void actionAdded(NotificationActionTypeEvent event)
          Action Listener Service Notifications
 void actionChanged(NotificationActionTypeEvent event)
          Action Listener Service Notifications
 void actionRemoved(NotificationActionTypeEvent event)
          Action Listener Service Notifications
 void addMouseListener(MouseListener l)
          Adding a mouse listener on the table.
 void clear()
          Clears the content of the notifications table.
 void eventTypeAdded(NotificationEventTypeEvent event)
          Adds the event to the notifications table.
 void eventTypeRemoved(NotificationEventTypeEvent event)
          Removes the event from the notifications table.
static Icon getColumnIconValue(int column)
          Returns the icon value of the given column if the the column supports an icon value, otherwise returns null.
 NotificationEntry getNotificationEntry(int row)
          Returns the notification entry at the given row.
 int getRowCount()
          Returns the number of lines of the table.
 int getSelectedRow()
          Returns the currently selected row.
 int rowAtPoint(Point point)
          Returns the row number corresponding to the given point.
 void setSelectedRow(int row)
          Selects the given row.
 
Methods inherited from class javax.swing.JScrollPane
createHorizontalScrollBar, createVerticalScrollBar, createViewport, getAccessibleContext, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getUI, getUIClassID, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorder, getViewportBorderBounds, isValidateRoot, isWheelScrollingEnabled, paramString, setColumnHeader, setColumnHeaderView, setComponentOrientation, setCorner, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setLayout, setRowHeader, setRowHeaderView, setUI, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportBorder, setViewportView, setWheelScrollingEnabled, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ENABLED

public static final String ENABLED
The enabled state of the notification action.

See Also:
Constant Field Values

DISABLED

public static final String DISABLED
The disabled state of the notification action.

See Also:
Constant Field Values
Constructor Detail

NotificationsTable

NotificationsTable(Object[] columns,
                   String[] columnToolTips,
                   NotificationConfigurationPanel panel)
Creates an instance of the NotificationsTable.

Parameters:
columns - an array containing all columns
columnToolTips - an array containing all column tooltips
panel - the parent configuration panel
Method Detail

getSelectedRow

public int getSelectedRow()
Returns the currently selected row.

Returns:
the currently selected row

getRowCount

public int getRowCount()
Returns the number of lines of the table.

Returns:
the number of lines of the table

setSelectedRow

public void setSelectedRow(int row)
Selects the given row.

Parameters:
row - the row to select

getNotificationEntry

public NotificationEntry getNotificationEntry(int row)
Returns the notification entry at the given row.

Parameters:
row - the row number, which notification entry we're looking for
Returns:
the notification entry at the given row

addMouseListener

public void addMouseListener(MouseListener l)
Adding a mouse listener on the table.

Overrides:
addMouseListener in class Component
Parameters:
l - the MouseListener to add

rowAtPoint

public int rowAtPoint(Point point)
Returns the row number corresponding to the given point.

Parameters:
point - the point under which is the row we're looking for
Returns:
the row number corresponding to the given point

getColumnIconValue

public static Icon getColumnIconValue(int column)
Returns the icon value of the given column if the the column supports an icon value, otherwise returns null.

Parameters:
column - the number of the column
Returns:
the icon value of the given column if the the column supports an icon value, otherwise returns null

actionAdded

public void actionAdded(NotificationActionTypeEvent event)
Action Listener Service Notifications

Specified by:
actionAdded in interface NotificationChangeListener
Parameters:
event - the NotificationActionTypeEvent that notified us

actionRemoved

public void actionRemoved(NotificationActionTypeEvent event)
Action Listener Service Notifications

Specified by:
actionRemoved in interface NotificationChangeListener
Parameters:
event - the NotificationActionTypeEvent that notified us

actionChanged

public void actionChanged(NotificationActionTypeEvent event)
Action Listener Service Notifications

Specified by:
actionChanged in interface NotificationChangeListener
Parameters:
event - the NotificationActionTypeEvent that notified us

eventTypeAdded

public void eventTypeAdded(NotificationEventTypeEvent event)
Adds the event to the notifications table.

Specified by:
eventTypeAdded in interface NotificationChangeListener
Parameters:
event - the event to add

eventTypeRemoved

public void eventTypeRemoved(NotificationEventTypeEvent event)
Removes the event from the notifications table.

Specified by:
eventTypeRemoved in interface NotificationChangeListener
Parameters:
event - the event to remove

clear

public void clear()
Clears the content of the notifications table.


Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.