summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2009-01-09 10:53:02 (EST)
committerCarsten Drossel2009-01-09 10:53:02 (EST)
commit124a9ab5f59ecf8767eda722d0f1fc477a8a6fec (patch)
tree64d17a60e9936b06d3727c05a01d4fbc515d8fbf
parent84b6497b5f104165055b9b4dc915c9afcdb37b4d (diff)
downloadorg.eclipse.riena-124a9ab5f59ecf8767eda722d0f1fc477a8a6fec.zip
org.eclipse.riena-124a9ab5f59ecf8767eda722d0f1fc477a8a6fec.tar.gz
org.eclipse.riena-124a9ab5f59ecf8767eda722d0f1fc477a8a6fec.tar.bz2
fixed java and checkstyle warnings
-rw-r--r--org.eclipse.riena.example.client/src/com/swtdesigner/SWTResourceManager.java764
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/CommunicationFaker.java4
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/ServiceProgressVisualizer.java4
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/ExceptionTestController.java16
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterActionSubModuleController.java4
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterNavigationSubModuleController.java7
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterSubModuleController.java6
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/UIProcessDemoSubModuleController.java5
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationSubApplicationNodeBuilder.java2
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/ExceptionTestView.java28
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/FilterExampleSubModuleView.java92
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/SharedViewDemoSubModuleView.java2
12 files changed, 493 insertions, 441 deletions
diff --git a/org.eclipse.riena.example.client/src/com/swtdesigner/SWTResourceManager.java b/org.eclipse.riena.example.client/src/com/swtdesigner/SWTResourceManager.java
index 76d138f..f1b24b9 100644
--- a/org.eclipse.riena.example.client/src/com/swtdesigner/SWTResourceManager.java
+++ b/org.eclipse.riena.example.client/src/com/swtdesigner/SWTResourceManager.java
@@ -9,6 +9,7 @@
* compeople AG - initial API and implementation
*******************************************************************************/
package com.swtdesigner;
+
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
@@ -36,172 +37,200 @@ import org.eclipse.swt.widgets.Display;
* Utility class for managing OS resources associated with SWT controls such as
* colors, fonts, images, etc.
*
- * !!! IMPORTANT !!! Application code must explicitly invoke the <code>dispose()</code>
- * method to release the operating system resources managed by cached objects
- * when those objects and OS resources are no longer needed (e.g. on
- * application shutdown)
+ * !!! IMPORTANT !!! Application code must explicitly invoke the
+ * <code>dispose()</code> method to release the operating system resources
+ * managed by cached objects when those objects and OS resources are no longer
+ * needed (e.g. on application shutdown)
*
* This class may be freely distributed as part of any application or plugin.
* <p>
- * Copyright (c) 2003 - 2005, Instantiations, Inc. <br>All Rights Reserved
+ * Copyright (c) 2003 - 2005, Instantiations, Inc. <br>
+ * All Rights Reserved
*
* @author scheglov_ke
* @author Dan Rubel
*/
-public class SWTResourceManager {
-
- /**
- * Dispose of cached objects and their underlying OS resources. This should
- * only be called when the cached objects are no longer needed (e.g. on
- * application shutdown)
- */
- public static void dispose() {
- disposeColors();
- disposeFonts();
- disposeImages();
- disposeCursors();
- }
-
- //////////////////////////////
- // Color support
- //////////////////////////////
-
- /**
- * Maps RGB values to colors
- */
- private static HashMap<RGB, Color> m_ColorMap = new HashMap<RGB, Color>();
-
- /**
- * Returns the system color matching the specific ID
- * @param systemColorID int The ID value for the color
- * @return Color The system color matching the specific ID
- */
- public static Color getColor(int systemColorID) {
- Display display = Display.getCurrent();
- return display.getSystemColor(systemColorID);
- }
-
- /**
- * Returns a color given its red, green and blue component values
- * @param r int The red component of the color
- * @param g int The green component of the color
- * @param b int The blue component of the color
- * @return Color The color matching the given red, green and blue componet values
- */
- public static Color getColor(int r, int g, int b) {
- return getColor(new RGB(r, g, b));
- }
-
- /**
- * Returns a color given its RGB value
- * @param rgb RGB The RGB value of the color
- * @return Color The color matching the RGB value
- */
- public static Color getColor(RGB rgb) {
- Color color = m_ColorMap.get(rgb);
- if (color == null) {
- Display display = Display.getCurrent();
- color = new Color(display, rgb);
- m_ColorMap.put(rgb, color);
- }
- return color;
- }
-
- /**
- * Dispose of all the cached colors
- */
- public static void disposeColors() {
- for (Iterator<Color> iter = m_ColorMap.values().iterator(); iter.hasNext();)
- iter.next().dispose();
- m_ColorMap.clear();
- }
-
- //////////////////////////////
- // Image support
- //////////////////////////////
+public final class SWTResourceManager {
+
+ private SWTResourceManager() {
+ // private constructor of utility class
+ }
+
+ /**
+ * Dispose of cached objects and their underlying OS resources. This should
+ * only be called when the cached objects are no longer needed (e.g. on
+ * application shutdown)
+ */
+ public static void dispose() {
+ disposeColors();
+ disposeFonts();
+ disposeImages();
+ disposeCursors();
+ }
+
+ //////////////////////////////
+ // Color support
+ //////////////////////////////
+
+ /**
+ * Maps RGB values to colors
+ */
+ private static HashMap<RGB, Color> colorMap = new HashMap<RGB, Color>();
+
+ /**
+ * Returns the system color matching the specific ID
+ *
+ * @param systemColorID
+ * int The ID value for the color
+ * @return Color The system color matching the specific ID
+ */
+ public static Color getColor(int systemColorID) {
+ Display display = Display.getCurrent();
+ return display.getSystemColor(systemColorID);
+ }
+
+ /**
+ * Returns a color given its red, green and blue component values
+ *
+ * @param r
+ * int The red component of the color
+ * @param g
+ * int The green component of the color
+ * @param b
+ * int The blue component of the color
+ * @return Color The color matching the given red, green and blue componet
+ * values
+ */
+ public static Color getColor(int r, int g, int b) {
+ return getColor(new RGB(r, g, b));
+ }
+
+ /**
+ * Returns a color given its RGB value
+ *
+ * @param rgb
+ * RGB The RGB value of the color
+ * @return Color The color matching the RGB value
+ */
+ public static Color getColor(RGB rgb) {
+ Color color = colorMap.get(rgb);
+ if (color == null) {
+ Display display = Display.getCurrent();
+ color = new Color(display, rgb);
+ colorMap.put(rgb, color);
+ }
+ return color;
+ }
+
+ /**
+ * Dispose of all the cached colors
+ */
+ public static void disposeColors() {
+ for (Iterator<Color> iter = colorMap.values().iterator(); iter.hasNext();) {
+ iter.next().dispose();
+ }
+ colorMap.clear();
+ }
+
+ //////////////////////////////
+ // Image support
+ //////////////////////////////
/**
* Maps image names to images
*/
- private static HashMap<String, Image> m_ClassImageMap = new HashMap<String, Image>();
+ private static HashMap<String, Image> classImageMap = new HashMap<String, Image>();
/**
* Maps images to image decorators
*/
- private static HashMap<Image, HashMap<Image, Image>> m_ImageToDecoratorMap = new HashMap<Image, HashMap<Image, Image>>();
-
- /**
- * Returns an image encoded by the specified input stream
- * @param is InputStream The input stream encoding the image data
- * @return Image The image encoded by the specified input stream
- */
- protected static Image getImage(InputStream is) {
- Display display = Display.getCurrent();
- ImageData data = new ImageData(is);
- if (data.transparentPixel > 0)
- return new Image(display, data, data.getTransparencyMask());
- return new Image(display, data);
- }
-
- /**
- * Returns an image stored in the file at the specified path
- * @param path String The path to the image file
- * @return Image The image stored in the file at the specified path
- */
- public static Image getImage(String path) {
- return getImage("default", path); //$NON-NLS-1$
- }
-
- /**
- * Returns an image stored in the file at the specified path
- * @param section The section to which belongs specified image
- * @param path String The path to the image file
- * @return Image The image stored in the file at the specified path
- */
- public static Image getImage(String section, String path) {
- String key = section + '|' + SWTResourceManager.class.getName() + '|' + path;
- Image image = m_ClassImageMap.get(key);
- if (image == null) {
- try {
- FileInputStream fis = new FileInputStream(path);
- image = getImage(fis);
- m_ClassImageMap.put(key, image);
- fis.close();
- } catch (Exception e) {
- image = getMissingImage();
- m_ClassImageMap.put(key, image);
- }
- }
- return image;
- }
-
- /**
- * Returns an image stored in the file at the specified path relative to the specified class
- * @param clazz Class The class relative to which to find the image
- * @param path String The path to the image file
- * @return Image The image stored in the file at the specified path
- */
- public static Image getImage(Class<?> clazz, String path) {
- String key = clazz.getName() + '|' + path;
- Image image = m_ClassImageMap.get(key);
- if (image == null) {
- try {
- if (path.length() > 0 && path.charAt(0) == '/') {
- String newPath = path.substring(1, path.length());
- image = getImage(new BufferedInputStream(clazz.getClassLoader().getResourceAsStream(newPath)));
- } else {
- image = getImage(clazz.getResourceAsStream(path));
- }
- m_ClassImageMap.put(key, image);
- } catch (Exception e) {
- image = getMissingImage();
- m_ClassImageMap.put(key, image);
- }
- }
- return image;
- }
-
- private static final int MISSING_IMAGE_SIZE = 10;
+ private static HashMap<Image, HashMap<Image, Image>> imageToDecoratorMap = new HashMap<Image, HashMap<Image, Image>>();
+
+ /**
+ * Returns an image encoded by the specified input stream
+ *
+ * @param is
+ * InputStream The input stream encoding the image data
+ * @return Image The image encoded by the specified input stream
+ */
+ protected static Image getImage(InputStream is) {
+ Display display = Display.getCurrent();
+ ImageData data = new ImageData(is);
+ if (data.transparentPixel > 0) {
+ return new Image(display, data, data.getTransparencyMask());
+ }
+ return new Image(display, data);
+ }
+
+ /**
+ * Returns an image stored in the file at the specified path
+ *
+ * @param path
+ * String The path to the image file
+ * @return Image The image stored in the file at the specified path
+ */
+ public static Image getImage(String path) {
+ return getImage("default", path); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns an image stored in the file at the specified path
+ *
+ * @param section
+ * The section to which belongs specified image
+ * @param path
+ * String The path to the image file
+ * @return Image The image stored in the file at the specified path
+ */
+ public static Image getImage(String section, String path) {
+ String key = section + '|' + SWTResourceManager.class.getName() + '|' + path;
+ Image image = classImageMap.get(key);
+ if (image == null) {
+ try {
+ FileInputStream fis = new FileInputStream(path);
+ image = getImage(fis);
+ classImageMap.put(key, image);
+ fis.close();
+ } catch (Exception e) {
+ image = getMissingImage();
+ classImageMap.put(key, image);
+ }
+ }
+ return image;
+ }
+
+ /**
+ * Returns an image stored in the file at the specified path relative to the
+ * specified class
+ *
+ * @param clazz
+ * Class The class relative to which to find the image
+ * @param path
+ * String The path to the image file
+ * @return Image The image stored in the file at the specified path
+ */
+ public static Image getImage(Class<?> clazz, String path) {
+ String key = clazz.getName() + '|' + path;
+ Image image = classImageMap.get(key);
+ if (image == null) {
+ try {
+ if (path.length() > 0 && path.charAt(0) == '/') {
+ String newPath = path.substring(1, path.length());
+ image = getImage(new BufferedInputStream(clazz.getClassLoader().getResourceAsStream(newPath)));
+ } else {
+ image = getImage(clazz.getResourceAsStream(path));
+ }
+ classImageMap.put(key, image);
+ } catch (Exception e) {
+ image = getMissingImage();
+ classImageMap.put(key, image);
+ }
+ }
+ return image;
+ }
+
+ private static final int MISSING_IMAGE_SIZE = 10;
+
private static Image getMissingImage() {
Image image = new Image(Display.getCurrent(), MISSING_IMAGE_SIZE, MISSING_IMAGE_SIZE);
//
@@ -213,45 +242,56 @@ public class SWTResourceManager {
return image;
}
- /**
- * Style constant for placing decorator image in top left corner of base image.
- */
- public static final int TOP_LEFT = 1;
- /**
- * Style constant for placing decorator image in top right corner of base image.
- */
- public static final int TOP_RIGHT = 2;
- /**
- * Style constant for placing decorator image in bottom left corner of base image.
- */
- public static final int BOTTOM_LEFT = 3;
- /**
- * Style constant for placing decorator image in bottom right corner of base image.
- */
- public static final int BOTTOM_RIGHT = 4;
-
- /**
- * Returns an image composed of a base image decorated by another image
- * @param baseImage Image The base image that should be decorated
- * @param decorator Image The image to decorate the base image
- * @return Image The resulting decorated image
- */
- public static Image decorateImage(Image baseImage, Image decorator) {
- return decorateImage(baseImage, decorator, BOTTOM_RIGHT);
- }
-
- /**
+ /**
+ * Style constant for placing decorator image in top left corner of base
+ * image.
+ */
+ public static final int TOP_LEFT = 1;
+ /**
+ * Style constant for placing decorator image in top right corner of base
+ * image.
+ */
+ public static final int TOP_RIGHT = 2;
+ /**
+ * Style constant for placing decorator image in bottom left corner of base
+ * image.
+ */
+ public static final int BOTTOM_LEFT = 3;
+ /**
+ * Style constant for placing decorator image in bottom right corner of base
+ * image.
+ */
+ public static final int BOTTOM_RIGHT = 4;
+
+ /**
* Returns an image composed of a base image decorated by another image
- * @param baseImage Image The base image that should be decorated
- * @param decorator Image The image to decorate the base image
- * @param corner The corner to place decorator image
+ *
+ * @param baseImage
+ * Image The base image that should be decorated
+ * @param decorator
+ * Image The image to decorate the base image
+ * @return Image The resulting decorated image
+ */
+ public static Image decorateImage(Image baseImage, Image decorator) {
+ return decorateImage(baseImage, decorator, BOTTOM_RIGHT);
+ }
+
+ /**
+ * Returns an image composed of a base image decorated by another image
+ *
+ * @param baseImage
+ * Image The base image that should be decorated
+ * @param decorator
+ * Image The image to decorate the base image
+ * @param corner
+ * The corner to place decorator image
* @return Image The resulting decorated image
*/
public static Image decorateImage(final Image baseImage, final Image decorator, final int corner) {
- HashMap<Image, Image> decoratedMap = m_ImageToDecoratorMap.get(baseImage);
+ HashMap<Image, Image> decoratedMap = imageToDecoratorMap.get(baseImage);
if (decoratedMap == null) {
decoratedMap = new HashMap<Image, Image>();
- m_ImageToDecoratorMap.put(baseImage, decoratedMap);
+ imageToDecoratorMap.put(baseImage, decoratedMap);
}
Image result = decoratedMap.get(decorator);
if (result == null) {
@@ -277,194 +317,218 @@ public class SWTResourceManager {
return result;
}
- /**
- * Dispose all of the cached images
- */
- public static void disposeImages() {
- for (Iterator<Image> I = m_ClassImageMap.values().iterator(); I.hasNext();)
- I.next().dispose();
- m_ClassImageMap.clear();
- //
- for (Iterator<HashMap<Image, Image>> I = m_ImageToDecoratorMap.values().iterator(); I.hasNext();) {
- HashMap<Image, Image> decoratedMap = I.next();
- for (Iterator<Image> J = decoratedMap.values().iterator(); J.hasNext();) {
- Image image = J.next();
+ /**
+ * Dispose all of the cached images
+ */
+ public static void disposeImages() {
+ for (Iterator<Image> imageIterator = classImageMap.values().iterator(); imageIterator.hasNext();) {
+ imageIterator.next().dispose();
+ }
+ classImageMap.clear();
+ //
+ for (Iterator<HashMap<Image, Image>> imageMapIterator = imageToDecoratorMap.values().iterator(); imageMapIterator
+ .hasNext();) {
+ HashMap<Image, Image> decoratedMap = imageMapIterator.next();
+ for (Iterator<Image> imageIterator2 = decoratedMap.values().iterator(); imageIterator2.hasNext();) {
+ Image image = imageIterator2.next();
image.dispose();
}
}
- }
+ }
- /**
+ /**
* Dispose cached images in specified section
- * @param section the section do dispose
+ *
+ * @param section
+ * the section do dispose
*/
public static void disposeImages(String section) {
- for (Iterator<String> I = m_ClassImageMap.keySet().iterator(); I.hasNext();) {
- String key = I.next();
- if (!key.startsWith(section + '|'))
+ for (Iterator<String> imageKeyIterator = classImageMap.keySet().iterator(); imageKeyIterator.hasNext();) {
+ String key = imageKeyIterator.next();
+ if (!key.startsWith(section + '|')) {
continue;
- Image image = m_ClassImageMap.get(key);
+ }
+ Image image = classImageMap.get(key);
image.dispose();
- I.remove();
+ imageKeyIterator.remove();
}
}
- //////////////////////////////
- // Font support
- //////////////////////////////
-
- /**
- * Maps font names to fonts
- */
- private static HashMap<String, Font> m_FontMap = new HashMap<String, Font>();
-
- /**
- * Maps fonts to their bold versions
- */
- private static HashMap<Font, Font> m_FontToBoldFontMap = new HashMap<Font, Font>();
-
- /**
- * Returns a font based on its name, height and style
- * @param name String The name of the font
- * @param height int The height of the font
- * @param style int The style of the font
- * @return Font The font matching the name, height and style
- */
- public static Font getFont(String name, int height, int style) {
- return getFont(name, height, style, false, false);
- }
-
-
- /**
- * Returns a font based on its name, height and style.
- * Windows-specific strikeout and underline flags are also supported.
- * @param name String The name of the font
- * @param size int The size of the font
- * @param style int The style of the font
- * @param strikeout boolean The strikeout flag (warning: Windows only)
- * @param underline boolean The underline flag (warning: Windows only)
- * @return Font The font matching the name, height, style, strikeout and underline
- */
+ //////////////////////////////
+ // Font support
+ //////////////////////////////
+
+ /**
+ * Maps font names to fonts
+ */
+ private static HashMap<String, Font> fontMap = new HashMap<String, Font>();
+
+ /**
+ * Maps fonts to their bold versions
+ */
+ private static HashMap<Font, Font> fontToBoldFontMap = new HashMap<Font, Font>();
+
+ /**
+ * Returns a font based on its name, height and style
+ *
+ * @param name
+ * String The name of the font
+ * @param height
+ * int The height of the font
+ * @param style
+ * int The style of the font
+ * @return Font The font matching the name, height and style
+ */
+ public static Font getFont(String name, int height, int style) {
+ return getFont(name, height, style, false, false);
+ }
+
+ /**
+ * Returns a font based on its name, height and style. Windows-specific
+ * strikeout and underline flags are also supported.
+ *
+ * @param name
+ * String The name of the font
+ * @param size
+ * int The size of the font
+ * @param style
+ * int The style of the font
+ * @param strikeout
+ * boolean The strikeout flag (warning: Windows only)
+ * @param underline
+ * boolean The underline flag (warning: Windows only)
+ * @return Font The font matching the name, height, style, strikeout and
+ * underline
+ */
public static Font getFont(String name, int size, int style, boolean strikeout, boolean underline) {
String fontName = name + '|' + size + '|' + style + '|' + strikeout + '|' + underline;
- Font font = m_FontMap.get(fontName);
- if (font == null) {
- FontData fontData = new FontData(name, size, style);
- if (strikeout || underline) {
- try {
- Class<?> logFontClass = Class.forName("org.eclipse.swt.internal.win32.LOGFONT"); //$NON-NLS-1$
- Object logFont = FontData.class.getField("data").get(fontData); //$NON-NLS-1$
- if (logFont != null && logFontClass != null) {
- if (strikeout) {
+ Font font = fontMap.get(fontName);
+ if (font == null) {
+ FontData fontData = new FontData(name, size, style);
+ if (strikeout || underline) {
+ try {
+ Class<?> logFontClass = Class.forName("org.eclipse.swt.internal.win32.LOGFONT"); //$NON-NLS-1$
+ Object logFont = FontData.class.getField("data").get(fontData); //$NON-NLS-1$
+ if (logFont != null && logFontClass != null) {
+ if (strikeout) {
logFontClass.getField("lfStrikeOut").set(logFont, new Byte((byte) 1)); //$NON-NLS-1$
}
- if (underline) {
+ if (underline) {
logFontClass.getField("lfUnderline").set(logFont, new Byte((byte) 1)); //$NON-NLS-1$
}
- }
- } catch (Throwable e) {
- System.err.println(
- "Unable to set underline or strikeout" + " (probably on a non-Windows platform). " + e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- font = new Font(Display.getCurrent(), fontData);
- m_FontMap.put(fontName, font);
- }
+ }
+ } catch (Throwable e) {
+ System.err
+ .println("Unable to set underline or strikeout" + " (probably on a non-Windows platform). " + e); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ font = new Font(Display.getCurrent(), fontData);
+ fontMap.put(fontName, font);
+ }
return font;
}
-
-
- /**
- * Return a bold version of the give font
- * @param baseFont Font The font for whoch a bold version is desired
- * @return Font The bold version of the give font
- */
- public static Font getBoldFont(Font baseFont) {
- Font font = m_FontToBoldFontMap.get(baseFont);
- if (font == null) {
- FontData fontDatas[] = baseFont.getFontData();
- FontData data = fontDatas[0];
- font = new Font(Display.getCurrent(), data.getName(), data.getHeight(), SWT.BOLD);
- m_FontToBoldFontMap.put(baseFont, font);
- }
- return font;
- }
-
- /**
- * Dispose all of the cached fonts
- */
- public static void disposeFonts() {
+
+ /**
+ * Return a bold version of the give font
+ *
+ * @param baseFont
+ * Font The font for whoch a bold version is desired
+ * @return Font The bold version of the give font
+ */
+ public static Font getBoldFont(Font baseFont) {
+ Font font = fontToBoldFontMap.get(baseFont);
+ if (font == null) {
+ FontData fontDatas[] = baseFont.getFontData();
+ FontData data = fontDatas[0];
+ font = new Font(Display.getCurrent(), data.getName(), data.getHeight(), SWT.BOLD);
+ fontToBoldFontMap.put(baseFont, font);
+ }
+ return font;
+ }
+
+ /**
+ * Dispose all of the cached fonts
+ */
+ public static void disposeFonts() {
// clear fonts
- for (Iterator<Font> iter = m_FontMap.values().iterator(); iter.hasNext();)
- iter.next().dispose();
- m_FontMap.clear();
+ for (Iterator<Font> iter = fontMap.values().iterator(); iter.hasNext();) {
+ iter.next().dispose();
+ }
+ fontMap.clear();
// clear bold fonts
- for (Iterator<Font> iter = m_FontToBoldFontMap.values().iterator(); iter.hasNext();)
- iter.next().dispose();
- m_FontToBoldFontMap.clear();
- }
+ for (Iterator<Font> iter = fontToBoldFontMap.values().iterator(); iter.hasNext();) {
+ iter.next().dispose();
+ }
+ fontToBoldFontMap.clear();
+ }
//////////////////////////////
- // CoolBar support
- //////////////////////////////
-
- /**
- * Fix the layout of the specified CoolBar
- * @param bar CoolBar The CoolBar that shgoud be fixed
- */
- public static void fixCoolBarSize(CoolBar bar) {
- CoolItem[] items = bar.getItems();
- // ensure that each item has control (at least empty one)
- for (int i = 0; i < items.length; i++) {
- CoolItem item = items[i];
- if (item.getControl() == null)
- item.setControl(new Canvas(bar, SWT.NONE) {
- @Override
- public Point computeSize(int wHint, int hHint, boolean changed) {
- return new Point(20, 20);
- }
- });
- }
- // compute size for each item
- for (int i = 0; i < items.length; i++) {
- CoolItem item = items[i];
- Control control = item.getControl();
- control.pack();
- Point size = control.getSize();
- item.setSize(item.computeSize(size.x, size.y));
- }
- }
-
- //////////////////////////////
- // Cursor support
- //////////////////////////////
-
- /**
- * Maps IDs to cursors
- */
- private static HashMap<Integer, Cursor> m_IdToCursorMap = new HashMap<Integer, Cursor>();
-
- /**
- * Returns the system cursor matching the specific ID
- * @param id int The ID value for the cursor
- * @return Cursor The system cursor matching the specific ID
- */
- public static Cursor getCursor(int id) {
- Integer key = new Integer(id);
- Cursor cursor = m_IdToCursorMap.get(key);
- if (cursor == null) {
- cursor = new Cursor(Display.getDefault(), id);
- m_IdToCursorMap.put(key, cursor);
- }
- return cursor;
- }
-
- /**
- * Dispose all of the cached cursors
- */
- public static void disposeCursors() {
- for (Iterator<Cursor> iter = m_IdToCursorMap.values().iterator(); iter.hasNext();)
- iter.next().dispose();
- m_IdToCursorMap.clear();
- }
+ // CoolBar support
+ //////////////////////////////
+
+ /**
+ * Fix the layout of the specified CoolBar
+ *
+ * @param bar
+ * CoolBar The CoolBar that shgoud be fixed
+ */
+ public static void fixCoolBarSize(CoolBar bar) {
+ CoolItem[] items = bar.getItems();
+ // ensure that each item has control (at least empty one)
+ for (int i = 0; i < items.length; i++) {
+ CoolItem item = items[i];
+ if (item.getControl() == null) {
+ item.setControl(new Canvas(bar, SWT.NONE) {
+ @Override
+ public Point computeSize(int wHint, int hHint, boolean changed) {
+ return new Point(20, 20);
+ }
+ });
+ }
+ }
+ // compute size for each item
+ for (int i = 0; i < items.length; i++) {
+ CoolItem item = items[i];
+ Control control = item.getControl();
+ control.pack();
+ Point size = control.getSize();
+ item.setSize(item.computeSize(size.x, size.y));
+ }
+ }
+
+ //////////////////////////////
+ // Cursor support
+ //////////////////////////////
+
+ /**
+ * Maps IDs to cursors
+ */
+ private static HashMap<Integer, Cursor> idToCursorMap = new HashMap<Integer, Cursor>();
+
+ /**
+ * Returns the system cursor matching the specific ID
+ *
+ * @param id
+ * int The ID value for the cursor
+ * @return Cursor The system cursor matching the specific ID
+ */
+ public static Cursor getCursor(int id) {
+ Integer key = new Integer(id);
+ Cursor cursor = idToCursorMap.get(key);
+ if (cursor == null) {
+ cursor = new Cursor(Display.getDefault(), id);
+ idToCursorMap.put(key, cursor);
+ }
+ return cursor;
+ }
+
+ /**
+ * Dispose all of the cached cursors
+ */
+ public static void disposeCursors() {
+ for (Iterator<Cursor> iter = idToCursorMap.values().iterator(); iter.hasNext();) {
+ iter.next().dispose();
+ }
+ idToCursorMap.clear();
+ }
} \ No newline at end of file
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/CommunicationFaker.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/CommunicationFaker.java
index dec6a32..99fa610 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/CommunicationFaker.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/CommunicationFaker.java
@@ -16,7 +16,7 @@ public class CommunicationFaker {
public void communicate(IRemoteProgressMonitorList progressMonitors) {
startCommunication(progressMonitors);
- _communicate(progressMonitors);
+ doCommunicate(progressMonitors);
endCommuncation(progressMonitors);
}
@@ -28,7 +28,7 @@ public class CommunicationFaker {
progressMonitors.fireStartEvent();
}
- private void _communicate(IRemoteProgressMonitorList progressMonitors) {
+ private void doCommunicate(IRemoteProgressMonitorList progressMonitors) {
for (int i = 0; i < 100; i += 1) {
sendData(progressMonitors);
delay();
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/ServiceProgressVisualizer.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/ServiceProgressVisualizer.java
index b54c359..bc28422 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/ServiceProgressVisualizer.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/ServiceProgressVisualizer.java
@@ -53,8 +53,8 @@ public class ServiceProgressVisualizer extends AbstractRemoteProgressMonitor {
*/
class CommunicationChannel {
- int actualTotalWork = 0;
- int actualWorkedUnits = 0;
+ private int actualTotalWork = 0;
+ private int actualWorkedUnits = 0;
int getActualTotalWork() {
return actualTotalWork;
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/ExceptionTestController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/ExceptionTestController.java
index d062c65..be9fc63 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/ExceptionTestController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/ExceptionTestController.java
@@ -27,20 +27,20 @@ public class ExceptionTestController extends SubModuleController {
// TODO Auto-generated method stub
super.configureRidgets();
- IActionRidget localNullPtr = (IActionRidget) getRidget("localNullPointerAction");
+ IActionRidget localNullPtr = (IActionRidget) getRidget("localNullPointerAction"); //$NON-NLS-1$
localNullPtr.addListener(new IActionListener() {
public void callback() {
- throw new NullPointerException("test nullpointer exception ");
+ throw new NullPointerException("test nullpointer exception "); //$NON-NLS-1$
}
});
- IActionRidget uiprocessNullPtr1 = (IActionRidget) getRidget("uiprocessNullPointerActionRunJob");
+ IActionRidget uiprocessNullPtr1 = (IActionRidget) getRidget("uiprocessNullPointerActionRunJob"); //$NON-NLS-1$
uiprocessNullPtr1.addListener(new IActionListener() {
public void callback() {
- UIProcess process = new UIProcess("TestException", true, getNavigationNode()) {
+ UIProcess process = new UIProcess("TestException", true, getNavigationNode()) { //$NON-NLS-1$
@Override
public boolean runJob(IProgressMonitor monitor) {
@@ -52,11 +52,11 @@ public class ExceptionTestController extends SubModuleController {
}
});
- IActionRidget uiprocessNullPtr2 = (IActionRidget) getRidget("uiprocessNullPointerActionUpdateUI");
+ IActionRidget uiprocessNullPtr2 = (IActionRidget) getRidget("uiprocessNullPointerActionUpdateUI"); //$NON-NLS-1$
uiprocessNullPtr2.addListener(new IActionListener() {
public void callback() {
- UIProcess process = new UIProcess("TestException", true, getNavigationNode()) {
+ UIProcess process = new UIProcess("TestException", true, getNavigationNode()) { //$NON-NLS-1$
public boolean runJob(IProgressMonitor monitor) {
notifyUpdateUI();
@@ -73,11 +73,11 @@ public class ExceptionTestController extends SubModuleController {
}
});
- IActionRidget uiprocessNullPtr3 = (IActionRidget) getRidget("uiprocessNullPointerActionFinalUpdateUI");
+ IActionRidget uiprocessNullPtr3 = (IActionRidget) getRidget("uiprocessNullPointerActionFinalUpdateUI"); //$NON-NLS-1$
uiprocessNullPtr3.addListener(new IActionListener() {
public void callback() {
- UIProcess process = new UIProcess("TestException", true, getNavigationNode()) {
+ UIProcess process = new UIProcess("TestException", true, getNavigationNode()) { //$NON-NLS-1$
@Override
public void finalUpdateUI() {
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterActionSubModuleController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterActionSubModuleController.java
index bd715ae..9d5f05e 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterActionSubModuleController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterActionSubModuleController.java
@@ -190,14 +190,12 @@ public class FilterActionSubModuleController extends SubModuleController {
Object filterValue = model.getSelectedFilterTypeValue();
FilterType type = model.getSelectedType();
- switch (type) {
- case MARKER:
+ if (type == FilterType.MARKER) {
if (filterValue instanceof DisabledMarker) {
attribute = new UIFilterRuleMenuItemDisabledMarker(model.getItemId());
} else if (filterValue instanceof HiddenMarker) {
attribute = new UIFilterRuleMenuItemHiddenMarker(model.getItemId());
}
- break;
}
return attribute;
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterNavigationSubModuleController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterNavigationSubModuleController.java
index 6863743..6922dee 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterNavigationSubModuleController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterNavigationSubModuleController.java
@@ -83,7 +83,7 @@ public class FilterNavigationSubModuleController extends SubModuleController {
SubApplicationNode subAppNode = getNavigationNode().getParentOfType(SubApplicationNode.class);
SubApplicationController subApp = (SubApplicationController) subAppNode.getNavigationNodeController();
- IActionRidget ridget = subApp.getMenuActionRidget("org.eclipse.riena.example.client.histBackMenuItem");
+ IActionRidget ridget = subApp.getMenuActionRidget("org.eclipse.riena.example.client.histBackMenuItem"); //$NON-NLS-1$
ridget.setEnabled(false);
}
@@ -193,15 +193,12 @@ public class FilterNavigationSubModuleController extends SubModuleController {
Object filterValue = model.getSelectedFilterTypeValue();
FilterType type = model.getSelectedType();
- switch (type) {
- case MARKER:
+ if (type == FilterType.MARKER) {
if (filterValue instanceof DisabledMarker) {
attribute = new UIFilterRuleNavigationDisabledMarker(nodeId);
} else if (filterValue instanceof HiddenMarker) {
attribute = new UIFilterRuleNavigationHiddenMarker(nodeId);
}
-
- break;
}
return attribute;
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterSubModuleController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterSubModuleController.java
index 20b1635..1d4eab0 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterSubModuleController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterSubModuleController.java
@@ -262,8 +262,7 @@ public class FilterSubModuleController extends SubModuleController {
Object filterValue = model.getSelectedFilterTypeValue();
FilterType type = model.getSelectedType();
- switch (type) {
- case MARKER:
+ if (type == FilterType.MARKER) {
if (filterValue instanceof OutputMarker) {
attribute = new UIFilterRuleRidgetOutputMarker(id);
} else if (filterValue instanceof DisabledMarker) {
@@ -273,8 +272,7 @@ public class FilterSubModuleController extends SubModuleController {
} else if (filterValue instanceof HiddenMarker) {
attribute = new UIFilterRuleRidgetHiddenMarker(id);
}
- break;
- case VALIDATOR:
+ } else if (type == FilterType.VALIDATOR) {
if (filterValue instanceof IValidator) {
attribute = new UIFilterRuleRidgetValidator(id, (IValidator) filterValue,
ValidationTime.ON_UI_CONTROL_EDIT);
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/UIProcessDemoSubModuleController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/UIProcessDemoSubModuleController.java
index 8a67106..bf24dd2 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/UIProcessDemoSubModuleController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/UIProcessDemoSubModuleController.java
@@ -78,7 +78,7 @@ public class UIProcessDemoSubModuleController extends SubModuleController {
try {
Thread.sleep(2500);
} catch (InterruptedException e1) {
-
+ e1.getCause(); // .ignore();
}
for (int i = 0; i <= 10; i++) {
if (monitor.isCanceled()) {
@@ -126,8 +126,9 @@ public class UIProcessDemoSubModuleController extends SubModuleController {
e.printStackTrace();
}
monitor.worked(i);
- if (monitor.isCanceled())
+ if (monitor.isCanceled()) {
return Status.CANCEL_STATUS;
+ }
}
} finally {
monitor.done();
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationSubApplicationNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationSubApplicationNodeBuilder.java
index 3816cb6..50d3015 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationSubApplicationNodeBuilder.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationSubApplicationNodeBuilder.java
@@ -110,7 +110,7 @@ public class NavigationSubApplicationNodeBuilder extends NavigationNodeBuilder {
}
public String getParentNodeId() {
- return "application";
+ return "application"; //$NON-NLS-1$
}
/**
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/ExceptionTestView.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/ExceptionTestView.java
index b2eaebc..0eb7432 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/ExceptionTestView.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/ExceptionTestView.java
@@ -12,8 +12,6 @@ package org.eclipse.riena.example.client.views;
import org.eclipse.riena.example.client.controllers.ExceptionTestController;
import org.eclipse.riena.navigation.ui.swt.views.SubModuleView;
-
-import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Button;
@@ -39,39 +37,35 @@ public class ExceptionTestView extends SubModuleView<ExceptionTestController> {
container.setBackground(SWTResourceManager.getColor(255, 255, 255));
final Button localNullPointer = new Button(container, SWT.NONE);
- localNullPointer.setText("throw NullPointerException");
+ localNullPointer.setText("throw NullPointerException"); //$NON-NLS-1$
localNullPointer.setBounds(48, 94, 246, 31);
- addUIControl(localNullPointer, "localNullPointerAction");
+ addUIControl(localNullPointer, "localNullPointerAction"); //$NON-NLS-1$
final Label testingVariousExceptionsLabel = new Label(container, SWT.NONE);
testingVariousExceptionsLabel.setBackground(SWTResourceManager.getColor(255, 255, 255));
- testingVariousExceptionsLabel.setText("Testing various Exceptions");
+ testingVariousExceptionsLabel.setText("Testing various Exceptions"); //$NON-NLS-1$
testingVariousExceptionsLabel.setBounds(26, 34, 173, 13);
final Button uiprocessNullPointer1 = new Button(container, SWT.NONE);
- uiprocessNullPointer1.setText("throw NullPointerException in UIProcess (runJob)");
+ uiprocessNullPointer1.setText("throw NullPointerException in UIProcess (runJob)"); //$NON-NLS-1$
uiprocessNullPointer1.setBounds(49, 149, 261, 23);
- addUIControl(uiprocessNullPointer1, "uiprocessNullPointerActionRunJob");
+ addUIControl(uiprocessNullPointer1, "uiprocessNullPointerActionRunJob"); //$NON-NLS-1$
final Button uiprocessNullPointer2 = new Button(container, SWT.NONE);
- uiprocessNullPointer2.setText("throw NullPointerException in UIProcess (finalUpdateUI)");
+ uiprocessNullPointer2.setText("throw NullPointerException in UIProcess (finalUpdateUI)"); //$NON-NLS-1$
uiprocessNullPointer2.setBounds(48, 188, 288, 23);
- addUIControl(uiprocessNullPointer2, "uiprocessNullPointerActionFinalUpdateUI");
+ addUIControl(uiprocessNullPointer2, "uiprocessNullPointerActionFinalUpdateUI"); //$NON-NLS-1$
final Button uiprocessNullPointer3 = new Button(container, SWT.NONE);
- uiprocessNullPointer3.setText("throw NullPointerException in UIProcess (updateUI)");
+ uiprocessNullPointer3.setText("throw NullPointerException in UIProcess (updateUI)"); //$NON-NLS-1$
uiprocessNullPointer3.setBounds(48, 228, 288, 23);
- addUIControl(uiprocessNullPointer3, "uiprocessNullPointerActionUpdateUI");
+ addUIControl(uiprocessNullPointer3, "uiprocessNullPointerActionUpdateUI"); //$NON-NLS-1$
final Button serverNullPointer = new Button(container, SWT.NONE);
- serverNullPointer.setText("throw NullPointerException on server");
+ serverNullPointer.setText("throw NullPointerException on server"); //$NON-NLS-1$
serverNullPointer.setBounds(48, 411, 246, 31);
parent.setLayout(new FillLayout());
- addUIControl(serverNullPointer, "serverNullPointerAction");
- }
-
- private void initializeToolBar() {
- IToolBarManager toolBarManager = getViewSite().getActionBars().getToolBarManager();
+ addUIControl(serverNullPointer, "serverNullPointerAction"); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/FilterExampleSubModuleView.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/FilterExampleSubModuleView.java
index d868cc6..1ef1f42 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/FilterExampleSubModuleView.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/FilterExampleSubModuleView.java
@@ -30,8 +30,8 @@ public class FilterExampleSubModuleView extends SubModuleView<FilterExampleSubMo
@Override
protected void basicCreatePartControl(Composite parent) {
parent.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
- final GridLayout gridLayout_3 = new GridLayout();
- parent.setLayout(gridLayout_3);
+ final GridLayout gridLayout3 = new GridLayout();
+ parent.setLayout(gridLayout3);
parent.setBackgroundMode(SWT.INHERIT_FORCE);
Group menuToolGroup;
@@ -42,10 +42,10 @@ public class FilterExampleSubModuleView extends SubModuleView<FilterExampleSubMo
navigationGroup = new Group(parent, SWT.NONE);
navigationGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
navigationGroup.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
- final GridLayout gridLayout_2 = new GridLayout();
- gridLayout_2.verticalSpacing = 0;
- gridLayout_2.numColumns = 2;
- navigationGroup.setLayout(gridLayout_2);
+ final GridLayout gridLayout2 = new GridLayout();
+ gridLayout2.verticalSpacing = 0;
+ gridLayout2.numColumns = 2;
+ navigationGroup.setLayout(gridLayout2);
navigationGroup.setText("Navigation"); //$NON-NLS-1$
final Label hideTheLabel = new Label(navigationGroup, SWT.NONE);
@@ -54,18 +54,18 @@ public class FilterExampleSubModuleView extends SubModuleView<FilterExampleSubMo
.setText("* Hide the first two module groups (\"Shared View Demo\" and \"UIProcess\" )\n* Disable the two sub-modules \"Ridget\" and \"Navigation\"\n* Hide the two sub-modules \"Menu Item\" and \"External Definition\"\n* Disable the module \"Log Collector\"\n* Inside the module \"Playground\" disable the two sub-modules \"Tree\" and \"Tree Table\""); //$NON-NLS-1$
final Button navigationButton = new Button(navigationGroup, SWT.TOGGLE);
- final GridData gd_navigationButton = new GridData(SWT.RIGHT, SWT.BOTTOM, false, false);
- gd_navigationButton.widthHint = 80;
- navigationButton.setLayoutData(gd_navigationButton);
+ final GridData gdNavigationButton = new GridData(SWT.RIGHT, SWT.BOTTOM, false, false);
+ gdNavigationButton.widthHint = 80;
+ navigationButton.setLayoutData(gdNavigationButton);
navigationButton.setText("activate"); //$NON-NLS-1$
addUIControl(navigationButton, "navigationBtn"); //$NON-NLS-1$
menuToolGroup = new Group(parent, SWT.NONE);
menuToolGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
menuToolGroup.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
- final GridLayout gridLayout_1 = new GridLayout();
- gridLayout_1.verticalSpacing = 0;
- gridLayout_1.numColumns = 2;
- menuToolGroup.setLayout(gridLayout_1);
+ final GridLayout gridLayout1 = new GridLayout();
+ gridLayout1.verticalSpacing = 0;
+ gridLayout1.numColumns = 2;
+ menuToolGroup.setLayout(gridLayout1);
menuToolGroup.setText("Menu / Tool Bar"); //$NON-NLS-1$
final Label disableAllLabel = new Label(menuToolGroup, SWT.WRAP);
@@ -74,9 +74,9 @@ public class FilterExampleSubModuleView extends SubModuleView<FilterExampleSubMo
.setText("* Disable all menu items of the menu \"File\"\n* Disable the tool item \"Exit\"\n* Hide th menu \"Navigation menu\""); //$NON-NLS-1$
final Button menuToolButton = new Button(menuToolGroup, SWT.TOGGLE);
- final GridData gd_menuToolButton = new GridData(SWT.RIGHT, SWT.BOTTOM, false, false);
- gd_menuToolButton.widthHint = 80;
- menuToolButton.setLayoutData(gd_menuToolButton);
+ final GridData gdMenuToolButton = new GridData(SWT.RIGHT, SWT.BOTTOM, false, false);
+ gdMenuToolButton.widthHint = 80;
+ menuToolButton.setLayoutData(gdMenuToolButton);
menuToolButton.setText("activate"); //$NON-NLS-1$
addUIControl(menuToolButton, "menuToolItemBtn"); //$NON-NLS-1$
ridgetsGroup = new Group(parent, SWT.NONE);
@@ -94,66 +94,66 @@ public class FilterExampleSubModuleView extends SubModuleView<FilterExampleSubMo
.setText("* In the sub-module \"Text\" hide every text field, that displays a model value\n* In the sub-module \"Text\" set for every ridget the maximum length \"12\""); //$NON-NLS-1$
final Button ridgetButton = new Button(ridgetsGroup, SWT.TOGGLE);
- final GridData gd_activateButton_1 = new GridData(SWT.RIGHT, SWT.BOTTOM, false, false);
- gd_activateButton_1.widthHint = 80;
- ridgetButton.setLayoutData(gd_activateButton_1);
+ final GridData gdActivateButton1 = new GridData(SWT.RIGHT, SWT.BOTTOM, false, false);
+ gdActivateButton1.widthHint = 80;
+ ridgetButton.setLayoutData(gdActivateButton1);
ridgetButton.setText("activate"); //$NON-NLS-1$
addUIControl(ridgetButton, "ridgetBtn"); //$NON-NLS-1$
- final Group ridgetsGroup_1 = new Group(parent, SWT.NONE);
- ridgetsGroup_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- final GridLayout gridLayout_4 = new GridLayout();
- gridLayout_4.verticalSpacing = 0;
- gridLayout_4.numColumns = 2;
- ridgetsGroup_1.setLayout(gridLayout_4);
- ridgetsGroup_1.setText("Ridgets (sample)"); //$NON-NLS-1$
-
- final Label theSampleTextLabel = new Label(ridgetsGroup_1, SWT.NONE);
- final GridData gd_theSampleTextLabel = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
- theSampleTextLabel.setLayoutData(gd_theSampleTextLabel);
+ final Group ridgetsGroup1 = new Group(parent, SWT.NONE);
+ ridgetsGroup1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ final GridLayout gridLayout4 = new GridLayout();
+ gridLayout4.verticalSpacing = 0;
+ gridLayout4.numColumns = 2;
+ ridgetsGroup1.setLayout(gridLayout4);
+ ridgetsGroup1.setText("Ridgets (sample)"); //$NON-NLS-1$
+
+ final Label theSampleTextLabel = new Label(ridgetsGroup1, SWT.NONE);
+ final GridData gdTheSampleTextLabel = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
+ theSampleTextLabel.setLayoutData(gdTheSampleTextLabel);
theSampleTextLabel.setText("The sample text ridget has a mandatory marker"); //$NON-NLS-1$
- final Label disableTheFourLabel = new Label(ridgetsGroup_1, SWT.NONE);
- final GridData gd_disableTheFourLabel = new GridData(SWT.FILL, SWT.CENTER, true, false);
- disableTheFourLabel.setLayoutData(gd_disableTheFourLabel);
+ final Label disableTheFourLabel = new Label(ridgetsGroup1, SWT.NONE);
+ final GridData gdDisableTheFourLabel = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ disableTheFourLabel.setLayoutData(gdDisableTheFourLabel);
disableTheFourLabel.setText("* Disable the three sample ridgets"); //$NON-NLS-1$
- final Button ridgetsDisableButton = new Button(ridgetsGroup_1, SWT.TOGGLE);
+ final Button ridgetsDisableButton = new Button(ridgetsGroup1, SWT.TOGGLE);
ridgetsDisableButton.setLayoutData(new GridData(80, SWT.DEFAULT));
ridgetsDisableButton.setText("activate"); //$NON-NLS-1$
addUIControl(ridgetsDisableButton, "ridgetDisableBtn"); //$NON-NLS-1$
- final Label hiddeTheFourLabel = new Label(ridgetsGroup_1, SWT.NONE);
+ final Label hiddeTheFourLabel = new Label(ridgetsGroup1, SWT.NONE);
hiddeTheFourLabel.setText("* Hide the three sample ridgets"); //$NON-NLS-1$
- final Button ridgetsHideButton = new Button(ridgetsGroup_1, SWT.TOGGLE);
+ final Button ridgetsHideButton = new Button(ridgetsGroup1, SWT.TOGGLE);
ridgetsHideButton.setLayoutData(new GridData(80, SWT.DEFAULT));
ridgetsHideButton.setText("activate"); //$NON-NLS-1$
addUIControl(ridgetsHideButton, "ridgetHideBtn"); //$NON-NLS-1$
- final Label onlyAllowLabel = new Label(ridgetsGroup_1, SWT.NONE);
+ final Label onlyAllowLabel = new Label(ridgetsGroup1, SWT.NONE);
onlyAllowLabel.setText("* Only allow the two characters \"0\" and \"1\" in the sample text ridget"); //$NON-NLS-1$
- final Button ridgets01Button = new Button(ridgetsGroup_1, SWT.TOGGLE);
+ final Button ridgets01Button = new Button(ridgetsGroup1, SWT.TOGGLE);
ridgets01Button.setLayoutData(new GridData(80, SWT.DEFAULT));
ridgets01Button.setText("activate"); //$NON-NLS-1$
addUIControl(ridgets01Button, "ridget01Btn"); //$NON-NLS-1$
- final Composite composite = new Composite(ridgetsGroup_1, SWT.NONE);
+ final Composite composite = new Composite(ridgetsGroup1, SWT.NONE);
composite.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
- final GridLayout gridLayout_5 = new GridLayout();
- gridLayout_5.horizontalSpacing = 15;
- gridLayout_5.numColumns = 4;
- composite.setLayout(gridLayout_5);
+ final GridLayout gridLayout5 = new GridLayout();
+ gridLayout5.horizontalSpacing = 15;
+ gridLayout5.numColumns = 4;
+ composite.setLayout(gridLayout5);
final Label sampleLabel = new Label(composite, SWT.NONE);
sampleLabel.setText("Sample Label"); //$NON-NLS-1$
addUIControl(sampleLabel, "sampleLabel"); //$NON-NLS-1$
final Text sampleText = new Text(composite, SWT.BORDER);
- final GridData gd_sampleText = new GridData(SWT.FILL, SWT.CENTER, true, false);
- gd_sampleText.minimumWidth = 80;
- sampleText.setLayoutData(gd_sampleText);
+ final GridData gdSampleText = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ gdSampleText.minimumWidth = 80;
+ sampleText.setLayoutData(gdSampleText);
addUIControl(sampleText, "sampleText"); //$NON-NLS-1$
final Button button = new Button(composite, SWT.NONE);
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/SharedViewDemoSubModuleView.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/SharedViewDemoSubModuleView.java
index 9f04c2d..58cf999 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/SharedViewDemoSubModuleView.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/views/SharedViewDemoSubModuleView.java
@@ -62,7 +62,7 @@ public class SharedViewDemoSubModuleView extends SubModuleView<SharedViewDemoSub
addUIControl(helloLabel, "labelFacade"); //$NON-NLS-1$
// getController().setLabelFacade(labelFacade);
- Label someText = UIControlsFactory.createLabel(parent, "(Instance " + instanceIndex + ") Data", SWT.LEFT); //$NON-NLS-1$ $NON-NLS-2$
+ Label someText = UIControlsFactory.createLabel(parent, "(Instance " + instanceIndex + ") Data", SWT.LEFT); //$NON-NLS-1$ //$NON-NLS-2$ $NON-NLS-2$
FormData fd = new FormData();
fd.top = new FormAttachment(0, TOP);
fd.left = new FormAttachment(0, LEFT);