Package javax.swing

Examples of javax.swing.JSplitPane


        rightSide.addTab(JMeterUtils.getResString("view_results_tab_sampler"), createResponseMetadataPanel());
    rightSide.addTab(JMeterUtils.getResString("view_results_tab_request"), createRequestPanel());
    rightSide.addTab(JMeterUtils.getResString("view_results_tab_response"), createResponseDataPanel());

        JSplitPane mainSplit =
            new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftSide, rightSide);
        add(mainSplit, BorderLayout.CENTER);
    }
View Full Code Here


        graphScrollPanel.setViewportBorder(
                BorderFactory.createEmptyBorder(2, 2, 2, 2));
        legendPanel = new JPanel();

        JScrollPane legendScrollPanel = new JScrollPane(legendPanel);
        JSplitPane graphSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
                graphScrollPanel, legendScrollPanel);

        this.add(mainPanel, BorderLayout.NORTH);
        this.add(graphSplitPane, BorderLayout.CENTER);
        log.debug("End : init1");
View Full Code Here

       

        JPanel all = new JPanel(new BorderLayout());
        all.add(createToolBar(), BorderLayout.NORTH);
       
        JSplitPane treeAndMain = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);

        treePanel = createTreePanel();
        treeAndMain.setLeftComponent(treePanel);

        mainPanel = createMainPanel();
        treeAndMain.setRightComponent(mainPanel);


        treeAndMain.setResizeWeight(.2);
        treeAndMain.setContinuousLayout(true);
        all.add(treeAndMain, BorderLayout.CENTER);

        getContentPane().add(all);

        tree.setSelectionRow(1);
View Full Code Here

public class JSplitPaneParser extends CompositeParser {

  @Override
  protected void genAddCode(ImportRewrite imports, StringBuilder builder) {
    JSplitPane jsp = (JSplitPane) adaptable.getWidget();
    int oritentation = jsp.getOrientation();
    String fieldName = adaptable.getID();
    String prefix = "";
    if (!adaptable.isRoot())
      prefix = fieldName + ".";
    if (oritentation == JSplitPane.HORIZONTAL_SPLIT) {
      Component left = jsp.getLeftComponent();
      if (left != null) {
        JComponent leftComponent = (JComponent) left;
        WidgetAdapter leftAdapter = WidgetAdapter
            .getWidgetAdapter(leftComponent);
        if (leftAdapter != null) {
          IParser leftParser = (IParser) leftAdapter
              .getAdapter(IParser.class);
          String leftGetName = leftParser.getCreationMethodName();
          builder.append(prefix + "setLeftComponent(" + leftGetName
              + "());\n");
        }
      }
      Component right = jsp.getRightComponent();
      if (right != null) {
        JComponent rightComponent = (JComponent) right;
        WidgetAdapter rightAdapter = WidgetAdapter
            .getWidgetAdapter(rightComponent);
        if (rightAdapter != null) {
          IParser rightParser = (IParser) rightAdapter
              .getAdapter(IParser.class);
          String rightGetName = rightParser.getCreationMethodName();
          builder.append(prefix + "setRightComponent(" + rightGetName
              + "());\n");
        }
      }
    } else {
      Component top = jsp.getTopComponent();
      if (top != null) {
        JComponent topComponent = (JComponent) top;
        WidgetAdapter topAdapter = WidgetAdapter
            .getWidgetAdapter(topComponent);
        if (topAdapter != null) {
          IParser topParser = (IParser) topAdapter
              .getAdapter(IParser.class);
          String topGetName = topParser.getCreationMethodName();
          builder.append(prefix + "setTopComponent(" + topGetName
              + "());\n");
        }
      }
      Component bottom = jsp.getBottomComponent();
      if (bottom != null) {
        JComponent bottomComponent = (JComponent) bottom;
        WidgetAdapter bottomAdapter = WidgetAdapter
            .getWidgetAdapter(bottomComponent);
        if (bottomAdapter != null) {
View Full Code Here

        statsTable.addMouseListener(new TableMouseListener());
        statsTable.addMouseMotionListener(new TableMouseMotionListener());
        JScrollPane right = new JScrollPane(statsTable);
        right.setAlignmentX(Component.CENTER_ALIGNMENT);

        JSplitPane splitPane =
            new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, left, right);
        splitPane.setOneTouchExpandable(true);
        splitPane.setResizeWeight(0.3);

        /* Add table to a panel and set the layout. */
        return generatePanel(new JComponent[] { splitPane },
                             new FlowLayout(), "JE Stats Table");
    }
View Full Code Here

      preferredSize.height = 150;
      getDetectorTextPanel().setPreferredSize(preferredSize);
      scrollPane.setBorder(null);
      //mainPanel.add(getDetectorTextPanel(), "1, 9, 1, 9");

      final JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true, detectorPanel, getDetectorTextPanel());
      splitPane.addHierarchyListener(new HierarchyListener() {
        public void hierarchyChanged(final HierarchyEvent e) {
          if (e.getChangeFlags() == HierarchyEvent.SHOWING_CHANGED) {
            if (splitPane.isShowing()) {
              splitPane.setDividerLocation(0.75);
            }
          }
        }
      });
      mainPanel.add(splitPane, "1, 7, 1, 7");
View Full Code Here

    Box rightSide = new Box(BoxLayout.Y_AXIS);
    rightSide.add(channelTextPane);
    rightSide.add(Box.createVerticalStrut(paddingHeight));
    rightSide.add(allLists);

    jsp = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, leftSide, rightSide);
    jsp.setDividerSize(8);
    jsp.setResizeWeight(1); // Make the left side expand when resizing
    // Add a listener for when the divider moves
    ((BasicSplitPaneUI)jsp.getUI()).getDivider().addComponentListener(new ComponentAdapter() {
      @Override
View Full Code Here

            rightPanel = new JPanel();
            rightPanel.setLayout( new BoxLayout(rightPanel, BoxLayout.Y_AXIS) );
            rightPanel.add( new JLabel("  " + getMessage("response00", "Response")) );
            rightPanel.add( new JLabel("") );

            outPane = new JSplitPane(0, leftPanel, rightPanel );
            outPane.setDividerSize(4);
            pane2.add( outPane, BorderLayout.CENTER );

            JPanel bottomButtons = new JPanel();

            bottomButtons.setLayout( new BoxLayout(bottomButtons, BoxLayout.X_AXIS));
            bottomButtons.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
            bottomButtons.add( xmlFormatBox = new JCheckBox( getMessage("xmlFormat00", "XML Format") ) );
            bottomButtons.add( Box.createRigidArea(new Dimension(5, 0)) );
            final String save = getMessage("save00", "Save");

            bottomButtons.add( saveButton = new JButton( save ) );
            bottomButtons.add( Box.createRigidArea(new Dimension(5, 0)) );
            final String resend = getMessage("resend00", "Resend");

            bottomButtons.add( resendButton = new JButton( resend ) );
            bottomButtons.add( Box.createRigidArea(new Dimension(5, 0)) );
            final String switchStr = getMessage("switch00", "Switch Layout");

            bottomButtons.add( switchButton = new JButton( switchStr ) );
            bottomButtons.add( Box.createHorizontalGlue() );
            final String close = getMessage("close00", "Close");

            bottomButtons.add( closeButton = new JButton( close ) );
            pane2.add( bottomButtons, BorderLayout.SOUTH );

            saveButton.setEnabled( false );
            saveButton.addActionListener( new ActionListener() {
                    public void actionPerformed(ActionEvent event) {
                        if ( save.equals(event.getActionCommand()) ) save();
                    }
                }
            );

            resendButton.setEnabled( false );
            resendButton.addActionListener( new ActionListener() {
                    public void actionPerformed(ActionEvent event) {
                        if ( resend.equals(event.getActionCommand()) ) resend();
                    }
                }
            );

            switchButton.addActionListener( new ActionListener() {
                    public void actionPerformed(ActionEvent event) {
                        if (switchStr.equals(event.getActionCommand()) ) {
                            int v = outPane.getOrientation();

                            if ( v == 0 // top/bottom
                                outPane.setOrientation(1);
                            else  // left/right
                                outPane.setOrientation(0);
                            outPane.setDividerLocation(0.5);
                        }
                    }
                }
            );

            closeButton.addActionListener( new ActionListener() {
                    public void actionPerformed(ActionEvent event) {
                        if (close.equals(event.getActionCommand()) )
                            close();
                    }
                }
            );

            JSplitPane  pane1 = new JSplitPane( 0 );

            pane1.setDividerSize(4);
            pane1.setTopComponent( tablePane );
            pane1.setBottomComponent( pane2 );
            pane1.setDividerLocation( 150 );
            this.add( pane1, BorderLayout.CENTER );

            //
            ////////////////////////////////////////////////////////////////////
            sel.setSelectionInterval(0, 0);
View Full Code Here

        rightSide.addTab(JMeterUtils.getResString("view_results_tab_sampler"), createResponseMetadataPanel());
    rightSide.addTab(JMeterUtils.getResString("view_results_tab_request"), createRequestPanel());
    rightSide.addTab(JMeterUtils.getResString("view_results_tab_response"), createResponseDataPanel());

        JSplitPane mainSplit =
            new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftSide, rightSide);
        add(mainSplit, BorderLayout.CENTER);
    }
View Full Code Here

            htmlPane = new JEditorPane();
            htmlPane.setContentType("text/html");
            htmlPane.setEditable(false);

            JSplitPane splitResponsePane = new JSplitPane(
                JSplitPane.HORIZONTAL_SPLIT,
                new JScrollPane(taTextResponse),
                new JScrollPane(htmlPane)
            );
            splitResponsePane.setOneTouchExpandable(false);
            splitResponsePane.setDividerLocation(350);
            // it would be better to set resizeWeight, but this method does
            // not exist in JRE 1.2.2
//            splitResponsePane.setResizeWeight(0.5);

            this.getContentPane().setLayout(new BorderLayout());
View Full Code Here

TOP

Related Classes of javax.swing.JSplitPane

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.