imageLabel.addMouseTrackListener(fMouseTrackListner);
imageLabel.setImage(OwlUI.getImage(fResources, item.getImage()));
imageLabel.setToolTipText(item.getOrigin());
/* Use a CCLabel per Item */
final CCLabel itemLabel = new CCLabel(fInnerContentCircle, SWT.NONE);
itemLabel.setBackground(fInnerContentCircle.getBackground());
itemLabel.setCursor(itemLabel.getDisplay().getSystemCursor(SWT.CURSOR_HAND));
itemLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
itemLabel.setText(item.getText());
itemLabel.setFont(fBoldTextFont);
itemLabel.addMouseTrackListener(fMouseTrackListner);
/* Paint text blue on mouse-enter */
MouseTrackAdapter mouseTrackListener = new MouseTrackAdapter() {
@Override
public void mouseEnter(MouseEvent e) {
itemLabel.setForeground(itemLabel.getDisplay().getSystemColor(SWT.COLOR_BLUE));
}
@Override
public void mouseExit(MouseEvent e) {
itemLabel.setForeground(itemLabel.getDisplay().getSystemColor(SWT.COLOR_BLACK));
}
};
itemLabel.addMouseTrackListener(mouseTrackListener);
imageLabel.addMouseTrackListener(mouseTrackListener);
/* Restore RSSOwl label is clicked */
MouseAdapter mouseListener = new MouseAdapter() {
@Override
public void mouseUp(MouseEvent e) {
/* Open Item */
item.open(e);
/* Close Popup */
doClose();
}
};
itemLabel.addMouseListener(mouseListener);
imageLabel.addMouseListener(mouseListener);
/* Offer Label to mark item sticky */
final CLabel markStickyLabel = new CLabel(fInnerContentCircle, SWT.NONE);
markStickyLabel.setImage(item.supportsSticky() ? fItemNonStickyIcon : fItemNonStickyDisabledIcon);
markStickyLabel.setBackground(fInnerContentCircle.getBackground());
markStickyLabel.setEnabled(item.supportsSticky());
markStickyLabel.addMouseTrackListener(fMouseTrackListner);
markStickyLabel.setCursor(fShell.getDisplay().getSystemCursor(SWT.CURSOR_HAND));
markStickyLabel.addMouseListener(new MouseAdapter() {
@Override
public void mouseDown(MouseEvent e) {
boolean newStateSticky = !item.isSticky();
/* Update Background Color */
itemLabel.setBackground(newStateSticky ? fStickyBgColor : fInnerContentCircle.getBackground());
/* Update Image */
markStickyLabel.setImage(newStateSticky ? fItemStickyIcon : fItemNonStickyIcon);
/* Apply state */
item.setSticky(newStateSticky);
}
});
/* Show Sticky if required */
if (item.supportsSticky() && item.isSticky()) {
itemLabel.setBackground(fStickyBgColor);
markStickyLabel.setImage(fItemStickyIcon);
}
/* Show excerpt of content if set */
if (fGlobalScope.getBoolean(DefaultPreferences.SHOW_EXCERPT_IN_NOTIFIER)) {