Package net.sourceforge.jiu.apps

# Class Strings

java.lang.Object
net.sourceforge.jiu.apps.Strings

All Implemented Interfaces:
  `StringIndexConstants`

public class Strings extends Object implements StringIndexConstants
String resource for the various apps. Each index value from `StringIndexConstants` has a corresponding String value for all supported natural languages.

Author:
  Marco Schmidt

## Field Summary

Fields
Modifier and Type
Field
Description
`private String[]`
`data`
`static final Integer`
`DEFAULT_LANGUAGE`
Constant of the default language, `LANG_ENGLISH`.
`static final String`
`DEFAULT_LANGUAGE_ISO_639_CODE`
The ISO 639 code for the default language `DEFAULT_LANGUAGE`.
`private static final String[]`
`ISO_639_LANGUAGE_CODES`
ISO 639 two-letter country codes for the supported languages, lower case.
`private static Hashtable`
`isoToConstant`
A hashtable that maps from ISO 639 country codes to Integer objects with the corresponding LANG_xyz constant for that language.
`static final Integer`
`LANG_ENGLISH`
Constant int value for the natural language English.
`static final Integer`
`LANG_FRENCH`
Constant int value for the natural language French.
`static final Integer`
`LANG_GERMAN`
Constant int value for the natural language German.
`static final Integer`
`LANG_SPANISH`
Constant int value for the natural language Spanish.
`private Integer`
`language`
`private static final Integer[]`
`LANGUAGE_CONSTANTS`

### Fields inherited from interface net.sourceforge.jiu.apps.StringIndexConstants

`ABOUT, ADJUST, ADJUST_BRIGHTNESS, ADJUST_CONTRAST, ADJUST_GAMMA, ADJUST_HUE_SATURATION_AND_VALUE, ALGORITHMS_NONE, APPLY_MAXIMUM_FILTER, APPLY_MEAN_FILTER, APPLY_MEDIAN_FILTER, APPLY_MINIMUM_FILTER, APPLY_OIL_FILTER, BILEVEL, BITS_PER_PIXEL, BLUR, BOTTOM_ROW, BRIGHTNESS_MENU_ITEM, BURKES_ERROR_DIFFUSION, CANCEL, CHOOSE_DITHERING_METHOD, CHOOSE_PALETTE_TYPE, CLOSE, CLOSE_FILE, COLOR, COLOR_IMAGE_QUANTIZATION, CONTOUR_REMOVAL, CONTOUR_REMOVAL_NUM_PASSES, CONTOUR_REMOVAL_TAU, CONTRAST, CONTRAST_MENU_ITEM, CONVERT_TO_GRAYSCALE, CONVERT_TO_MINIMUM_COLOR_TYPE_MENU_ITEM, CORRELATION, COULD_NOT_CREATE_HISTOGRAM, COUNT_COLORS_USED, CPU_ENDIANNESS, CPU_ISALIST, CROP_IMAGE, CROP_MENU_ITEM, DISK_SPACE, DISSIMILARITY, DITHERING_METHOD, DITHERING_NONE, DO_YOU_REALLY_WANT_TO_CLOSE_WITHOUT_SAVING, DO_YOU_REALLY_WANT_TO_QUIT_WITHOUT_SAVING, EDGE_DETECTION, EDIT, EDIT_REDO, EDIT_UNDO, EMBOSS, ENERGY, ENTER_BRIGHTNESS_VALUE, ENTER_CONTRAST_VALUE, ENTER_GAMMA_VALUE, ENTER_THRESHOLD_VALUE, ENTER_WINDOW_SIZE, ENTROPY, EQUALIZE_HISTOGRAM_MENU_ITEM, ERROR_DIFFUSION, ERROR_LOADING_IMAGE, ERROR_MESSAGE, ERROR_NO_MORE_THAN_8_BITS, EXIT, FEEDBACK, FILE, FILE_FORMAT_UNKNOWN, FILTERS, FLIP, FLOYD_STEINBERG_ERROR_DIFFUSION, FREE_MEMORY, GAMMA_MENU_ITEM, GIF, GRAYSCALE, HELP, HISTOGRAM, HOMEPAGE, HOMOGENEITY, HORIZONTAL_PREWITT, HORIZONTAL_SOBEL, HUE, HUE_SATURATION_VALUE_MENU_ITEM, IMAGE_1, IMAGE_TYPE, IMAGE_TYPE_UNKNOWN, INVERT, JARVIS_JUDICE_NINKE_ERROR_DIFFUSION, LEFT_COLUMN, LITHOGRAPH, LOAD_IMAGE_FILE, LOAD_PALETTE, MAINTAIN_ASPECT_RATIO, MAP_TO_ARBITRARY_PALETTE, MAP_TO_ARBITRARY_PALETTE_MENU_ITEM, MAXIMUM_COLOR_DISTANCE, MAXIMUM_FILTER_MENU_ITEM, MEAN_FILTER_MENU_ITEM, MEDIAN_CUT, MEDIAN_CUT_COLOR_QUANTIZATION, MEDIAN_CUT_CONTOUR_REMOVAL, MEDIAN_FILTER_MENU_ITEM, MEMORY, METHOD, METHOD_REPR_COLOR, METHOD_REPR_COLOR_AVERAGE, METHOD_REPR_COLOR_MEDIAN, METHOD_REPR_COLOR_WEIGHTED_AVERAGE, MINIMUM_FILTER_MENU_ITEM, MIRROR, NEW_HEIGHT, NEW_WIDTH, NO, NORMALIZE_HISTOGRAM_MENU_ITEM, NUM_COLORS, NUMBER_OF_BITS, NUMBER_OF_BITS_BLUE, NUMBER_OF_BITS_GREEN, NUMBER_OF_BITS_RED, NUMBER_OF_COLORS_SMALL_ENOUGH, NUMBER_OF_SHADES_OF_GRAY, NUMBER_OF_USED_COLORS, OCTREE_COLOR_QUANTIZATION, OCTREE_COLOR_QUANTIZATION_MENU_ITEM, OIL_FILTER_MENU_ITEM, OK, OPEN, ORDERED_DITHERING, OUTPUT_COLOR_TYPE, OUTPUT_COLOR_TYPE_PALETTED, OUTPUT_COLOR_TYPE_RGB, OUTPUT_QUALITY_IMPROVEMENT_ALGORITHM, PALETTE_FROM_FILE, PALETTE_MENU_ITEM, PALETTE_PALM_16_COLORS, PALETTE_PALM_16_GRAY, PALETTE_PALM_256_COLORS, PALETTE_PALM_4_GRAY, PALETTE_SAVE_AS_MENU_ITEM, PALETTED, PALM, PIXELS, PORTABLE_BITMAP, PORTABLE_GRAYMAP, PORTABLE_NETWORK_GRAPHICS, PORTABLE_PIXMAP, PROMOTE, PROMOTE_TO_GRAY16, PROMOTE_TO_GRAY8, PROMOTE_TO_PALETTED, PROMOTE_TO_RGB, PROMOTE_TO_RGB24, PROMOTE_TO_RGB48, PROPERTY_JAVA_CLASS_PATH, PROPERTY_JAVA_CLASS_VERSION, PROPERTY_JAVA_HOME, PROPERTY_JAVA_SPECIFICATION_NAME, PROPERTY_JAVA_SPECIFICATION_VENDOR, PROPERTY_JAVA_SPECIFICATION_VERSION, PROPERTY_JAVA_VENDOR, PROPERTY_JAVA_VENDOR_URL, PROPERTY_JAVA_VERSION, PROPERTY_JAVA_VM_NAME, PROPERTY_JAVA_VM_SPECIFICATION_NAME, PROPERTY_JAVA_VM_SPECIFICATION_VENDOR, PROPERTY_JAVA_VM_SPECIFICATION_VERSION, PROPERTY_JAVA_VM_VENDOR, PROPERTY_JAVA_VM_VERSION, PROPERTY_OS_ARCH, PROPERTY_OS_NAME, PROPERTY_OS_VERSION, PSYCHEDELIC_DISTILLATION, QUIT_PROGRAM, REDUCE, REDUCE_NUMBER_OF_SHADES_OF_GRAY, REDUCE_NUMBER_OF_SHADES_OF_GRAY_MENU_ITEM, REDUCE_TO_BILEVEL_ORDERED_DITHERING, REDUCE_TO_BILEVEL_THRESHOLD, REDUCE_TO_BILEVEL_THRESHOLD_MENU_ITEM, RGB_TRUECOLOR, RIGHT_COLUMN, ROTATE_180, ROTATE_90_LEFT, ROTATE_90_RIGHT, ROTATE_OTHER, SATURATION, SAVE_AS, SAVE_COOCCURRENCE_FREQUENCY_MATRIX, SAVE_COOCCURRENCE_FREQUENCY_MATRIX_MENU_ITEM, SAVE_COOCCURRENCE_MATRIX, SAVE_COOCCURRENCE_MATRIX_MENU_ITEM, SAVE_HISTOGRAM_AS, SAVE_HISTOGRAM_AS_MENU_ITEM, SAVE_IMAGE_AS, SAVE_PALETTE, SAVEAS, SCALE, SCALE_IMAGE, SCREEN_RESOLUTION, SET_HUE, SHARPEN, SHEAR_ENTER_ANGLE, SHEAR_IMAGE, SHEAR_MENU_ITEM, SIERRA_ERROR_DIFFUSION, STEVENSON_ARCE_ERROR_DIFFUSION, STUCKI_ERROR_DIFFUSION, SUN_RASTER, SYSTEM, SYSTEM_INFORMATION, TEXTURE_PROPERTIES, TEXTURE_PROPERTIES_MENU_ITEM, TOP_ROW, TOTAL_MEMORY, TOTAL_NUMBER_OF_BITS_AND_COLORS, TRANSFORMATIONS, UNIFORM_PALETTE_COLOR_QUANTIZATION, UNIFORM_PALETTE_COLOR_QUANTIZATION_MENU_ITEM, USED_MEMORY, VALUE, VERTICAL_PREWITT, VERTICAL_SOBEL, VIEW, VIEW_INTERPOLATIONTYPE, VIEW_INTERPOLATIONTYPE_BICUBIC, VIEW_INTERPOLATIONTYPE_BILINEAR, VIEW_INTERPOLATIONTYPE_NEARESTNEIGHBOR, VIEW_SETORIGINALSIZE, VIEW_ZOOMIN, VIEW_ZOOMOUT, WEBSAFE_PALETTE, WINDOW_HEIGHT, WINDOW_WIDTH, WINDOWS_BITMAP, YES`

## Constructor Summary

Constructors
Constructor
Description
`Strings(Integer languageConstant, String[] stringValues)`
Create a new String object for the given language and fill it with the String array.

## Method Summary

Modifier and Type
Method
Description
`static String`
`determineIsoCodeFromDefaultLocale()`
`static String`
`determineSuitableIsoCode()`
Determines an ISO 639 code of a language suitable for the environment in which the JVM is currently running.
`static Integer`
`findLanguageCode(String iso639LanguageCode)`
`String`
`get(int index)`
Gets the String denoted by the argument index.
`static String`
`getFileName(int languageCode)`
`Integer`
`getLanguage()`
Returns the language of this object as one of the LANG_xyz constants of this class.
`void`
`set(Integer languageConstant, String[] values)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### LANG_ENGLISH

public static final Integer LANG_ENGLISH
Constant int value for the natural language English.

### LANG_GERMAN

public static final Integer LANG_GERMAN
Constant int value for the natural language German.

### LANG_SPANISH

public static final Integer LANG_SPANISH
Constant int value for the natural language Spanish.

### LANG_FRENCH

public static final Integer LANG_FRENCH
Constant int value for the natural language French.

### DEFAULT_LANGUAGE

public static final Integer DEFAULT_LANGUAGE
Constant of the default language, `LANG_ENGLISH`.

### ISO_639_LANGUAGE_CODES

private static final String[] ISO_639_LANGUAGE_CODES
ISO 639 two-letter country codes for the supported languages, lower case.

### LANGUAGE_CONSTANTS

private static final Integer[] LANGUAGE_CONSTANTS

### DEFAULT_LANGUAGE_ISO_639_CODE

public static final String DEFAULT_LANGUAGE_ISO_639_CODE
The ISO 639 code for the default language `DEFAULT_LANGUAGE`.

### isoToConstant

private static Hashtable isoToConstant
A hashtable that maps from ISO 639 country codes to Integer objects with the corresponding LANG_xyz constant for that language.

### data

private String[] data

### language

private Integer language

## Constructor Details

### Strings

public Strings(Integer languageConstant, String[] stringValues)
Create a new String object for the given language and fill it with the String array.

## Method Details

### determineSuitableIsoCode

public static String determineSuitableIsoCode()
Determines an ISO 639 code of a language suitable for the environment in which the JVM is currently running. First calls `determineIsoCodeFromDefaultLocale()`. If that yields null, the ISO code for `DEFAULT_LANGUAGE` is returned. So different from `determineIsoCodeFromDefaultLocale()` this method always returns a non-null value.

Returns:
  String with ISO 639 code of a language that fits the JVM environment, or the default language as fallback solution

### determineIsoCodeFromDefaultLocale

public static String determineIsoCodeFromDefaultLocale()

### findLanguageCode

public static Integer findLanguageCode(String iso639LanguageCode)

### get

public String get(int index)
Gets the String denoted by the argument index. This index must be one of the int constants defined in `StringIndexConstants`.

Returns:
  String with given index in the current language
Throws:
  `IllegalArgumentException` - is not a valid index from `StringIndexConstants`

### getLanguage

public Integer getLanguage()
Returns the language of this object as one of the LANG_xyz constants of this class.

### getFileName

public static String getFileName(int languageCode)

### set

public void set(Integer languageConstant, String[] values)