use of org.pushingpixels.flamingo.internal.ui.ribbon.appmenu.JRibbonApplicationMenuButton in project freeplane by freeplane.
the class RibbonBuilder method updateApplicationMenuButton.
public void updateApplicationMenuButton(JRibbon ribbon) {
for (Component comp : ribbon.getComponents()) {
if (comp instanceof JRibbonApplicationMenuButton) {
String appName = ResourceController.getResourceController().getProperty("ApplicationName", "Freeplane");
URL location = ResourceController.getResourceController().getResource("/images/" + appName.trim() + "_app_menu_128.png");
if (location != null) {
ResizableIcon icon = ImageWrapperResizableIcon.getIcon(location, new Dimension(32, 32));
((JRibbonApplicationMenuButton) comp).setIcon(icon);
((JRibbonApplicationMenuButton) comp).setBackground(Color.blue);
}
}
}
}
Aggregations