本文整理汇总了Java中org.opengis.util.InternationalString类的典型用法代码示例。如果您正苦于以下问题:Java InternationalString类的具体用法?Java InternationalString怎么用?Java InternationalString使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
InternationalString类属于org.opengis.util包,在下文中一共展示了InternationalString类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getListCellRendererComponent
import org.opengis.util.InternationalString; //导入依赖的package包/类
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
String text = null;
if (value != null) {
Style style = (Style) value;
InternationalString title = style.getDescription().getTitle();
if (title != null) {
text = title.toString();
}else {
text = "Default Styler";
}
}
label.setText(text);
return label;
}
示例2: ComplexTypeImpl
import org.opengis.util.InternationalString; //导入依赖的package包/类
public ComplexTypeImpl(
Name name, Collection<PropertyDescriptor> properties, boolean identified,
boolean isAbstract, List<Filter> restrictions, AttributeType superType,
InternationalString description
) {
super(name, Collection.class, identified, isAbstract, restrictions, superType, description);
List<PropertyDescriptor> localProperties;
Map<Name, PropertyDescriptor> localPropertyMap;
if (properties == null) {
localProperties = Collections.emptyList();
localPropertyMap = Collections.emptyMap();
} else {
localProperties = new ArrayList<PropertyDescriptor>(properties);
localPropertyMap = new HashMap<Name, PropertyDescriptor>();
for (PropertyDescriptor pd : properties) {
if( pd == null ){
// descriptor entry may be null if a request was made for a property that does not exist
throw new NullPointerException("PropertyDescriptor is null - did you request a property that does not exist?");
}
localPropertyMap.put(pd.getName(), pd);
}
}
this.properties = Collections.unmodifiableList(localProperties);
this.propertyMap = Collections.unmodifiableMap(localPropertyMap);
}
示例3: getPropertyDescriptorList
import org.opengis.util.InternationalString; //导入依赖的package包/类
/**
* Gets the property descriptor list.
*
* @return the property descriptor list
*/
public Collection<PropertyDescriptor> getPropertyDescriptorList() {
if (schema != null) {
return schema.getDescriptors();
} else {
if (geometryType == GeometryTypeEnum.RASTER) {
if (rasterPropertyDescriptorList == null) {
rasterPropertyDescriptorList = new ArrayList<PropertyDescriptor>();
CoordinateReferenceSystem crs = null;
boolean isIdentifiable = false;
boolean isAbstract = false;
List<Filter> restrictions = null;
AttributeType superType = null;
InternationalString description = null;
GeometryType type = featureTypeFactory.createGeometryType(
new NameImpl(rasterGeometryField), GridCoverage2D.class, crs,
isIdentifiable, isAbstract, restrictions, superType, description);
GeometryDescriptor descriptor = featureTypeFactory.createGeometryDescriptor(
type, new NameImpl(rasterGeometryField), 0, 1, false, null);
rasterPropertyDescriptorList.add(descriptor);
}
return rasterPropertyDescriptorList;
}
}
return null;
}
示例4: populateStandardData
import org.opengis.util.InternationalString; //导入依赖的package包/类
/**
* Populate standard data.
*
* @param standardData the standard data
*/
private void populateStandardData(StandardData standardData) {
Description description = standardData.description;
String titleString = "";
String descriptionString = "";
if (description != null) {
InternationalString title = description.getTitle();
if (title != null) {
titleString = title.toString();
}
InternationalString abstractDesc = description.getAbstract();
if (abstractDesc != null) {
descriptionString = abstractDesc.toString();
}
}
if (fieldConfigVisitor.getFieldConfig(FieldIdEnum.NAME) != null) {
fieldConfigVisitor.populateTextField(FieldIdEnum.NAME, standardData.name);
}
if (fieldConfigVisitor.getFieldConfig(FieldIdEnum.TITLE) != null) {
fieldConfigVisitor.populateTextField(FieldIdEnum.TITLE, titleString);
}
if (fieldConfigVisitor.getFieldConfig(FieldIdEnum.DESCRIPTION) != null) {
fieldConfigVisitor.populateTextField(FieldIdEnum.DESCRIPTION, descriptionString);
}
FieldConfigBase uomFieldConfig = fieldConfigManager.get(FieldIdEnum.UOM);
if (uomFieldConfig != null) {
uomFieldConfig.updateAttributeSelection(SelectedSymbol.getInstance().isRasterSymbol());
String uomString = UnitsOfMeasure.getInstance().convert(standardData.unit);
fieldConfigVisitor.populateField(FieldIdEnum.UOM,
getFilterFactory().literal(uomString));
}
}
示例5: getStandardData
import org.opengis.util.InternationalString; //导入依赖的package包/类
/**
* Gets the standard data.
*
* @return the standard data
*/
protected StandardData getStandardData() {
StandardData standardData = new StandardData();
if (fieldConfigVisitor.getFieldConfig(FieldIdEnum.NAME) != null) {
standardData.name = fieldConfigVisitor.getText(FieldIdEnum.NAME);
}
if ((fieldConfigVisitor.getFieldConfig(FieldIdEnum.TITLE) != null)
&& (fieldConfigVisitor.getFieldConfig(FieldIdEnum.DESCRIPTION) != null)) {
InternationalString titleString = Text
.text(fieldConfigVisitor.getText(FieldIdEnum.TITLE));
InternationalString descriptionString = Text
.text(fieldConfigVisitor.getText(FieldIdEnum.DESCRIPTION));
standardData.description = (Description) getStyleFactory().description(titleString,
descriptionString);
}
FieldConfigBase uomFieldConfig = fieldConfigManager.get(FieldIdEnum.UOM);
if (uomFieldConfig != null) {
Expression uomExpression = fieldConfigVisitor.getExpression(FieldIdEnum.UOM);
String uomString = "";
if (uomExpression instanceof LiteralExpressionImpl) {
uomString = (String) ((LiteralExpressionImpl) uomExpression).getValue();
} else {
if (uomExpression != null) {
ConsoleManager.getInstance().error(this,
Localisation.getString(StandardPanel.class,
"StandardPanel.unsupportedUOM")
+ uomExpression.getClass().getName());
}
}
standardData.unit = UnitsOfMeasure.getInstance().convert(uomString);
}
return standardData;
}
示例6: beginTask
import org.opengis.util.InternationalString; //导入依赖的package包/类
public void beginTask( String name, int totalWork ) {
this.totalWork = totalWork;
runningWork = 0;
geotoolsMonitor.started();
InternationalString iName = new SimpleInternationalString(name);
geotoolsMonitor.setTask(iName);
}
示例7: getListCellRendererComponent
import org.opengis.util.InternationalString; //导入依赖的package包/类
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
String text = null;
if (value != null) {
StyleImpl style = (StyleImpl) value;
InternationalString title = style.getTitle();
text = title.toString();
}
label.setText(text);
return label;
}
示例8: examleText
import org.opengis.util.InternationalString; //导入依赖的package包/类
private void examleText() throws Exception {
// exampleText start
InternationalString greeting;
// simple text place holder
greeting = Text.text("hello world");
// translated text for an internationalized application
// useful as message.properties, message_fr.properties etc can be translated
// outside of your application
greeting = Text.text("greeting", "message.properties");
// the next method is good for quickly doing things as a developer
Map<String,String> translations = new HashMap<String,String>();
translations.put("greeting", "Hello World");
translations.put( "greeting_it", "ciao mondo");
greeting = Text.text("greeting", translations );
// you can actually use the same map to configure several international strings
// (each string will only pick up the entries with a matching key)
//
// With that in mind we make a special effort to allow you to use properties
Properties properties = new Properties();
properties.load( new FileInputStream("message.properties") );
InternationalString title = Text.text( "title", properties );
InternationalString description = Text.text( "description", properties );
// exampleText end
}
示例9: getCategoryNames
import org.opengis.util.InternationalString; //导入依赖的package包/类
@Override
public InternationalString[] getCategoryNames()
throws IllegalStateException {
return new InternationalString[] {
SimpleInternationalString.wrap("Background")
};
}
示例10: PropertyTypeImpl
import org.opengis.util.InternationalString; //导入依赖的package包/类
public PropertyTypeImpl(
Name name, Class<?> binding, boolean isAbstract, List<Filter> restrictions,
PropertyType superType, InternationalString description
) {
if(name== null){
throw new NullPointerException("Name is required for PropertyType");
}
if(binding == null) {
if( superType != null && superType.getBinding() != null){
// FIXME: This should be optional as the superType may have the required information?
throw new NullPointerException("Binding to a Java class, did you mean to bind to "+superType.getBinding());
}
throw new NullPointerException("Binding to a Java class is required");
}
this.name = name;
this.binding = binding;
this.isAbstract = isAbstract;
if (restrictions == null) {
this.restrictions = NO_RESTRICTIONS;
} else {
this.restrictions = Collections.unmodifiableList(restrictions);
}
this.superType = superType;
this.description = description;
this.userData = new HashMap<Object,Object>();
}
示例11: AttributeTypeImpl
import org.opengis.util.InternationalString; //导入依赖的package包/类
public AttributeTypeImpl(
Name name, Class<?> binding, boolean identified, boolean isAbstract,
List<Filter> restrictions, AttributeType superType, InternationalString description
) {
super(name, binding, isAbstract, restrictions, superType, description);
this.identified = identified;
}
示例12: GeometryTypeImpl
import org.opengis.util.InternationalString; //导入依赖的package包/类
public GeometryTypeImpl(
Name name, Class binding, CoordinateReferenceSystem crs,
boolean identified, boolean isAbstract, List<Filter> restrictions,
AttributeType superType, InternationalString description
) {
super(name, binding, identified, isAbstract, restrictions, superType, description);
CRS = crs;
}
示例13: getRemarks
import org.opengis.util.InternationalString; //导入依赖的package包/类
public InternationalString getRemarks() {
throw new UnsupportedOperationException();
}
示例14: setTask
import org.opengis.util.InternationalString; //导入依赖的package包/类
public void setTask( InternationalString task ) {
setDescription(task.toString());
}
示例15: getTask
import org.opengis.util.InternationalString; //导入依赖的package包/类
public InternationalString getTask() {
return new SimpleInternationalString(getDescription());
}