Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.Serialization


       
        this.textField = new Text( nestedComposite, style );
        this.textField.setLayoutData( gdfill() );
        decorator.addEditorControl( this.textField, true );
       
        final Serialization serialization = property.definition().getAnnotation( Serialization.class );

        final TextOverlayPainter.Controller textOverlayPainterController = new TextOverlayPainter.Controller()
        {
            @Override
            public boolean isHyperlinkEnabled()
            {
                return ( jumpActionHandler == null ? false : jumpActionHandler.isEnabled() );
            }

            @Override
            public void handleHyperlinkEvent()
            {
                if( jumpActionHandler != null )
                {
                    jumpActionHandler.execute( TextFieldPropertyEditorPresentation.this );
                }
            }

            @Override
            public String overlay()
            {
                String def = property.disposed() ? null : property.getDefaultText();
               
                if( def != null && isSensitiveData )
                {
                    final StringBuilder buf = new StringBuilder();
                   
                    for( int i = 0, n = def.length(); i < n; i++ )
                    {
                        buf.append( "\u25CF" );
                    }
                   
                    def = buf.toString();
                }
               
                if( def == null && serialization != null )
                {
                    def = serialization.primary();
                }
               
                return def;
            }
        };
View Full Code Here


    }

    @Override
    protected void facts( final SortedSet<String> facts )
    {
        final Serialization serialization = context( ValueProperty.class ).getAnnotation( Serialization.class );
       
        facts.add( fact.format( serialization.primary() ) );
       
        for( final String alternative : serialization.alternative() )
        {
            facts.add( fact.format( alternative ) );
        }
    }
View Full Code Here

    }

    @Override
    protected void init()
    {
        final Serialization serialization = context( ValueProperty.class ).getAnnotation( Serialization.class );
        final ListFactory<DateFormat> formatsListFactory = ListFactory.start();
       
        formatsListFactory.add( new SimpleDateFormat( serialization.primary() ) );
       
        for( final String alternative : serialization.alternative() )
        {
            formatsListFactory.add( new SimpleDateFormat( alternative ) );
        }
       
        this.formats = formatsListFactory.result();
View Full Code Here

    }

    @Override
    protected void init()
    {
        final Serialization serialization = context( ValueProperty.class ).getAnnotation( Serialization.class );
        this.format = new SimpleDateFormat( serialization.primary() );
    }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.Serialization

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.