add(new ImageFigure(getLabelProvider().getImage(getModel())));
textLabel = new Label(getLabelProvider().getText(getModel()));
textLabel.setLabelAlignment(PositionConstants.LEFT);
add(textLabel);
removeButton = new NoBorderButton(CommonUIPlugin.getDefault().getImageRegistry().get(ICommonUIConstants.ICON_TRAY_CATEGORY_REMOVE_BUTTON)) {
public void handleKeyPressed(KeyEvent event) {
// Do nothing - the button can only be pressed with a mouse
}
public void handleKeyReleased(KeyEvent event) {
// Do nothing - the button can only be pressed with a mouse
}
};
removeButton.setOpaque(false);
removeButton.setToolTip(getRemoveToolTip());
removeButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
removeEntry();
}
});
addButton = new NoBorderButton(CommonUIPlugin.getDefault().getImageRegistry().get(ICommonUIConstants.ICON_TRAY_CATEGORY_ADD_BUTTON)) {
public void handleKeyPressed(KeyEvent event) {
// Do nothing - the button can only be pressed with a mouse
}
public void handleKeyReleased(KeyEvent event) {
// Do nothing - the button can only be pressed with a mouse