/** * Initializes buttons panel. * * @param uiGroup the <tt>UIGroup</tt> for which we initialize the button panel */ private void initButtonsPanel(UIGroup uiGroup) { if (!isSelected) return; int x = (statusIcon == null ? 0 : statusIcon.getIconWidth()) + LEFT_BORDER + H_GAP; int gridX = 0; // The list of the actions // we will create a button for every action Collection<SIPCommButton> contactActions = uiGroup.getCustomActionButtons(); int lastGridX = gridX; if (contactActions != null && contactActions.size() > 0) { lastGridX = initGroupActionButtons(contactActions, gridX, x); } else { addLabels(gridX); } if (lastAddedButton != null) setButtonBg(lastAddedButton, lastGridX, true); this.setBounds(0, 0, treeContactList.getWidth(), getPreferredSize().height); }