當前位置: 首頁>>代碼示例>>Java>>正文


Java Localized類代碼示例

本文整理匯總了Java中it.albertus.util.Localized的典型用法代碼示例。如果您正苦於以下問題:Java Localized類的具體用法?Java Localized怎麽用?Java Localized使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Localized類屬於it.albertus.util包,在下文中一共展示了Localized類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getLanguageComboOptions

import it.albertus.util.Localized; //導入依賴的package包/類
public static LocalizedLabelsAndValues getLanguageComboOptions() {
	final Language[] values = Messages.Language.values();
	final LocalizedLabelsAndValues options = new LocalizedLabelsAndValues(values.length);
	for (final Language language : values) {
		final Locale locale = language.getLocale();
		final String value = locale.getLanguage();
		final Localized name = new Localized() {
			@Override
			public String getString() {
				return locale.getDisplayLanguage(locale);
			}
		};
		options.add(name, value);
	}
	return options;
}
 
開發者ID:Albertus82,項目名稱:RouterLogger,代碼行數:17,代碼來源:GeneralPreferencePage.java

示例2: updateTexts

import it.albertus.util.Localized; //導入依賴的package包/類
public void updateTexts() {
	final Table table = tableViewer.getTable();
	for (final Entry<Integer, Localized> e : labelsMap.entrySet()) {
		table.getColumn(e.getKey()).setText(e.getValue().getString());
	}
	contextMenu.updateTexts();
}
 
開發者ID:Albertus82,項目名稱:EarthquakeBulletin,代碼行數:8,代碼來源:ResultsTable.java

示例3: getSeparatorComboOptions

import it.albertus.util.Localized; //導入依賴的package包/類
public static LocalizedLabelsAndValues getSeparatorComboOptions() {
	final Separator[] values = Separator.values();
	final LocalizedLabelsAndValues options = new LocalizedLabelsAndValues(values.length);
	for (final Separator separator : values) {
		final String value = separator.value;
		final Localized name = new Localized() {
			@Override
			public String getString() {
				return Messages.get(separator.resourceKey);
			}
		};
		options.add(name, value);
	}
	return options;
}
 
開發者ID:Albertus82,項目名稱:RouterLogger,代碼行數:16,代碼來源:CsvPreferencePage.java

示例4: getReaderComboOptions

import it.albertus.util.Localized; //導入依賴的package包/類
public static LocalizedLabelsAndValues getReaderComboOptions() {
	final ReaderComboData[] values = ReaderComboData.values();
	final LocalizedLabelsAndValues options = new LocalizedLabelsAndValues(values.length);
	for (final ReaderComboData comboData : values) {
		final String value = comboData.readerClass.getSimpleName();
		final Localized name = new Localized() {
			@Override
			public String getString() {
				return Messages.get(comboData.resourceKey);
			}
		};
		options.add(name, value);
	}
	return options;
}
 
開發者ID:Albertus82,項目名稱:RouterLogger,代碼行數:16,代碼來源:ReaderPreferencePage.java

示例5: getMqttQosComboOptions

import it.albertus.util.Localized; //導入依賴的package包/類
public static LocalizedLabelsAndValues getMqttQosComboOptions() {
	final MqttQos[] values = MqttQos.values();
	final LocalizedLabelsAndValues options = new LocalizedLabelsAndValues(values.length);
	for (final MqttQos qos : values) {
		final byte value = qos.getValue();
		final Localized name = new Localized() {
			@Override
			public String getString() {
				return qos.getDescription();
			}
		};
		options.add(name, value);
	}
	return options;
}
 
開發者ID:Albertus82,項目名稱:RouterLogger,代碼行數:16,代碼來源:MqttPreferencePage.java

示例6: getWriterComboOptions

import it.albertus.util.Localized; //導入依賴的package包/類
public static LocalizedLabelsAndValues getWriterComboOptions() {
	final WriterComboData[] values = WriterComboData.values();
	final LocalizedLabelsAndValues options = new LocalizedLabelsAndValues(values.length);
	for (final WriterComboData comboData : values) {
		final String value = comboData.writerClass.getSimpleName();
		final Localized name = new Localized() {
			@Override
			public String getString() {
				return Messages.get(comboData.resourceKey);
			}
		};
		options.add(name, value);
	}
	return options;
}
 
開發者ID:Albertus82,項目名稱:RouterLogger,代碼行數:16,代碼來源:WriterPreferencePage.java

示例7: ControlValidatorDecoration

import it.albertus.util.Localized; //導入依賴的package包/類
public ControlValidatorDecoration(final ControlValidator<?> validator, final String message) {
	this(validator, new Localized() {
		@Override
		public String getString() {
			return message;
		}
	});
}
 
開發者ID:Albertus82,項目名稱:JFaceUtils,代碼行數:9,代碼來源:ControlValidatorDecoration.java

示例8: directoryDialogMessage

import it.albertus.util.Localized; //導入依賴的package包/類
public FieldEditorDetailsBuilder directoryDialogMessage(final String dialogMessage) {
	this.directoryDialogMessage = new Localized() {
		@Override
		public String getString() {
			return dialogMessage;
		}
	};
	return this;
}
 
開發者ID:Albertus82,項目名稱:JFaceUtils,代碼行數:10,代碼來源:FieldEditorDetails.java

示例9: SearchFormControlValidatorDecoration

import it.albertus.util.Localized; //導入依賴的package包/類
public SearchFormControlValidatorDecoration(final ControlValidator<?> validator, final Localized message) {
	super(validator, message);
}
 
開發者ID:Albertus82,項目名稱:EarthquakeBulletin,代碼行數:4,代碼來源:SearchFormControlValidatorDecoration.java


注:本文中的it.albertus.util.Localized類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。