mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Make UI Inspector better: provide icon info for InplaceButton
This commit is contained in:
@@ -39,6 +39,7 @@ public class InplaceButton extends JComponent implements ActiveComponent, Access
|
||||
private BaseButtonBehavior myBehavior;
|
||||
private ActionListener myListener;
|
||||
|
||||
private Icon myIcon;
|
||||
private CenteredIcon myRegular;
|
||||
private CenteredIcon myHovered;
|
||||
private CenteredIcon myInactive;
|
||||
@@ -130,6 +131,7 @@ public class InplaceButton extends JComponent implements ActiveComponent, Access
|
||||
|
||||
setPreferredSize(new Dimension(width, height));
|
||||
|
||||
myIcon = regular;
|
||||
myRegular = new CenteredIcon(regular, width, height);
|
||||
myHovered = new CenteredIcon(hovered, width, height);
|
||||
myInactive = new CenteredIcon(inactive, width, height);
|
||||
@@ -158,6 +160,10 @@ public class InplaceButton extends JComponent implements ActiveComponent, Access
|
||||
setIcons(icon, icon, icon);
|
||||
}
|
||||
|
||||
public Icon getIcon() {
|
||||
return myIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JComponent getComponent() {
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user