net.sourceforge.rssowl.util.shop
Class PaintShop

java.lang.Object
  extended bynet.sourceforge.rssowl.util.shop.PaintShop

public class PaintShop
extends Object

Factory class for some Paint / Icon concerns in RSSOwl

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
private static Class clazz
          Class required for Image loading
static org.eclipse.swt.graphics.Color grayToolBarColor
          Gray ToolBar color
static org.eclipse.swt.graphics.Color grayViewFormColor
          Gray ViewForm color
static org.eclipse.swt.graphics.Image iconAddToFavorites
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconBackward
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconBlueStripes
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconCancelOperation
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconCancelOperationDisabled
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconCopy
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconError
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconErrorLense
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconFeedDiscovery
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconFind
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconFolder
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconFolderSubscribe
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconFolderSubscribeUnread
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconFolderUnread
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconForward
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconHTML
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconLense
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconLenseUnread
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconMail
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconNotRated
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image[] iconOwl
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconPDF
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconPrint
          Some multiple used Icons in RSSOwl
private static org.eclipse.swt.graphics.Image iconProgress0
          Some multiple used Icons in RSSOwl
private static org.eclipse.swt.graphics.Image iconProgress100
          Some multiple used Icons in RSSOwl
private static org.eclipse.swt.graphics.Image iconProgress20
          Some multiple used Icons in RSSOwl
private static org.eclipse.swt.graphics.Image iconProgress40
          Some multiple used Icons in RSSOwl
private static org.eclipse.swt.graphics.Image iconProgress60
          Some multiple used Icons in RSSOwl
private static org.eclipse.swt.graphics.Image iconProgress80
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconRateSuccess
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconRead
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconReload
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconReloadBrowser
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconRTF
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconSearch
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconSkip
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconSkipDisabled
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconStop
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconUnread
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconValidate
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconWarning
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Image iconWorld
          Some multiple used Icons in RSSOwl
static org.eclipse.swt.graphics.Color linkColor
          Make the linkColor accessible from all Objects
static org.eclipse.swt.graphics.Color syntaxHighlightColor
          Make the syntaxHighlightColor accessible from all Objects
 
Constructor Summary
private PaintShop()
          This utility class constructor is hidden
 
Method Summary
static void disposeIcons()
          Dispose icons
static org.eclipse.swt.graphics.Image getFilledImage(org.eclipse.swt.widgets.Display display, org.eclipse.swt.graphics.RGB color, int width, int height)
          Fill an Image with a given color
static org.eclipse.swt.graphics.Image getLanguageFlag(String locale, Class curClass)
          Get the correct flag for the given language.
static org.eclipse.swt.graphics.Image getProgressIcon(int value)
          Get the progress icon for the given value.
static void initIcons()
          Initialize the multiple used icons
static void initLinkColor(org.eclipse.swt.widgets.Display display)
          Set the color for the links
static void initSyntaxHighlightColor(org.eclipse.swt.widgets.Display display)
          Set the color for the syntaxhighlight
static boolean isset(org.eclipse.swt.graphics.Image image)
          Check the given Image for being NULL or disposed.
static org.eclipse.swt.graphics.Image loadImage(String path)
          Load an Image from the given Path using an InputStream that is closed after the Image has been loaded.
static org.eclipse.swt.graphics.Image loadImage(String path, boolean hideOnMac)
          Load an Image from the given Path using an InputStream that is closed after the Image has been loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

grayToolBarColor

public static org.eclipse.swt.graphics.Color grayToolBarColor
Gray ToolBar color


grayViewFormColor

public static org.eclipse.swt.graphics.Color grayViewFormColor
Gray ViewForm color


iconAddToFavorites

public static org.eclipse.swt.graphics.Image iconAddToFavorites
Some multiple used Icons in RSSOwl


iconBackward

public static org.eclipse.swt.graphics.Image iconBackward
Some multiple used Icons in RSSOwl


iconBlueStripes

public static org.eclipse.swt.graphics.Image iconBlueStripes
Some multiple used Icons in RSSOwl


iconCancelOperation

public static org.eclipse.swt.graphics.Image iconCancelOperation
Some multiple used Icons in RSSOwl


iconCancelOperationDisabled

public static org.eclipse.swt.graphics.Image iconCancelOperationDisabled
Some multiple used Icons in RSSOwl


iconCopy

public static org.eclipse.swt.graphics.Image iconCopy
Some multiple used Icons in RSSOwl


iconError

public static org.eclipse.swt.graphics.Image iconError
Some multiple used Icons in RSSOwl


iconErrorLense

public static org.eclipse.swt.graphics.Image iconErrorLense
Some multiple used Icons in RSSOwl


iconFeedDiscovery

public static org.eclipse.swt.graphics.Image iconFeedDiscovery
Some multiple used Icons in RSSOwl


iconFind

public static org.eclipse.swt.graphics.Image iconFind
Some multiple used Icons in RSSOwl


iconFolder

public static org.eclipse.swt.graphics.Image iconFolder
Some multiple used Icons in RSSOwl


iconFolderSubscribe

public static org.eclipse.swt.graphics.Image iconFolderSubscribe
Some multiple used Icons in RSSOwl


iconFolderSubscribeUnread

public static org.eclipse.swt.graphics.Image iconFolderSubscribeUnread
Some multiple used Icons in RSSOwl


iconFolderUnread

public static org.eclipse.swt.graphics.Image iconFolderUnread
Some multiple used Icons in RSSOwl


iconForward

public static org.eclipse.swt.graphics.Image iconForward
Some multiple used Icons in RSSOwl


iconHTML

public static org.eclipse.swt.graphics.Image iconHTML
Some multiple used Icons in RSSOwl


iconLense

public static org.eclipse.swt.graphics.Image iconLense
Some multiple used Icons in RSSOwl


iconLenseUnread

public static org.eclipse.swt.graphics.Image iconLenseUnread
Some multiple used Icons in RSSOwl


iconMail

public static org.eclipse.swt.graphics.Image iconMail
Some multiple used Icons in RSSOwl


iconNotRated

public static org.eclipse.swt.graphics.Image iconNotRated
Some multiple used Icons in RSSOwl


iconOwl

public static org.eclipse.swt.graphics.Image[] iconOwl
Some multiple used Icons in RSSOwl


iconPDF

public static org.eclipse.swt.graphics.Image iconPDF
Some multiple used Icons in RSSOwl


iconPrint

public static org.eclipse.swt.graphics.Image iconPrint
Some multiple used Icons in RSSOwl


iconRateSuccess

public static org.eclipse.swt.graphics.Image iconRateSuccess
Some multiple used Icons in RSSOwl


iconRead

public static org.eclipse.swt.graphics.Image iconRead
Some multiple used Icons in RSSOwl


iconReload

public static org.eclipse.swt.graphics.Image iconReload
Some multiple used Icons in RSSOwl


iconReloadBrowser

public static org.eclipse.swt.graphics.Image iconReloadBrowser
Some multiple used Icons in RSSOwl


iconRTF

public static org.eclipse.swt.graphics.Image iconRTF
Some multiple used Icons in RSSOwl


iconSearch

public static org.eclipse.swt.graphics.Image iconSearch
Some multiple used Icons in RSSOwl


iconSkip

public static org.eclipse.swt.graphics.Image iconSkip
Some multiple used Icons in RSSOwl


iconSkipDisabled

public static org.eclipse.swt.graphics.Image iconSkipDisabled
Some multiple used Icons in RSSOwl


iconStop

public static org.eclipse.swt.graphics.Image iconStop
Some multiple used Icons in RSSOwl


iconUnread

public static org.eclipse.swt.graphics.Image iconUnread
Some multiple used Icons in RSSOwl


iconValidate

public static org.eclipse.swt.graphics.Image iconValidate
Some multiple used Icons in RSSOwl


iconWarning

public static org.eclipse.swt.graphics.Image iconWarning
Some multiple used Icons in RSSOwl


iconWorld

public static org.eclipse.swt.graphics.Image iconWorld
Some multiple used Icons in RSSOwl


linkColor

public static org.eclipse.swt.graphics.Color linkColor
Make the linkColor accessible from all Objects


syntaxHighlightColor

public static org.eclipse.swt.graphics.Color syntaxHighlightColor
Make the syntaxHighlightColor accessible from all Objects


clazz

private static final Class clazz
Class required for Image loading


iconProgress0

private static org.eclipse.swt.graphics.Image iconProgress0
Some multiple used Icons in RSSOwl


iconProgress100

private static org.eclipse.swt.graphics.Image iconProgress100
Some multiple used Icons in RSSOwl


iconProgress20

private static org.eclipse.swt.graphics.Image iconProgress20
Some multiple used Icons in RSSOwl


iconProgress40

private static org.eclipse.swt.graphics.Image iconProgress40
Some multiple used Icons in RSSOwl


iconProgress60

private static org.eclipse.swt.graphics.Image iconProgress60
Some multiple used Icons in RSSOwl


iconProgress80

private static org.eclipse.swt.graphics.Image iconProgress80
Some multiple used Icons in RSSOwl

Constructor Detail

PaintShop

private PaintShop()
This utility class constructor is hidden

Method Detail

disposeIcons

public static void disposeIcons()
Dispose icons


getFilledImage

public static org.eclipse.swt.graphics.Image getFilledImage(org.eclipse.swt.widgets.Display display,
                                                            org.eclipse.swt.graphics.RGB color,
                                                            int width,
                                                            int height)
Fill an Image with a given color

Parameters:
display - The display as device for the color
color - The color to display
width - Width of the image
height - Height of the image
Returns:
Image Filled image

getLanguageFlag

public static org.eclipse.swt.graphics.Image getLanguageFlag(String locale,
                                                             Class curClass)
Get the correct flag for the given language. If a flag for the given language is not found, return the "unknown" flag.

Parameters:
locale - The language
curClass - Current class
Returns:
An image that displays the flag

getProgressIcon

public static org.eclipse.swt.graphics.Image getProgressIcon(int value)
Get the progress icon for the given value.

Parameters:
value - The value (20, 40, 60, 80, 100)
Returns:
Image The image of the progress bar

initIcons

public static void initIcons()
Initialize the multiple used icons


initLinkColor

public static void initLinkColor(org.eclipse.swt.widgets.Display display)
Set the color for the links

Parameters:
display - The display

initSyntaxHighlightColor

public static void initSyntaxHighlightColor(org.eclipse.swt.widgets.Display display)
Set the color for the syntaxhighlight

Parameters:
display - The display

isset

public static boolean isset(org.eclipse.swt.graphics.Image image)
Check the given Image for being NULL or disposed. Return false in that case.

Parameters:
image - The image to check
Returns:
boolean TRUE if the Image is available

loadImage

public static org.eclipse.swt.graphics.Image loadImage(String path)
Load an Image from the given Path using an InputStream that is closed after the Image has been loaded.

Parameters:
path - Path to the Image (must start with "/")
Returns:
Image The loaded Image or NULL

loadImage

public static org.eclipse.swt.graphics.Image loadImage(String path,
                                                       boolean hideOnMac)
Load an Image from the given Path using an InputStream that is closed after the Image has been loaded.

Parameters:
path - Path to the Image (must start with "/")
hideOnMac - If TRUE, hide the Image on Mac
Returns:
Image The loaded Image or NULL


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo