]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - swt/org.argeo.cms.swt/src/org/argeo/cms/swt/CmsSwtTheme.java
Refactor SWT directory structure.
[lgpl/argeo-commons.git] / swt / org.argeo.cms.swt / src / org / argeo / cms / swt / CmsSwtTheme.java
diff --git a/swt/org.argeo.cms.swt/src/org/argeo/cms/swt/CmsSwtTheme.java b/swt/org.argeo.cms.swt/src/org/argeo/cms/swt/CmsSwtTheme.java
new file mode 100644 (file)
index 0000000..7669b15
--- /dev/null
@@ -0,0 +1,25 @@
+package org.argeo.cms.swt;
+
+import org.argeo.api.cms.ux.CmsIcon;
+import org.argeo.api.cms.ux.CmsTheme;
+import org.eclipse.swt.graphics.Image;
+
+/** SWT specific {@link CmsTheme}. */
+public interface CmsSwtTheme extends CmsTheme {
+//     /** The image registered at this path, or <code>null</code> if not found. */
+//     Image getImage(String path);
+
+       /**
+        * And icon with this file name (without the extension), with a best effort to
+        * find the appropriate size, or <code>null</code> if not found.
+        * 
+        * @param name          An icon file name without path and extension.
+        * @param preferredSize the preferred size, if <code>null</code>,
+        *                      {@link #getDefaultIconSize()} will be tried.
+        */
+       Image getIcon(String name, Integer preferredSize);
+
+       Image getSmallIcon(CmsIcon icon);
+       
+       Image getBigIcon(CmsIcon icon);
+}