Examples of UIExtensionFactory


Examples of org.apache.ace.webui.UIExtensionFactory

            Collections.sort(m_extensionFactories);

            // Walk through the holders and fetch the extension factories one by one...
            extensions = new ArrayList<UIExtensionFactory>(m_extensionFactories.size());
            for (UIExtensionFactoryHolder holder : m_extensionFactories) {
                UIExtensionFactory extensionFactory = holder.getUIExtensionFactory();
                // Make sure only to use non-GCd factories...
                if (extensionFactory != null) {
                    extensions.add(extensionFactory);
                }
            }
View Full Code Here

Examples of org.apache.ace.webui.UIExtensionFactory

        props.put(Constants.SERVICE_RANKING, Integer.valueOf(100));

        // shows off components that are contributed by extensions
        manager.add(createComponent()
            .setInterface(UIExtensionFactory.class.getName(), props)
            .setImplementation(new UIExtensionFactory() {
                public Component create(Map<String, Object> context) {
                    VerticalLayout vl = new VerticalLayout();
                    vl.setCaption("Info");
                    final NamedObject namedObject = (NamedObject) context.get("object");
                    final StatefulTargetObject target = (StatefulTargetObject) namedObject.getObject();
View Full Code Here

Examples of org.apache.ace.webui.UIExtensionFactory

        );
        Properties properties = new Properties();
        properties.put(UIExtensionFactory.EXTENSION_POINT_KEY, UIExtensionFactory.EXTENSION_POINT_VALUE_MENU);
        manager.add(createComponent()
            .setInterface(UIExtensionFactory.class.getName(), properties)
            .setImplementation(new UIExtensionFactory() {
                    @Override
                    public Component create(Map<String, Object> context) {
                        Button b = new UserAdminButton((User) context.get("user"));
                        manager.add(createComponent()
                            .setImplementation(b)
View Full Code Here

Examples of org.apache.ace.webui.UIExtensionFactory

        properties.put(UIExtensionFactory.EXTENSION_POINT_KEY, UIExtensionFactory.EXTENSION_POINT_VALUE_MENU);
        properties.put(Constants.SERVICE_RANKING, 102);

        manager.add(createComponent()
            .setInterface(UIExtensionFactory.class.getName(), properties)
            .setImplementation(new UIExtensionFactory() {
                    @Override
                    public Component create(Map<String, Object> context) {
                        EditUserInfoButton b = new EditUserInfoButton();
                        manager.add(createComponent()
                            .setImplementation(b)
                            .setComposition("getComposition")
                            .add(createServiceDependency()
                                .setService(UserEditor.class)
                                .setRequired(true))
                            .add(createServiceDependency()
                                .setService(LogService.class)
                                .setRequired(false)
                            )
                        );
                        return b;
                    }
                }
            )
        );

        properties.put(Constants.SERVICE_RANKING, 101);

        manager.add(createComponent()
            .setInterface(UIExtensionFactory.class.getName(), properties)
            .setImplementation(new UIExtensionFactory() {
                    @Override
                    public Component create(Map<String, Object> context) {
                        UserAdminButton b = new UserAdminButton();
                        manager.add(createComponent()
                            .setImplementation(b)
View Full Code Here

Examples of org.apache.ace.webui.UIExtensionFactory

            Collections.sort(m_extensionFactories);

            // Walk through the holders and fetch the extension factories one by one...
            extensions = new ArrayList<UIExtensionFactory>(m_extensionFactories.size());
            for (UIExtensionFactoryHolder holder : m_extensionFactories) {
                UIExtensionFactory extensionFactory = holder.getUIExtensionFactory();
                // Make sure only to use non-GCd factories...
                if (extensionFactory != null) {
                    extensions.add(extensionFactory);
                }
            }
View Full Code Here

Examples of org.apache.ace.webui.UIExtensionFactory

        props.put(Constants.SERVICE_RANKING, Integer.valueOf(100));

        // shows off components that are contributed by extensions
        manager.add(createComponent()
            .setInterface(UIExtensionFactory.class.getName(), props)
            .setImplementation(new UIExtensionFactory() {
                public Component create(Map<String, Object> context) {
                    VerticalLayout vl = new VerticalLayout();
                    vl.setCaption("Info");
                    final StatefulTargetObject target = (StatefulTargetObject) context.get("statefulTarget");
                    Label info = new Label("Target ID          : " + target.getID() + "\n" +
View Full Code Here

Examples of org.apache.ace.webui.UIExtensionFactory

        Map<String, Object> context = new HashMap<String, Object>();

        List<Component> result = new ArrayList<Component>();
        for (ServiceReference ref : refs) {
            UIExtensionFactory factory = extensions.get(ref);

            result.add(factory.create(context));
        }
        return result;
    }
View Full Code Here

Examples of org.apache.ace.webui.UIExtensionFactory

        );
       
        // shows off components that are contributed by extensions
        manager.add(createComponent()
            .setInterface(UIExtensionFactory.class.getName(), new Properties() {{ put(UIExtensionFactory.EXTENSION_POINT_KEY, UIExtensionFactory.EXTENSION_POINT_VALUE_TARGET); }})
            .setImplementation(new UIExtensionFactory() {
                public Component create(Map<String, Object> context) {
                    final NamedObject object = (NamedObject) context.get("object");
                    VerticalLayout vl = new VerticalLayout();
                    vl.setCaption("Info");
                    final NamedObject namedObject = (NamedObject) context.get("object");
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.