/**
* Copyright 2013 European Parliament
*
* Licensed under the EUPL, Version 1.1 or - as soon they will be approved by the European Commission - subsequent versions of the EUPL (the "Licence");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and limitations under the Licence.
*/
package org.nsesa.editor.gwt.an.drafting.client.ui.main.document.path;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.*;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import org.nsesa.editor.gwt.core.client.ui.document.DocumentEventBus;
import org.nsesa.editor.gwt.core.client.util.Scope;
import java.util.logging.Logger;
import static org.nsesa.editor.gwt.core.client.util.Scope.ScopeValue.DOCUMENT;
/**
* Date: 24/06/12 16:39
*
* @author <a href="mailto:philip.luppens@gmail.com">Philip Luppens</a>
* @version $Id$
*/
@Singleton
@Scope(DOCUMENT)
public class PathViewImpl extends Composite implements PathView, ProvidesResize {
interface MyUiBinder extends UiBinder<Widget, PathViewImpl> {
}
private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
private static final Logger LOG = Logger.getLogger(PathViewImpl.class.getName());
@UiField
HTMLPanel mainPanel;
@UiField
HTMLPanel holderPanel;
@UiField
ScrollPanel scrollPanel;
private final DocumentEventBus documentEventBus;
@Inject
public PathViewImpl(final DocumentEventBus documentEventBus) {
this.documentEventBus = documentEventBus;
final Widget widget = uiBinder.createAndBindUi(this);
initWidget(widget);
if (!GWT.isScript())
widget.setTitle(this.getClass().getName());
}
@Override
public void setPath(Panel pathPanel) {
this.holderPanel.clear();
this.holderPanel.add(pathPanel);
}
}