Display popup buttons somehow differently than usual buttons #PL-5065

This commit is contained in:
Yuriy Artamonov 2015-03-19 09:13:26 +00:00
parent 941217ee56
commit 7b4b640a0b

View File

@ -25,6 +25,8 @@ import java.beans.PropertyChangeListener;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import static java.awt.Component.*;
/** /**
* @author krivopustov * @author krivopustov
* @version $Id$ * @version $Id$
@ -50,11 +52,15 @@ public class DesktopPopupButton extends DesktopAbstractActionsHolderComponent<JB
impl.setLayout(new BoxLayout(impl, BoxLayout.X_AXIS)); impl.setLayout(new BoxLayout(impl, BoxLayout.X_AXIS));
captionLabel = new JLabel(); captionLabel = new JLabel();
impl.add(Box.createHorizontalGlue());
impl.add(captionLabel); impl.add(captionLabel);
captionLabel.setAlignmentX(CENTER_ALIGNMENT);
rightIcon = new JLabel(); rightIcon = new JLabel();
rightIcon.setIcon(resources.getIcon(DROP_DOWN_ICON)); rightIcon.setIcon(resources.getIcon(DROP_DOWN_ICON));
rightIcon.setAlignmentX(CENTER_ALIGNMENT);
impl.add(rightIcon); impl.add(rightIcon);
impl.add(Box.createHorizontalGlue());
impl.addActionListener( impl.addActionListener(
new ActionListener() { new ActionListener() {