Examples of JGridBagPanel


Examples of eas.miscellaneous.datatypes.JGridBagPanel

//        params.getSinglePar(SHOW_THESE_PAR_NAME).setParDatatype(Datatypes.fixedStringSet(values));
    }

    public void reset(ParCollection params) {
        resetRequested = false;
        panel = new JGridBagPanel();
        frame.getContentPane().removeAll();
       
        List<SingleParameter> parameters = params.getAllPars();
       
        JScrollPane scrollBar = new JScrollPane(
View Full Code Here

Examples of org.apache.batik.ext.swing.JGridBagPanel

    protected Component buildUserFont(){
        return new JButton("User Font");
    }

    protected Component buildBehavior(){
        JGridBagPanel p = new JGridBagPanel();
        showRendering
            = new JCheckBox(Resources.getString(LABEL_SHOW_RENDERING));
        autoAdjustWindow
            = new JCheckBox(Resources.getString(LABEL_AUTO_ADJUST_WINDOW));
        enableDoubleBuffering
            = new JCheckBox(Resources.getString(LABEL_ENABLE_DOUBLE_BUFFERING));
        enableDoubleBuffering.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                showRendering.setEnabled(!enableDoubleBuffering.isSelected());
            }
        });
        showDebugTrace
            = new JCheckBox(Resources.getString(LABEL_SHOW_DEBUG_TRACE));

        selectionXorMode
            = new JCheckBox(Resources.getString(LABEL_SELECTION_XOR_MODE));

        isXMLParserValidating
            = new JCheckBox(Resources.getString(LABEL_IS_XML_PARSER_VALIDATING));

        enforceSecureScripting
            = new JCheckBox(Resources.getString(LABEL_SECURE_SCRIPTING_TOGGLE));

        grantScriptFileAccess
            = new JCheckBox(Resources.getString(LABEL_GRANT_SCRIPT_FILE_ACCESS));
       
        grantScriptNetworkAccess
            = new JCheckBox(Resources.getString(LABEL_GRANT_SCRIPT_NETWORK_ACCESS));

        JGridBagPanel scriptSecurityPanel = new JGridBagPanel();
        scriptSecurityPanel.add(enforceSecureScripting,    0, 0, 1, 1, WEST, HORIZONTAL, 1, 0);
        scriptSecurityPanel.add(grantScriptFileAccess,    1, 0, 1, 1, WEST, HORIZONTAL, 1, 0);
        scriptSecurityPanel.add(grantScriptNetworkAccess, 1, 1, 1, 1, WEST, HORIZONTAL, 1, 0);
       
        enforceSecureScripting.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    grantScriptFileAccess.setEnabled(enforceSecureScripting.isSelected());
                    grantScriptNetworkAccess.setEnabled(enforceSecureScripting.isSelected());
                }
            });

        loadJava
            = new JCheckBox(Resources.getString(LABEL_LOAD_JAVA));

        loadEcmascript
            = new JCheckBox(Resources.getString(LABEL_LOAD_ECMASCRIPT));

        JGridBagPanel loadScriptPanel = new JGridBagPanel();
        loadScriptPanel.add(loadJava, 0, 0, 1, 1, WEST, NONE, 1, 0);
        loadScriptPanel.add(loadEcmascript, 1, 0, 1, 1, WEST, NONE, 1, 0);

        JPanel scriptOriginPanel = new JPanel();

        scriptOriginGroup = new ButtonGroup();
        JRadioButton rb = null;

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_ANY));
        rb.setActionCommand("" + ResourceOrigin.ANY);
        scriptOriginGroup.add(rb);
        scriptOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_DOCUMENT));
        rb.setActionCommand("" + ResourceOrigin.DOCUMENT);
        scriptOriginGroup.add(rb);
        scriptOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_EMBED));
        rb.setActionCommand("" + ResourceOrigin.EMBEDED);
        scriptOriginGroup.add(rb);
        scriptOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_NONE));
        rb.setActionCommand("" + ResourceOrigin.NONE);
        scriptOriginGroup.add(rb);
        scriptOriginPanel.add(rb);

        JPanel resourceOriginPanel = new JPanel();
        resourceOriginGroup = new ButtonGroup();

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_ANY));
        rb.setActionCommand("" + ResourceOrigin.ANY);
        resourceOriginGroup.add(rb);
        resourceOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_DOCUMENT));
        rb.setActionCommand("" + ResourceOrigin.DOCUMENT);
        resourceOriginGroup.add(rb);
        resourceOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_EMBED));
        rb.setActionCommand("" + ResourceOrigin.EMBEDED);
        resourceOriginGroup.add(rb);
        resourceOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_NONE));
        rb.setActionCommand("" + ResourceOrigin.NONE);
        resourceOriginGroup.add(rb);
        resourceOriginPanel.add(rb);

        JTabbedPane browserOptions = new JTabbedPane();
        // browserOptions.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));

        p.add(showRendering,    0, 0, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(autoAdjustWindow, 0, 1, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(enableDoubleBuffering, 0, 2, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(showDebugTrace,   0, 3, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(selectionXorMode,   0, 4, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(isXMLParserValidating,   0, 5, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(new JLabel(), 0, 11, 2, 1, WEST, BOTH, 1, 1);

        browserOptions.addTab(Resources.getString(TITLE_BEHAVIOR), p);
        p.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));

        p = new JGridBagPanel();
        p.add(new JLabel(Resources.getString(LABEL_ENFORCE_SECURE_SCRIPTING)), 0, 6, 1, 1, NORTHWEST, NONE, 0, 0);
        p.add(scriptSecurityPanel, 1, 6, 1, 1, WEST, NONE, 0, 0);
        p.add(new JLabel(Resources.getString(LABEL_LOAD_SCRIPTS)), 0, 8, 1, 1, WEST, NONE, 0, 0);
        p.add(loadScriptPanel, 1, 8, 1, 1, WEST, NONE, 1, 0);
        p.add(new JLabel(Resources.getString(LABEL_SCRIPT_ORIGIN)), 0, 9, 1, 1, WEST, NONE, 0, 0);
        p.add(scriptOriginPanel, 1, 9, 1, 1, WEST, NONE, 1, 0);
        p.add(new JLabel(Resources.getString(LABEL_RESOURCE_ORIGIN)), 0, 10, 1, 1, WEST, NONE, 0, 0);
        p.add(resourceOriginPanel, 1, 10, 1, 1, WEST, NONE, 1, 0);
        p.add(new JLabel(), 0, 11, 2, 1, WEST, BOTH, 1, 1);

        browserOptions.addTab(Resources.getString(TITLE_SECURITY), p);
        p.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));

        JGridBagPanel borderedPanel = new JGridBagPanel();
        borderedPanel.add(browserOptions, 0, 0, 1, 1, WEST, BOTH, 1, 1);
        borderedPanel.setBorder(BorderFactory.createCompoundBorder
                                (BorderFactory.createTitledBorder
                                 (BorderFactory.createEtchedBorder(),
                                  Resources.getString(TITLE_BROWSER_OPTIONS)),
                                 BorderFactory.createEmptyBorder(10, 10, 10, 10)));
       
View Full Code Here

Examples of org.apache.batik.ext.swing.JGridBagPanel

       
        return borderedPanel;
    }

    protected Component buildNetwork(){
        JGridBagPanel p = new JGridBagPanel();
        host = new JTextField(Resources.getInteger(CONFIG_HOST_TEXT_FIELD_LENGTH));
        JLabel hostLabel = new JLabel(Resources.getString(LABEL_HOST));
        port = new JTextField(Resources.getInteger(CONFIG_PORT_TEXT_FIELD_LENGTH));
        JLabel portLabel = new JLabel(Resources.getString(LABEL_PORT));
        p.add(hostLabel, 0, 0, 1, 1, WEST, HORIZONTAL, 0, 0);
        p.add(host, 0, 1, 1, 1, CENTER, HORIZONTAL, 1, 0);
        p.add(portLabel, 1, 0, 1, 1, WEST, HORIZONTAL, 0, 0);
        p.add(port, 1, 1, 1, 1, CENTER, HORIZONTAL, 0, 0);
        p.add(new JLabel(""), 2, 1, 1, 1, CENTER, HORIZONTAL, 0, 0);

        p.setBorder(BorderFactory.createCompoundBorder
                    (BorderFactory.createTitledBorder
                     (BorderFactory.createEtchedBorder(),
                     Resources.getString(TITLE_NETWORK)),
                     BorderFactory.createEmptyBorder(10, 10, 10, 10)));
View Full Code Here

Examples of org.apache.batik.ext.swing.JGridBagPanel

    protected Component buildUserFont(){
        return new JButton("User Font");
    }

    protected Component buildBehavior(){
        JGridBagPanel p = new JGridBagPanel();
        showRendering
            = new JCheckBox(Resources.getString(LABEL_SHOW_RENDERING));
        autoAdjustWindow
            = new JCheckBox(Resources.getString(LABEL_AUTO_ADJUST_WINDOW));
        enableDoubleBuffering
            = new JCheckBox(Resources.getString(LABEL_ENABLE_DOUBLE_BUFFERING));
        enableDoubleBuffering.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                showRendering.setEnabled(!enableDoubleBuffering.isSelected());
            }
        });
        showDebugTrace
            = new JCheckBox(Resources.getString(LABEL_SHOW_DEBUG_TRACE));

        selectionXorMode
            = new JCheckBox(Resources.getString(LABEL_SELECTION_XOR_MODE));

        isXMLParserValidating
            = new JCheckBox(Resources.getString(LABEL_IS_XML_PARSER_VALIDATING));

        enforceSecureScripting
            = new JCheckBox(Resources.getString(LABEL_ENFORCE_SECURE_SCRIPTING));

        loadJava
            = new JCheckBox(Resources.getString(LABEL_LOAD_JAVA));

        loadEcmascript
            = new JCheckBox(Resources.getString(LABEL_LOAD_ECMASCRIPT));

        constrainScriptOrigin
            = new JCheckBox(Resources.getString(LABEL_CONSTRAIN_SCRIPT_ORIGIN));

        p.add(showRendering,    0, 0, 1, 1, WEST, HORIZONTAL, 1, 0);
        p.add(autoAdjustWindow, 0, 1, 1, 1, WEST, HORIZONTAL, 1, 0);
        p.add(enableDoubleBuffering, 0, 2, 1, 1, WEST, HORIZONTAL, 1, 0);
        p.add(showDebugTrace,   0, 3, 1, 1, WEST, HORIZONTAL, 1, 0);
        p.add(selectionXorMode,   0, 4, 1, 1, WEST, HORIZONTAL, 1, 0);
        p.add(isXMLParserValidating,   0, 5, 1, 1, WEST, HORIZONTAL, 1, 0);
        p.add(enforceSecureScripting, 0, 6, 1, 1, WEST, HORIZONTAL, 1, 0);
        p.add(loadJava, 0, 7, 1, 1, WEST, HORIZONTAL, 1, 0);
        p.add(loadEcmascript, 0, 8, 1, 1, WEST, HORIZONTAL, 1, 0);
        p.add(constrainScriptOrigin, 0, 9, 1, 1, WEST, HORIZONTAL, 1, 0);

        p.setBorder(BorderFactory.createCompoundBorder
                    (BorderFactory.createTitledBorder
                     (BorderFactory.createEtchedBorder(),
                     Resources.getString(TITLE_BEHAVIOR)),
                     BorderFactory.createEmptyBorder(10, 10, 10, 10)));
View Full Code Here

Examples of org.apache.batik.ext.swing.JGridBagPanel

        return p;
    }

    protected Component buildNetwork(){
        JGridBagPanel p = new JGridBagPanel();
        host = new JTextField(Resources.getInteger(CONFIG_HOST_TEXT_FIELD_LENGTH));
        JLabel hostLabel = new JLabel(Resources.getString(LABEL_HOST));
        port = new JTextField(Resources.getInteger(CONFIG_PORT_TEXT_FIELD_LENGTH));
        JLabel portLabel = new JLabel(Resources.getString(LABEL_PORT));
        p.add(hostLabel, 0, 0, 1, 1, WEST, HORIZONTAL, 0, 0);
        p.add(host, 0, 1, 1, 1, CENTER, HORIZONTAL, 1, 0);
        p.add(portLabel, 1, 0, 1, 1, WEST, HORIZONTAL, 0, 0);
        p.add(port, 1, 1, 1, 1, CENTER, HORIZONTAL, 0, 0);
        p.add(new JLabel(""), 2, 1, 1, 1, CENTER, HORIZONTAL, 0, 0);

        p.setBorder(BorderFactory.createCompoundBorder
                    (BorderFactory.createTitledBorder
                     (BorderFactory.createEtchedBorder(),
                     Resources.getString(TITLE_NETWORK)),
                     BorderFactory.createEmptyBorder(10, 10, 10, 10)));
View Full Code Here

Examples of org.apache.batik.ext.swing.JGridBagPanel

    protected Component buildUserFont(){
        return new JButton("User Font");
    }

    protected Component buildBehavior(){
        JGridBagPanel p = new JGridBagPanel();
        showRendering
            = new JCheckBox(Resources.getString(LABEL_SHOW_RENDERING));
        autoAdjustWindow
            = new JCheckBox(Resources.getString(LABEL_AUTO_ADJUST_WINDOW));
        enableDoubleBuffering
            = new JCheckBox(Resources.getString(LABEL_ENABLE_DOUBLE_BUFFERING));
        enableDoubleBuffering.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                showRendering.setEnabled(!enableDoubleBuffering.isSelected());
            }
        });
        showDebugTrace
            = new JCheckBox(Resources.getString(LABEL_SHOW_DEBUG_TRACE));

        selectionXorMode
            = new JCheckBox(Resources.getString(LABEL_SELECTION_XOR_MODE));

        isXMLParserValidating
            = new JCheckBox(Resources.getString(LABEL_IS_XML_PARSER_VALIDATING));

        enforceSecureScripting
            = new JCheckBox(Resources.getString(LABEL_SECURE_SCRIPTING_TOGGLE));

        grantScriptFileAccess
            = new JCheckBox(Resources.getString(LABEL_GRANT_SCRIPT_FILE_ACCESS));
       
        grantScriptNetworkAccess
            = new JCheckBox(Resources.getString(LABEL_GRANT_SCRIPT_NETWORK_ACCESS));

        JGridBagPanel scriptSecurityPanel = new JGridBagPanel();
        scriptSecurityPanel.add(enforceSecureScripting,    0, 0, 1, 1, WEST, HORIZONTAL, 1, 0);
        scriptSecurityPanel.add(grantScriptFileAccess,    1, 0, 1, 1, WEST, HORIZONTAL, 1, 0);
        scriptSecurityPanel.add(grantScriptNetworkAccess, 1, 1, 1, 1, WEST, HORIZONTAL, 1, 0);
       
        enforceSecureScripting.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    grantScriptFileAccess.setEnabled(enforceSecureScripting.isSelected());
                    grantScriptNetworkAccess.setEnabled(enforceSecureScripting.isSelected());
                }
            });

        loadJava
            = new JCheckBox(Resources.getString(LABEL_LOAD_JAVA));

        loadEcmascript
            = new JCheckBox(Resources.getString(LABEL_LOAD_ECMASCRIPT));

        JGridBagPanel loadScriptPanel = new JGridBagPanel();
        loadScriptPanel.add(loadJava, 0, 0, 1, 1, WEST, NONE, 1, 0);
        loadScriptPanel.add(loadEcmascript, 1, 0, 1, 1, WEST, NONE, 1, 0);

        JPanel scriptOriginPanel = new JPanel();

        scriptOriginGroup = new ButtonGroup();
        JRadioButton rb = null;

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_ANY));
        rb.setActionCommand("" + ResourceOrigin.ANY);
        scriptOriginGroup.add(rb);
        scriptOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_DOCUMENT));
        rb.setActionCommand("" + ResourceOrigin.DOCUMENT);
        scriptOriginGroup.add(rb);
        scriptOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_EMBED));
        rb.setActionCommand("" + ResourceOrigin.EMBEDED);
        scriptOriginGroup.add(rb);
        scriptOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_NONE));
        rb.setActionCommand("" + ResourceOrigin.NONE);
        scriptOriginGroup.add(rb);
        scriptOriginPanel.add(rb);

        JPanel resourceOriginPanel = new JPanel();
        resourceOriginGroup = new ButtonGroup();

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_ANY));
        rb.setActionCommand("" + ResourceOrigin.ANY);
        resourceOriginGroup.add(rb);
        resourceOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_DOCUMENT));
        rb.setActionCommand("" + ResourceOrigin.DOCUMENT);
        resourceOriginGroup.add(rb);
        resourceOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_EMBED));
        rb.setActionCommand("" + ResourceOrigin.EMBEDED);
        resourceOriginGroup.add(rb);
        resourceOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_NONE));
        rb.setActionCommand("" + ResourceOrigin.NONE);
        resourceOriginGroup.add(rb);
        resourceOriginPanel.add(rb);

        JTabbedPane browserOptions = new JTabbedPane();
        // browserOptions.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));

        p.add(showRendering,    0, 0, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(autoAdjustWindow, 0, 1, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(enableDoubleBuffering, 0, 2, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(showDebugTrace,   0, 3, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(selectionXorMode,   0, 4, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(isXMLParserValidating,   0, 5, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(new JLabel(), 0, 11, 2, 1, WEST, BOTH, 1, 1);

        browserOptions.addTab(Resources.getString(TITLE_BEHAVIOR), p);
        p.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));

        p = new JGridBagPanel();
        p.add(new JLabel(Resources.getString(LABEL_ENFORCE_SECURE_SCRIPTING)), 0, 6, 1, 1, NORTHWEST, NONE, 0, 0);
        p.add(scriptSecurityPanel, 1, 6, 1, 1, WEST, NONE, 0, 0);
        p.add(new JLabel(Resources.getString(LABEL_LOAD_SCRIPTS)), 0, 8, 1, 1, WEST, NONE, 0, 0);
        p.add(loadScriptPanel, 1, 8, 1, 1, WEST, NONE, 1, 0);
        p.add(new JLabel(Resources.getString(LABEL_SCRIPT_ORIGIN)), 0, 9, 1, 1, WEST, NONE, 0, 0);
        p.add(scriptOriginPanel, 1, 9, 1, 1, WEST, NONE, 1, 0);
        p.add(new JLabel(Resources.getString(LABEL_RESOURCE_ORIGIN)), 0, 10, 1, 1, WEST, NONE, 0, 0);
        p.add(resourceOriginPanel, 1, 10, 1, 1, WEST, NONE, 1, 0);
        p.add(new JLabel(), 0, 11, 2, 1, WEST, BOTH, 1, 1);

        browserOptions.addTab(Resources.getString(TITLE_SECURITY), p);
        p.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));

        JGridBagPanel borderedPanel = new JGridBagPanel();
        borderedPanel.add(browserOptions, 0, 0, 1, 1, WEST, BOTH, 1, 1);
        borderedPanel.setBorder(BorderFactory.createCompoundBorder
                                (BorderFactory.createTitledBorder
                                 (BorderFactory.createEtchedBorder(),
                                  Resources.getString(TITLE_BROWSER_OPTIONS)),
                                 BorderFactory.createEmptyBorder(10, 10, 10, 10)));
       
View Full Code Here

Examples of org.apache.batik.ext.swing.JGridBagPanel

       
        return borderedPanel;
    }

    protected Component buildNetwork(){
        JGridBagPanel p = new JGridBagPanel();
        host = new JTextField(Resources.getInteger(CONFIG_HOST_TEXT_FIELD_LENGTH));
        JLabel hostLabel = new JLabel(Resources.getString(LABEL_HOST));
        port = new JTextField(Resources.getInteger(CONFIG_PORT_TEXT_FIELD_LENGTH));
        JLabel portLabel = new JLabel(Resources.getString(LABEL_PORT));
        p.add(hostLabel, 0, 0, 1, 1, WEST, HORIZONTAL, 0, 0);
        p.add(host, 0, 1, 1, 1, CENTER, HORIZONTAL, 1, 0);
        p.add(portLabel, 1, 0, 1, 1, WEST, HORIZONTAL, 0, 0);
        p.add(port, 1, 1, 1, 1, CENTER, HORIZONTAL, 0, 0);
        p.add(new JLabel(""), 2, 1, 1, 1, CENTER, HORIZONTAL, 0, 0);

        p.setBorder(BorderFactory.createCompoundBorder
                    (BorderFactory.createTitledBorder
                     (BorderFactory.createEtchedBorder(),
                     Resources.getString(TITLE_NETWORK)),
                     BorderFactory.createEmptyBorder(10, 10, 10, 10)));
View Full Code Here

Examples of org.apache.batik.ext.swing.JGridBagPanel

    protected Component buildUserFont(){
        return new JButton("User Font");
    }

    protected Component buildBehavior(){
        JGridBagPanel p = new JGridBagPanel();
        showRendering
            = new JCheckBox(Resources.getString(LABEL_SHOW_RENDERING));
        autoAdjustWindow
            = new JCheckBox(Resources.getString(LABEL_AUTO_ADJUST_WINDOW));
        enableDoubleBuffering
            = new JCheckBox(Resources.getString(LABEL_ENABLE_DOUBLE_BUFFERING));
        enableDoubleBuffering.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                showRendering.setEnabled(!enableDoubleBuffering.isSelected());
            }
        });
        showDebugTrace
            = new JCheckBox(Resources.getString(LABEL_SHOW_DEBUG_TRACE));

        selectionXorMode
            = new JCheckBox(Resources.getString(LABEL_SELECTION_XOR_MODE));

        isXMLParserValidating
            = new JCheckBox(Resources.getString(LABEL_IS_XML_PARSER_VALIDATING));

        enforceSecureScripting
            = new JCheckBox(Resources.getString(LABEL_SECURE_SCRIPTING_TOGGLE));

        grantScriptFileAccess
            = new JCheckBox(Resources.getString(LABEL_GRANT_SCRIPT_FILE_ACCESS));
       
        grantScriptNetworkAccess
            = new JCheckBox(Resources.getString(LABEL_GRANT_SCRIPT_NETWORK_ACCESS));

        JGridBagPanel scriptSecurityPanel = new JGridBagPanel();
        scriptSecurityPanel.add(enforceSecureScripting,    0, 0, 1, 1, WEST, HORIZONTAL, 1, 0);
        scriptSecurityPanel.add(grantScriptFileAccess,    1, 0, 1, 1, WEST, HORIZONTAL, 1, 0);
        scriptSecurityPanel.add(grantScriptNetworkAccess, 1, 1, 1, 1, WEST, HORIZONTAL, 1, 0);
       
        enforceSecureScripting.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    grantScriptFileAccess.setEnabled(enforceSecureScripting.isSelected());
                    grantScriptNetworkAccess.setEnabled(enforceSecureScripting.isSelected());
                }
            });

        loadJava
            = new JCheckBox(Resources.getString(LABEL_LOAD_JAVA));

        loadEcmascript
            = new JCheckBox(Resources.getString(LABEL_LOAD_ECMASCRIPT));

        JGridBagPanel loadScriptPanel = new JGridBagPanel();
        loadScriptPanel.add(loadJava, 0, 0, 1, 1, WEST, NONE, 1, 0);
        loadScriptPanel.add(loadEcmascript, 1, 0, 1, 1, WEST, NONE, 1, 0);

        JPanel scriptOriginPanel = new JPanel();

        scriptOriginGroup = new ButtonGroup();
        JRadioButton rb = null;

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_ANY));
        rb.setActionCommand("" + ResourceOrigin.ANY);
        scriptOriginGroup.add(rb);
        scriptOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_DOCUMENT));
        rb.setActionCommand("" + ResourceOrigin.DOCUMENT);
        scriptOriginGroup.add(rb);
        scriptOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_EMBED));
        rb.setActionCommand("" + ResourceOrigin.EMBEDED);
        scriptOriginGroup.add(rb);
        scriptOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_NONE));
        rb.setActionCommand("" + ResourceOrigin.NONE);
        scriptOriginGroup.add(rb);
        scriptOriginPanel.add(rb);

        JPanel resourceOriginPanel = new JPanel();
        resourceOriginGroup = new ButtonGroup();

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_ANY));
        rb.setActionCommand("" + ResourceOrigin.ANY);
        resourceOriginGroup.add(rb);
        resourceOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_DOCUMENT));
        rb.setActionCommand("" + ResourceOrigin.DOCUMENT);
        resourceOriginGroup.add(rb);
        resourceOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_EMBED));
        rb.setActionCommand("" + ResourceOrigin.EMBEDED);
        resourceOriginGroup.add(rb);
        resourceOriginPanel.add(rb);

        rb = new JRadioButton(Resources.getString(LABEL_ORIGIN_NONE));
        rb.setActionCommand("" + ResourceOrigin.NONE);
        resourceOriginGroup.add(rb);
        resourceOriginPanel.add(rb);

        JTabbedPane browserOptions = new JTabbedPane();
        // browserOptions.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));

        p.add(showRendering,    0, 0, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(autoAdjustWindow, 0, 1, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(enableDoubleBuffering, 0, 2, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(showDebugTrace,   0, 3, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(selectionXorMode,   0, 4, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(isXMLParserValidating,   0, 5, 2, 1, WEST, HORIZONTAL, 1, 0);
        p.add(new JLabel(), 0, 11, 2, 1, WEST, BOTH, 1, 1);

        browserOptions.addTab(Resources.getString(TITLE_BEHAVIOR), p);
        p.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));

        p = new JGridBagPanel();
        p.add(new JLabel(Resources.getString(LABEL_ENFORCE_SECURE_SCRIPTING)), 0, 6, 1, 1, NORTHWEST, NONE, 0, 0);
        p.add(scriptSecurityPanel, 1, 6, 1, 1, WEST, NONE, 0, 0);
        p.add(new JLabel(Resources.getString(LABEL_LOAD_SCRIPTS)), 0, 8, 1, 1, WEST, NONE, 0, 0);
        p.add(loadScriptPanel, 1, 8, 1, 1, WEST, NONE, 1, 0);
        p.add(new JLabel(Resources.getString(LABEL_SCRIPT_ORIGIN)), 0, 9, 1, 1, WEST, NONE, 0, 0);
        p.add(scriptOriginPanel, 1, 9, 1, 1, WEST, NONE, 1, 0);
        p.add(new JLabel(Resources.getString(LABEL_RESOURCE_ORIGIN)), 0, 10, 1, 1, WEST, NONE, 0, 0);
        p.add(resourceOriginPanel, 1, 10, 1, 1, WEST, NONE, 1, 0);
        p.add(new JLabel(), 0, 11, 2, 1, WEST, BOTH, 1, 1);

        browserOptions.addTab(Resources.getString(TITLE_SECURITY), p);
        p.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));

        JGridBagPanel borderedPanel = new JGridBagPanel();
        borderedPanel.add(browserOptions, 0, 0, 1, 1, WEST, BOTH, 1, 1);
        borderedPanel.setBorder(BorderFactory.createCompoundBorder
                                (BorderFactory.createTitledBorder
                                 (BorderFactory.createEtchedBorder(),
                                  Resources.getString(TITLE_BROWSER_OPTIONS)),
                                 BorderFactory.createEmptyBorder(10, 10, 10, 10)));
       
View Full Code Here

Examples of org.apache.batik.ext.swing.JGridBagPanel

       
        return borderedPanel;
    }

    protected Component buildNetwork(){
        JGridBagPanel p = new JGridBagPanel();
        host = new JTextField(Resources.getInteger(CONFIG_HOST_TEXT_FIELD_LENGTH));
        JLabel hostLabel = new JLabel(Resources.getString(LABEL_HOST));
        port = new JTextField(Resources.getInteger(CONFIG_PORT_TEXT_FIELD_LENGTH));
        JLabel portLabel = new JLabel(Resources.getString(LABEL_PORT));
        p.add(hostLabel, 0, 0, 1, 1, WEST, HORIZONTAL, 0, 0);
        p.add(host, 0, 1, 1, 1, CENTER, HORIZONTAL, 1, 0);
        p.add(portLabel, 1, 0, 1, 1, WEST, HORIZONTAL, 0, 0);
        p.add(port, 1, 1, 1, 1, CENTER, HORIZONTAL, 0, 0);
        p.add(new JLabel(""), 2, 1, 1, 1, CENTER, HORIZONTAL, 0, 0);

        p.setBorder(BorderFactory.createCompoundBorder
                    (BorderFactory.createTitledBorder
                     (BorderFactory.createEtchedBorder(),
                     Resources.getString(TITLE_NETWORK)),
                     BorderFactory.createEmptyBorder(10, 10, 10, 10)));
View Full Code Here

Examples of org.apache.batik.ext.swing.JGridBagPanel

    protected Component buildUserFont(){
        return new JButton("User Font");
    }

    protected Component buildBehavior(){
        JGridBagPanel p = new JGridBagPanel();
        showRendering
            = new JCheckBox(Resources.getString(LABEL_SHOW_RENDERING));
        autoAdjustWindow
            = new JCheckBox(Resources.getString(LABEL_AUTO_ADJUST_WINDOW));
        enableDoubleBuffering
            = new JCheckBox(Resources.getString(LABEL_ENABLE_DOUBLE_BUFFERING));
        enableDoubleBuffering.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                showRendering.setEnabled(!enableDoubleBuffering.isSelected());
            }
        });
        showDebugTrace
            = new JCheckBox(Resources.getString(LABEL_SHOW_DEBUG_TRACE));

        selectionXorMode
            = new JCheckBox(Resources.getString(LABEL_SELECTION_XOR_MODE));

        isXMLParserValidating
            = new JCheckBox(Resources.getString(LABEL_IS_XML_PARSER_VALIDATING));

        p.add(showRendering,    0, 0, 1, 1, WEST, HORIZONTAL, 1, 0);
        p.add(autoAdjustWindow, 0, 1, 1, 1, WEST, HORIZONTAL, 1, 0);
        p.add(enableDoubleBuffering, 0, 2, 1, 1, WEST, HORIZONTAL, 1, 0);
        p.add(showDebugTrace,   0, 3, 1, 1, WEST, HORIZONTAL, 1, 0);
        p.add(selectionXorMode,   0, 4, 1, 1, WEST, HORIZONTAL, 1, 0);
        p.add(isXMLParserValidating,   0, 5, 1, 1, WEST, HORIZONTAL, 1, 0);

        p.setBorder(BorderFactory.createCompoundBorder
                    (BorderFactory.createTitledBorder
                     (BorderFactory.createEtchedBorder(),
                     Resources.getString(TITLE_BEHAVIOR)),
                     BorderFactory.createEmptyBorder(10, 10, 10, 10)));
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.