Package java.awt

Examples of java.awt.GridBagConstraints


     * longitude
     */
    protected void makeWidgets() {
        String locText;
        GridBagLayout gridbag = new GridBagLayout();
        GridBagConstraints c = new GridBagConstraints();

        setLayout(gridbag);
        locText = i18n.get(UTMCoordPanel.class,
                "border",
                "Zone Number|Hemisphere|Easting|Northing");
View Full Code Here


        JPanel p;
        if (gui == null) {
            gui = PaletteHelper.createVerticalPanel("Earthquakes");

            GridBagLayout gridbag = new GridBagLayout();
            GridBagConstraints constraints = new GridBagConstraints();
            gui.setLayout(gridbag);
            constraints.fill = GridBagConstraints.HORIZONTAL; // fill
            // horizontally
            constraints.gridwidth = GridBagConstraints.REMAINDER; //another
            // row
View Full Code Here

            palette.add(namePanel);

            JPanel buttonPanel = new JPanel();
            GridBagLayout gridbag = new GridBagLayout();
            GridBagConstraints c = new GridBagConstraints();

            buttonPanel.setLayout(gridbag);

            applybutton = new JButton(i18n.get(GoToMenu.class,
                    "addView",
View Full Code Here

    }

    protected WindowSupport init() {
        stack = new Stack();
        GridBagLayout gridbag = new GridBagLayout();
        GridBagConstraints c = new GridBagConstraints();
        setLayout(gridbag);

        // Has to happen before first push
        browserLaunch = new JButton("Open in Browser");
        URL url = this.getClass().getResource("w.gif");
        ImageIcon imageIcon = new ImageIcon(url, "Go back");
        backButton = new JButton(imageIcon);
        dismissButton = new JButton("Close");
        //////
        jep = new JEditorPane();
        jep.setEditable(false);
        jep.addHyperlinkListener(new HyperlinkListener() {
            public void hyperlinkUpdate(HyperlinkEvent e) {
                if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                    JEditorPane pane = (JEditorPane) e.getSource();

                    if (e instanceof HTMLFrameHyperlinkEvent) {
                        Debug.message("minibrowser",
                                "processing HTMLFrameHyperlinkEvent");
                        HTMLFrameHyperlinkEvent evt = (HTMLFrameHyperlinkEvent) e;
                        HTMLDocument doc = (HTMLDocument) pane.getDocument();
                        doc.processHTMLFrameHyperlinkEvent(evt);
                    } else {
                        Debug.message("minibrowser",
                                "processing HyperlinkEvent");
                        try {
                            push(e.getURL());
                        } catch (Throwable t) {
                            t.printStackTrace();
                        }
                    }
                }
            }
        });

        JScrollPane jsp = new JScrollPane(jep, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);

        c.gridwidth = GridBagConstraints.REMAINDER;
        c.fill = GridBagConstraints.BOTH;
        c.anchor = GridBagConstraints.NORTHWEST;
        c.insets = new Insets(5, 5, 5, 5);
        c.weightx = 1;
        c.weighty = 1;
        gridbag.setConstraints(jsp, c);
        add(jsp);

        JPanel buttonPanel = new JPanel();
        GridBagLayout gridbag2 = new GridBagLayout();
        GridBagConstraints c2 = new GridBagConstraints();
        buttonPanel.setLayout(gridbag2);

        c2.fill = GridBagConstraints.NONE;
        c2.anchor = GridBagConstraints.WEST;
        c2.weightx = 0;
View Full Code Here

        //      setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
        this.setOpaque(false);

        JPanel panel = new JPanel();
        GridBagLayout internalGridbag = new GridBagLayout();
        GridBagConstraints c2 = new GridBagConstraints();
        panel.setLayout(internalGridbag);

        zoomDelegate = new ZoomSupport(this);
        zoomInButton = getButton("zoomIn", "Zoom In", zoomInCmd);
        c2.gridx = 0;
View Full Code Here

     * longitude
     */
    protected void makeWidgets() {
        String locText;
        GridBagLayout gridbag = new GridBagLayout();
        GridBagConstraints c = new GridBagConstraints();

        setLayout(gridbag);
        locText = i18n.get(MGRSCoordPanel.class, "border", "MGRS Coordinate");
        setBorder(new TitledBorder(new EtchedBorder(), locText));

View Full Code Here

                JLabel label = new JLabel(shpFileName, JLabel.LEFT);
                JPanel panel = new JPanel();
                GridBagLayout gridbag = new GridBagLayout();
                panel.setLayout(gridbag);
                GridBagConstraints c = new GridBagConstraints();
                c.weightx = 1.0;
                c.insets = new Insets(2, 2, 2, 2);
                c.anchor = GridBagConstraints.WEST;
                c.fill = GridBagConstraints.HORIZONTAL;
                gridbag.setConstraints(label, c);
View Full Code Here

        Color current = dark;

        p.removeAll();
        GridBagLayout gridbag = new GridBagLayout();
        p.setLayout(gridbag);
        GridBagConstraints c = new GridBagConstraints();
        c.anchor = GridBagConstraints.NORTHWEST;
        c.gridx = GridBagConstraints.REMAINDER;
        c.fill = GridBagConstraints.HORIZONTAL;
        c.weightx = 1.0;
View Full Code Here

    public Component getGUI() {
        if (panel == null) {
            panel = new JPanel();
            GridBagLayout gridbag = new GridBagLayout();
            GridBagConstraints c = new GridBagConstraints();

            panel.setLayout(gridbag);
            c.gridx = GridBagConstraints.REMAINDER;
            c.weightx = 1.0;
            c.insets = new Insets(1, 5, 1, 5);
            c.fill = GridBagConstraints.HORIZONTAL;
            JPanel daPanel1 = PaletteHelper.createHorizontalPanel("Paint Settings for Shapes");
            daPanel1.add(shapeDA.getGUI());
            JPanel daPanel2 = PaletteHelper.createHorizontalPanel("Paint Settings for Intersected Shapes");
            daPanel2.add(shapeDASelected.getGUI());

            gridbag.setConstraints(daPanel1, c);
            gridbag.setConstraints(daPanel2, c);
            panel.add(daPanel1);
            panel.add(daPanel2);

            c.weighty = 1.0;
            c.fill = GridBagConstraints.BOTH;
            JPanel tablePanel = getFileListControl();
            gridbag.setConstraints(tablePanel, c);
            panel.add(tablePanel);

            JPanel checkPanel = new JPanel();
            GridBagLayout gb = new GridBagLayout();
            checkPanel.setLayout(gb);
            GridBagConstraints c2 = new GridBagConstraints();

            c2.anchor = GridBagConstraints.WEST;
            c2.gridx = GridBagConstraints.REMAINDER;
            showCrossingsButton = new JCheckBox("Show Crossing Points", showCrossingPoints);
            showCrossingsButton.setToolTipText("<html>Show ordered points where drawn lines cross Shapes.");
View Full Code Here

        panel = PaletteHelper.createHorizontalPanel(i18n.get(OMDrawingToolLauncher.class,
                "panelGraphicAttributes",
                "Graphic Attributes:"));
        GridBagLayout gridbag = new GridBagLayout();
        GridBagConstraints c = new GridBagConstraints();
        c.anchor = GridBagConstraints.CENTER;
        panel.setLayout(gridbag);

        String interString = i18n.get(OMDrawingToolLauncher.class,
                "panelRenderingType",
View Full Code Here

TOP

Related Classes of java.awt.GridBagConstraints

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.