Package java.awt

Examples of java.awt.GridLayout


      columns = 2;
    } else {
      columns = 1;
    }
   
    JPanel spanel = new JPanel(new GridLayout(0, columns));
    panel.add(spanel, BorderLayout.PAGE_END);
   
    for(Statistics child: getChildren().values()) {
      GStatistics gs = (GStatistics)child;
     
View Full Code Here


     * @return the panel that got created
     */
    public static JPanel createHorizontalPanel(String title) {
        JPanel panel = new JPanel();
        //      panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
        panel.setLayout(new GridLayout(1, 0));
        if (title != null) {
            panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
                    title));
        } else {
            panel.setBorder(BorderFactory.createEtchedBorder());
View Full Code Here

     * @return the panel that got created
     */
    public static JPanel createVerticalPanel(String title) {
        JPanel panel = new JPanel();
        //      panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
        panel.setLayout(new GridLayout(0, 1));
        if (title != null) {
            panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
                    title));
        } else {
            panel.setBorder(BorderFactory.createEtchedBorder());
View Full Code Here

                    title));
        } else {
            panel.setBorder(BorderFactory.createEtchedBorder());
        }

        panel.setLayout(new GridLayout(0, 1));
        return panel;
    }
View Full Code Here

        add(new JLabel("      "), BorderLayout.NORTH);
        add(new JLabel("      "), BorderLayout.SOUTH);
        message = new JLabel("");
        jpb = new JProgressBar(0, 100);
        JPanel cpanel = new JPanel();
        cpanel.setLayout(new GridLayout(0, 1));
        cpanel.add(jpb);
        cpanel.add(message);

        add(cpanel, BorderLayout.CENTER);
View Full Code Here

                    }
                });
                autoTimerButton.setToolTipText("<HTML><BODY>Only run the timer when the layer is active on the map.</BODY></HTML>");
            }

            JPanel tbp = new JPanel(new GridLayout(0, 1));
            tbp.add(timerButton);
            tbp.add(autoTimerButton);
            box.add(tbp);
        }
        return box;
View Full Code Here

        JPanel stuff = new JPanel();
        stuff.setBorder(BorderFactory.createRaisedBevelBorder());
        // stuff.add(new JLabel(prettyName));
        stuff.add(drawingAttributes.getGUI());

        JPanel checks = new JPanel(new GridLayout(0, 1));
        JCheckBox enableButton = new JCheckBox(i18n.get(SpatialIndexHandler.class,
                "enableButton",
                "Show"));
        enableButton.setSelected(enabled);
        enableButton.addActionListener(new ActionListener() {
View Full Code Here

            joinBox.addActionListener(this);
            joinPanel.add(joinBox);
            palette.add(joinPanel);

            JPanel widthPanel = new JPanel();
            widthPanel.setLayout(new GridLayout(0, 1));

            JLabel widthLabel = new JLabel("Line Width");
            widthField = new JTextField(Float.toString(basicStroke.getLineWidth()), 4);
            widthField.setToolTipText("Enter pixel width of line.");
            widthPanel.add(widthLabel);
            widthPanel.add(widthField);

            JPanel mlPanel = new JPanel();
            mlPanel.setLayout(new GridLayout(0, 1));

            JLabel miterLimitLabel = new JLabel("Miter Limit");
            miterLimitField = new JTextField(Float.toString(basicStroke.getMiterLimit()), 4);
            miterLimitField.setToolTipText("Min angle for corner decorations.");

            mlPanel.add(miterLimitLabel);
            mlPanel.add(miterLimitField);

            JPanel dlPanel = new JPanel();
            dlPanel.setLayout(new FlowLayout());

            JLabel dashLabel = new JLabel("Dash Pattern");
//            float[] da = basicStroke.getDashArray();
//            String dashArrayString = dashArrayToString(da);

            dashField = new JTextField(dashArrayToString(basicStroke.getDashArray()), 15);
            dashField.setToolTipText("Number of pixels on off on ...");
            dlPanel.add(dashLabel);
            dlPanel.add(dashField);

            JPanel dpPanel = new JPanel();
            dpPanel.setLayout(new GridLayout(0, 1));

            JLabel dashPhaseLabel = new JLabel("Dash Phase");
            dashPhaseField = new JTextField(Float.toString(basicStroke.getDashPhase()), 4);
            dashPhaseField.setToolTipText("Phase to start dash array.");
            dpPanel.add(dashPhaseLabel);
            dpPanel.add(dashPhaseField);

            JPanel textFieldPanel = new JPanel();
            textFieldPanel.setLayout(new GridLayout(0, 3));
            textFieldPanel.add(widthPanel);
            textFieldPanel.add(dpPanel);
            textFieldPanel.add(mlPanel);
            palette.add(textFieldPanel);
            palette.add(dlPanel);

            JPanel buttonPanel = new JPanel();
            buttonPanel.setLayout(new GridLayout(0, 2));
            closebutton = new JButton("Cancel");
            closebutton.addActionListener(this);
            applybutton = new JButton("OK");
            applybutton.addActionListener(this);
            buttonPanel.add(applybutton);
View Full Code Here

            scrollPane.setAlignmentY(java.awt.Component.TOP_ALIGNMENT);

            box.add(scrollPane);

            if (declutterMatrix != null) {
                JPanel dbp = new JPanel(new GridLayout(0, 1));

                JCheckBox declutterButton = new JCheckBox(i18n.get(LocationLayer.class,
                        "declutterNames",
                        "Declutter Names"), useDeclutterMatrix);
                declutterButton.addActionListener(new ActionListener() {
View Full Code Here

            layerPanel.add(showRulerButton);
            layerPanel.add(show15Button);
//            layerPanel.add(showBelow1Button);
            palette.add(layerPanel);

            JPanel subbox3 = new JPanel(new GridLayout(0, 1));

            JButton setProperties = new JButton(i18n.get(GraticuleLayer.class,
                    "setProperties",
                    "Preferences"));
            setProperties.setActionCommand(DisplayPropertiesCmd);
View Full Code Here

TOP

Related Classes of java.awt.GridLayout

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.