2024-10-14 15:19:13 +03:00
|
|
|
package Common.Visual.Controls;
|
2024-10-10 23:57:36 +03:00
|
|
|
import Common.Passes.Pass;
|
2024-10-14 15:19:13 +03:00
|
|
|
import Common.Utils.Utils_;
|
2023-09-17 22:13:42 +03:00
|
|
|
public class StablePassMenuItem extends StableMenuItem implements PassControl {
|
2024-10-09 23:37:58 +03:00
|
|
|
public StablePassMenuItem(Pass pass) {
|
2023-09-17 22:13:42 +03:00
|
|
|
setText(pass.getDescription());
|
|
|
|
|
setToolTipText(pass.getDescription());
|
|
|
|
|
if (pass.getIconPath() != null) setIcon(pass.getIconPath());
|
|
|
|
|
addActionListener(pass.getControlAction());
|
2025-02-06 18:31:18 +03:00
|
|
|
pass.addControl(this);
|
2023-09-17 22:13:42 +03:00
|
|
|
}
|
2024-10-14 15:19:13 +03:00
|
|
|
@Override
|
|
|
|
|
public void setIcon(String icon_path) {
|
|
|
|
|
setIcon(Utils_.getIcon(icon_path));
|
|
|
|
|
}
|
2023-09-17 22:13:42 +03:00
|
|
|
}
|