Package com.alibaba.json.bvt

Examples of com.alibaba.json.bvt.JSONFieldTest$Demo


    }

    private List<Demo> createDemoList(List<String> demoClassNamesList) {             
        List<Demo> demoList = new ArrayList<Demo>();
        for(String demoClassName: demoClassNamesList) {
             Demo demo = createDemo(demoClassName);
            if (demo != null) {
                demoList.add(demo);
            }
        }
        return demoList;
View Full Code Here


   
    /**
     */
    private Demo createDemo(String demoClassName) {       
        Class<?> demoClass = null;
        Demo demo = null;
        try {
            demoClass = Class.forName(demoClassName);
            demo = new Demo(demoClass);
        } catch (ClassNotFoundException cnfe) {
            LOG.log(Level.WARNING, "demo class not found:"+ demoClassName);
        }       
        return demo;
    }
View Full Code Here

     * @param demoContainer
     */
    private void requestFocusOnDemo() {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                Demo demo = demoSelector.getSelectedDemo();
                if (demo != null) {
                    Component demoComponent = demo.getDemoComponent();
                    if (demoComponent != null) {
                        KeyboardFocusManager.getCurrentKeyboardFocusManager().focusNextComponent(demoComponent);
                    }
                }
            }
View Full Code Here

        });
    }
   
    private void updateFromSelectedDemoChanged() {
        JComponent demoContainer = getComponentByConstraint("demo");
        Demo demo = getDemo();
        if (demo != null) {
            JComponent demoPanel = runningDemoCache.get(demo.getName());
            if (demoPanel == null || demo.getDemoComponent() == null) {
                demo.startInitializing();
                demoPanel = createDemoPanel(demo);
                if (demoPanel != null) {
                    runningDemoCache.put(demo.getName(), demoPanel);
                }
            }
            if (demoPanel != null) {
                demoContainer.removeAll(); //(currentDemoPanel);
                demoContainer.add(demoPanel, BorderLayout.CENTER);
                demoContainer.revalidate();
                demoContainer.repaint();
                multiSplitLayout.layoutByWeight(getMainFrame().getContentPane());
            }
        }

        codeViewer.setSourceFiles(demo != null?
                                  demo.getSourceFiles() : null);
    }
View Full Code Here

    // we don't have control over the demo component's instantiation
    private class DemoPropertyChangeListener implements PropertyChangeListener {
        public void propertyChange(PropertyChangeEvent e) {
            String propertyName = e.getPropertyName();
            if (propertyName.equals("demoComponent")) {
                Demo demo = (Demo)e.getSource();
                JComponent demoComponent = (JComponent)e.getNewValue();
                if (demoComponent != null) {
                    demoComponent.putClientProperty("swingset3.demo", demo);
                    demoComponent.addHierarchyListener(new DemoVisibilityListener());
                    registerPopups(demoComponent);
View Full Code Here

   
    private class DemoVisibilityListener implements HierarchyListener {
        public void hierarchyChanged(HierarchyEvent event) {
            if ((event.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) > 0) {
                JComponent component = (JComponent)event.getComponent();
                final Demo demo = (Demo)component.getClientProperty("swingset3.demo");
                if (!component.isShowing()) {
                    demo.stop();
                } else {
                    getComponentByConstraint("demo").revalidate();
                    EventQueue.invokeLater(new Runnable() {
                        public void run() {
                            demo.start();
                        }
                    });
                }
            }           
        }       
View Full Code Here

TOP

Related Classes of com.alibaba.json.bvt.JSONFieldTest$Demo

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.