summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-17 08:07:31 (EDT)
committerEike Stepper2007-10-17 08:07:31 (EDT)
commitaadadee654f747513b8f31b508e53c6995fbba32 (patch)
tree9b1893cb7808c4fe972ba9e12f12ca6c3e4834a0
parentf8bc634aba00f3915334e9adae9afcd647dae71d (diff)
downloadcdo-aadadee654f747513b8f31b508e53c6995fbba32.zip
cdo-aadadee654f747513b8f31b508e53c6995fbba32.tar.gz
cdo-aadadee654f747513b8f31b508e53c6995fbba32.tar.bz2
[205668] Provide buddies example
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205668
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/UIUtil.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/UIUtil.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/UIUtil.java
index 18a5286..6351b9d 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/UIUtil.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/UIUtil.java
@@ -14,6 +14,7 @@ import org.eclipse.net4j.util.internal.ui.security.InteractiveCredentialsProvide
import org.eclipse.net4j.util.security.IPasswordCredentialsProvider;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.layout.GridData;
@@ -21,6 +22,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.PlatformUI;
/**
@@ -40,6 +42,22 @@ public final class UIUtil
}
}
+ public static void dispose(Color color)
+ {
+ if (color != null)
+ {
+ color.dispose();
+ }
+ }
+
+ public static void dispose(Widget widget)
+ {
+ if (widget != null)
+ {
+ widget.dispose();
+ }
+ }
+
public static Font getBoldFont(Control control)
{
FontData[] datas = control.getFont().getFontData().clone();