Examples of UIDescriptor


Examples of net.jini.lookup.entry.UIDescriptor

            int attrCount = serviceItem.attributeSets.length;
            Entry[] attr = serviceItem.attributeSets;
            List<UIDescriptor> list = new ArrayList<UIDescriptor>();
            for(int i = 0; i < attrCount; ++i) {               
                if(attr[i] instanceof UIDescriptor) {
                    UIDescriptor desc = (UIDescriptor)attr[i];
                    if(desc.attributes == null) {
                        continue;
                    }
                    for (Object attribute : desc.attributes) {
                        if (attribute instanceof UIFactoryTypes) {
                            // Should also look through required packages here
                            list.add(desc);
                        }
                    }
                }
            }
            List factoryList = new ArrayList();
            for (UIDescriptor desc : list) {
                Object uiFactory;
                try {
                    uiFactory = desc.getUIFactory(serviceItem.service
                        .getClass().getClassLoader());
                    factoryList.add(uiFactory);
                } catch (ClassNotFoundException cnfe) {
                    System.out.println(
                        "Class not found. Could not unmarshall " +
View Full Code Here

Examples of net.jini.lookup.entry.UIDescriptor

            throw new IllegalArgumentException("codebase is null");
        if(jars == null)
            throw new IllegalArgumentException("jars are null");
        if(className == null)
            throw new IllegalArgumentException("className is null");
        UIDescriptor desc = new UIDescriptor();
        desc.role = role;
        UIFactoryTypes types  ;
        MarshalledObject factory;
        URL[] urls = new URL[jars.length];
       
View Full Code Here

Examples of net.jini.lookup.entry.UIDescriptor

    public static UIDescriptor getUIDescriptor(String role, JComponentFactory factory) throws IOException {
        if(role==null)
            throw new IllegalArgumentException("role is null");
        if(factory==null)
            throw new IllegalArgumentException("factory is null");
        UIDescriptor desc = new UIDescriptor();
        desc.role = role;
        desc.toolkit = JComponentFactory.TOOLKIT;
        desc.attributes = Collections.singleton(new UIFactoryTypes(Collections.singleton(JComponentFactory.TYPE_NAME)));
        desc.factory = new MarshalledObject<JComponentFactory>(factory);
        return (desc);
View Full Code Here

Examples of net.jini.lookup.entry.UIDescriptor

    public static UIDescriptor getUIDescriptor(String role, JDialogFactory factory) throws IOException {
        if(role==null)
            throw new IllegalArgumentException("role is null");
        if(factory==null)
            throw new IllegalArgumentException("factory is null");
        UIDescriptor desc = new UIDescriptor();
        desc.role = role;
        desc.toolkit = JDialogFactory.TOOLKIT;
        desc.attributes = Collections.singleton(new UIFactoryTypes(Collections.singleton(JDialogFactory.TYPE_NAME)));
        desc.factory = new MarshalledObject<JDialogFactory>(factory);
        return (desc);
View Full Code Here

Examples of net.jini.lookup.entry.UIDescriptor

    public static UIDescriptor getUIDescriptor(String role, JFrameFactory factory) throws IOException {
        if(role==null)
            throw new IllegalArgumentException("role is null");
        if(factory==null)
            throw new IllegalArgumentException("factory is null");
        UIDescriptor desc = new UIDescriptor();
        desc.role = role;
        desc.toolkit = JFrameFactory.TOOLKIT;
        desc.attributes = Collections.singleton(new UIFactoryTypes(Collections.singleton(JFrameFactory.TYPE_NAME)));
        desc.factory = new MarshalledObject<JFrameFactory>(factory);
        return (desc);
View Full Code Here

Examples of net.jini.lookup.entry.UIDescriptor

    public static UIDescriptor getUIDescriptor(String role, JWindowFactory factory) throws IOException {
        if(role==null)
            throw new IllegalArgumentException("role is null");
        if(factory==null)
            throw new IllegalArgumentException("factory is null");
        UIDescriptor desc = new UIDescriptor();
        desc.role = role;
        desc.toolkit = JWindowFactory.TOOLKIT;
        desc.attributes = Collections.singleton(new UIFactoryTypes(Collections.singleton(JWindowFactory.TYPE_NAME)));
        desc.factory = new MarshalledObject<JWindowFactory>(factory);
        return (desc);
View Full Code Here

Examples of net.jini.lookup.entry.UIDescriptor

            setOpaque(true);
            setLightWeightPopupEnabled(true);
        }

        public void actionPerformed(ActionEvent anEvent) {
            UIDescriptor uiDescriptor = getSelectedUIDescriptor();
            if (uiDescriptor == null) {
                return;
            }
            ServiceUIHelper.handle(uiDescriptor, serviceItem, browser);
        }
View Full Code Here

Examples of net.jini.lookup.entry.UIDescriptor

            if (!ev.isPopupTrigger()) {
                return;
            }

            UIDescriptor selectedDescriptor = getSelectedUIDescriptor();

            if (selectedDescriptor == null) {
                return;
            }
View Full Code Here

Examples of net.jini.lookup.entry.UIDescriptor

            if (!ev.isPopupTrigger()) {
                return;
            }

            UIDescriptor selectedDescriptor = getSelectedUIDescriptor();

            if (selectedDescriptor == null) {
                return;
            }
View Full Code Here

Examples of net.jini.lookup.entry.UIDescriptor

            setLightWeightPopupEnabled(true);
        }

        public void actionPerformed(final ActionEvent anEvent) {

            UIDescriptor uiDescriptor = getSelectedUIDescriptor();

            if (uiDescriptor == null) {
                return;
            }
            ServiceUIHelper.handle(uiDescriptor, serviceItem, dialog);
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.