ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # IGNITE-32 WIP: Minor UI tweaks.
Date Tue, 13 Jan 2015 03:07:01 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-32 0ee13c673 -> a565ef4dc


# IGNITE-32 WIP: Minor UI tweaks.


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

Branch: refs/heads/ignite-32
Commit: a565ef4dcea657a031488cbe7b1f59c0cd9aad50
Parents: 0ee13c6
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Tue Jan 13 10:07:24 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue Jan 13 10:07:24 2015 +0700

----------------------------------------------------------------------
 .../java/org/apache/ignite/schema/ui/Field.java |  2 +-
 .../org/apache/ignite/schema/ui/MessageBox.java |  2 +-
 .../apache/ignite/schema/ui/ModalDialog.java    | 23 +++++++-------------
 .../apache/ignite/schema/ui/NamingDialog.java   |  2 +-
 .../apache/ignite/schema/ui/SchemaLoadApp.java  | 19 +++++++++++-----
 5 files changed, 25 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a565ef4d/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/Field.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/Field.java b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/Field.java
index 5d04612..26edc7a 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/Field.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/Field.java
@@ -43,7 +43,7 @@ public class Field {
     /**
      * Copy constructor.
      *
-     * @param src Source field.
+     * @param src Source field to copy from.
      */
     public Field(Field src) {
         desc = src.desc;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a565ef4d/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
index 96bfafb..4f4d248 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
@@ -45,7 +45,7 @@ public class MessageBox extends ModalDialog {
      * @param msg Message to show.
      */
     private MessageBox(Stage owner, MessageType type, String msg) {
-        super(owner);
+        super(owner, 480, 180);
 
         String title;
         String iconFile;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a565ef4d/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
index 56ed881..3fc6b63 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
@@ -14,29 +14,22 @@ public abstract class ModalDialog extends Stage {
 
     /**
      * @param owner Owner window.
+     * @param width Window width.
+     * @param height Window height.
      */
-    protected ModalDialog(Stage owner) {
+    protected ModalDialog(Stage owner, int width, int height) {
         this.owner = owner;
+
+        this.setWidth(width);
+        this.setHeight(height);
     }
 
     /**
      * Show modal dialog.
      */
     protected void showModal() {
-        sizeToScene();
-
-        setX(owner.getX() + owner.getWidth() / 8);
-        setY(owner.getY() + owner.getHeight() / 4);
-
-        // We should set dialog position later (after show),
-        // because JavaFX will set actual width and height on dialog show.
-        Platform.runLater(new Runnable() {
-            /** {@inheritDoc} */
-            @Override public void run() {
-                setX(owner.getX() + owner.getWidth() / 2 - getWidth() / 2);
-                setY(owner.getY() + owner.getHeight() / 2 - getHeight() / 2);
-            }
-        });
+        setX(owner.getX() + owner.getWidth() / 2 - getWidth() / 2);
+        setY(owner.getY() + owner.getHeight() / 2 - getHeight() / 2);
 
         showAndWait();
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a565ef4d/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/NamingDialog.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/NamingDialog.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/NamingDialog.java
index 0848866..e9d7fd5 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/NamingDialog.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/NamingDialog.java
@@ -44,7 +44,7 @@ public class NamingDialog extends ModalDialog {
      */
     public NamingDialog(final Stage owner, final String prefix, String suffix, boolean regex,
final String ptrn,
         final String replace) {
-        super(owner);
+        super(owner, 350, 270);
 
         setTitle("Custom Naming");
         initStyle(StageStyle.UTILITY);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a565ef4d/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
index 9b85855..92fa7ea 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
@@ -257,6 +257,17 @@ public class SchemaLoadApp extends Application {
                 return null;
             }
 
+            private CheckBoxTreeItem<String> addCheckBoxTreeItem(CheckBoxTreeItem<String>
parent, String text) {
+                CheckBoxTreeItem<String> item = new CheckBoxTreeItem<>(text);
+
+                item.setSelected(true);
+                item.setExpanded(true);
+
+                parent.getChildren().add(item);
+
+                return item;
+            }
+
             /** {@inheritDoc} */
             @Override protected void succeeded() {
                 super.succeeded();
@@ -264,12 +275,10 @@ public class SchemaLoadApp extends Application {
                 rootItem.getChildren().clear();
 
                 for (Map.Entry<String, Map<String, ObservableList<Field>>>
schema : fields.entrySet()) {
-                    CheckBoxTreeItem<String> schemaItem = new CheckBoxTreeItem<>(schema.getKey());
+                    CheckBoxTreeItem<String> schemaItem = addCheckBoxTreeItem(rootItem,
schema.getKey());
 
                     for (String tbl : schema.getValue().keySet())
-                        schemaItem.getChildren().add(new CheckBoxTreeItem<>(tbl));
-
-                    rootItem.getChildren().add(schemaItem);
+                        addCheckBoxTreeItem(schemaItem, tbl);
                 }
 
                 unlockUI(connLayerPnl, connPnl, nextBtn);
@@ -842,7 +851,7 @@ public class SchemaLoadApp extends Application {
             "If selected then generate empty and full constructors for POJOs", false), 3);
 
         xmlSingleFileCh = genPnl.add(checkBox("Write all configurations to a single file",
-            "If selected then all configurations will be saved into the file 'ignite.xml'",
true), 3);
+            "If selected then all configurations will be saved into the file 'Ignite.xml'",
true), 3);
 
         dfltNamingCh = checkBox("Default naming conversions",
             "If selected then DB names will be converted to default java names", true);


Mime
View raw message