当前位置: 首页>>代码示例>>Java>>正文


Java Expression.toString方法代码示例

本文整理汇总了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;
}
 
开发者ID:robward-scisys,项目名称:sldeditor,代码行数:27,代码来源:ColourUtils.java

示例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();
        }
    }
}
 
开发者ID:robward-scisys,项目名称:sldeditor,代码行数:21,代码来源:ExternalGraphicDetails.java

示例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;
}
 
开发者ID:robward-scisys,项目名称:sldeditor,代码行数:25,代码来源:ColourUtils.java

示例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);
}
 
开发者ID:robward-scisys,项目名称:sldeditor,代码行数:16,代码来源:ExpressionSubPanel.java

示例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;
}
 
开发者ID:robward-scisys,项目名称:sldeditor,代码行数:18,代码来源:ArrowUtils.java

示例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;
}
 
开发者ID:robward-scisys,项目名称:sldeditor,代码行数:35,代码来源:FunctionTableModel.java

示例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);
    }
}
 
开发者ID:robward-scisys,项目名称:sldeditor,代码行数:74,代码来源:FieldConfigTTF.java

示例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());
}
 
开发者ID:robward-scisys,项目名称:sldeditor,代码行数:11,代码来源:ExtractGeometryField.java


注:本文中的org.opengis.filter.expression.Expression.toString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。