From 92674055bd966fbf0d5e4a520bd5aa3f2298861f Mon Sep 17 00:00:00 2001 From: Heiko Braun Date: Tue, 24 Jul 2012 10:26:21 +0200 Subject: [PATCH] rename fx related views --- .../as/console/client/tools/BrowserPresenter.java | 2 +- .../jboss/as/console/client/tools/BrowserView.java | 4 ++-- .../{TemplateModelsView.java => FXModelsView.java} | 14 ++++++++++---- ...agePresenter.java => FXTemplatesPresenter.java} | 2 +- .../{StorageView.java => FXTemplatesView.java} | 14 +++++++------- .../console/client/tools/NewFXTemplateWizard.java | 4 ++-- 6 files changed, 23 insertions(+), 17 deletions(-) rename gui/src/main/java/org/jboss/as/console/client/tools/{TemplateModelsView.java => FXModelsView.java} (94%) rename gui/src/main/java/org/jboss/as/console/client/tools/{StoragePresenter.java => FXTemplatesPresenter.java} (91%) rename gui/src/main/java/org/jboss/as/console/client/tools/{StorageView.java => FXTemplatesView.java} (95%) diff --git a/gui/src/main/java/org/jboss/as/console/client/tools/BrowserPresenter.java b/gui/src/main/java/org/jboss/as/console/client/tools/BrowserPresenter.java index 4326cca961..1ebf544234 100644 --- a/gui/src/main/java/org/jboss/as/console/client/tools/BrowserPresenter.java +++ b/gui/src/main/java/org/jboss/as/console/client/tools/BrowserPresenter.java @@ -25,7 +25,7 @@ * @author Heiko Braun * @date 6/15/12 */ -public class BrowserPresenter extends PresenterWidget implements StoragePresenter{ +public class BrowserPresenter extends PresenterWidget implements FXTemplatesPresenter { private final PlaceManager placeManager; private DispatchAsync dispatcher; diff --git a/gui/src/main/java/org/jboss/as/console/client/tools/BrowserView.java b/gui/src/main/java/org/jboss/as/console/client/tools/BrowserView.java index c3da24b859..4c144ef0d3 100644 --- a/gui/src/main/java/org/jboss/as/console/client/tools/BrowserView.java +++ b/gui/src/main/java/org/jboss/as/console/client/tools/BrowserView.java @@ -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 @@ -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"); diff --git a/gui/src/main/java/org/jboss/as/console/client/tools/TemplateModelsView.java b/gui/src/main/java/org/jboss/as/console/client/tools/FXModelsView.java similarity index 94% rename from gui/src/main/java/org/jboss/as/console/client/tools/TemplateModelsView.java rename to gui/src/main/java/org/jboss/as/console/client/tools/FXModelsView.java index 8c092d1de6..c89c405557 100644 --- a/gui/src/main/java/org/jboss/as/console/client/tools/TemplateModelsView.java +++ b/gui/src/main/java/org/jboss/as/console/client/tools/FXModelsView.java @@ -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; @@ -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 table; private ListDataProvider 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(8, new ProvidesKey() { @Override @@ -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) @@ -198,6 +202,8 @@ private FXTemplate getCurrentTemplate() public void setModelSteps(FXTemplate template, List models) { this.currentTemplate = template; + + this.headline.setText("Models: Template '"+template.getName()+"'"); dataProvider.getList().clear(); dataProvider.getList().addAll(models); dataProvider.flush(); diff --git a/gui/src/main/java/org/jboss/as/console/client/tools/StoragePresenter.java b/gui/src/main/java/org/jboss/as/console/client/tools/FXTemplatesPresenter.java similarity index 91% rename from gui/src/main/java/org/jboss/as/console/client/tools/StoragePresenter.java rename to gui/src/main/java/org/jboss/as/console/client/tools/FXTemplatesPresenter.java index e5f308cef8..7cc225b01e 100644 --- a/gui/src/main/java/org/jboss/as/console/client/tools/StoragePresenter.java +++ b/gui/src/main/java/org/jboss/as/console/client/tools/FXTemplatesPresenter.java @@ -4,7 +4,7 @@ * @author Heiko Braun * @date 7/23/12 */ -public interface StoragePresenter { +public interface FXTemplatesPresenter { void launchNewTemplateWizard(); void onRemoveTemplate(String id); diff --git a/gui/src/main/java/org/jboss/as/console/client/tools/StorageView.java b/gui/src/main/java/org/jboss/as/console/client/tools/FXTemplatesView.java similarity index 95% rename from gui/src/main/java/org/jboss/as/console/client/tools/StorageView.java rename to gui/src/main/java/org/jboss/as/console/client/tools/FXTemplatesView.java index c4c5bf3e64..e8c79f8860 100644 --- a/gui/src/main/java/org/jboss/as/console/client/tools/StorageView.java +++ b/gui/src/main/java/org/jboss/as/console/client/tools/FXTemplatesView.java @@ -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 table; private ListDataProvider 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); } @@ -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 @@ -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); diff --git a/gui/src/main/java/org/jboss/as/console/client/tools/NewFXTemplateWizard.java b/gui/src/main/java/org/jboss/as/console/client/tools/NewFXTemplateWizard.java index 096e0a403c..6c8d5749d1 100644 --- a/gui/src/main/java/org/jboss/as/console/client/tools/NewFXTemplateWizard.java +++ b/gui/src/main/java/org/jboss/as/console/client/tools/NewFXTemplateWizard.java @@ -23,9 +23,9 @@ */ public class NewFXTemplateWizard { - private StoragePresenter presenter; + private FXTemplatesPresenter presenter; - public NewFXTemplateWizard(StoragePresenter presenter) { + public NewFXTemplateWizard(FXTemplatesPresenter presenter) { this.presenter = presenter; }