Package net.miginfocom.swing

Examples of net.miginfocom.swing.MigLayout


        folderParser = new FolderParser(new Dimension(0, 0), 1/*spp*/, 1/*sequences*/, controls);
        if (!folderParser.setSource(myStimuliFolder))
            throw new TestException(myStimuliFolder.getAbsolutePath() + " Cannot be used as the source folder.");

        myPage.setLayout(new MigLayout("fill, insets 0, gap " + border + " " + border + ", wrap " + dropfieldColumns, "[fill, sg]", "[fill]"));

        /** Draw container **/
        lsContainer = new DropField(null);
        myPage.add(lsContainer, "east, gapleft " + border + ", w " + containerWidth);

View Full Code Here


        else
            theTextArea.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, new CopyOnWriteArraySet<AWTKeyStroke>(Arrays.asList(new AWTKeyStroke[]{AWTKeyStroke.getAWTKeyStroke('\t', 0)})));
        theTextArea.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, new CopyOnWriteArraySet<AWTKeyStroke>(Arrays.asList(new AWTKeyStroke[]{AWTKeyStroke.getAWTKeyStroke('\t', java.awt.event.InputEvent.SHIFT_DOWN_MASK)})));

        JScrollPane theScrollPane = new JScrollPane(theTextArea);
        setLayout(new MigLayout("fill, insets 0"));
        add(source.labelAttribute("name"), rows > 1 ? "wrap" : "");
        add(theScrollPane, "growx");
    }
View Full Code Here

        super(source.attribute("name"));
        m_field = new Field(source, Field.TRACE_CLICK);
        m_required = source.booleanAttribute("required");
        boolean high = (!source.attribute("top").equals("")) && (!source.attribute("bottom").equals(""));
        String heightString = m_field.hasImage() ? "" : (high ? ", h 10cm" : ", h 1cm");
        setLayout(new MigLayout("fill, insets 0"));
        add(m_field, "grow" + heightString);
    }
View Full Code Here

        finalMessage = source.child("final").attribute("finalMessage");

        mySaveFolder = source.pathToFile(source.textChild("results"));
        myStimuliFolder = source.pathToFile(source.textChild("stimuli"));
        head.setLayout(new MigLayout("insets 0, fillx", "push[][]"));

        headerTextLabel = new JLabel();
        headerTextLabel.setHorizontalAlignment(SwingConstants.CENTER);
        head.add(headerTextLabel, "pos 50%-pref/2 0.5al");
View Full Code Here

        Arrays.fill(visitedPages, false);
        myFolderParser.setInnerStimuli(0);
        visitedPages[0] = true;
        visitedPageCount = 1;

        myPage.setLayout(new MigLayout("fill, wrap 1"));
        myPage.add(myFolderParser.getPanel(), "north, alignx 50%");

        /**
         * myPage should hold (1) Stimuli, and (2) Response devices this is (2)
         */
 
View Full Code Here

        myPanel = new JPanel();
        myPanel.setSize(size);
        myResponseDeviceList = new ResponseDeviceList(source.child("questions"));
        myPageScroller = new PageScroller(myPanel, myResponseDeviceList);
        myPanel.removeAll();
        myPanel.setLayout(new MigLayout("fill"));
        myPanel.add(myPageScroller.current(), "align 50% 50%");
    }
View Full Code Here

     */
    public RadioButtons(ExtendedElement source) {
        super(source.attribute("name"));
        boolean required = source.booleanAttribute("required");
        int columns = source.intAttribute("columns");
        setLayout(new MigLayout("fill, insets 0, wrap " + columns));
        String[] choices = source.textChildren("choice");
        theButtons = new ButtonGroup();
        add(new JLabel(source.attribute("name")), "west, aligny top");
        noButton = new JRadioButton("SKATTA-NO-RADIOBUTTON-SELECTED", required);
        if (required) theButtons.add(noButton);
View Full Code Here

        m_pauseButton.setToolTipText("Display a pause button next to playable stimuli.");

        JButton nextButton = new JButton("Next");
        JButton backButton = new JButton("Back");

        setLayout(new MigLayout("fill", "[grow 0|fill, grow, sg col]"));

        JPanel pagesPanel = new JPanel(new MigLayout("fill, insets 0", "[sg, fill, grow]"));
        pagesPanel.setBorder(BorderFactory.createTitledBorder("Pages"));
        pagesPanel.add(m_backButton);
        pagesPanel.add(m_loopButton);
        add(pagesPanel, "span, wrap, growx");

        JPanel stimuliPanel = new JPanel(new MigLayout("fill, insets 0", "[sg, fill, grow]"));
        stimuliPanel.setBorder(BorderFactory.createTitledBorder("Stimuli"));
        stimuliPanel.add(m_stopButton);
        stimuliPanel.add(m_pauseButton);
        stimuliPanel.add(repeatLabel1, "split 3, grow 0");
        stimuliPanel.add(m_repeatField);
View Full Code Here

    }
// ============= Protected Methods ============== //
// ============= Private Methods ============== //
    private void setup(){
  //rootPanel = new JPanel(new MigLayout("","grow","grow"));
  rootPanel = new JPanel(new MigLayout("fill"));
  infoLabel = new JLabel("");
  actionB = new JButton("Stop");
  actionB.addActionListener(this);
  progressBar = new JProgressBar();
  progressBar.setOrientation(SwingConstants.HORIZONTAL);
View Full Code Here

  thread.start();
    }
// ============= Protected Methods ============== //
// ============= Private Methods ============== //
    private void setup(){
  rootPanel = new JPanel(new MigLayout("fill"));
  infoLabel = new JLabel("");
  actionB = new JButton("Cancel");
  actionB.addActionListener(this);

  rootPanel.add(infoLabel,"dock north");
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.