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: work UI.
Date Mon, 22 Dec 2014 11:14:35 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-32 afdcb1f2c -> 0dafc25ef


# IGNITE-32 WIP: work UI.


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

Branch: refs/heads/ignite-32
Commit: 0dafc25efe06dcf43b74054ebc0c3773638fcf12
Parents: afdcb1f
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Mon Dec 22 18:14:30 2014 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Mon Dec 22 18:14:30 2014 +0700

----------------------------------------------------------------------
 .../apache/ignite/schema/ui/SchemaLoadApp.java  | 86 ++++++++++++++++----
 1 file changed, 68 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0dafc25e/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 4c26e9f..b2e1d39 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
@@ -21,7 +21,6 @@ import javafx.scene.text.*;
 import javafx.stage.*;
 import org.apache.ignite.schema.db.*;
 
-import javax.imageio.*;
 import java.util.*;
 
 /**
@@ -29,10 +28,13 @@ import java.util.*;
  */
 public class SchemaLoadApp extends Application {
     /** */
+    private static Insets DFLT_PADDING = new Insets(10, 10, 10, 10);
+
+    /** */
     private int step = 0;
 
     /** */
-    private Pane contentPane;
+    private BorderPane contentPane;
 
     /** */
     private Label titleLb;
@@ -46,6 +48,14 @@ public class SchemaLoadApp extends Application {
     /** */
     private List<WizardPage> pages;
 
+    private static HBox newHBox(int spacing) {
+        HBox hb = new HBox(spacing);
+
+        hb.setPadding(DFLT_PADDING);
+
+        return hb;
+    }
+
     private abstract class WizardPage {
         protected Pane contentPane;
 
@@ -72,9 +82,56 @@ public class SchemaLoadApp extends Application {
         }
 
         @Override protected Pane createContent() {
-            HBox hb = new HBox();
+            GridPane gp = new GridPane();
 
-            return hb;
+            gp.setGridLinesVisible(true);
+
+            ColumnConstraints col1 = new ColumnConstraints();
+            col1.setPercentWidth(30);
+            ColumnConstraints col2 = new ColumnConstraints();
+            col2.setPercentWidth(70);
+            gp.getColumnConstraints().addAll(col1, col2);
+
+            gp.setAlignment(Pos.CENTER);
+            gp.setHgap(10);
+            gp.setVgap(10);
+            gp.setPadding(DFLT_PADDING);
+
+            Label aliasLb = new Label("Alias:");
+            gp.add(aliasLb, 0, 0);
+
+            ObservableList<String> options = FXCollections.observableArrayList("My
Settings");
+            ComboBox<String> aliasCb = new ComboBox<>(options);
+            aliasCb.setPromptText("Schema load settings");
+            aliasCb.setEditable(true);
+
+            gp.add(aliasCb, 1, 0);
+
+            Label jdbcLb = new Label("JDBC Driver:");
+            gp.add(jdbcLb, 0, 2);
+
+            TextField jdbcTf = new TextField();
+            gp.add(jdbcTf, 1, 2);
+
+            Label urlLb = new Label("URL:");
+            gp.add(urlLb, 0, 3);
+
+            TextField urlTf = new TextField();
+            gp.add(urlTf, 1, 3);
+
+            Label userLb = new Label("User:");
+            gp.add(userLb, 0, 4);
+
+            TextField userTf = new TextField();
+            gp.add(userTf, 1, 4);
+
+            Label pwdLb = new Label("Password:");
+            gp.add(pwdLb, 0, 5);
+
+            PasswordField pwdTf = new PasswordField();
+            gp.add(pwdTf, 1, 5);
+
+            return gp;
         }
     }
 
@@ -134,8 +191,7 @@ public class SchemaLoadApp extends Application {
      * @return Header pane with title label.
      */
     private Pane createHeaderPane() {
-        HBox hb = new HBox();
-        hb.setPadding(new Insets(10, 10, 10, 10));
+        HBox hb = newHBox(0);
 
         titleLb = new Label("");
         titleLb.setFont(Font.font("Tahoma", FontWeight.NORMAL, 20));
@@ -163,17 +219,11 @@ public class SchemaLoadApp extends Application {
             }
         });
 
-        HBox hb = new HBox(10);
+        HBox hb = newHBox(10);
+        hb.setAlignment(Pos.BOTTOM_RIGHT);
         hb.getChildren().addAll(prevBtn, nextBtn);
 
-        AnchorPane ap = new AnchorPane();
-
-        ap.getChildren().add(hb);
-
-        AnchorPane.setBottomAnchor(hb, 10.0);
-        AnchorPane.setRightAnchor(hb, 10.0);
-
-        return ap;
+        return hb;
     }
 
     /**
@@ -190,8 +240,7 @@ public class SchemaLoadApp extends Application {
 
         WizardPage page = pages.get(step);
 
-        contentPane.getChildren().clear();
-        contentPane.getChildren().add(page.createContent());
+        contentPane.setCenter(page.createContent());
 
         titleLb.setText(page.title);
 
@@ -222,7 +271,8 @@ public class SchemaLoadApp extends Application {
 
         primaryStage.setTitle("Schema Load");
 
-        contentPane = new HBox();
+        contentPane = new BorderPane();
+        contentPane.setStyle("-fx-border-color: red;");
 
         BorderPane layerPnl = new BorderPane();
 


Mime
View raw message