ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [16/50] [abbrv] incubator-ignite git commit: # IGNITE-411 Fixed issues with message dialog under java 8: non transparent text area and vertical scroll bar is shown when not needed.
Date Mon, 16 Mar 2015 03:40:08 GMT
# IGNITE-411 Fixed issues with message dialog under java 8: non transparent text area and vertical
scroll bar is shown when not needed.


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

Branch: refs/heads/ignite-368
Commit: 7096ca9db74507f035108b270f0850a269b852c5
Parents: 8749696
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Fri Mar 13 16:46:29 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Fri Mar 13 16:46:29 2015 +0700

----------------------------------------------------------------------
 modules/schema-import/src/main/java/media/style.css | 16 ++++++++++++++++
 .../org/apache/ignite/schema/ui/MessageBox.java     | 16 +++++++++++++++-
 2 files changed, 31 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7096ca9d/modules/schema-import/src/main/java/media/style.css
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/media/style.css b/modules/schema-import/src/main/java/media/style.css
index 1a7bf2a..e4ccb08 100644
--- a/modules/schema-import/src/main/java/media/style.css
+++ b/modules/schema-import/src/main/java/media/style.css
@@ -47,6 +47,22 @@
     -fx-background-color: transparent, transparent, transparent;
 }
 
+.text-area .scroll-pane {
+    -fx-background-color: transparent;
+}
+
+.text-area .scroll-pane .viewport{
+    -fx-background-color: transparent;
+}
+
+.text-area .scroll-pane .content{
+    -fx-background-color: transparent;
+}
+
+.text-area .scroll-bar:vertical:disabled {
+    -fx-opacity: 0;
+}
+
 .text-field {
     -fx-font-size: 14;
     -fx-background-color: -fx-text-box-border, -fx-control-inner-background, -fx-control-inner-background;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7096ca9d/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
index cf6a705..ac26b4b 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.schema.ui;
 
+import javafx.beans.value.*;
 import javafx.event.*;
 import javafx.geometry.*;
 import javafx.scene.control.*;
@@ -115,13 +116,26 @@ public class MessageBox extends ModalDialog {
 
         contentPnl.add(hBox(0, true, imageView(iconFile, 48)));
 
-        TextArea ta = new TextArea(msg);
+        final TextArea ta = new TextArea(msg);
         ta.setEditable(false);
         ta.setWrapText(true);
         ta.setFocusTraversable(false);
 
         contentPnl.add(ta);
 
+        // Workaround for vertical scrollbar.
+        if (msg.split("\r\n|\r|\n").length < 3)
+            showingProperty().addListener(new ChangeListener<Boolean>() {
+                @Override public void changed(ObservableValue<? extends Boolean> val,
Boolean oldVal, Boolean newVal) {
+                    if (newVal) {
+                        ScrollBar scrollBar = (ScrollBar)ta.lookup(".scroll-bar:vertical");
+
+                        if (scrollBar != null)
+                            scrollBar.setDisable(true);
+                    }
+                }
+            });
+
         final CheckBox rememberChoiceCh = checkBox("Remember choice", "", false);
 
         if (rememberChoice) {


Mime
View raw message