mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-04 11:23:50 +00:00
fix merge problem with ComponentToolbar
This commit is contained in:
1 parent
b5ed17701b
commit
f546d6a9d4
1 file changed
+39
-1
+39
-1
@@ -1,7 +1,45 @@
|
||||
package com.sap.sailing.gwt.ui.shared.components;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
import com.google.gwt.user.client.ui.AbstractImagePrototype;
|
||||
import com.google.gwt.user.client.ui.Anchor;
|
||||
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
|
||||
public class ComponentTitleBar extends HorizontalPanel {
|
||||
public class ComponentToolbar extends HorizontalPanel {
|
||||
|
||||
private static ComponentResources resources = GWT.create(ComponentResources.class);
|
||||
|
||||
private final Component<?> component;
|
||||
final StringMessages stringMessages;
|
||||
|
||||
public ComponentToolbar(final Component<?> component, final StringMessages stringMessages) {
|
||||
super();
|
||||
|
||||
this.setSpacing(10);
|
||||
this.component = component;
|
||||
this.stringMessages = stringMessages;
|
||||
}
|
||||
|
||||
public void addSettingsButton() {
|
||||
if(component.hasSettings()) {
|
||||
ImageResource settingsImage = resources.settingsIcon();
|
||||
Anchor showConfigAnchor = new Anchor(AbstractImagePrototype.create(settingsImage).getSafeHtml());
|
||||
showConfigAnchor.setTitle(stringMessages.configuration());
|
||||
showConfigAnchor.addClickHandler(new ClickHandler() {
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
new SettingsDialog(component, stringMessages).show();
|
||||
}
|
||||
});
|
||||
|
||||
this.add(showConfigAnchor);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user