tool window combo - icon & line

This commit is contained in:
Kirill Kalishev
2009-10-30 15:37:03 +03:00
parent 3f4e4ac011
commit a9cef6f8aa
2 changed files with 8 additions and 1 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

After

Width:  |  Height:  |  Size: 286 B

@@ -50,7 +50,6 @@ public class ContentComboLabel extends BaseLabel {
public ContentComboLabel(ComboContentLayout layout) {
super(layout.myUi, true);
myLayout = layout;
addMouseListener(new MouseAdapter(){});
}
@@ -64,6 +63,8 @@ public class ContentComboLabel extends BaseLabel {
}
private void showPopup() {
if (!isToDrawCombo()) return;
final ContentManager manager = myUi.myManager;
BaseListPopupStep step = new BaseListPopupStep<Content>(null, manager.getContents()) {
@Override
@@ -150,6 +151,12 @@ public class ContentComboLabel extends BaseLabel {
super.paintChildren(g);
if (isToDrawCombo()) {
myComboIcon.paintIcon(this, g);
g.setColor(new Color(255, 255, 255, 100));
int x = myComboIcon.getIconRec().x - 3;
int yTop = myComboIcon.getIconRec().y;
int yBottom = yTop + myComboIcon.getIconHeight();
g.drawLine(x, yTop + 1, x, yBottom - 3);
}
}