2020-10-13 11:52:50 +02:00
|
|
|
package org.gcube.portlets.user.geoportaldataentry.client.ui;
|
|
|
|
|
2020-10-20 09:58:56 +02:00
|
|
|
import org.gcube.portlets.user.geoportaldataentry.client.events.CreateNewProjectEvent;
|
|
|
|
|
2020-10-13 11:52:50 +02:00
|
|
|
import com.github.gwtbootstrap.client.ui.NavLink;
|
|
|
|
import com.google.gwt.core.client.GWT;
|
|
|
|
import com.google.gwt.event.dom.client.ClickEvent;
|
|
|
|
import com.google.gwt.event.shared.EventBus;
|
2020-10-20 09:58:56 +02:00
|
|
|
import com.google.gwt.event.shared.HandlerManager;
|
2020-10-13 11:52:50 +02:00
|
|
|
import com.google.gwt.uibinder.client.UiBinder;
|
|
|
|
import com.google.gwt.uibinder.client.UiField;
|
|
|
|
import com.google.gwt.uibinder.client.UiHandler;
|
|
|
|
import com.google.gwt.user.client.ui.Composite;
|
|
|
|
import com.google.gwt.user.client.ui.Widget;
|
|
|
|
|
|
|
|
public class GeonaNavigationBar extends Composite {
|
|
|
|
|
|
|
|
private static GeonaNavigationBarUiBinder uiBinder = GWT.create(GeonaNavigationBarUiBinder.class);
|
|
|
|
|
|
|
|
interface GeonaNavigationBarUiBinder extends UiBinder<Widget, GeonaNavigationBar> {
|
|
|
|
}
|
2020-10-20 09:58:56 +02:00
|
|
|
|
2020-10-13 11:52:50 +02:00
|
|
|
private EventBus eventBus;
|
|
|
|
|
|
|
|
public GeonaNavigationBar() {
|
|
|
|
initWidget(uiBinder.createAndBindUi(this));
|
|
|
|
}
|
|
|
|
|
|
|
|
private void bindEvents() {
|
|
|
|
// TODO Auto-generated method stub
|
2020-10-20 09:58:56 +02:00
|
|
|
|
2020-10-13 11:52:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@UiField
|
|
|
|
NavLink linkCreateNewProject;
|
|
|
|
|
2020-10-20 09:58:56 +02:00
|
|
|
private HandlerManager appManagerBus;
|
|
|
|
|
2020-10-13 11:52:50 +02:00
|
|
|
public GeonaNavigationBar(String firstName) {
|
|
|
|
initWidget(uiBinder.createAndBindUi(this));
|
|
|
|
}
|
|
|
|
|
|
|
|
@UiHandler("linkCreateNewProject")
|
|
|
|
void onClick(ClickEvent e) {
|
2020-10-20 09:58:56 +02:00
|
|
|
appManagerBus.fireEvent(new CreateNewProjectEvent());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the app manager bus.
|
|
|
|
*
|
|
|
|
* @param appManagerBus the new app manager bus
|
|
|
|
*/
|
|
|
|
public void setAppManagerBus(HandlerManager appManagerBus) {
|
|
|
|
this.appManagerBus = appManagerBus;
|
2020-10-13 11:52:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|