Examples of JFrameFactory


Examples of net.jini.lookup.ui.factory.JFrameFactory

    if (uiDescriptor == null) {
        return;
    }

    try {
        JFrameFactory uiFactory = (JFrameFactory)
      uiDescriptor.getUIFactory(
          Thread.currentThread().getContextClassLoader());
        JFrame frame = uiFactory.getJFrame(item);

        frame.validate();
        frame.setVisible(true);
    }
    catch (Exception e) {
View Full Code Here

Examples of net.jini.lookup.ui.factory.JFrameFactory

      if (uiDescriptor == null) {
    return;
      }

      try {
    JFrameFactory uiFactory = (JFrameFactory)
        uiDescriptor.getUIFactory(Thread.currentThread().getContextClassLoader());
    JFrame frame = uiFactory.getJFrame(serviceItem);

    frame.validate();
    frame.setVisible(true);
      }
      catch (Exception e) {
View Full Code Here

Examples of net.jini.lookup.ui.factory.JFrameFactory

      if (uiDescriptor == null) {
    return;
      }

      try {
    JFrameFactory uiFactory = (JFrameFactory)
        uiDescriptor.getUIFactory(Thread.currentThread().getContextClassLoader());
    JFrame frame = uiFactory.getJFrame(serviceItem);

    frame.validate();
    frame.setVisible(true);
      }
      catch (Exception e) {
View Full Code Here

Examples of net.jini.lookup.ui.factory.JFrameFactory

            add(button);
        }

        private void launchFrameUI(Object factory, Object item) throws
                                                                IOException, ClassNotFoundException {
            JFrameFactory fac = (JFrameFactory)factory;
            JFrame frame = fac.getJFrame(item);
            frame.validate();
            frame.setSize(frame.getSize());
            frame.setLocation(frame.getLocation());
            frame.pack();
            frame.setVisible(true);
View Full Code Here

Examples of net.jini.lookup.ui.factory.JFrameFactory

    static void handle(final UIDescriptor uiDescriptor, final ServiceItem serviceItem, final Component parent) {
        try {
            Object factory = uiDescriptor.getUIFactory(Thread.currentThread().getContextClassLoader());
            Class factoryClass = factory.getClass();
            if(JFrameFactory.class.isAssignableFrom(factoryClass)) {
                JFrameFactory uiFactory = (JFrameFactory)factory;
                JFrame frame = uiFactory.getJFrame(serviceItem);
                frame.validate();
                frame.setVisible(true);
            }
            else if(JWindowFactory.class.isAssignableFrom(factoryClass)) {
                JWindowFactory uiFactory = (JWindowFactory)factory;
                JWindow window = uiFactory.getJWindow(serviceItem);
                window.validate();
                window.setVisible(true);
            } else if(JComponentFactory.class.isAssignableFrom(factoryClass)) {
                JComponentFactory uiFactory = (JComponentFactory)factory;
                JComponent component = uiFactory.getJComponent(serviceItem);
                String name = component.getAccessibleContext().getAccessibleName();
                if(name==null) {
                    component.getAccessibleContext().setAccessibleName(component.getClass().getName());
                }
                JComponentFrame componentFrame = new JComponentFrame(component, name);
                componentFrame.setLocationRelativeTo(parent);
                componentFrame.setVisible(true);
            } else if(JDialogFactory.class.isAssignableFrom(factoryClass)) {
                JDialogFactory uiFactory = (JDialogFactory)factory;
                JDialog dialog = uiFactory.getJDialog(serviceItem);
                dialog.validate();
                dialog.setVisible(true);
            }
        } catch (Exception e) {
            Util.showError(e, parent, "Service UI Exception");
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.