Examples of GridBagLineAdder


Examples of com.qspin.qtaste.ui.tools.GridBagLineAdder

            JLabel iconlabel = new JLabel(topLeftLogo);

            mHeaderPanel = new ConfigInfoPanel(this);
            mHeaderPanel.init();

            GridBagLineAdder centeradder = new GridBagLineAdder(center);
            JLabel sep = new JLabel("  ");
            sep.setFont(ResourceManager.getInstance().getSmallFont());
            sep.setUI(new FillLabelUI(ResourceManager.getInstance().getLightColor()));
            centeradder.setWeight(1.0f, 0.0f);
            centeradder.add(mHeaderPanel);

            // prepare the right panels containg the main information:
            // the right pane is selected through the tabbed pane:
            //    - Test cases: management of test cases and test suites
            //    - Test campaign: management of test campaigns
View Full Code Here

Examples of com.qspin.qtaste.ui.tools.GridBagLineAdder

   public TitlePanel(String pTitle, String pIcon, boolean pPanes)
   {
      super(new GridBagLayout());
      Border b = BorderFactory.createLineBorder(ResourceManager.getInstance().getBackColor());
      setBorder(b);
      GridBagLineAdder adder = new GridBagLineAdder(this);
      JLabel title = new JLabel(ResourceManager.getInstance().getImageIcon(pIcon));
      title.setText(pTitle);
      title.setFont(ResourceManager.getInstance().getLargerFont());
      title.setUI(new StepLabelUI());

      mContentPanel = new JPanel();

      JPanel titlepanel = new JPanel(new BorderLayout());
      titlepanel.add(title, BorderLayout.WEST);

      adder.setWeight(1.0f, 0.0f);
      adder.add(titlepanel);
      adder.next();

      if(pPanes)
      {
         JTabbedPane pane = new JTabbedPane();
         pane.addTab("Main", mContentPanel);

         adder.setWeight(1.0f, 1.0f);
         adder.addWithVerticalFill(pane);
      }
      else
      {
         adder.addSeparator();
         adder.setWeight(1.0f, 1.0f);
         adder.addWithVerticalFill(mContentPanel);
      }
   }
View Full Code Here

Examples of com.qspin.qtaste.ui.tools.GridBagLineAdder

    public ConfigEditPanel(Window owner) {
        super(owner, "QTaste Configuration", ModalityType.APPLICATION_MODAL);
        TitlePanel mainConfigPanel = new TitlePanel("QTaste Configuration", "main/qspin", false);
        this.setLayout(new GridBagLayout());
        GridBagLineAdder adder = new GridBagLineAdder(this);
        mSelectedProperties = new Properties();
       
       
        // add the Site selection panel
        JPanel siteSelectionPanel = new JPanel(new BorderLayout());
       
        mInfoBox = new InfoCbBox();
        this.initSiteCb(mInfoBox);
        mInfoBox.addActionListener(new CbActionListener(this));
        siteSelectionPanel.add(mInfoBox);
       
       
        adder.addToEnd(mainConfigPanel);
        adder.addToEnd(siteSelectionPanel);
        adder.addSeparator("Details");
       
        mDetailsPanel = new JPanel(new GridLayout(1,4, 10,10));
        mDetailsScrollPane = new JScrollPane(mDetailsPanel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        mDetailsScrollPane.setPreferredSize(new Dimension(500,600));
        //mDetailsPanel.setLayout(new GridLayout(1,4, 10,10));
        //jsp.getViewport().add(mDetailsPanel);

        adder.addToEnd(mDetailsScrollPane);
        //this.setPreferredSize(new Dimension(600,800));
        this.pack();
        this.setLocationRelativeTo(null);
    }
View Full Code Here

Examples of com.qspin.qtaste.ui.tools.GridBagLineAdder

    }

    public void init() {

        setLayout(new GridBagLayout());
        GridBagLineAdder adder = new GridBagLineAdder(this);
        adder.setWeight(1.0f, 0.0f);
        adder.setLength(6);

        //1st column - 1st row
        adder.setWeight(0.0, 0.0);
        adder.add(new JLabel("Test suite:"));
        adder.setWeight(1.0, 0.0);
        adder.add(mTestSuiteLabel);
        adder.setWeight(0.0, 0.0);

        //2d column - 1st row
        adder.add(new JLabel("Testbed config:"));
        // set the combobox as read only (not possible to modify the testbed from GUI at this time
        UIManager.put("ComboBox.disabledForeground", Color.BLACK);
        mTestbedList.setEnabled(true);
        adder.add(mTestbedList);

        // add testbed mouse listener, for the "Edit File" action
        TestbedMouseListener testbedMouseListener = new TestbedMouseListener();
        java.awt.Component[] mTestbedListComponents = mTestbedList.getComponents();
        for (int i = 0; i < mTestbedListComponents.length; i++) {
            mTestbedListComponents[i].addMouseListener(testbedMouseListener);
        }

        // go to second row
        adder.addSeparator();

        //1st column - 2d row
        adder.add(new JLabel("Test results directory:"));
        adder.add(mTestResultsLabel);


        //2d column - 2d row
        m_ignoreControlScript.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                TestEngine.setIgnoreControlScript(ignoreControlScript());
                setControlTestbedButtonsEnabled();
            }
        });
        adder.add(m_ignoreControlScript);
        JPanel sutPanel = new JPanel();
        JLabel sutVersion = new JLabel("SUT version: ");
        sutPanel.add(sutVersion);
        m_SUTVersion.setHorizontalAlignment(JTextField.RIGHT);
        m_SUTVersion.setPreferredSize(new Dimension(150, m_SUTVersion.getPreferredSize().height));
        sutPanel.add(m_SUTVersion);
        adder.add(sutPanel);
        m_SUTVersion.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {               
                TestBedConfiguration.setSUTVersion(m_SUTVersion.getText());
            }
        });
        //create a 3d row
        adder.addSeparator();

        //1st column - 3d row
        adder.add(new JLabel("Reporting Format:"));
        adder.add(mTestReportingFormat);
      
        //2d column - 3d row
        // add a button to manually start the testbed
        m_startTestbed.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                isStartingOrStoppingTestbed = true;
                setControlTestbedButtonsEnabled();
                parent.getTestCasePanel().showTestcaseResultsTab();
                TestBedConfiguration.setSUTVersion(getSUTVersion());
                new SUTStartStopThread("start").start();
            }
        });
        m_startTestbed.setEnabled(false);
        adder.add(m_startTestbed);

        // add a button to manually stop the testbed
        m_stopTestbed.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                isStartingOrStoppingTestbed = true;
                setControlTestbedButtonsEnabled();
                parent.getTestCasePanel().showTestcaseResultsTab();
                TestBedConfiguration.setSUTVersion(getSUTVersion());
                new SUTStartStopThread("stop").start();
            }
        });
        m_stopTestbed.setEnabled(false);
        adder.add(m_stopTestbed);

        DefaultComboBoxModel model = (DefaultComboBoxModel) mTestbedList.getModel();
        model.removeAllElements();
        String testbedDir = testbedConfig.getFile().getParent();
        File fTestbedDir = new File(testbedDir);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.