本文整理汇总了Java中org.opengis.filter.expression.Expression.toString方法的典型用法代码示例。如果您正苦于以下问题:Java Expression.toString方法的具体用法?Java Expression.toString怎么用?Java Expression.toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opengis.filter.expression.Expression
的用法示例。
在下文中一共展示了Expression.toString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIntColour
import org.opengis.filter.expression.Expression; //导入方法依赖的package包/类
/**
* Gets the colour as an int value, i.e remove '#' symbol and
* convert the remaining hex values as a decimal.
* <p>Returns 0 if colourExpression is null.
*
* @param colourExpression the colour expression
* @return the int colour value
*/
public static int getIntColour(Expression colourExpression)
{
if(colourExpression == null)
{
return 0;
}
String tmpColour = colourExpression.toString();
if(tmpColour.startsWith("#"))
{
tmpColour = colourExpression.toString().substring(1);
}
int colour = Integer.parseInt(tmpColour, 16);
return colour;
}
示例2: updateSymbol
import org.opengis.filter.expression.Expression; //导入方法依赖的package包/类
/**
* Update symbol.
*/
private void updateSymbol() {
if (!Controller.getInstance().isPopulating()) {
Expression expression = fieldConfigVisitor.getExpression(FieldIdEnum.EXTERNAL_GRAPHIC);
if (!lastURLValue.equals(expression.toString())) {
externalURL = parseString(expression.toString());
lastURLValue = expression.toString();
UndoManager.getInstance().addUndoEvent(new UndoEvent(this,
FieldIdEnum.EXTERNAL_GRAPHIC, oldValueObj, externalURL));
oldValueObj = externalURL;
}
if (parentObj != null) {
parentObj.externalGraphicValueUpdated();
}
}
}
示例3: getIntColour
import org.opengis.filter.expression.Expression; //导入方法依赖的package包/类
/**
* Gets the colour as an int value, i.e remove '#' symbol and convert
* the remaining hex values as a decimal.
*
* <p>Returns 0 if colourExpression is null.
*
* @param colourExpression the colour expression
* @return the int colour value
*/
public static int getIntColour(Expression colourExpression) {
if (colourExpression == null) {
return 0;
}
String tmpColour = colourExpression.toString();
if (tmpColour.startsWith("#")) {
tmpColour = colourExpression.toString().substring(1);
}
int colour = Integer.parseInt(tmpColour, 16);
return colour;
}
示例4: populateExpression
import org.opengis.filter.expression.Expression; //导入方法依赖的package包/类
/**
* Populate expression.
*
* @param expression the expression
*/
public void populateExpression(Expression expression) {
this.storedExpression = expression;
String expressionString = "";
if (expression != null) {
expressionString = expression.toString();
}
expressionTextField.setText(expressionString);
}
示例5: getExpression
import org.opengis.filter.expression.Expression; //导入方法依赖的package包/类
/**
* Gets the expression as a string, if a null expression is supplied return the default value.
*
* @param expression the expression
* @param attribute the attribute
* @return the string
*/
private static String getExpression(Expression expression, String attribute) {
String string;
if (expression != null) {
string = expression.toString();
} else {
initialise();
string = String.valueOf(defaultMap.get(attribute));
}
return string;
}
示例6: getValueAt
import org.opengis.filter.expression.Expression; //导入方法依赖的package包/类
/**
* Gets the value at.
*
* @param rowIndex the row index
* @param columnIndex the column index
* @return the value at
*/
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
ProcessFunctionParameterValue value = valueList.get(rowIndex);
switch (columnIndex) {
case COL_PARAMETER:
return value.name;
case COL_TYPE:
return value.dataType;
case COL_OPTIONAL:
if (value.optional) {
return value.included;
}
break;
case COL_VALUE:
if (value.objectValue != null) {
Expression expression = value.objectValue.getExpression();
if (expression != null) {
return expression.toString();
}
}
break;
default:
break;
}
return null;
}
示例7: setValue
import org.opengis.filter.expression.Expression; //导入方法依赖的package包/类
/**
* Sets the value.
*
* @param symbolizerType the symbolizer type
* @param fieldConfigManager the field config manager
* @param multiOptionPanel the multi option panel
* @param graphic the graphic
* @param symbol the symbol
*/
@Override
public void setValue(Class<?> symbolizerType, GraphicPanelFieldManager fieldConfigManager,
FieldConfigSymbolType multiOptionPanel, Graphic graphic, GraphicalSymbol symbol) {
if (symbol == null) {
return;
}
if (fieldConfigManager == null) {
return;
}
MarkImpl markerSymbol = (MarkImpl) symbol;
FillImpl fill = markerSymbol.getFill();
Expression expFillColour = null;
Expression expFillOpacity = null;
if (fill != null) {
expFillColour = fill.getColor();
if (!isOverallOpacity(symbolizerType)) {
expFillOpacity = fill.getOpacity();
}
}
FieldConfigBase field = fieldConfigManager.get(fillFieldConfig.getColour());
if (field != null) {
field.populate(expFillColour);
}
// Opacity
if (isOverallOpacity(symbolizerType)) {
FieldConfigBase opacity = fieldConfigManager.get(FieldIdEnum.OVERALL_OPACITY);
if (opacity != null) {
opacity.populate(graphic.getOpacity());
}
}
field = fieldConfigManager.get(fillFieldConfig.getOpacity());
if (field != null) {
field.populate(expFillOpacity);
}
Class<?> panelId = getCommonData().getPanelId();
GroupConfigInterface fillGroup = fieldConfigManager.getGroup(panelId,
fillFieldConfig.getGroup());
if (fillGroup != null) {
fillGroup.enable(expFillColour != null);
}
if (ttfPanel != null) {
Expression wellKnownNameExpression = markerSymbol.getWellKnownName();
String wellKnownName = null;
if (wellKnownNameExpression != null) {
wellKnownName = wellKnownNameExpression.toString();
}
ttfPanel.populateExpression(wellKnownName);
}
if (multiOptionPanel != null) {
multiOptionPanel.setSelectedItem(TTF_SYMBOL_KEY);
}
}
示例8: validGeometryFieldName
import org.opengis.filter.expression.Expression; //导入方法依赖的package包/类
/**
* Check if geometry field name is valid.
*
* @param geometryField the geometry field expression
* @return true, if valid
*/
private static boolean validGeometryFieldName(Expression geometryField) {
return ((geometryField != null) && (geometryField.toString() != null)
&& !geometryField.toString().trim().isEmpty());
}