Package com.sun.swingset3.codeview

Examples of com.sun.swingset3.codeview.CodeViewer$SourceProcessor


        demoPanel = new JXPanel(new BorderLayout());
        demoPanel.add(demo.createDemoComponent());
    }

    private JComponent createDescriptionArea(URL descriptionURL) {
        final JEditorPane editor =  new HTMLPanel();

        editor.setEditable(false);

        editor.setMargin(DemoXPanel.margin);
        editor.setOpaque(true);
        try {
            editor.setPage(descriptionURL);
        } catch (IOException e) {
            System.err.println("couldn't load description from URL:"
                    + descriptionURL);
        }
        return editor;
View Full Code Here


    public LoadedXDemoPanel(Demo demo) throws Exception {
        super(demo.getName());
        initComponents(demo);
        layoutComponents();
        setBorder(new RoundedBorder(5));//DemoXPanel.roundedBorder);
        if (descriptionArea != null)
            demoPanel.setBorder(DemoXPanel.roundedBorder);
        applyDefaults();
    }
View Full Code Here

    }
   
    protected JComponent createCodePanel() {
       
        JPanel panel = new JXPanel(new BorderLayout());
        panel.setBorder(new RoundedBorder(10));
       
        noCodeLabel = new JLabel(getString("CodeViewer.noCodeLoaded", "no code loaded"));
        noCodeLabel.setHorizontalAlignment(JLabel.CENTER);
        panel.add(noCodeLabel, BorderLayout.CENTER);
        return panel;
View Full Code Here

        JPanel messagePanel = new JPanel(new BorderLayout());      
        JLabel label = new JLabel(message);
        messagePanel.add(label);
        if (ex != null) {
            JComponent panel = new JXPanel(new BorderLayout());
            panel.setBorder(new RoundedBorder());
           
            // remind(aim): provide way to allow user to see exception only if desired
            StringWriter writer = new StringWriter();
            ex.printStackTrace(new PrintWriter(writer));
            JTextArea exceptionText = new JTextArea();
            exceptionText.setText("Cause of error:\n" +
                    writer.getBuffer().toString());
            exceptionText.setBorder(new RoundedBorder());
            exceptionText.setOpaque(false);
            exceptionText.setBackground(
                    Utilities.deriveColorHSB(UIManager.getColor("Panel.background"),
                    0, 0, -.2f));
            JScrollPane scrollpane = new JScrollPane(exceptionText);
View Full Code Here

TOP

Related Classes of com.sun.swingset3.codeview.CodeViewer$SourceProcessor

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.