Package javax.swing

Examples of javax.swing.BoxLayout


            Component pal = getGUI();
            if (pal == null)
                pal = new JLabel("No Palette");

            JPanel p = new JPanel();
            p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
            p.setAlignmentX(Component.LEFT_ALIGNMENT);
            p.setAlignmentY(Component.BOTTOM_ALIGNMENT);
            p.add(pal);

            JScrollPane scrollPane = new JScrollPane(p, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
View Full Code Here


    LinkedList children = new LinkedList();

    public OMControlPanel() {

        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

        JPanel navBox = new JPanel();
        navBox.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
        navBox.setLayout(new BorderLayout());
View Full Code Here

        public NameFetcher(GoToButton buttonToName) {

            notifyThis = buttonToName;
            setTitle(i18n.get(GoToMenu.class, "addViewTitle", "Add View"));
            JPanel palette = new JPanel();
            palette.setLayout(new BoxLayout(palette, BoxLayout.Y_AXIS));

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

            label = new JLabel(i18n.get(GoToMenu.class,
View Full Code Here

    public Component getGUI() {

        if (box == null) {

            box = new JPanel();
            box.setLayout(new BoxLayout(box, BoxLayout.Y_AXIS));
            box.setAlignmentX(Component.LEFT_ALIGNMENT);

            JPanel stuff = new JPanel();
            // stuff.setLayout(new BoxLayout(stuff,
            // BoxLayout.X_AXIS));
View Full Code Here

    public void setGUI() {

        if (palette == null) {
            setTitle("Modify Line Stroke Parameters");
            palette = new JPanel();
            palette.setLayout(new BoxLayout(palette, BoxLayout.Y_AXIS));

            JPanel capPanel = PaletteHelper.createPaletteJPanel("Line Cap Decoration");
            String[] capStrings = { "Butt", "Round", "Square" };
            capBox = new JComboBox(capStrings);
            capBox.addActionListener(this);
View Full Code Here

     */
    public void resetGUI() {
        removeAll();

        JPanel palette = new JPanel();
        palette.setLayout(new BoxLayout(palette, BoxLayout.Y_AXIS));
        palette.setAlignmentX(Component.CENTER_ALIGNMENT); // LEFT
        palette.setAlignmentY(Component.CENTER_ALIGNMENT); // BOTTOM

        String[] requestorNames = new String[drawingToolRequestors.size()];

        if (Debug.debugging("omdtl")) {
            Debug.output("Have " + requestorNames.length + " REQUESTORS");
        }

        for (int i = 0; i < requestorNames.length; i++) {
            requestorNames[i] = ((DrawingToolRequestor) drawingToolRequestors.elementAt(i)).getName();
            if (requestorNames[i] == null) {
                Debug.output("OMDrawingToolLauncher has a requestor that is unnamed.  Please assign a name to the requestor");
                requestorNames[i] = "-- Unnamed --";
            }
            if (Debug.debugging("omdtl")) {
                Debug.output("Adding REQUESTOR " + requestorNames[i]
                        + " to menu");
            }
        }

        Object oldChoice = null;
        if (requestors != null) {
            oldChoice = requestors.getSelectedItem();
        }

        requestors = new JComboBox(requestorNames);
        requestors.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JComboBox jcb = (JComboBox) e.getSource();
                String currentChoice = (String) jcb.getSelectedItem();
                setCurrentRequestor(currentChoice);
            }
        });

        if (requestorNames.length > 0) {
            if (oldChoice == null) {
                requestors.setSelectedIndex(0);
            } else {
                requestors.setSelectedItem(oldChoice);
            }
        }

        JPanel panel = PaletteHelper.createPaletteJPanel(i18n.get(OMDrawingToolLauncher.class,
                "panelSendTo",
                "Send To:"));
        panel.add(requestors);
        palette.add(panel);

        if (Debug.debugging("omdtl")) {
            Debug.output("Figuring out tools, using names");
        }

        panel = PaletteHelper.createPaletteJPanel(i18n.get(OMDrawingToolLauncher.class,
                "panelGraphicType",
                "Graphic Type:"));
        panel.add(getToolWidgets(useTextEditToolTitles));
        palette.add(panel);

        String[] renderTypes = new String[3];

        renderTypes[OMGraphic.RENDERTYPE_LATLON - 1] = rtc[0];
        renderTypes[OMGraphic.RENDERTYPE_XY - 1] = rtc[1];
        renderTypes[OMGraphic.RENDERTYPE_OFFSET - 1] = rtc[2];

        JComboBox renderTypeList = new JComboBox(renderTypes);
        renderTypeList.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JComboBox jcb = (JComboBox) e.getSource();
                String currentChoice = (String) jcb.getSelectedItem();
                if (currentChoice == rtc[2]) {
                    defaultGraphicAttributes.setRenderType(OMGraphic.RENDERTYPE_OFFSET);
                } else if (currentChoice == rtc[1]) {
                    defaultGraphicAttributes.setRenderType(OMGraphic.RENDERTYPE_XY);
                } else {
                    defaultGraphicAttributes.setRenderType(OMGraphic.RENDERTYPE_LATLON);
                }
            }
        });

        renderTypeList.setSelectedIndex(defaultGraphicAttributes.getRenderType() - 1);

        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",
                "Rendering Type:");
        JPanel panel2 = new JPanel();
        JLabel renderTypeLabel = new JLabel(interString);
        panel2.add(renderTypeLabel);
        panel2.add(renderTypeList);

        panel3 = new JPanel();
        updateDrawingAttributesGUI();

        gridbag.setConstraints(panel2, c);
        panel.add(panel2);
        gridbag.setConstraints(panel3, c);
        panel.add(panel3);
        palette.add(panel);

        JButton createButton = new JButton(i18n.get(OMDrawingToolLauncher.class,
                "createButton",
                "Create Graphic"));
        createButton.setActionCommand(CreateCmd);
        createButton.addActionListener(this);

        JPanel dismissBox = new JPanel();
        JButton dismiss = new JButton(i18n.get(OMDrawingToolLauncher.class,
                "dismiss",
                "Close"));
        dismissBox.setLayout(new BoxLayout(dismissBox, BoxLayout.X_AXIS));
        dismissBox.setAlignmentX(Component.CENTER_ALIGNMENT);
        dismissBox.setAlignmentY(Component.BOTTOM_ALIGNMENT);
        dismissBox.add(createButton);
        dismissBox.add(dismiss);

        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
        setAlignmentX(Component.CENTER_ALIGNMENT);
        setAlignmentY(Component.BOTTOM_ALIGNMENT);
        add(palette);
        add(dismissBox);

View Full Code Here

            descriptionColor = Color.blue;
        }

        private void setupRendererUI() {
            panel = new JPanel();
            panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));

            nameRenderer = new DefaultTreeCellRenderer();
            descriptionRenderer = new DefaultTreeCellRenderer();

            panel.add(nameRenderer);
View Full Code Here

            panel = new JPanel();
            JTabbedPane tabs = new JTabbedPane();

            JPanel bfPanel = new JPanel();
            bfPanel.setLayout(new BoxLayout(bfPanel, BoxLayout.Y_AXIS));
            bfPanel.setAlignmentX(Component.CENTER_ALIGNMENT); // LEFT
            bfPanel.setAlignmentY(Component.CENTER_ALIGNMENT); // BOTTOM
            tabs.addTab("Layer Visibility", bfPanel);

            for (int i = 0; i < layerComps.length; i++) {
View Full Code Here

    bRemove = resources.getButton("removeTransform", this);
    p2.add(bRemove);
    p1.add(p2, BorderLayout.EAST);
     
    composedTransformPanel = new  JPanel();
    composedTransformPanel.setLayout(new BoxLayout(composedTransformPanel, BoxLayout.Y_AXIS));
   
    // Make panel for all composed transformations
    transformCombos =  new ArrayList(((TransformData)dataCopy).getTransformChildren().size() +1);
    transformTables =  new ArrayList(((TransformData)dataCopy).getTransformChildren().size() +1);
 
View Full Code Here

   
    // Other properties
   
    //JPanel pProp= new JPanel(new GridLayout(propertyData.length,1));
    JPanel pProp= new JPanel();
    pProp.setLayout(new BoxLayout(pProp, BoxLayout.Y_AXIS));
    propertiesTable = new JTable[propertyData.length];
    propertiesCheckBox = new JCheckBox[propertyData.length];
   
    for (int i=0; i<propertyData.length; i++){
     
View Full Code Here

TOP

Related Classes of javax.swing.BoxLayout

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.