Skip to content

Commit

Permalink
rename fx related views
Browse files Browse the repository at this point in the history
  • Loading branch information
heiko-braun committed Aug 7, 2012
1 parent b2e2d1d commit 9267405
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @author Heiko Braun
* @date 6/15/12
*/
public class BrowserPresenter extends PresenterWidget<BrowserPresenter.MyView> implements StoragePresenter{
public class BrowserPresenter extends PresenterWidget<BrowserPresenter.MyView> implements FXTemplatesPresenter {

private final PlaceManager placeManager;
private DispatchAsync dispatcher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class BrowserView extends PopupViewImpl implements BrowserPresenter.MyVie
private DescriptionView descView;
private DefaultWindow window;
private FormView formView;
private StorageView storageView;
private FXTemplatesView storageView;


@Inject
Expand Down Expand Up @@ -100,7 +100,7 @@ public void onClick(ClickEvent clickEvent) {
descView = new DescriptionView();
formView = new FormView();

storageView = new StorageView();
storageView = new FXTemplatesView();

DefaultTabLayoutPanel tabLayoutPanel = new DefaultTabLayoutPanel(40, Style.Unit.PX);
tabLayoutPanel.addStyleName("default-tabpanel");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.google.gwt.view.client.SelectionChangeEvent;
import com.google.gwt.view.client.SingleSelectionModel;
import org.jboss.as.console.client.shared.viewframework.builder.MultipleToOneLayout;
import org.jboss.ballroom.client.widgets.ContentHeaderLabel;
import org.jboss.ballroom.client.widgets.forms.ComboBoxItem;
import org.jboss.ballroom.client.widgets.forms.ListItem;
import org.jboss.ballroom.client.widgets.forms.TextAreaItem;
Expand All @@ -29,19 +30,22 @@
* @author Heiko Braun
* @date 7/23/12
*/
public class TemplateModelsView {
public class FXModelsView {

private StoragePresenter presenter;
private FXTemplatesPresenter presenter;
private DefaultCellTable<FXModel> table;
private ListDataProvider<FXModel> dataProvider;
private FXTemplate currentTemplate ;
private ContentHeaderLabel headline;

public void setPresenter(StoragePresenter presenter) {
public void setPresenter(FXTemplatesPresenter presenter) {
this.presenter = presenter;
}

Widget asWidget() {

headline = new ContentHeaderLabel();

table = new DefaultCellTable<FXModel>(8,
new ProvidesKey<FXModel>() {
@Override
Expand Down Expand Up @@ -182,7 +186,7 @@ public void onDelete(Object entity) {
formLayout.add(form.asWidget());

MultipleToOneLayout layout = new MultipleToOneLayout()
.setHeadline("Model Steps")
.setHeadlineWidget(headline)
.setPlain(true)
.setDescription("The actual model steps involved when working with a template.")
.setMaster("Available Model Steps", table)
Expand All @@ -198,6 +202,8 @@ private FXTemplate getCurrentTemplate()

public void setModelSteps(FXTemplate template, List<FXModel> models) {
this.currentTemplate = template;

this.headline.setText("Models: Template '"+template.getName()+"'");
dataProvider.getList().clear();
dataProvider.getList().addAll(models);
dataProvider.flush();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @author Heiko Braun
* @date 7/23/12
*/
public interface StoragePresenter {
public interface FXTemplatesPresenter {
void launchNewTemplateWizard();

void onRemoveTemplate(String id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@
* @author Heiko Braun
* @date 7/23/12
*/
public class StorageView {
public class FXTemplatesView {

private StoragePresenter presenter;
private FXTemplatesPresenter presenter;
private DefaultCellTable<FXTemplate> table;
private ListDataProvider<FXTemplate> dataProvider;
private PagedView pages;
private TemplateModelsView modelStepView;
private FXModelsView modelStepView;

public StorageView() {
public FXTemplatesView() {

}

public void setPresenter(StoragePresenter presenter) {
public void setPresenter(FXTemplatesPresenter presenter) {
this.presenter = presenter;
modelStepView.setPresenter(presenter);
}
Expand Down Expand Up @@ -125,7 +125,7 @@ public void onClick(ClickEvent clickEvent) {
final TextBoxItem name = new TextBoxItem("name", "Name", true);
form.setFields(id, name);

modelStepView = new TemplateModelsView();
modelStepView = new FXModelsView();

table.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
@Override
Expand All @@ -152,7 +152,7 @@ public void onSelectionChange(SelectionChangeEvent selectionChangeEvent) {
.setPlain(true)
.setDescription("UI Templates for generic model updates.")
.setMaster("Available Templates", table)
.setTopLevelTools(toolstrip)
.setMasterTools(toolstrip)
.setDetail("Detail", formLayout);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
*/
public class NewFXTemplateWizard {

private StoragePresenter presenter;
private FXTemplatesPresenter presenter;

public NewFXTemplateWizard(StoragePresenter presenter) {
public NewFXTemplateWizard(FXTemplatesPresenter presenter) {
this.presenter = presenter;
}

Expand Down

0 comments on commit 9267405

Please sign in to comment.