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.
work in progress: prototyping layout selection
- Loading branch information
Alex Eng
committed
May 24, 2012
1 parent
8b2be9d
commit 9b7ddd6
Showing
12 changed files
with
647 additions
and
9 deletions.
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
65 changes: 65 additions & 0 deletions
65
zanata-war/src/main/java/org/zanata/webtrans/client/presenter/LayoutSelectionPresenter.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,65 @@ | ||
/* | ||
* 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.presenter.client.EventBus; | ||
import net.customware.gwt.presenter.client.widget.WidgetDisplay; | ||
import net.customware.gwt.presenter.client.widget.WidgetPresenter; | ||
|
||
/** | ||
* @author Alex Eng <a href="mailto:aeng@redhat.com">aeng@redhat.com</a> | ||
* | ||
*/ | ||
public class LayoutSelectionPresenter extends WidgetPresenter<LayoutSelectionPresenter.Display> | ||
{ | ||
|
||
public LayoutSelectionPresenter(Display display, EventBus eventBus) | ||
{ | ||
super(display, eventBus); | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
public interface Display extends WidgetDisplay | ||
{ | ||
|
||
} | ||
|
||
@Override | ||
protected void onBind() | ||
{ | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
protected void onUnbind() | ||
{ | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
protected void onRevealDisplay() | ||
{ | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
} |
94 changes: 94 additions & 0 deletions
94
zanata-war/src/main/java/org/zanata/webtrans/client/presenter/LayoutSelectorPresenter.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,94 @@ | ||
/* | ||
* 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 com.google.gwt.event.dom.client.ClickEvent; | ||
import com.google.gwt.event.dom.client.ClickHandler; | ||
import com.google.gwt.event.dom.client.HasClickHandlers; | ||
import com.google.inject.Inject; | ||
|
||
import net.customware.gwt.presenter.client.EventBus; | ||
import net.customware.gwt.presenter.client.widget.WidgetDisplay; | ||
import net.customware.gwt.presenter.client.widget.WidgetPresenter; | ||
|
||
/** | ||
* @author Alex Eng <a href="mailto:aeng@redhat.com">aeng@redhat.com</a> | ||
* | ||
*/ | ||
public class LayoutSelectorPresenter extends WidgetPresenter<LayoutSelectorPresenter.Display> | ||
{ | ||
@Inject | ||
public LayoutSelectorPresenter(Display display, EventBus eventBus) | ||
{ | ||
super(display, eventBus); | ||
} | ||
|
||
public interface Display extends WidgetDisplay | ||
{ | ||
void show(); | ||
|
||
void showLayoutList(boolean isShowLayoutList); | ||
|
||
HasClickHandlers getConfigButton(); | ||
|
||
void toggleView(); | ||
|
||
void hide(); | ||
} | ||
|
||
|
||
@Override | ||
protected void onBind() | ||
{ | ||
display.showLayoutList(false); | ||
|
||
registerHandler(display.getConfigButton().addClickHandler(new ClickHandler() | ||
{ | ||
@Override | ||
public void onClick(ClickEvent event) | ||
{ | ||
display.toggleView(); | ||
} | ||
})); | ||
} | ||
|
||
@Override | ||
protected void onUnbind() | ||
{ | ||
// TODO Auto-generated method stub | ||
} | ||
|
||
@Override | ||
protected void onRevealDisplay() | ||
{ | ||
// TODO Auto-generated method stub | ||
} | ||
|
||
public void show() | ||
{ | ||
display.show(); | ||
} | ||
|
||
public void hide() | ||
{ | ||
display.hide(); | ||
} | ||
} |
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
Oops, something went wrong.