public class ContactListTreeCellRenderer extends javax.swing.JPanel implements javax.swing.tree.TreeCellRenderer, javax.swing.Icon, Skinnable
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected boolean |
isSelected
Indicates if the current list cell is selected.
|
protected javax.swing.JLabel |
rightLabel
The component showing the avatar or the contact count in the case of
groups.
|
protected int |
row
The index of the current cell.
|
protected javax.swing.Icon |
statusIcon
The icon showing the contact status.
|
protected javax.swing.tree.TreeNode |
treeNode
Indicates if the current cell contains a leaf or a group.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
ContactListTreeCellRenderer()
Initializes the panel containing the node.
|
Modifier and Type | Method and Description |
---|---|
javax.swing.JButton |
getAddContactButton()
Returns the add contact button contained in the current cell.
|
javax.swing.JButton |
getCallButton()
Returns the call button contained in the current cell.
|
javax.swing.JButton |
getCallVideoButton()
Returns the call video button contained in the current cell.
|
javax.swing.JButton |
getChatButton()
Returns the call button contained in the current cell.
|
javax.swing.JButton |
getDesktopSharingButton()
Returns the desktop sharing button contained in the current cell.
|
javax.swing.Icon |
getDragIcon(javax.swing.JTree tree,
java.lang.Object dragObject,
int index)
Returns the drag icon used to represent a cell in all drag operations.
|
int |
getIconHeight()
Returns the height of this icon.
|
int |
getIconWidth()
Returns the width of this icon.
|
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of this component.
|
java.awt.Component |
getTreeCellRendererComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
Returns this panel that has been configured to display the meta contact
and meta contact group cells.
|
void |
loadSkin()
Loads all images and colors.
|
protected void |
paintComponent(java.awt.Graphics g)
Paints a customized background.
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Draw the icon at the specified location.
|
void |
resetRolloverState()
Resets the rollover state of all rollover components in the current cell.
|
void |
resetRolloverState(java.awt.Component excludeComponent)
Resets the rollover state of all rollover components in the current cell
except the component given as a parameter.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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
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, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, 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, 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, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected final javax.swing.JLabel rightLabel
protected javax.swing.Icon statusIcon
protected boolean isSelected
protected int row
protected javax.swing.tree.TreeNode treeNode
public ContactListTreeCellRenderer()
public java.awt.Component getTreeCellRendererComponent(javax.swing.JTree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
getTreeCellRendererComponent
in interface javax.swing.tree.TreeCellRenderer
tree
- the source treevalue
- the tree nodeselected
- indicates if the node is selectedexpanded
- indicates if the node is expandedleaf
- indicates if the node is a leafrow
- indicates the row number of the nodehasFocus
- indicates if the node has the focusprotected void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
g
- the Graphics object through which we paintpublic int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon
c
- the component which can be used as observerg
- the Graphics object used for paintingx
- the position on the X coordinatey
- the position on the Y coordinatepublic javax.swing.JButton getChatButton()
public javax.swing.JButton getCallButton()
public javax.swing.JButton getCallVideoButton()
public javax.swing.JButton getDesktopSharingButton()
public javax.swing.JButton getAddContactButton()
public javax.swing.Icon getDragIcon(javax.swing.JTree tree, java.lang.Object dragObject, int index)
tree
- the parent tree objectdragObject
- the dragged objectindex
- the index of the dragged object in the treepublic void resetRolloverState()
public void resetRolloverState(java.awt.Component excludeComponent)
excludeComponent
- the component to exclude from the reset
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.