net.sourceforge.rssowl.util.shop
Class PaintShop

java.lang.Object
  extended by net.sourceforge.rssowl.util.shop.PaintShop

public class PaintShop
extends java.lang.Object

Factory class for some Paint / Icon concerns in RSSOwl

Version:
1.2.4
Author:
Benjamin Pasero

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

Field Detail

grayToolBarColor

public static Color grayToolBarColor
Gray ToolBar color


grayViewFormColor

public static Color grayViewFormColor
Gray ViewForm color


iconAddBlogroll

public static Image iconAddBlogroll
Some multiple used Icons in RSSOwl


iconAddCategory

public static Image iconAddCategory
Some multiple used Icons in RSSOwl


iconAddToFavorites

public static Image iconAddToFavorites
Some multiple used Icons in RSSOwl


iconBackward

public static Image iconBackward
Some multiple used Icons in RSSOwl


iconBlueStripes

public static Image iconBlueStripes
Some multiple used Icons in RSSOwl


iconCancelOperation

public static Image iconCancelOperation
Some multiple used Icons in RSSOwl


iconCancelOperationDisabled

public static Image iconCancelOperationDisabled
Some multiple used Icons in RSSOwl


iconCopy

public static Image iconCopy
Some multiple used Icons in RSSOwl


iconChecked

public static Image iconChecked
Some multiple used Icons in RSSOwl


iconDelete

public static Image iconDelete
Some multiple used Icons in RSSOwl


iconError

public static Image iconError
Some multiple used Icons in RSSOwl


iconErrorLense

public static Image iconErrorLense
Some multiple used Icons in RSSOwl


iconExport

public static Image iconExport
Some multiple used Icons in RSSOwl


iconExportOpml

public static Image iconExportOpml
Some multiple used Icons in RSSOwl


iconFeedDiscovery

public static Image iconFeedDiscovery
Some multiple used Icons in RSSOwl


iconFind

public static Image iconFind
Some multiple used Icons in RSSOwl


iconFolder

public static Image iconFolder
Some multiple used Icons in RSSOwl


iconFolderSubscribe

public static Image iconFolderSubscribe
Some multiple used Icons in RSSOwl


iconFolderSubscribeUnread

public static Image iconFolderSubscribeUnread
Some multiple used Icons in RSSOwl


iconFolderUnread

public static Image iconFolderUnread
Some multiple used Icons in RSSOwl


iconForward

public static Image iconForward
Some multiple used Icons in RSSOwl


iconHTML

public static Image iconHTML
Some multiple used Icons in RSSOwl


iconImport

public static Image iconImport
Some multiple used Icons in RSSOwl


iconImportOpml

public static Image iconImportOpml
Some multiple used Icons in RSSOwl


iconInfo

public static Image iconInfo
Some multiple used Icons in RSSOwl


iconLense

public static Image iconLense
Some multiple used Icons in RSSOwl


iconLenseUnread

public static Image iconLenseUnread
Some multiple used Icons in RSSOwl


iconMail

public static Image iconMail
Some multiple used Icons in RSSOwl


iconNew

public static Image iconNew
Some multiple used Icons in RSSOwl


iconNotRated

public static Image iconNotRated
Some multiple used Icons in RSSOwl


iconOwl

public static Image[] iconOwl
Some multiple used Icons in RSSOwl


iconPDF

public static Image iconPDF
Some multiple used Icons in RSSOwl


iconPrint

public static Image iconPrint
Some multiple used Icons in RSSOwl


iconRateSuccess

public static Image iconRateSuccess
Some multiple used Icons in RSSOwl


iconRead

public static Image iconRead
Some multiple used Icons in RSSOwl


iconReload

public static Image iconReload
Some multiple used Icons in RSSOwl


iconReloadBrowser

public static Image iconReloadBrowser
Some multiple used Icons in RSSOwl


iconRTF

public static Image iconRTF
Some multiple used Icons in RSSOwl


iconSearch

public static Image iconSearch
Some multiple used Icons in RSSOwl


iconSkip

public static Image iconSkip
Some multiple used Icons in RSSOwl


iconSkipDisabled

public static Image iconSkipDisabled
Some multiple used Icons in RSSOwl


iconStop

public static Image iconStop
Some multiple used Icons in RSSOwl


iconSubCategory

public static Image iconSubCategory
Some multiple used Icons in RSSOwl


iconUnread

public static Image iconUnread
Some multiple used Icons in RSSOwl


iconValidate

public static Image iconValidate
Some multiple used Icons in RSSOwl


iconWarning

public static Image iconWarning
Some multiple used Icons in RSSOwl


iconWorld

public static Image iconWorld
Some multiple used Icons in RSSOwl


linkColor

public static Color linkColor
Make the linkColor accessible from all Objects


syntaxHighlightColor

public static Color syntaxHighlightColor
Make the syntaxHighlightColor accessible from all Objects


viewFormBorderInsideColor

public static Color viewFormBorderInsideColor
First Border Color of ViewForm


viewFormBorderMiddleColor

public static Color viewFormBorderMiddleColor
Second Border Color of ViewForm


viewFormBorderOutsideColor

public static Color viewFormBorderOutsideColor
Third Border Color of ViewForm


clazz

private static final java.lang.Class clazz
Class required for Image loading


iconProgress0

private static Image iconProgress0
Some multiple used Icons in RSSOwl


iconProgress100

private static Image iconProgress100
Some multiple used Icons in RSSOwl


iconProgress20

private static Image iconProgress20
Some multiple used Icons in RSSOwl


iconProgress40

private static Image iconProgress40
Some multiple used Icons in RSSOwl


iconProgress60

private static Image iconProgress60
Some multiple used Icons in RSSOwl


iconProgress80

private static 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 Image getFilledImage(Display display,
                                   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 Image getLanguageFlag(java.lang.String locale,
                                    java.lang.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 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

initColors

public static void initColors()
Initialize the multiple used colors


initIcons

public static void initIcons()
Initialize the multiple used icons


initLinkColor

public static void initLinkColor(Display display)
Set the color for the links

Parameters:
display - The display

initSyntaxHighlightColor

public static void initSyntaxHighlightColor(Display display)
Set the color for the syntaxhighlight

Parameters:
display - The display

isset

public static boolean isset(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 Image loadImage(java.lang.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 Image loadImage(java.lang.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

sizeTo

public static Image sizeTo(Display display,
                           Image src,
                           int width,
                           int height,
                           boolean disposeSrc)
Takes the given Image and creates a new one with the given Size. The new Image is not a scaled version of the source Image, only a clipped one.

Parameters:
display - The display as device for the image.
src - The source Image to resize.
width - The width of the new Image.
height - The height of the new Image.
disposeSrc - If TRUE, dispose the source Image.
Returns:
Image The resized Image.


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo