Java tutorial
/** * Copyright 2012 ArcBees Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.roughindustries.commonwealthcocktails.client.application; import javax.inject.Inject; import org.gwtbootstrap3.client.ui.Container; import org.gwtbootstrap3.client.ui.NavbarBrand; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.cellview.client.CellTable; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.HTMLPanel; import com.google.gwt.user.client.ui.IsWidget; import com.google.gwt.user.client.ui.ScrollPanel; import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.Widget; import com.gwtplatform.mvp.client.ViewImpl; import com.roughindustries.commonwealthcocktails.model.ccCocktail; public class ApplicationView extends ViewImpl implements ApplicationPresenter.MyView { @UiField CellTable<ccCocktail> cocktailGrid; @UiField ScrollPanel scroll; @UiField HTMLPanel topBuffer; @UiField HTMLPanel bottomBuffer; @UiField HTMLPanel leftBuffer; @UiField HTMLPanel rightBuffer; @UiField Container headerContainer; @UiField NavbarBrand brand; private Widget widget; @Inject public ApplicationView(final Binder uiBinder) { Window.enableScrolling(false); widget = uiBinder.createAndBindUi(this); } @Override public void setInSlot(Object slot, IsWidget content) { if (slot == ApplicationPresenter.SLOT_COCKTAILS) { } else { super.setInSlot(slot, content); } } @Override public Widget asWidget() { return widget; } public ScrollPanel getScroll() { return scroll; } public CellTable<ccCocktail> getCocktailGrid() { return cocktailGrid; } public HTMLPanel getTopBuffer() { return topBuffer; } public HTMLPanel getBottomBuffer() { return bottomBuffer; } public HTMLPanel getLeftBuffer() { return leftBuffer; } public HTMLPanel getRightBuffer() { return rightBuffer; } public Container getHeaderContainer() { return headerContainer; } public NavbarBrand getBrand() { return brand; } public interface Binder extends UiBinder<Widget, ApplicationView> { } }