Package com.e1c.langtool.flags.ui
Class SharedImages
java.lang.Object
com.e1c.langtool.flags.ui.SharedImages
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<String>Gets the available country codes of ISO-3166 standard with flags.static org.eclipse.swt.graphics.ImagegetCountryFlagImage(String countryCode) Retrieves the specified image from the flags ui plugin's image registry.static org.eclipse.swt.graphics.ImageRetrieves the specified image from the flags ui plugin's image registry.static org.eclipse.jface.resource.ImageDescriptorgetImageDescriptor(String symbolicName) Retrieves the image descriptor for specified image from the flags ui plugin's image registry.static Collection<String>Gets the language codes for languages that has an origin according ISO-639-1 Standard.static org.eclipse.swt.graphics.ImagegetLanguageFlagImage(String languageCode) Retrieves the specified image from the flags ui plugin's image registry.static org.eclipse.swt.graphics.ImagegetLanguageFlagImage(org.eclipse.core.resources.IProject project, String languageCode) Retrieves the specified image from the flags ui plugin's image registry according the project's settings.static org.eclipse.jface.resource.ImageDescriptorgetLanguageFlagImageDescriptor(org.eclipse.core.resources.IProject project, String languageCode) Retrieves the image descriptor for specified image from the flags ui plugin's image registry according the project's settings.static voidinitializeImageRegistry(org.eclipse.jface.resource.ImageRegistry reg)
-
Field Details
-
IMG_OBJ16_DEFAULT
- See Also:
-
-
Constructor Details
-
SharedImages
public SharedImages()
-
-
Method Details
-
initializeImageRegistry
public static void initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry reg) -
getCountryCodes
Gets the available country codes of ISO-3166 standard with flags. Codes are in Upper case.- Returns:
- the country codes, nevere returns
null.
-
getLanguageCodes
Gets the language codes for languages that has an origin according ISO-639-1 Standard.- Returns:
- the language codes
-
getLanguageFlagImage
public static org.eclipse.swt.graphics.Image getLanguageFlagImage(org.eclipse.core.resources.IProject project, String languageCode) Retrieves the specified image from the flags ui plugin's image registry according the project's settings. Note: The returnedImageis managed by the workbench; clients must not dispose of the returned image.- Parameters:
project- the project which has specific settings of mapping language code and coutry codelanguageCode- the language code of the image- Returns:
- the image, or
IMG_OBJ16_DEFAULTdefault image if not found, never returnsnull
-
getLanguageFlagImageDescriptor
public static org.eclipse.jface.resource.ImageDescriptor getLanguageFlagImageDescriptor(org.eclipse.core.resources.IProject project, String languageCode) Retrieves the image descriptor for specified image from the flags ui plugin's image registry according the project's settings. UnlikeImages, image descriptors themselves do not need to be disposed.- Parameters:
project- the project which has specific settings of mapping language code and coutry codelanguageCode- the language code- Returns:
- the image descriptor, or
IMG_OBJ16_DEFAULTdefault image if not found, never returnsnull
-
getLanguageFlagImage
Retrieves the specified image from the flags ui plugin's image registry. Note: The returnedImageis managed by the workbench; clients must not dispose of the returned image.- Parameters:
languageCode- the language code of the image- Returns:
- the image, or
IMG_OBJ16_DEFAULTdefault image if not found, never returnsnull - See Also:
-
getCountryFlagImage
Retrieves the specified image from the flags ui plugin's image registry. Note: The returnedImageis managed by the workbench; clients must not dispose of the returned image.- Parameters:
countryCode- the country code of the image, the code should be in upper case, according to ISO-3166 standard- Returns:
- the image, or
IMG_OBJ16_DEFAULTdefault image if not found, never returnsnull - See Also:
-
getImage
Retrieves the specified image from the flags ui plugin's image registry. Note: The returnedImageis managed by the workbench; clients must not dispose of the returned image.- Parameters:
symbolicName- the symbolic name of the image. UseIMG_OBJ16_DEFAULTas symbolic name or callgetCountryFlagImage(String),getLanguageFlagImage(String),getLanguageFlagImage(IProject, String)instead.- Returns:
- the image, or returns
nullimage if not found - See Also:
-
getImageDescriptor
Retrieves the image descriptor for specified image from the flags ui plugin's image registry. UnlikeImages, image descriptors themselves do not need to be disposed.- Parameters:
symbolicName- the symbolic name of the image; there are constants declared in this interface for build-in images that come with the workbench- Returns:
- the image descriptor, or
IMG_OBJ16_DEFAULTdefault image if not found, never returnsnull
-