Package org.locationtech.udig.project.ui.feature

Examples of org.locationtech.udig.project.ui.feature.EditFeature


     * </p>
     *
     * @return <code>true</code> if the field value is valid, and <code>false</code> if invalid
     */
    protected boolean doCheckState() {
        EditFeature feature = getFeature();
        if (feature == null)
            return true; // cannot check right now
        SimpleFeatureType schema = feature.getFeatureType();
        AttributeDescriptor descriptor = schema.getDescriptor(getAttributeName());
        if (descriptor == null) {
            // the schema changed on us! help ...
            return false;
        }
View Full Code Here


     * If false is returned you may check errorMessage for the reason why.
     * @param date
     * @return true if date is valid
     */
    protected boolean checkState( Date date ){
        EditFeature feature = getFeature();
        if( feature == null ){
            return false; // cannot check right now
        }
       
        SimpleFeatureType schema = feature.getFeatureType();
        AttributeDescriptor descriptor = schema.getDescriptor( getAttributeName());
        if( descriptor == null ){
            return false; // schema changed on us?
        }
        Class<?> binding = descriptor.getType().getBinding();
View Full Code Here

    protected void persistChanges() {
        IFeatureSite site = getSite();
        if( site == null ){
            return;
        }
        EditFeature feature = site.getEditFeature();
       
        if (name != null && !name.isDisposed() && Boolean.TRUE.equals(name.getData(DIRTY))) {
            feature.setAttribute(this.NAME, name.getText());
        }
        if (gmiCntry != null && !gmiCntry.isDisposed()
                && Boolean.TRUE.equals(gmiCntry.getData(DIRTY))) {
            feature.setAttribute(this.GMI_CNTRY, gmiCntry.getText());
        }
        if (colorMap != null && !colorMap.getCombo().isDisposed()
                && Boolean.TRUE.equals(colorMap.getData(DIRTY))) {
            IStructuredSelection selection = (IStructuredSelection) colorMap.getSelection();
            Integer color = (Integer) selection.getFirstElement();
            feature.setAttribute(COLOR_MAP, color.toString());
        }
    }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.ui.feature.EditFeature

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.