Package jsky.util.gui

Examples of jsky.util.gui.GridBagUtil


        JLabel catalogTitleLabel = makeCatalogPanelLabel(catalog);
        _catalogQueryPanel = makeCatalogQueryPanel(catalog);
        _catalogQueryPanel.addActionListener(_searchListener);


        GridBagUtil layout = new GridBagUtil(this);
        layout.add(catalogTitleLabel, 0, 0, 1, 1, 0.0, 0.0,
                GridBagConstraints.NONE,
                GridBagConstraints.CENTER,
                new Insets(3, 0, 3, 0));

        if (scrollable) {
            layout.add(new JScrollPane(_catalogQueryPanel), 0, 1, 1, 1, 1.0, 1.0,
                    GridBagConstraints.BOTH,
                    GridBagConstraints.CENTER,
                    new Insets(0, 0, 0, 0));
        } else {
            layout.add(_catalogQueryPanel, 0, 1, 1, 1, 1.0, 1.0,
                    GridBagConstraints.BOTH,
                    GridBagConstraints.CENTER,
                    new Insets(0, 0, 0, 0));
        }

        layout.add(makeButtonPanel(), 0, 2, 1, 1, 0.0, 0.0,
                GridBagConstraints.HORIZONTAL,
                GridBagConstraints.CENTER,
                new Insets(5, 0, 0, 5));
    }
View Full Code Here


            public void stateChanged(ChangeEvent e) {
                updatePlotOptions();
            }
        });

        GridBagUtil layout = new GridBagUtil(this);
        layout.add(_mainTabbedPane, 0, 0, 1, 1, 1.0, 1.0,
                GridBagConstraints.BOTH,
                GridBagConstraints.CENTER,
                new Insets(0, 0, 0, 0));
        layout.add(_makeButtonPanel(), 0, 1, 1, 1, 1.0, 0.0,
                GridBagConstraints.HORIZONTAL,
                GridBagConstraints.SOUTH,
                new Insets(6, 11, 6, 11));
    }
View Full Code Here


    // Create and return a button panel with site and time options.
    private JPanel _makeButtonPanel() {
        JPanel panel = new JPanel();
        GridBagUtil layout = new GridBagUtil(panel);
        layout.add(_makeSitePanel(), 0, 0, 1, 1, 1.0, 0.0,
                GridBagConstraints.NONE,
                GridBagConstraints.WEST,
                new Insets(0, 0, 0, 0));
        layout.add(_makePlotTypePanel(), 1, 0, 1, 1, 1.0, 0.0,
                GridBagConstraints.NONE,
                GridBagConstraints.CENTER,
                new Insets(0, 0, 0, 0));
        layout.add(_makeTimePanel(), 2, 0, 1, 1, 1.0, 0.0,
                GridBagConstraints.NONE,
                GridBagConstraints.EAST,
                new Insets(0, 0, 0, 0));

        return panel;
View Full Code Here

                    setSite(rb.getText());
                }
            }
        };
        JLabel label = new JLabel("Site:");
        GridBagUtil layout = new GridBagUtil(panel);
        layout.add(label, 0, 0, 1, 1, 0.0, 0.0,
                GridBagConstraints.NONE,
                GridBagConstraints.WEST,
                new Insets(0, 0, 0, 0));
        _siteButtons = new JRadioButton[sites.length];
        for (int i = 0; i < sites.length; i++) {
            _siteButtons[i] = new JRadioButton(sites[i].getName(), i == 0);
            layout.add(_siteButtons[i], i + 1, 0, 1, 1, 0.0, 0.0,
                    GridBagConstraints.NONE,
                    GridBagConstraints.WEST,
                    new Insets(0, 3, 0, 0));
            group.add(_siteButtons[i]);
            _siteButtons[i].addItemListener(itemListener);
View Full Code Here

                    setPlotVisible(cb.getText(), cb.isSelected());
                }
            }
        };
        JLabel label = new JLabel("Plot:");
        GridBagUtil layout = new GridBagUtil(_plotTypePanel);
        layout.add(label, 0, 0, 1, 1, 0.0, 0.0,
                GridBagConstraints.NONE,
                GridBagConstraints.WEST,
                new Insets(0, 0, 0, 0));
        _plotTypeButtons = new JCheckBox[types.length];
        for (int i = 0; i < types.length; i++) {
            _plotTypeButtons[i] = new JCheckBox(types[i], selected[i]);
            layout.add(_plotTypeButtons[i], i + 1, 0, 1, 1, 0.0, 0.0,
                    GridBagConstraints.NONE,
                    GridBagConstraints.WEST,
                    new Insets(0, 3, 0, 0));
            _plotTypeButtons[i].addItemListener(itemListener);
            setPlotVisible(types[i], selected[i]);
View Full Code Here

                    }
                }
            }
        };
        JLabel label = new JLabel("Time:");
        GridBagUtil layout = new GridBagUtil(panel);
        layout.add(label, 0, 0, 1, 1, 0.0, 0.0,
                GridBagConstraints.NONE,
                GridBagConstraints.WEST,
                new Insets(0, 0, 0, 0));
        for (int i = 0; i < _availableTimeZoneDisplayNames.length; i++) {
            _timeZoneButtons[i] = new JRadioButton(_availableTimeZoneDisplayNames[i], i == 0);
            layout.add(_timeZoneButtons[i], i + 1, 0, 1, 1, 0.0, 0.0,
                    GridBagConstraints.NONE,
                    GridBagConstraints.WEST,
                    new Insets(0, 3, 0, 0));
            group.add(_timeZoneButtons[i]);
            _timeZoneButtons[i].addItemListener(itemListener);
View Full Code Here

        // create labels and values
        makePanelItems();

        // organize the labels and fields in a GridBagLayout
        setLayout(new GridBagLayout());
        layout = new GridBagUtil(this, (GridBagLayout) getLayout());

        if (orient == SwingConstants.HORIZONTAL) {
            horizontalPanelLayout();
        } else {
            verticalPanelLayout();
View Full Code Here

     * Create the accessory panel.
     */
    protected void createAccessoryPanel() {
        JPanel accessoryPanel = new JPanel();
        accessoryPanel.setLayout(new GridBagLayout());
        GridBagUtil layout = new GridBagUtil(accessoryPanel, (GridBagLayout) accessoryPanel.getLayout());
        accessoryPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        formatBox = new JComboBox();
        formatBox.setSelectedItem(JPEG_TYPE);
        formatBox.setToolTipText(_I18N.getString("selectFileFormat"));
        formatBox.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                updateFileSuffix();
            }
        });
        int r = 0;
        int none = GridBagConstraints.NONE;
        int west = GridBagConstraints.WEST;
        layout.add(new JLabel(_I18N.getString("saveAsType") + ":"), 0, r++, 1, 1, 0.0, 0.0, none, west);
        layout.add(formatBox, 0, r++, 1, 1, 0.0, 0.0, none, west);
        layout.add(new JLabel(" "), 0, r++, 1, 1, 0.0, 0.0, none, west); // space
        layout.add(new JLabel(_I18N.getString("options") + ":"), 0, r++, 1, 1, 0.0, 0.0, none, west);

        useAll = new JRadioButton(_I18N.getString("saveImage"));
        useAll.setToolTipText(_I18N.getString("saveImageAreaNoGraphics"));
        useAll.setSelected(true);
        useAll.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                updateFormatBox(false);
            }
        });

        useView = new JRadioButton(_I18N.getString("saveCurrentView"));
        useView.setToolTipText(_I18N.getString("saveImageAreaWithGraphics"));
        useView.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                updateFormatBox(true);
            }
        });

        ButtonGroup bg = new ButtonGroup();
        bg.add(useAll);
        bg.add(useView);
        layout.add(useAll, 0, r++, 1, 1, 0.0, 0.0, none, west);
        layout.add(useView, 0, r++, 1, 1, 0.0, 0.0, none, west);

        setAccessory(accessoryPanel);
    }
View Full Code Here

TOP

Related Classes of jsky.util.gui.GridBagUtil

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.