Package net.miginfocom.swing

Examples of net.miginfocom.swing.MigLayout


        JButton browseStimuli = new JButton("Browse");
        browseStimuli.setActionCommand("browseStimuli");
        browseStimuli.addActionListener(this);

        setLayout(new MigLayout("fill, wrap 1", "[fill, grow]"));

        add(titleComponent(m_nameField, "Test name"));
        add(titleComponent(m_headerField, "Header"));
        add(titleComponent(m_passwordField, "Password"));

        JPanel typePanel = new JPanel(new MigLayout("fill, insets 0", "[fill]"));
        typePanel.add(m_standardButton);
        typePanel.add(m_ddButton);
        typePanel.add(m_syncButton);
        add(titleComponent(typePanel, "Test type"));

        JPanel pausePanel = new JPanel(new MigLayout("fill, nogrid, insets 0", "[fill]"));
        pausePanel.add(pauseLabel, "grow 0, sg label");
        pausePanel.add(m_pauseDelayField, "alignx left, w 50lp!");
        pausePanel.add(m_pauseMinutesButton, "grow 0");
        pausePanel.add(m_pausePagesButton, "wrap, grow 0, gapright push");
        pausePanel.add(pauseMessageLabel, "sg label");
        pausePanel.add(m_pauseMessageField, "growx");
        add(titleComponent(pausePanel, "Pauses"));

        JPanel resultsPanel = new JPanel(new MigLayout("fill, insets 0"));
        resultsPanel.add(m_resultsField, "growx");
        resultsPanel.add(browseResults);
        add(titleComponent(resultsPanel, "Results storage"));

        JPanel stimuliPanel = new JPanel(new MigLayout("fill, insets 0"));
        stimuliPanel.add(m_stimuliField, "growx");
        stimuliPanel.add(browseStimuli);
        add(titleComponent(stimuliPanel, "Stimuli source"));

        JPanel labelPanel = new JPanel(new MigLayout("fill, wrap 2, insets 0", "[sg, fill]"));
        labelPanel.add(m_startField);
        labelPanel.add(m_endField);
        labelPanel.add(m_nextField);
        labelPanel.add(m_previousField);
        labelPanel.add(m_upField);
View Full Code Here


        m_bottomField.setToolTipText("A label that will be displayed at the bottom of the dropfield");

        m_listComponent = new JLabel(getName());
        m_nameField.getDocument().addDocumentListener(this);

        setLayout(new MigLayout("fillx, insets 0, wrap 2", "[][fill, sg, grow]", "[align baseline, grow 0]"));

        add(nameLabel);
        add(m_nameField);
        add(backgroundLabel);
        add(m_backgroundField);
View Full Code Here

    private int cursor;
    private ResponseDeviceList theList;

    private JPanel newSubpage() {
        JPanel panel = new JPanel();
        panel.setLayout(new MigLayout("fillx, gapy 4:20, flowy"));
        mySubpages.add(panel);
        return panel;
    }
View Full Code Here

     * Caller: ResponsDeviceList one time. Responsdevices will keep same order
     * during the whole test.
     */
    public ResponseDeviceRow() {
        myResponseDevices = new Vector<ResponseDevice>();
        setLayout(new MigLayout("insets 0, w 10cm, gapx 4, fillx"));
        m_notSetPanel = new JPanel();
        m_notSetPanel.setBackground(java.awt.Color.RED);
        m_notSetPanel.setOpaque(false);
        add(m_notSetPanel, "w 3!, gapx 2, growy");
    }
View Full Code Here

        m_controlButtons = new ControlButtons(controls, this);
        m_panel.setSize(maxsize);
        m_panel.setMaximumSize(maxsize);
        m_panel.setMinimumSize(maxsize);
        m_panel.setPreferredSize(maxsize);
        m_panel.setLayout(new MigLayout("fill, flowy"));
        m_maxsize.height -= m_controlButtons.getPreferredSize().height;
        m_player = new MediaPlayer();
        m_player.setFixedAspectRatio(true);
        m_player.setControlPanelVisible(false);
        m_player.setPlaybackLoop(m_replay);
View Full Code Here

        m_name = source.attribute("name");
        setOpaque(true);

        addComponentListener(this);

        setLayout(new MigLayout("fill"));

        /* Color */
        String background = source.attribute("background");
        if (background.length() == 7 && background.charAt(0) == '#') {
            bgColor = new Color(Integer.parseInt(background.substring(1, 3), 16),
View Full Code Here

        m_finalField.setToolTipText("The message that will be displayed after the test has been saved.");

        JButton saveButton = new JButton("Save");
        JButton backButton = new JButton("Back");

        setLayout(new MigLayout("fill"));

        add(titleComponent(m_headerField, "Final Header"), "wrap, growx");
        add(titleComponent(m_finalField, "Final Message"), "wrap, growx");

        add(m_questions, "wrap, grow, spanx, pushy");
View Full Code Here

        m_leftField.setEnabled(false);
        m_rightField.setEnabled(false);
        m_topField.setEnabled(false);
        m_bottomField.setEnabled(false);

        setLayout(new MigLayout("fillx, insets 0, wrap 2", "[][fill, sg, grow]", "[align baseline, grow 0]"));

        add(m_activeButton, "span");
        add(nameLabel);
        add(m_nameField);
        add(backgroundLabel);
View Full Code Here

        m_downButton.addActionListener(this);
        m_deleteButton = new JButton("Delete");
        m_deleteButton.addActionListener(this);

        m_detailsPanel = new JPanel();
        m_detailsPanel.setLayout(new MigLayout("fill, insets 0", "[fill, grow]", "[fill, grow]"));

        m_nullPanel = new JPanel();
        m_nullPanel.setLayout(new MigLayout("fill"));
        m_nullPanel.add(new JLabel("<html>Select one of the questions on the right to edit its details." + (m_groupable ? "<br><br>You can select multiple questions by holding shift or control to group questions." : "") + "</html>"), "grow");

        setLayout(new MigLayout("fill", "[sg|sg]"));
        add(m_detailsPanel, "grow, spany 3");
        add(new JScrollPane(m_list, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), "wrap, grow");
        add(m_upButton, "split 2, growx, sg button");
        add(m_newButton, "wrap, growx, sg button");
        add(m_downButton, "split 2, growx, sg button");
View Full Code Here

            } else {
                fgColor = list.getForeground();
                bgColor = list.getBackground();
            }
            JPanel panel = new JPanel();
            panel.setLayout(new MigLayout("fill, insets 0, gap 0"));
            panel.setBackground(bgColor);
            panel.setForeground(fgColor);
            int endingGroups = 0;
            if (q.getNext() != null)
                endingGroups = q.groupsEndedBefore(q.getNext());
View Full Code Here

TOP

Related Classes of net.miginfocom.swing.MigLayout

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.