Package org.eclipse.sapphire.modeling.localization

Examples of org.eclipse.sapphire.modeling.localization.LocalizationService


            formData.top = new FormAttachment( 0, 0 );
            formData.bottom = new FormAttachment( 100, 0 );
           
            tabbedPropertiesComposite.setLayoutData( gdfill() );
           
            final LocalizationService localizationService = this.part.definition().adapt( LocalizationService.class );
            final List<PropertiesViewPagePart> pages = this.part.getPages();
            final List<PropertiesViewPagePart> visiblePages = new ArrayList<PropertiesViewPagePart>();
            final List<TabbedPropertyList.Item> elements = new ArrayList<TabbedPropertyList.Item>( pages.size() );
            final TabbedPropertyList list = tabbedPropertiesComposite.getList();
           
            final Map<PropertiesViewPagePart,TabbedPropertyList.Item> partToTabbedPropertyListItem
                = new HashMap<PropertiesViewPagePart,TabbedPropertyList.Item>();
           
            for( final PropertiesViewPagePart page : pages )
            {
                final int index;
               
                if( page.visible() )
                {
                    visiblePages.add( page );
                   
                    final MutableReference<ImageDescriptor> imageDescriptor = new MutableReference<ImageDescriptor>();
                    final MutableReference<Image> image = new MutableReference<Image>();
                   
                    final TabbedPropertyList.Item item = new TabbedPropertyList.Item()
                    {
                        public String getText()
                        {
                            return localizationService.transform( page.getLabel(), CapitalizationType.TITLE_STYLE, false );
                        }
   
                        public Image getImage()
                        {
                            final ImageDescriptor oldImageDescriptor = imageDescriptor.get();
View Full Code Here


        {
            label = keyword.toDisplayString();
        }
        else if( property.hasAnnotation( NamedValues.class ) )
        {
            final LocalizationService localization = property.getLocalizationService();
           
            for( final NamedValue x : property.getAnnotation( NamedValues.class ).namedValues() )
            {
                if( decoded.equals( x.value() ) )
                {
                    label = localization.text( x.label(), CapitalizationType.NO_CAPS, false ) + " (" + x.value() + ")";
                    break;
                }
            }
        }
       
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.modeling.localization.LocalizationService

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.