Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'experimental')
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.app/OSGI-INF/services/org.eclipse.fx.code.compensator.app.DarkTheme.xml4
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.app/OSGI-INF/services/org.eclipse.fx.code.compensator.app.DefaultTheme.xml4
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/ApplicationLifecycle.classbin1980 -> 1095 bytes
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/DirtyStateTrackerAddon.classbin3719 -> 1398 bytes
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/LoadFile.classbin3348 -> 1169 bytes
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/LoadFolder.classbin2994 -> 1182 bytes
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/OpenFile.classbin4144 -> 1509 bytes
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/BugTrackerImpl.java1
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/CISystemImpl.java1
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/LocalProjectImpl.java1
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ModuleContainerImpl.java1
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ModuleImpl.java1
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ProjectImpl.java1
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/RemoteProjectImpl.java1
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/VCSRepositoryImpl.java1
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.project.jdt/xtend-gen/org/eclipse/fx/code/compensator/project/jdt/handler/.NewClassTemplate.xtendbinbin1989 -> 1989 bytes
-rw-r--r--experimental/swt/org.eclipse.fx.runtime.examples.swt/.classpath2
-rw-r--r--experimental/swt/org.eclipse.fx.runtime.examples.swt/META-INF/MANIFEST.MF4
-rw-r--r--experimental/swt/org.eclipse.fx.runtime.swt/src/org/eclipse/swt/widgets/Control.java75
-rw-r--r--experimental/swt/org.eclipse.fx.runtime.swt/src/org/eclipse/swt/widgets/Shell.java436
-rw-r--r--experimental/swt/org.eclipse.fx.sample.singlesource.app/bin/.gitignore1
21 files changed, 317 insertions, 217 deletions
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.app/OSGI-INF/services/org.eclipse.fx.code.compensator.app.DarkTheme.xml b/experimental/compensator/org.eclipse.fx.code.compensator.app/OSGI-INF/services/org.eclipse.fx.code.compensator.app.DarkTheme.xml
index 075dfb7a4..2cc036308 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.app/OSGI-INF/services/org.eclipse.fx.code.compensator.app.DarkTheme.xml
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.app/OSGI-INF/services/org.eclipse.fx.code.compensator.app.DarkTheme.xml
@@ -4,6 +4,6 @@
<service>
<provide interface="org.eclipse.fx.ui.services.theme.Theme"/>
</service>
- <reference bind="registerMultiURLStylesheet" cardinality="0..n" interface="org.eclipse.fx.ui.services.theme.MultiURLStylesheet" name="registerMultiURLStylesheet" policy="dynamic" unbind="unregisterMultiURLStylesheet"/>
- <reference bind="registerStylesheet" cardinality="0..n" interface="org.eclipse.fx.ui.services.theme.Stylesheet" name="registerStylesheet" policy="dynamic" unbind="unregisterStylesheet"/>
+ <reference bind="registerMultiURLStylesheet" cardinality="0..n" interface="org.eclipse.fx.ui.services.theme.MultiURLStylesheet" name="registerMultiURLStylesheet" policy="dynamic"/>
+ <reference bind="registerStylesheet" cardinality="0..n" interface="org.eclipse.fx.ui.services.theme.Stylesheet" name="registerStylesheet" policy="dynamic"/>
</scr:component> \ No newline at end of file
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.app/OSGI-INF/services/org.eclipse.fx.code.compensator.app.DefaultTheme.xml b/experimental/compensator/org.eclipse.fx.code.compensator.app/OSGI-INF/services/org.eclipse.fx.code.compensator.app.DefaultTheme.xml
index 48db54a93..b092468a9 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.app/OSGI-INF/services/org.eclipse.fx.code.compensator.app.DefaultTheme.xml
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.app/OSGI-INF/services/org.eclipse.fx.code.compensator.app.DefaultTheme.xml
@@ -4,6 +4,6 @@
<service>
<provide interface="org.eclipse.fx.ui.services.theme.Theme"/>
</service>
- <reference bind="registerMultiURLStylesheet" cardinality="0..n" interface="org.eclipse.fx.ui.services.theme.MultiURLStylesheet" name="registerMultiURLStylesheet" policy="dynamic" unbind="unregisterMultiURLStylesheet"/>
- <reference bind="registerStylesheet" cardinality="0..n" interface="org.eclipse.fx.ui.services.theme.Stylesheet" name="registerStylesheet" policy="dynamic" unbind="unregisterStylesheet"/>
+ <reference bind="registerMultiURLStylesheet" cardinality="0..n" interface="org.eclipse.fx.ui.services.theme.MultiURLStylesheet" name="registerMultiURLStylesheet" policy="dynamic"/>
+ <reference bind="registerStylesheet" cardinality="0..n" interface="org.eclipse.fx.ui.services.theme.Stylesheet" name="registerStylesheet" policy="dynamic"/>
</scr:component> \ No newline at end of file
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/ApplicationLifecycle.class b/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/ApplicationLifecycle.class
index 88099e290..a86386874 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/ApplicationLifecycle.class
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/ApplicationLifecycle.class
Binary files differ
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/DirtyStateTrackerAddon.class b/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/DirtyStateTrackerAddon.class
index f1d12d9e2..4ed480c37 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/DirtyStateTrackerAddon.class
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/DirtyStateTrackerAddon.class
Binary files differ
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/LoadFile.class b/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/LoadFile.class
index 4b5480750..c95034bb5 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/LoadFile.class
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/LoadFile.class
Binary files differ
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/LoadFolder.class b/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/LoadFolder.class
index b050d2a24..7e5276289 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/LoadFolder.class
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/LoadFolder.class
Binary files differ
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/OpenFile.class b/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/OpenFile.class
index 7e433236e..13e3d60e8 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/OpenFile.class
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.app/bin/org/eclipse/fx/code/compensator/app/OpenFile.class
Binary files differ
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/BugTrackerImpl.java b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/BugTrackerImpl.java
index 14e6e8cbf..1ea72da39 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/BugTrackerImpl.java
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/BugTrackerImpl.java
@@ -17,7 +17,6 @@ import org.eclipse.fx.code.compensator.model.workbench.WorkbenchPackage;
* An implementation of the model object '<em><b>Bug Tracker</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/CISystemImpl.java b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/CISystemImpl.java
index 67efa9ac6..da6788d64 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/CISystemImpl.java
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/CISystemImpl.java
@@ -17,7 +17,6 @@ import org.eclipse.fx.code.compensator.model.workbench.WorkbenchPackage;
* An implementation of the model object '<em><b>CI System</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/LocalProjectImpl.java b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/LocalProjectImpl.java
index 073d9f011..14190aee3 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/LocalProjectImpl.java
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/LocalProjectImpl.java
@@ -23,7 +23,6 @@ import org.eclipse.fx.code.compensator.model.workbench.WorkbenchPackage;
* An implementation of the model object '<em><b>Local Project</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ModuleContainerImpl.java b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ModuleContainerImpl.java
index 976fa498d..05289c6f5 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ModuleContainerImpl.java
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ModuleContainerImpl.java
@@ -25,7 +25,6 @@ import org.eclipse.fx.code.compensator.model.workbench.WorkbenchPackage;
* An implementation of the model object '<em><b>Module Container</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ModuleImpl.java b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ModuleImpl.java
index 1d5167113..4d75494b3 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ModuleImpl.java
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ModuleImpl.java
@@ -16,7 +16,6 @@ import org.eclipse.fx.code.compensator.model.workbench.WorkbenchPackage;
* An implementation of the model object '<em><b>Module</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ProjectImpl.java b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ProjectImpl.java
index 32a852258..a390a76a2 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ProjectImpl.java
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/ProjectImpl.java
@@ -27,7 +27,6 @@ import org.eclipse.fx.code.compensator.model.workbench.WorkbenchPackage;
* An implementation of the model object '<em><b>Project</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/RemoteProjectImpl.java b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/RemoteProjectImpl.java
index f2911e828..5519b33e8 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/RemoteProjectImpl.java
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/RemoteProjectImpl.java
@@ -16,7 +16,6 @@ import org.eclipse.fx.code.compensator.model.workbench.WorkbenchPackage;
* An implementation of the model object '<em><b>Remote Project</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/VCSRepositoryImpl.java b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/VCSRepositoryImpl.java
index 872dea846..fdda794df 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/VCSRepositoryImpl.java
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.model/src-gen/org/eclipse/fx/code/compensator/model/workbench/impl/VCSRepositoryImpl.java
@@ -17,7 +17,6 @@ import org.eclipse.fx.code.compensator.model.workbench.WorkbenchPackage;
* An implementation of the model object '<em><b>VCS Repository</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.project.jdt/xtend-gen/org/eclipse/fx/code/compensator/project/jdt/handler/.NewClassTemplate.xtendbin b/experimental/compensator/org.eclipse.fx.code.compensator.project.jdt/xtend-gen/org/eclipse/fx/code/compensator/project/jdt/handler/.NewClassTemplate.xtendbin
index 4db1eebea..8d9704eec 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.project.jdt/xtend-gen/org/eclipse/fx/code/compensator/project/jdt/handler/.NewClassTemplate.xtendbin
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.project.jdt/xtend-gen/org/eclipse/fx/code/compensator/project/jdt/handler/.NewClassTemplate.xtendbin
Binary files differ
diff --git a/experimental/swt/org.eclipse.fx.runtime.examples.swt/.classpath b/experimental/swt/org.eclipse.fx.runtime.examples.swt/.classpath
index 154022be0..4047486e8 100644
--- a/experimental/swt/org.eclipse.fx.runtime.examples.swt/.classpath
+++ b/experimental/swt/org.eclipse.fx.runtime.examples.swt/.classpath
@@ -5,5 +5,7 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-mini"/>
<classpathentry kind="src" path="src-snippets"/>
+ <classpathentry kind="src" path="src-forms"/>
+ <classpathentry kind="src" path="src-jface"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/experimental/swt/org.eclipse.fx.runtime.examples.swt/META-INF/MANIFEST.MF b/experimental/swt/org.eclipse.fx.runtime.examples.swt/META-INF/MANIFEST.MF
index 824105135..e9912db3e 100644
--- a/experimental/swt/org.eclipse.fx.runtime.examples.swt/META-INF/MANIFEST.MF
+++ b/experimental/swt/org.eclipse.fx.runtime.examples.swt/META-INF/MANIFEST.MF
@@ -7,7 +7,9 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.fx.runtime.swt;bundle-version="1.0.0",
org.eclipse.fx.osgi.util;bundle-version="0.8.1",
org.eclipse.equinox.event;bundle-version="1.3.0",
- org.eclipse.fx.runtime.swtutil;bundle-version="1.0.0"
+ org.eclipse.fx.runtime.swtutil;bundle-version="1.0.0",
+ org.eclipse.ui.forms;bundle-version="3.6.200",
+ org.eclipse.jface;bundle-version="3.11.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: javafx.animation;version="2.0.0",
javafx.application;version="2.0.0",
diff --git a/experimental/swt/org.eclipse.fx.runtime.swt/src/org/eclipse/swt/widgets/Control.java b/experimental/swt/org.eclipse.fx.runtime.swt/src/org/eclipse/swt/widgets/Control.java
index 59f99821b..2764f93a3 100644
--- a/experimental/swt/org.eclipse.fx.runtime.swt/src/org/eclipse/swt/widgets/Control.java
+++ b/experimental/swt/org.eclipse.fx.runtime.swt/src/org/eclipse/swt/widgets/Control.java
@@ -222,7 +222,7 @@ public abstract class Control extends Widget implements Drawable {
javafx.scene.control.Control.USE_COMPUTED_SIZE);
int height = (int) internal_getNativeObject().prefHeight(
javafx.scene.control.Control.USE_COMPUTED_SIZE);
-
+
if (width <= 0) {
width = DEFAULT_WIDTH;
}
@@ -272,11 +272,11 @@ public abstract class Control extends Widget implements Drawable {
addListener(SWT.Move, typedListener);
}
-
+
public void addDragDetectListener (DragDetectListener listener) {
Util.logNotImplemented();
}
-
+
public void addFocusListener(FocusListener listener) {
TypedListener typedListener = new TypedListener(listener);
addListener(SWT.FocusIn, typedListener);
@@ -300,11 +300,11 @@ public abstract class Control extends Widget implements Drawable {
addListener(SWT.KeyDown, typedListener);
}
-
+
public void addMenuDetectListener (MenuDetectListener listener) {
Util.logNotImplemented();
}
-
+
public void addMouseListener(MouseListener listener) {
TypedListener typedListener = new TypedListener(listener);
addListener(SWT.MouseDown, typedListener);
@@ -317,9 +317,14 @@ public abstract class Control extends Widget implements Drawable {
addListener(SWT.MouseMove, typedListener);
}
-
+
public void addMouseTrackListener (MouseTrackListener listener) {
- Util.logNotImplemented();
+ checkWidget();
+ if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
+ TypedListener typedListener = new TypedListener (listener);
+ addListener (SWT.MouseEnter,typedListener);
+ addListener (SWT.MouseExit,typedListener);
+ addListener (SWT.MouseHover,typedListener);
}
//
// public void addMouseWheelListener (MouseWheelListener listener) {
@@ -375,10 +380,10 @@ public abstract class Control extends Widget implements Drawable {
Util.logNotImplemented();
return false;
}
-
+
public boolean dragDetect (Event event) {
Util.logNotImplemented();
- return false;
+ return false;
}
//
// public boolean forceFocus () {
@@ -398,7 +403,7 @@ public abstract class Control extends Widget implements Drawable {
Util.logNotImplemented();
return null;
}
-
+
public Rectangle getBounds() {
Point location = getLocation();
Point size = getSize();
@@ -448,7 +453,7 @@ public abstract class Control extends Widget implements Drawable {
if (!(this instanceof Shell)) {
bounds = getDisplay().map(getParent(), null, bounds);
}
-
+
int index = -1, value = -1;
for (int i = 0; i < monitors.length; i++) {
Rectangle rect = bounds.intersection(monitors[i].getBounds());
@@ -527,7 +532,7 @@ public abstract class Control extends Widget implements Drawable {
public boolean isEnabled () {
return getEnabled () && parent.isEnabled ();
}
-
+
public boolean isFocusControl() {
return internal_getEventTarget().isFocused();
}
@@ -545,12 +550,12 @@ public abstract class Control extends Widget implements Drawable {
parent.internal_controlMoveAbove(this, control);
}
-
+
public void moveBelow (Control control) {
System.out.println("MOVE BELOW: " + parent);
parent.internal_controlMoveBelow(this, control);
}
-
+
public void pack() {
forceSizeProcessing();
// TODO is it min size??
@@ -558,12 +563,12 @@ public abstract class Control extends Widget implements Drawable {
(int) internal_getNativeControl().prefHeight(-1));
}
-
+
public void pack (boolean changed) {
forceSizeProcessing();
// TODO is it min size??
setSize((int) internal_getNativeControl().prefWidth(-1),
- (int) internal_getNativeControl().prefHeight(-1));
+ (int) internal_getNativeControl().prefHeight(-1));
}
//
// public boolean print (GC gc) {
@@ -580,13 +585,13 @@ public abstract class Control extends Widget implements Drawable {
public void removeControlListener (ControlListener listener) {
removeListener(SWT.Resize, listener);
- removeListener(SWT.Move, listener);
+ removeListener(SWT.Move, listener);
}
-
+
public void removeDragDetectListener(DragDetectListener listener) {
Util.logNotImplemented();
}
-
+
public void removeFocusListener(FocusListener listener) {
removeListener(SWT.FocusIn, listener);
removeListener(SWT.FocusOut, listener);
@@ -618,11 +623,11 @@ public abstract class Control extends Widget implements Drawable {
removeListener(SWT.MouseDoubleClick, listener);
}
-
+
public void removeMouseMoveListener(MouseMoveListener listener) {
removeListener(SWT.MouseMove, listener);
}
-
+
public void removeMouseTrackListener(MouseTrackListener listener) {
Util.logNotImplemented();
}
@@ -667,7 +672,7 @@ public abstract class Control extends Widget implements Drawable {
public void setCapture (boolean capture) {
Util.logNotImplemented();
}
-
+
public void setCursor(Cursor cursor) {
this.cursor = cursor;
internal_getNativeObject().setCursor(
@@ -708,20 +713,20 @@ public abstract class Control extends Widget implements Drawable {
if (font != null) {
b.append(font.internal_getAsCSSString());
}
-
+
if (foreground != null) {
String rgb = "rgb(" + foreground.getRed() + ","
+ foreground.getGreen() + "," + foreground.getBlue() + ")";
b.append("-fx-text-inner-color: " + rgb
+ "; -fx-text-background-color: " + rgb + ";");
}
-
+
if( background != null ) {
String rgb = "rgb(" + background.getRed() + ","
+ background.getGreen() + "," + background.getBlue() + ")";
b.append("-fx-background-color: " + rgb);
}
-
+
return b.toString();
}
@@ -761,14 +766,14 @@ public abstract class Control extends Widget implements Drawable {
Util.logNotImplemented();
}
-
+
public boolean setParent (Composite parent) {
this.parent.internal_detachControl(this);
parent.internal_attachControl(this);
this.parent = parent;
return true;
}
-
+
public void setRedraw(boolean redraw) {
// Not needed in FX
}
@@ -829,26 +834,26 @@ public abstract class Control extends Widget implements Drawable {
return toDisplay(point.x, point.y);
}
-
+
public boolean traverse (int traversal) {
Util.logNotImplemented();
return false;
}
-
+
public boolean traverse (int traversal, KeyEvent event) {
Util.logNotImplemented();
return false;
}
-
+
public boolean traverse (int traversal, Event event) {
Util.logNotImplemented();
return false;
}
-
+
public void update() {
Util.logNotImplemented();
}
-
+
public void setTextDirection(int dir) {
Util.logNotImplemented();
}
@@ -1095,12 +1100,12 @@ public abstract class Control extends Widget implements Drawable {
}
}
}
-
+
@Override
public DrawableGC internal_new_GC() {
return new MeasureGC(this);
}
-
+
void markLayout (boolean changed, boolean all) {
// nothing todo
}
@@ -1202,7 +1207,7 @@ public abstract class Control extends Widget implements Drawable {
Control c = Widget.getWidget(event.getTarget());
if (c != null) {
c.sendKeyEvent(event);
-//if we consume the event e.g. navigation in table/tree get broken!
+//if we consume the event e.g. navigation in table/tree get broken!
// event.consume();
}
}
diff --git a/experimental/swt/org.eclipse.fx.runtime.swt/src/org/eclipse/swt/widgets/Shell.java b/experimental/swt/org.eclipse.fx.runtime.swt/src/org/eclipse/swt/widgets/Shell.java
index 2b3492e76..567e02d1f 100644
--- a/experimental/swt/org.eclipse.fx.runtime.swt/src/org/eclipse/swt/widgets/Shell.java
+++ b/experimental/swt/org.eclipse.fx.runtime.swt/src/org/eclipse/swt/widgets/Shell.java
@@ -13,33 +13,35 @@ package org.eclipse.swt.widgets;
import java.util.ArrayList;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ShellListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.internal.Util;
+
+import com.sun.javafx.geom.PathIterator;
+
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.scene.Scene;
+import javafx.scene.control.PopupControl;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Region;
import javafx.scene.shape.LineTo;
import javafx.scene.shape.MoveTo;
import javafx.scene.shape.Path;
import javafx.stage.Modality;
+import javafx.stage.Popup;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import javafx.stage.Window;
import javafx.stage.WindowEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ShellListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.internal.Util;
-
-import com.sun.javafx.geom.PathIterator;
-
public class Shell extends Decorations {
- private Stage stage;
+ private Window stage;
private static final double MIN_WIDTH = 500;
private static final double MIN_HEIGHT = 200;
private BorderPane nativeObject;
@@ -49,7 +51,7 @@ public class Shell extends Decorations {
public Shell() {
super(Display.getCurrent(), SWT.DIALOG_TRIM);
}
-
+
public Shell(Display d) {
super(d, SWT.DIALOG_TRIM);
}
@@ -57,13 +59,24 @@ public class Shell extends Decorations {
public Shell(Display d, int style) {
super(d, style);
}
-
+
public Shell(Shell s) {
this(s == null ? null : s.getDisplay());
- stage.initOwner(s.stage);
+ if( isStage() ) {
+ ((Stage)stage).initOwner(s.stage);
+ }
+
this.parentShell = s;
}
+ private boolean isStage() {
+ return stage instanceof Stage;
+ }
+
+ private Stage asStage() {
+ return (Stage) stage;
+ }
+
public Shell(int style) {
this(Display.getDefault(),style);
}
@@ -71,7 +84,9 @@ public class Shell extends Decorations {
public Shell(Shell shell, int style) {
this(shell == null ? null : shell.getDisplay(), style);
if (shell != null) {
- stage.initOwner(shell.stage);
+ if( isStage() ) {
+ ((Stage)stage).initOwner(shell.stage);
+ }
}
this.parentShell = shell;
}
@@ -80,104 +95,115 @@ public class Shell extends Decorations {
super(Display.getDefault(),SWT.NONE);
this.stage = stage;
}
-
+
@Override
protected Region createWidget() {
if( stage != null ) {
return nativeObject = new BorderPane();
}
-
+
Region r = super.createWidget();
nativeObject = new BorderPane();
+ nativeObject.setStyle("-fx-background-color: black");
nativeObject.setCenter(r);
-
- stage = new Stage();
- final Scene s = new Scene(internal_getNativeObject());
- s.getStylesheets().add(getClass().getClassLoader().getResource("org/eclipse/swt/internal/swt.css").toExternalForm());
- stage.setScene(s);
- //TODO what to do with SWT.TOOL???
- if( /* (getStyle() & SWT.TOOL) == SWT.TOOL ||*/ (getStyle() & SWT.NO_TRIM) == SWT.NO_TRIM ) {
- stage.initStyle(StageStyle.UNDECORATED);
- }
- if( (style & SWT.APPLICATION_MODAL) == SWT.APPLICATION_MODAL ) {
- stage.initModality(Modality.APPLICATION_MODAL);
- } else if( (style & SWT.PRIMARY_MODAL) == SWT.PRIMARY_MODAL ) {
- Util.logNotImplemented();
- }
-
-
+
if( (getStyle() & SWT.NO_FOCUS) == SWT.NO_FOCUS ) {
- System.err.println("NO FOCUS NOT IMPLEMENTED");
- }
- stage.setOnShowing(new EventHandler<WindowEvent>() {
-
- @Override
- public void handle(WindowEvent event) {
- if( stage.widthProperty().getValue().equals(Double.NaN) && stage.heightProperty().getValue().equals(Double.NaN) ) {
- stage.setWidth(MIN_WIDTH);
- stage.setHeight(MIN_HEIGHT);
+ stage = new Popup() {
+ public void hide() {
+ Thread.dumpStack();
+ System.err.println("HIDING!!!!");
+ super.hide();
}
+ };
+ ((Popup)stage).getContent().add(nativeObject);
+ ((Popup)stage).setAutoHide(false);
+ getDisplay().registerShell(this);
+ } else {
+ Stage stage = new Stage();
+ this.stage = stage;
+ final Scene s = new Scene(internal_getNativeObject());
+ s.getStylesheets().add(getClass().getClassLoader().getResource("org/eclipse/swt/internal/swt.css").toExternalForm());
+ stage.setScene(s);
+ //TODO what to do with SWT.TOOL???
+ if( /* (getStyle() & SWT.TOOL) == SWT.TOOL ||*/ (getStyle() & SWT.NO_TRIM) == SWT.NO_TRIM ) {
+ stage.initStyle(StageStyle.UNDECORATED);
+ }
+ if( (style & SWT.APPLICATION_MODAL) == SWT.APPLICATION_MODAL ) {
+ stage.initModality(Modality.APPLICATION_MODAL);
+ } else if( (style & SWT.PRIMARY_MODAL) == SWT.PRIMARY_MODAL ) {
+ Util.logNotImplemented();
}
- });
- stage.addEventHandler(WindowEvent.WINDOW_CLOSE_REQUEST, new EventHandler<WindowEvent>() {
- @Override
- public void handle(WindowEvent event) {
- if( isListening(SWT.Close) ) {
- Event evt = new Event();
- internal_sendEvent(SWT.Close, evt, true);
- if( ! evt.doit ) {
- event.consume();
+ stage.setOnShowing(new EventHandler<WindowEvent>() {
+
+ @Override
+ public void handle(WindowEvent event) {
+ if( stage.widthProperty().getValue().equals(Double.NaN) && stage.heightProperty().getValue().equals(Double.NaN) ) {
+ stage.setWidth(MIN_WIDTH);
+ stage.setHeight(MIN_HEIGHT);
}
}
- }
- });
- stage.focusedProperty().addListener(new InvalidationListener() {
-
- @Override
- public void invalidated(Observable observable) {
- if( s.getFocusOwner() != null ) {
- Object o = Widget.getWidget(s.getFocusOwner());
- if( o instanceof Control ) {
- getDisplay().setFocusControl((Control) o);
+ });
+ stage.addEventHandler(WindowEvent.WINDOW_CLOSE_REQUEST, new EventHandler<WindowEvent>() {
+
+ @Override
+ public void handle(WindowEvent event) {
+ if( isListening(SWT.Close) ) {
+ Event evt = new Event();
+ internal_sendEvent(SWT.Close, evt, true);
+ if( ! evt.doit ) {
+ event.consume();
+ }
}
- } else {
- getDisplay().setFocusControl(null);
}
- }
- });
- s.focusOwnerProperty().addListener(new InvalidationListener() {
-
- @Override
- public void invalidated(Observable observable) {
- if( stage.isFocused() ) {
+ });
+ stage.focusedProperty().addListener(new InvalidationListener() {
+
+ @Override
+ public void invalidated(Observable observable) {
if( s.getFocusOwner() != null ) {
Object o = Widget.getWidget(s.getFocusOwner());
if( o instanceof Control ) {
- getDisplay().setFocusControl((Control) o);
+ getDisplay().setFocusControl((Control) o);
}
} else {
getDisplay().setFocusControl(null);
}
}
- }
- });
-
- getDisplay().registerShell(this);
-
+ });
+ s.focusOwnerProperty().addListener(new InvalidationListener() {
+
+ @Override
+ public void invalidated(Observable observable) {
+ if( stage.isFocused() ) {
+ if( s.getFocusOwner() != null ) {
+ Object o = Widget.getWidget(s.getFocusOwner());
+ if( o instanceof Control ) {
+ getDisplay().setFocusControl((Control) o);
+ }
+ } else {
+ getDisplay().setFocusControl(null);
+ }
+ }
+ }
+ });
+
+ getDisplay().registerShell(this);
+ }
+
return nativeObject;
}
-
+
@Override
public Region internal_getNativeObject() {
return nativeObject;
}
-
+
@Override
protected void initListeners() {
super.initListeners();
stage.setOnHidden(new EventHandler<WindowEvent>() {
-
+
@Override
public void handle(WindowEvent event) {
dispose();
@@ -186,7 +212,11 @@ public class Shell extends Decorations {
}
public void open() {
- stage.show();
+ if( isStage() ) {
+ ((Stage)stage).show();
+ } else {
+ ((Popup)stage).show(parentShell.internal_getWindow());
+ }
}
@Override
@@ -202,137 +232,174 @@ public class Shell extends Decorations {
public void setLocation(int x, int y) {
stage.setX(x);
stage.setY(y);
+ System.err.println(x+"/"+y);
}
-
+
@Override
public void setText(String string) {
- stage.setTitle(string);
+ if( isStage() ) {
+ ((Stage)stage).setTitle(string);
+ } else {
+ Util.logNotImplemented();
+ }
}
@Override
public String getText() {
- return stage.getTitle();
+ if( isStage() ) {
+ return ((Stage)stage).getTitle();
+ } else {
+ Util.logNotImplemented();
+ return null;
+ }
}
-
+
@Override
public void setImage(Image image) {
Image oldImage = getImage();
super.setImage(image);
-
- if( oldImage != null ) {
- stage.getIcons().remove(oldImage.internal_getImage());
- }
-
- if( image != null ) {
- stage.getIcons().add(image.internal_getImage());
+
+ if( isStage() ) {
+ if( oldImage != null ) {
+ ((Stage)stage).getIcons().remove(oldImage.internal_getImage());
+ }
+
+ if( image != null ) {
+ ((Stage)stage).getIcons().add(image.internal_getImage());
+ }
+ } else {
+ Util.logNotImplemented();
}
}
-
+
@Override
protected double internal_getWidth() {
return stage.getWidth();
}
-
+
@Override
protected double internal_getHeight() {
return stage.getHeight();
}
-
+
@Override
public Point getLocation() {
return new Point((int)stage.getX(), (int)stage.getY());
}
-
+
@Override
public void setSize(int width, int height) {
stage.setWidth(width);
stage.setHeight(height);
}
-
+
@Override
public Point getSize() {
return new Point((int)stage.getWidth(), (int)stage.getHeight());
}
-
+
@Override
public Rectangle getBounds() {
return new Rectangle((int)stage.getX(), (int)stage.getY(), (int)stage.getWidth(), (int)stage.getHeight());
}
public void setFullScreen(boolean selection) {
- stage.setFullScreen(selection);
+ if( isStage() ) {
+ ((Stage)stage).setFullScreen(selection);
+ } else {
+ Util.logNotImplemented();
+ }
}
-
+
@Override
public Composite getParent() {
// TODO Does it need another implementation???
return super.getParent();
}
-
+
@Override
public Shell getShell() {
return this;
}
-
+
@Override
public void pack() {
stage.sizeToScene();
}
-
+
public Window internal_getWindow() {
return stage;
}
-
+
@Override
public void setDefaultButton(Button defaultButton) {
Button b = getDefaultButton();
if( b != null ) {
b.internal_setDefault(false);
}
-
+
super.setDefaultButton(defaultButton);
-
+
if( defaultButton != null ) {
defaultButton.internal_setDefault(true);
}
}
-
+
public void addShellListener(ShellListener listener) {
Util.logNotImplemented();
}
-
+
public void close () {
- stage.close();
+ if( isStage() ) {
+ ((Stage)stage).close();
+ } else {
+ Util.logNotImplemented();
+ }
}
-
+
public int getAlpha () {
return 255 - (int)(stage.getOpacity() * 255);
}
-
+
// public int getImeInputMode () {
-//
+//
// }
-
+
public boolean getMaximized () {
- return stage.isMaximized();
+ if( isStage() ) {
+ return ((Stage)stage).isMaximized();
+ } else {
+ Util.logNotImplemented();
+ return false;
+ }
}
-
+
// public boolean getModified () {
// return false;
// }
-
+
public boolean getMinimized () {
- return stage.isIconified();
+ if( isStage() ) {
+ return ((Stage)stage).isIconified();
+ } else {
+ return false;
+ }
+
}
-
+
public Point getMinimumSize () {
- return new Point((int)stage.getMinWidth(), (int)stage.getMinHeight());
+ if( isStage() ) {
+ return new Point((int)((Stage)stage).getMinWidth(), (int)((Stage)stage).getMinHeight());
+ } else {
+ Util.logNotImplemented();
+ return new Point(100,100);
+ }
}
-
+
public org.eclipse.swt.graphics.Region getRegion () {
return region;
}
-
+
public Shell [] getShells () {
java.util.List<Shell> shells = new ArrayList<>();
for( Shell s : getDisplay().getShells() ) {
@@ -342,91 +409,105 @@ public class Shell extends Decorations {
}
return shells.toArray(new Shell[shells.size()]);
}
-
+
// public ToolBar getToolBar() {
-//
+//
// }
-
+
// public boolean isEnabled () {
// return true;
// }
public boolean isVisible () {
- return getVisible();
+ return stage.isShowing();
}
-
+
@Override
public boolean isEnabled() {
return getEnabled();
}
-
-//
+
+//
// public boolean print (GC gc) {
-//
+//
// }
-//
+//
public void removeShellListener(ShellListener listener) {
Util.logNotImplemented();
}
-
+
public void setActive () {
- stage.toFront();
+ if( isStage() ) {
+ ((Stage)stage).toFront();
+ }
stage.setFocused(true);
}
-
+
public void setAlpha (int alpha) {
stage.setOpacity(alpha/255.0);
}
-//
+//
// public void setFullScreen (boolean fullScreen) {
-//
+//
// }
-//
+//
public void setMenuBar (Menu menu) {
if( (menu.style & SWT.BAR) == SWT.BAR ) {
nativeObject.setTop((Node)menu.internal_getNativeObject());
}
super.setMenuBar(menu);
}
-//
+//
// public void setImeInputMode (int mode) {
-//
+//
// }
-//
+//
public void setMaximized (boolean maximized) {
- stage.setMaximized(true);
- super.setMaximized(maximized);
+ if( isStage() ) {
+ asStage().setMaximized(true);
+ super.setMaximized(maximized);
+ } else {
+ Util.logNotImplemented();
+ }
}
-
+
public void setMinimized (boolean minimized) {
- stage.setIconified(true);
- super.setMinimized(minimized);
+ if( isStage() ) {
+ asStage().setIconified(true);
+ super.setMinimized(minimized);
+ } else {
+ Util.logNotImplemented();
+ }
}
-
+
public void setMinimumSize (int width, int height) {
- stage.setMinWidth(width);
- stage.setMinHeight(height);
+ if( isStage() ) {
+ asStage().setMinWidth(width);
+ asStage().setMinHeight(height);
+ } else {
+ Util.logNotImplemented();
+ }
}
-
+
public void setMinimumSize (Point size) {
setMinimumSize(size.x, size.y);
}
-
+
public void setModified (boolean modified) {
Util.logNotImplemented();
}
-
+
public void setRegion (org.eclipse.swt.graphics.Region region) {
float coords[] = new float[6];
-
+
float x = 0;
float y = 0;
-
+
PathIterator pathIterator = region.internal_getNativeObject().getPathIterator(null);
-
+
Path p = new Path();
-
+
p.getElements().add(new MoveTo(0, 0));
-
+
while( ! pathIterator.isDone() ) {
switch (pathIterator.currentSegment(coords)) {
case PathIterator.SEG_CLOSE:
@@ -451,50 +532,69 @@ public class Shell extends Decorations {
}
pathIterator.next();
}
-
+
stage.getScene().getRoot().setClip(p);
this.region = region;
}
-
+
public void setVisible (boolean visible) {
+ System.err.println("VISIBILITY: " + visible);
+ if( visible == isVisible() ) {
+ return;
+ }
+
if( visible ) {
- stage.show();
- } else {
- if( stage.isShowing() ) {
- stage.hide();
+ if( isStage() ) {
+ asStage().show();
+ } else {
+ ((Popup)stage).show(parentShell.internal_getWindow());
+ System.err.println(isVisible());
}
+ } else {
+// if( stage.isShowing() ) {
+// stage.hide();
+// } else {
+// Thread.dumpStack();
+// ((Popup)stage).hide();
+// }
}
-
+
}
-
+
@Override
public void dispose() {
getDisplay().unregisterShell(this);
super.dispose();
- stage.close();
+ if( isStage() ) {
+ asStage().close();
+ } else {
+ Util.logNotImplemented();
+ }
}
-
+
@Override
public void setImages(Image[] images) {
super.setImages(images);
javafx.scene.image.Image[] imgs = new javafx.scene.image.Image[images.length];
-
+
for(int i = 0; i < imgs.length; i++) {
imgs[i] = images[i].internal_getImage();
}
-
- stage.getIcons().setAll(imgs);
+
+ if( isStage() ) {
+ asStage().getIcons().setAll(imgs);
+ }
}
public void forceActive () {
Util.logNotImplemented();
}
-
+
@Override
public void moveAbove(Control control) {
// super.moveAbove(control);
}
-
+
@Override
public void moveBelow(Control control) {
// super.moveBelow(control);
diff --git a/experimental/swt/org.eclipse.fx.sample.singlesource.app/bin/.gitignore b/experimental/swt/org.eclipse.fx.sample.singlesource.app/bin/.gitignore
deleted file mode 100644
index 283762609..000000000
--- a/experimental/swt/org.eclipse.fx.sample.singlesource.app/bin/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/donotdelete

Back to the top