This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alex Eng
committed
Jul 10, 2012
1 parent
60d974e
commit 0fd8d79
Showing
7 changed files
with
177 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
zanata-war/src/main/java/org/zanata/webtrans/client/presenter/DashboardPresenter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* | ||
* Copyright 2012, Red Hat, Inc. and individual contributors as indicated by the | ||
* @author tags. See the copyright.txt file in the distribution for a full | ||
* listing of individual contributors. | ||
* | ||
* This is free software; you can redistribute it and/or modify it under the | ||
* terms of the GNU Lesser General Public License as published by the Free | ||
* Software Foundation; either version 2.1 of the License, or (at your option) | ||
* any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this software; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF | ||
* site: http://www.fsf.org. | ||
*/ | ||
package org.zanata.webtrans.client.presenter; | ||
|
||
import net.customware.gwt.dispatch.client.DispatchAsync; | ||
import net.customware.gwt.presenter.client.EventBus; | ||
import net.customware.gwt.presenter.client.widget.WidgetDisplay; | ||
import net.customware.gwt.presenter.client.widget.WidgetPresenter; | ||
|
||
import org.zanata.webtrans.client.resources.WebTransMessages; | ||
import org.zanata.webtrans.client.rpc.CachingDispatchAsync; | ||
import org.zanata.webtrans.shared.model.WorkspaceContext; | ||
|
||
import com.google.inject.Inject; | ||
|
||
/** | ||
* | ||
* @author Alex Eng <a href="mailto:aeng@redhat.com">aeng@redhat.com</a> | ||
* | ||
*/ | ||
public class DashboardPresenter extends WidgetPresenter<DashboardPresenter.Display> | ||
{ | ||
|
||
public interface Display extends WidgetDisplay | ||
{ | ||
|
||
} | ||
|
||
private final DispatchAsync dispatcher; | ||
|
||
|
||
|
||
|
||
@Inject | ||
public DashboardPresenter(final Display display, EventBus eventBus, WorkspaceContext workspaceContext, CachingDispatchAsync dispatcher, final WebTransMessages messages) | ||
{ | ||
super(display, eventBus); | ||
this.dispatcher = dispatcher; | ||
} | ||
|
||
@Override | ||
protected void onBind() | ||
{ | ||
|
||
} | ||
|
||
@Override | ||
protected void onUnbind() | ||
{ | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
@Override | ||
protected void onRevealDisplay() | ||
{ | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
|
||
public enum MainView | ||
{ | ||
Documents, Editor, Search; | ||
Dashboard, Documents, Editor, Search; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
zanata-war/src/main/java/org/zanata/webtrans/client/view/DashboardView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Copyright 2012, Red Hat, Inc. and individual contributors | ||
* as indicated by the @author tags. See the copyright.txt file in the | ||
* distribution for a full listing of individual contributors. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
package org.zanata.webtrans.client.view; | ||
|
||
import org.zanata.webtrans.client.presenter.DashboardPresenter; | ||
import org.zanata.webtrans.client.resources.Resources; | ||
import org.zanata.webtrans.client.resources.UiMessages; | ||
|
||
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.Composite; | ||
import com.google.gwt.user.client.ui.FlexTable; | ||
import com.google.gwt.user.client.ui.Widget; | ||
import com.google.inject.Inject; | ||
|
||
/** | ||
* | ||
* @author Alex Eng <a href="mailto:aeng@redhat.com">aeng@redhat.com</a> | ||
* | ||
*/ | ||
public class DashboardView extends Composite implements DashboardPresenter.Display | ||
{ | ||
private static DashboardViewUiBinder uiBinder = GWT.create(DashboardViewUiBinder.class); | ||
|
||
@UiField | ||
FlexTable rootTable; | ||
|
||
interface DashboardViewUiBinder extends UiBinder<Widget, DashboardView> | ||
{ | ||
} | ||
|
||
@Inject | ||
public DashboardView(final UiMessages messages, Resources resources) | ||
{ | ||
initWidget(uiBinder.createAndBindUi(this)); | ||
} | ||
|
||
@Override | ||
public Widget asWidget() | ||
{ | ||
return this; | ||
} | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
zanata-war/src/main/java/org/zanata/webtrans/client/view/DashboardView.ui.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> | ||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" | ||
xmlns:g="urn:import:com.google.gwt.user.client.ui"> | ||
|
||
<ui:with field='resources' type="org.zanata.webtrans.client.resources.Resources"/> | ||
|
||
<ui:style> | ||
.rootTable | ||
{ | ||
} | ||
</ui:style> | ||
|
||
|
||
<g:FlexTable ui:field="rootTable" styleName="rootTable" cellPadding="10px"> | ||
|
||
</g:FlexTable> | ||
|
||
</ui:UiBinder> |