Package org.eclipse.sapphire.modeling.annotations

Examples of org.eclipse.sapphire.modeling.annotations.NumericRange.min()


        final PropertyDef property = context( PropertyDef.class );
        final Class<?> type = property.getTypeClass();
        final NumericRange rangeConstraintAnnotation = property.getAnnotation( NumericRange.class );
        final MasterConversionService converter = property.service( MasterConversionService.class );

        final String minStr = rangeConstraintAnnotation.min();
       
        if( minStr != null )
        {
            this.min = ( minStr.length() > 0 ? (Comparable) converter.convert( minStr, type ) : null );
        }
View Full Code Here


    @Override
    protected void facts( final SortedSet<String> facts )
    {
        final ValueProperty property = context( ValueProperty.class );
        final NumericRange range = property.getAnnotation( NumericRange.class );
        final String min = range.min();
        final String max = range.max();
           
        if( min.length() > 0 )
        {
            facts.add( minValueStatement.format( new ValueSnapshot( property, min ) ) );
View Full Code Here

            final ValueProperty property = context.find( ValueProperty.class );
           
            if( property != null )
            {
                final NumericRange range = property.getAnnotation( NumericRange.class );
                return ( range != null && ( range.min().length() > 0 || range.max().length() > 0 ) );
            }
           
            return false;
        }
    }
View Full Code Here

    {
        final NumericRange rangeAnnotation = property().definition().getAnnotation( NumericRange.class );
       
        try
        {
            this.minimum = Integer.parseInt( rangeAnnotation.min() );
            this.maximum = Integer.parseInt( rangeAnnotation.max() );
        }
        catch( NumberFormatException e )
        {
            // Should not happen here. We already checked this in property editor applicability test.
View Full Code Here

            {
                final NumericRange rangeAnnotation = property.getAnnotation( NumericRange.class );
               
                if( rangeAnnotation != null )
                {
                    final String minStr = rangeAnnotation.min();
                    final String maxStr = rangeAnnotation.max();
                   
                    if( minStr.length() > 0 && maxStr.length() > 0 )
                    {
                        return new ScalePropertyEditorPresentation( part, parent, composite );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.