tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject [10/15] incubator-tamaya git commit: Implemented UI improvements.
Date Tue, 16 Aug 2016 13:51:47 GMT
Implemented UI improvements.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/0352ef0a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/0352ef0a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/0352ef0a

Branch: refs/heads/master
Commit: 0352ef0ad67dd43607d2f3b25a90f049b33b8a33
Parents: b9856f1
Author: anatole <anatole@apache.org>
Authored: Sat Jun 4 02:14:30 2016 +0200
Committer: anatole <anatole@apache.org>
Committed: Tue Aug 16 15:51:30 2016 +0200

----------------------------------------------------------------------
 .../mutableconfig/ui/ConfigEditorWidget.java    |  1 +
 .../mutableconfig/ui/ConfigUpdaterView.java     | 24 ++++++++++++--------
 .../tamaya/mutableconfig/ui/ProtocolWidget.java |  7 +++---
 .../ui/TransactionControlWidget.java            | 22 ++++++------------
 4 files changed, 27 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/0352ef0a/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ConfigEditorWidget.java
----------------------------------------------------------------------
diff --git a/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ConfigEditorWidget.java
b/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ConfigEditorWidget.java
index b614e2a..bc8f9f4 100644
--- a/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ConfigEditorWidget.java
+++ b/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ConfigEditorWidget.java
@@ -31,6 +31,7 @@ import java.util.Objects;
 public class ConfigEditorWidget extends FormLayout {
 
     private MutableConfiguration mutableConfig;
+
     private ProtocolWidget logWriter;
     private TransactionControlWidget taWidget;
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/0352ef0a/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ConfigUpdaterView.java
----------------------------------------------------------------------
diff --git a/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ConfigUpdaterView.java
b/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ConfigUpdaterView.java
index d2b7745..474aeea 100644
--- a/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ConfigUpdaterView.java
+++ b/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ConfigUpdaterView.java
@@ -21,7 +21,9 @@ package org.apache.tamaya.mutableconfig.ui;
 import com.vaadin.navigator.View;
 import com.vaadin.navigator.ViewChangeListener;
 import com.vaadin.shared.ui.label.ContentMode;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
+import com.vaadin.ui.PopupView;
 import org.apache.tamaya.mutableconfig.MutableConfiguration;
 import org.apache.tamaya.mutableconfig.MutableConfigurationProvider;
 import org.apache.tamaya.mutableconfig.spi.MutablePropertySource;
@@ -71,14 +73,16 @@ public class ConfigUpdaterView extends VerticalSpacedLayout implements
View {
         }
     }
 
-    private ProtocolWidget protocolArea = new ProtocolWidget();
+    private ProtocolWidget logWidget = new ProtocolWidget();
+    private PopupView logPopup = new PopupView("Show log", logWidget);
 
     private MutableConfiguration mutableConfig = MutableConfigurationProvider.getMutableConfiguration();
 
-    private TransactionControlWidget taControlWidget = new TransactionControlWidget(mutableConfig,
-            protocolArea);
+    private TransactionControlWidget taControl = new TransactionControlWidget(mutableConfig,
+            logWidget);
+    private PopupView taDetails = new PopupView("Transaction Details", taControl);
 
-    private ConfigEditorWidget editorWidget = new ConfigEditorWidget(mutableConfig, protocolArea,
taControlWidget);
+    private ConfigEditorWidget editorWidget = new ConfigEditorWidget(mutableConfig, logWidget,
taControl);
 
 
     public ConfigUpdaterView() {
@@ -90,13 +94,15 @@ public class ConfigUpdaterView extends VerticalSpacedLayout implements
View {
 
         caption.addStyleName(UIConstants.LABEL_HUGE);
         description.addStyleName(UIConstants.LABEL_LARGE);
-        protocolArea.print("INFO: Writable Property Sources: ");
+        logWidget.print("INFO: Writable Property Sources: ");
         for(MutablePropertySource ps:mutableConfig.getMutablePropertySources()){
-            protocolArea.print(ps.getName(), ", ");
+            logWidget.print(ps.getName(), ", ");
         }
-        protocolArea.println();
-        protocolArea.setHeight(100, Unit.PERCENTAGE);
-        addComponents(caption, description, editorWidget, taControlWidget, protocolArea);
+        logWidget.println();
+        logWidget.setHeight(100, Unit.PERCENTAGE);
+        HorizontalLayout hl = new HorizontalLayout(taDetails, logPopup);
+        hl.setSpacing(true);
+        addComponents(caption, description, editorWidget, hl);
     }
 
     private String getCaption(String key, String value) {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/0352ef0a/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ProtocolWidget.java
----------------------------------------------------------------------
diff --git a/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ProtocolWidget.java
b/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ProtocolWidget.java
index 29bc424..001dd40 100644
--- a/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ProtocolWidget.java
+++ b/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/ProtocolWidget.java
@@ -41,8 +41,8 @@ public class ProtocolWidget extends VerticalLayout{
     private PrintWriter writer = new PrintWriter(protocol);
 
     public ProtocolWidget(){
-        textArea.setWidth(100, Unit.PERCENTAGE);
-        textArea.setHeight(100, Unit.PERCENTAGE);
+        textArea.setWidth(600, Unit.PIXELS);
+        textArea.setHeight(400, Unit.PERCENTAGE);
         textArea.setReadOnly(true);
         clearButton.addClickListener(new Button.ClickListener() {
             @Override
@@ -53,7 +53,8 @@ public class ProtocolWidget extends VerticalLayout{
         });
         textArea.setSizeFull();
         addComponents(textArea, clearButton);
-        setHeight(100, Unit.PERCENTAGE);
+        setWidth(700, Unit.PIXELS);
+        setHeight(500, Unit.PERCENTAGE);
     }
 
     public PrintWriter getWriter(){

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/0352ef0a/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/TransactionControlWidget.java
----------------------------------------------------------------------
diff --git a/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/TransactionControlWidget.java
b/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/TransactionControlWidget.java
index 8150c4a..40440c6 100644
--- a/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/TransactionControlWidget.java
+++ b/modules/mutable-config/src/main/java/org/apache/tamaya/mutableconfig/ui/TransactionControlWidget.java
@@ -19,15 +19,7 @@
 package org.apache.tamaya.mutableconfig.ui;
 
 import com.vaadin.data.Property;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.CheckBox;
-import com.vaadin.ui.ComboBox;
-import com.vaadin.ui.Field;
-import com.vaadin.ui.HorizontalLayout;
-import com.vaadin.ui.Notification;
-import com.vaadin.ui.TextArea;
-import com.vaadin.ui.TextField;
-import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.*;
 import org.apache.tamaya.mutableconfig.ChangePropagationPolicy;
 import org.apache.tamaya.mutableconfig.MutableConfiguration;
 import org.apache.tamaya.mutableconfig.MutableConfigurationProvider;
@@ -43,7 +35,7 @@ import java.util.Objects;
 /**
  * Tamaya UI view to change configuration.
  */
-public class TransactionControlWidget extends HorizontalLayout {
+public class TransactionControlWidget extends TabSheet {
 
     private Field taID = new TextField("Transaction ID");
     private Field taContent = new TextArea("Transaction Context");
@@ -77,16 +69,16 @@ public class TransactionControlWidget extends HorizontalLayout {
         taContent.setHeight(250, Unit.PIXELS);
         taLayout.setWidth(600, Unit.PIXELS);
         taID.setReadOnly(true);
-        taID.setWidth(100, Unit.PERCENTAGE);
         this.mutableConfig = Objects.requireNonNull(mutableConfig);
         this.logWriter = Objects.requireNonNull(logWriter);
-        changePropagationPolicy.setWidth(300, Unit.PIXELS);
-        changePropagationPolicyOther.
-                setWidth(600, Unit.PIXELS);
+        changePropagationPolicy.setWidth(500, Unit.PIXELS);
+        changePropagationPolicyOther.setWidth(500, Unit.PIXELS);
         HorizontalLayout buttonLayout = new HorizontalLayout();
         buttonLayout.addComponents(startTAButton, commitTAButton, rollbackTAButton);
         leftLayout.addComponents(changePropagationPolicy, changePropagationPolicyOther, buttonLayout);
-        addComponents(leftLayout, taLayout);
+        addTab(leftLayout, "Transaction Control");
+        addTab(taLayout, "Transaction Details");
+        setWidth(600, Unit.PIXELS);
         initActions();
         update();
     }


Mime
View raw message