summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Becker2011-01-20 11:16:17 (EST)
committerJuergen Becker2011-01-20 11:16:17 (EST)
commit6268ea96b00652751943e61d5148e9dfde1edf2f (patch)
tree16e51bcc35a6fd397a1963ac1ca75574a2bb6aaf
parentb305f952f268f3fc32cfac8b24ac8e3bc7457899 (diff)
downloadorg.eclipse.riena-6268ea96b00652751943e61d5148e9dfde1edf2f.zip
org.eclipse.riena-6268ea96b00652751943e61d5148e9dfde1edf2f.tar.gz
org.eclipse.riena-6268ea96b00652751943e61d5148e9dfde1edf2f.tar.bz2
InfoFlyoutRidget now works with RAP.
Added two support methods to the SWTFacades.
-rw-r--r--org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/internal/ui/ridgets/swt/InfoFlyoutRidget.java15
-rw-r--r--org.eclipse.riena.ui.swt.rcp/src/org/eclipse/riena/ui/swt/facades/SWTFacadeRCP.java8
-rw-r--r--org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/facades/SWTFacade.java21
3 files changed, 40 insertions, 4 deletions
diff --git a/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/internal/ui/ridgets/swt/InfoFlyoutRidget.java b/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/internal/ui/ridgets/swt/InfoFlyoutRidget.java
index 0aef708..7ba67d7 100644
--- a/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/internal/ui/ridgets/swt/InfoFlyoutRidget.java
+++ b/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/internal/ui/ridgets/swt/InfoFlyoutRidget.java
@@ -20,6 +20,7 @@ import org.eclipse.riena.ui.ridgets.AbstractRidget;
import org.eclipse.riena.ui.ridgets.IInfoFlyoutRidget;
import org.eclipse.riena.ui.ridgets.uibinding.IBindingPropertyLocator;
import org.eclipse.riena.ui.swt.InfoFlyout;
+import org.eclipse.riena.ui.swt.facades.SWTFacade;
import org.eclipse.riena.ui.swt.lnf.LnfKeyConstants;
import org.eclipse.riena.ui.swt.lnf.LnfManager;
import org.eclipse.riena.ui.swt.uiprocess.SwtUISynchronizer;
@@ -63,6 +64,7 @@ public class InfoFlyoutRidget extends AbstractRidget implements IInfoFlyoutRidge
worker = new Worker();
worker.start();
}
+ SWTFacade.getDefault().beforeInfoFlyoutShow(infoFlyout);
try {
infos.put(info);
} catch (final InterruptedException e) {
@@ -92,7 +94,6 @@ public class InfoFlyoutRidget extends AbstractRidget implements IInfoFlyoutRidge
break;
}
}
-
}
private void processInfo(final InfoFlyoutData info) {
@@ -101,9 +102,15 @@ public class InfoFlyoutRidget extends AbstractRidget implements IInfoFlyoutRidge
syncher.syncExec(new Runnable() {
public void run() {
- infoFlyout.setMessage(info.getMessage());
- infoFlyout.setIcon(info.getIcon());
- infoFlyout.openFlyout();
+ try {
+ infoFlyout.setMessage(info.getMessage());
+ infoFlyout.setIcon(info.getIcon());
+ infoFlyout.openFlyout();
+ } finally {
+ if (infos.isEmpty()) {
+ SWTFacade.getDefault().afterInfoFlyoutShow(infoFlyout);
+ }
+ }
}
});
diff --git a/org.eclipse.riena.ui.swt.rcp/src/org/eclipse/riena/ui/swt/facades/SWTFacadeRCP.java b/org.eclipse.riena.ui.swt.rcp/src/org/eclipse/riena/ui/swt/facades/SWTFacadeRCP.java
index 7ad1d4b..15f60f0 100644
--- a/org.eclipse.riena.ui.swt.rcp/src/org/eclipse/riena/ui/swt/facades/SWTFacadeRCP.java
+++ b/org.eclipse.riena.ui.swt.rcp/src/org/eclipse/riena/ui/swt/facades/SWTFacadeRCP.java
@@ -216,6 +216,14 @@ public final class SWTFacadeRCP extends SWTFacade {
scrollBar.setIncrement(value);
}
+ public void beforeInfoFlyoutShow(final InfoFlyout flyout) {
+ // nothing
+ }
+
+ public void afterInfoFlyoutShow(final InfoFlyout flyout) {
+ // nothing
+ }
+
// protected methods
////////////////////
diff --git a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/facades/SWTFacade.java b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/facades/SWTFacade.java
index f3d558f..b8dce07 100644
--- a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/facades/SWTFacade.java
+++ b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/facades/SWTFacade.java
@@ -591,6 +591,26 @@ public abstract class SWTFacade {
}
/**
+ * This method is called before the first InfoFlyout message is processed
+ *
+ * @param flyout
+ * a {@link InfoFlyout} instance, never null
+ */
+ public void beforeInfoFlyoutShow(final InfoFlyout flyout) {
+ // nothing by default
+ }
+
+ /**
+ * This method is called after all InfoFlyout messages are processed
+ *
+ * @param flyout
+ * a {@link InfoFlyout} instance, never null
+ */
+ public void afterInfoFlyoutShow(final InfoFlyout flyout) {
+ // nothing by default
+ }
+
+ /**
* Perform a platform specific traversal action as indicated by the value of
* the {@code traversal} argument. The following values are supported:
* <ul>
@@ -678,4 +698,5 @@ public abstract class SWTFacade {
* @since 3.0
*/
protected abstract Object[] removeVerifyListeners(final Control control);
+
}