// Path: gwt/src/opus/gwt/management/console/client/event/BreadCrumbEvent.java
// public class BreadCrumbEvent extends GwtEvent<BreadCrumbEventHandler> {
// 	
// 	public static Type<BreadCrumbEventHandler> TYPE = new Type<BreadCrumbEventHandler>();
// 	public enum Action{SET_CRUMBS, SET_ACTIVE, ADD_CRUMB, REMOVE_CRUMB};
// 	private Action actionType;
// 	private String[] names;
// 	private String crumb;
// 	
// 	public BreadCrumbEvent(Action actionType, String[] names){
// 		this.actionType = actionType;
// 		this.names = names;
// 	}
// 	
// 	public BreadCrumbEvent(Action actionType, String crumb){
// 		this.actionType = actionType;
// 		this.crumb = crumb;
// 	}
// 	
// 	public Action getAction(){
// 		return actionType;
// 	}
// 
// 	public String getCrumb(){
// 		return crumb;
// 	}
// 	
// 	public String[] getCrumbNames(){
// 		return names;
// 	}
// 	
//   	@Override
//   	public Type<BreadCrumbEventHandler> getAssociatedType() {
// 	  return TYPE;
//   	}
// 
//   	@Override
//   	protected void dispatch(BreadCrumbEventHandler handler) {
// 	  handler.onBreadCrumb(this);
//   	}
// }
// 
// Path: gwt/src/opus/gwt/management/console/client/event/BreadCrumbEventHandler.java
// public interface BreadCrumbEventHandler extends EventHandler {
// 	void onBreadCrumb(BreadCrumbEvent event);
// }


import java.util.HashMap;
import opus.gwt.management.console.client.ClientFactory;
import opus.gwt.management.console.client.event.BreadCrumbEvent;
import opus.gwt.management.console.client.event.BreadCrumbEventHandler;
import opus.gwt.management.console.client.resources.BreadCrumbsPanelCss.BreadCrumbsPanelStyle;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Widget;

package opus.gwt.management.console.client.navigation;




public class BreadCrumbsPanel extends Composite {

	private static BreadCrumbsUiBinder uiBinder = GWT.create(BreadCrumbsUiBinder.class);
	interface BreadCrumbsUiBinder extends UiBinder<Widget, BreadCrumbsPanel> {}
	
	private EventBus eventBus;
	private HTML activeCrumb;
	private HashMap<String, HTML> breadCrumbLabels;
	
	@UiField FlowPanel breadCrumbsContainer;
	@UiField BreadCrumbsPanelStyle style;
	
	public BreadCrumbsPanel(ClientFactory clientFactory) {
		initWidget(uiBinder.createAndBindUi(this));
		this.eventBus = clientFactory.getEventBus();
		registerHandlers();
		activeCrumb = new HTML();
		breadCrumbLabels = new HashMap<String, HTML>();	
	}
	
	private void registerHandlers(){
		eventBus.addHandler(BreadCrumbEvent.TYPE, 

// Path: gwt/src/opus/gwt/management/console/client/event/BreadCrumbEvent.java
// public class BreadCrumbEvent extends GwtEvent<BreadCrumbEventHandler> {
// 	
// 	public static Type<BreadCrumbEventHandler> TYPE = new Type<BreadCrumbEventHandler>();
// 	public enum Action{SET_CRUMBS, SET_ACTIVE, ADD_CRUMB, REMOVE_CRUMB};
// 	private Action actionType;
// 	private String[] names;
// 	private String crumb;
// 	
// 	public BreadCrumbEvent(Action actionType, String[] names){
// 		this.actionType = actionType;
// 		this.names = names;
// 	}
// 	
// 	public BreadCrumbEvent(Action actionType, String crumb){
// 		this.actionType = actionType;
// 		this.crumb = crumb;
// 	}
// 	
// 	public Action getAction(){
// 		return actionType;
// 	}
// 
// 	public String getCrumb(){
// 		return crumb;
// 	}
// 	
// 	public String[] getCrumbNames(){
// 		return names;
// 	}
// 	
//   	@Override
//   	public Type<BreadCrumbEventHandler> getAssociatedType() {
// 	  return TYPE;
//   	}
// 
//   	@Override
//   	protected void dispatch(BreadCrumbEventHandler handler) {
// 	  handler.onBreadCrumb(this);
//   	}
// }
// 
// Path: gwt/src/opus/gwt/management/console/client/event/BreadCrumbEventHandler.java
// public interface BreadCrumbEventHandler extends EventHandler {
// 	void onBreadCrumb(BreadCrumbEvent event);
// }


// Path: gwt/src/opus/gwt/management/console/client/navigation/BreadCrumbsPanel.java
import java.util.HashMap;
import opus.gwt.management.console.client.ClientFactory;
import opus.gwt.management.console.client.event.BreadCrumbEvent;
import opus.gwt.management.console.client.event.BreadCrumbEventHandler;
import opus.gwt.management.console.client.resources.BreadCrumbsPanelCss.BreadCrumbsPanelStyle;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Widget;

package opus.gwt.management.console.client.navigation;




public class BreadCrumbsPanel extends Composite {

	private static BreadCrumbsUiBinder uiBinder = GWT.create(BreadCrumbsUiBinder.class);
	interface BreadCrumbsUiBinder extends UiBinder<Widget, BreadCrumbsPanel> {}
	
	private EventBus eventBus;
	private HTML activeCrumb;
	private HashMap<String, HTML> breadCrumbLabels;
	
	@UiField FlowPanel breadCrumbsContainer;
	@UiField BreadCrumbsPanelStyle style;
	
	public BreadCrumbsPanel(ClientFactory clientFactory) {
		initWidget(uiBinder.createAndBindUi(this));
		this.eventBus = clientFactory.getEventBus();
		registerHandlers();
		activeCrumb = new HTML();
		breadCrumbLabels = new HashMap<String, HTML>();	
	}
	
	private void registerHandlers(){
		eventBus.addHandler(BreadCrumbEvent.TYPE, 

			new BreadCrumbEventHandler(){
