Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.Property.service()


        final Property property = part.property();
        final EnumValueType enumValueType = new EnumValueType( this.enumValues[ 0 ].getDeclaringClass() );

        for( final Enum<?> enumItem : this.enumValues )
        {
            final String enumItemStr = property.service( MasterConversionService.class ).convert( enumItem, String.class );
            final String auxText = part.getRenderingHint( PropertyEditorDef.HINT_AUX_TEXT + "." + enumItemStr, null );
            final ValueImageService imageService = property.service( ValueImageService.class );
            final ImageData imageData = imageService.provide( enumItemStr );
            final Image image = propertyEditorPresentation.resources().image( imageData );
            final Button button = this.buttonsGroup.addRadioButton( enumValueType.getLabel( enumItem, false, CapitalizationType.FIRST_WORD_ONLY, true ), auxText, image );
View Full Code Here


        for( final Enum<?> enumItem : this.enumValues )
        {
            final String enumItemStr = property.service( MasterConversionService.class ).convert( enumItem, String.class );
            final String auxText = part.getRenderingHint( PropertyEditorDef.HINT_AUX_TEXT + "." + enumItemStr, null );
            final ValueImageService imageService = property.service( ValueImageService.class );
            final ImageData imageData = imageService.provide( enumItemStr );
            final Image image = propertyEditorPresentation.resources().image( imageData );
            final Button button = this.buttonsGroup.addRadioButton( enumValueType.getLabel( enumItem, false, CapitalizationType.FIRST_WORD_ONLY, true ), auxText, image );
            button.setData( enumItem );
        }
View Full Code Here

    @Override
    protected void initEnablementService()
    {
        final Property property = context( Property.class );
       
        this.versionCompatibilityService = property.service( MasterVersionCompatibilityService.class );
       
        this.versionCompatibilityServiceListener = new Listener()
        {
            @Override
            public void handle( final Event event )
View Full Code Here

    {
        @Override
        public boolean applicable( final ServiceContext context )
        {
            final Property property = context.find( Property.class );
            return ( property != null && property.service( RequiredConstraintService.class ) != null );
        }
    }
   
}
View Full Code Here

    @Override
    protected void initVersionCompatibilityService()
    {
        final Property parent = context( Element.class ).parent();
       
        this.parentVersionCompatibilityService = parent.service( MasterVersionCompatibilityService.class );
       
        this.parentVersionCompatibilityServiceListener = new Listener()
        {
            @Override
            public void handle( final Event event )
View Full Code Here

    {
        @Override
        public boolean applicable( final ServiceContext context )
        {
            final Property property = context.find( Property.class );
            return ( property != null && property.service( RequiredConstraintService.class ) != null );
        }
    }

}
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.