Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Mueller2018-02-20 09:38:37 -0500
committerMarvin Mueller2018-02-20 09:38:37 -0500
commit2fa2b964778b190a8147a9b896e0a406b8d691c8 (patch)
treef929bbe6dcbf8f8ba971c66d9a25266bd378c5f3
parent5ec5c82a71df32081993b6a2574fecc69c6e9de9 (diff)
downloadorg.eclipse.jubula.core-2fa2b964778b190a8147a9b896e0a406b8d691c8.tar.gz
org.eclipse.jubula.core-2fa2b964778b190a8147a9b896e0a406b8d691c8.tar.xz
org.eclipse.jubula.core-2fa2b964778b190a8147a9b896e0a406b8d691c8.zip
Fix Java 9 problems in javaFX
-rw-r--r--org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TableAdapter.java2
-rw-r--r--org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/TreeTableOperationContext.java2
-rw-r--r--org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/compatibility/ComboBoxUtils.java3
-rw-r--r--org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/compatibility/TableUtils.java7
4 files changed, 8 insertions, 6 deletions
diff --git a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TableAdapter.java b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TableAdapter.java
index ca5caaeea..75d885582 100644
--- a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TableAdapter.java
+++ b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TableAdapter.java
@@ -380,7 +380,7 @@ public class TableAdapter extends JavaFXComponentAdapter<TableView<?>>
table.scrollToColumn(col);
// Update the layout coordinates otherwise
// we would get old position values
- return TableUtils.getNodeBoundsofHeader(table, column,
+ return TableUtils.getNodeBoundsofHeader(table, col,
true);
}
});
diff --git a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/TreeTableOperationContext.java b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/TreeTableOperationContext.java
index 0ae2ba82b..1796118a3 100644
--- a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/TreeTableOperationContext.java
+++ b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/TreeTableOperationContext.java
@@ -859,7 +859,7 @@ public class TreeTableOperationContext
// we would get old position values
treeTable.layout();
Rectangle b = TableUtils.getNodeBoundsofHeader(
- treeTable, column, false);
+ treeTable, col, false);
Rectangle tableB = NodeBounds
.getAbsoluteBounds(treeTable);
return new Rectangle(Math.abs(tableB.x - b.x),
diff --git a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/compatibility/ComboBoxUtils.java b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/compatibility/ComboBoxUtils.java
index b62be3298..90d55ab67 100644
--- a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/compatibility/ComboBoxUtils.java
+++ b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/compatibility/ComboBoxUtils.java
@@ -60,6 +60,7 @@ public class ComboBoxUtils {
*/
public static ListView<?> getPopUpContent(ComboBox<?> combobox) {
Class<?> clazz = null;
+ Object skin = combobox.getSkin();
try {
clazz = Class.forName(JAVA8_COMBO_LISTVIEWSKIN);
} catch (ClassNotFoundException e) {
@@ -71,7 +72,7 @@ public class ComboBoxUtils {
}
try {
Method method = clazz.getMethod(GET_POPUP_CONTENT);
- Object o = method.invoke(combobox);
+ Object o = method.invoke(skin);
if (o instanceof ListView<?>) {
return (ListView<?>) o;
}
diff --git a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/compatibility/TableUtils.java b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/compatibility/TableUtils.java
index 59fc2ba36..d3d586670 100644
--- a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/compatibility/TableUtils.java
+++ b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/util/compatibility/TableUtils.java
@@ -22,6 +22,7 @@ import org.slf4j.LoggerFactory;
import javafx.scene.Node;
import javafx.scene.Parent;
+import javafx.scene.control.TableColumnBase;
import javafx.scene.control.TableView;
/**
@@ -53,7 +54,7 @@ public class TableUtils {
* @return the {@link Rectangle} or null if it is not found
*/
public static Rectangle getNodeBoundsofHeader(Parent table,
- int column, boolean relative) {
+ TableColumnBase<?, ?> column, boolean relative) {
Class<?> clazz = null;
try {
clazz = Class.forName(
@@ -74,8 +75,8 @@ public class TableUtils {
List<?> headerRow = NodeTraverseHelper.getInstancesOf(table, clazz);
Object colH = null;
for (Object tableHeaderRow : headerRow) {
- Method method =
- clazz.getMethod(GET_COLUMN_HEADER_FOR, Integer.class);
+ Method method = clazz.getMethod(GET_COLUMN_HEADER_FOR,
+ TableColumnBase.class);
colH = method.invoke(tableHeaderRow, column);
if (colH != null) {
if (relative) {

Back to the top