Package javax.swing

Examples of javax.swing.JSplitPane


    contentPane.add(toolBar,      BorderLayout.NORTH);
    contentPane.add(statusBar,    BorderLayout.SOUTH);


    splitPaneHoriz = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
                                    bundlePanel,
                                    detailPanel);

    ss = new SizeSaver("splitPaneHoriz",
                       null, // new Dimension(700, 400),
                       350);
    ss.attach(splitPaneHoriz);
    sizesavers.add(ss);
    // splitPaneHoriz.setDividerLocation(bundlePanel.getPreferredSize().width);

    splitPaneHoriz.setOneTouchExpandable(false);


    JFloatable consoleWrapper =
      new JFloatable(consoleSwing.getJComponent(), "Console");

    splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
                               splitPaneHoriz,
                               consoleWrapper);

    ss = new SizeSaver("splitPaneVertical",
                       null, // new Dimension(800, 600),
View Full Code Here


            }
          }
        });


      JSplitPane panel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
                                        left,
                                        recordPanel);

      panel.setDividerLocation(200);


      add(panel, BorderLayout.CENTER);

      refreshList(true);
View Full Code Here

   *
   * @return javax.swing.JSplitPane
   */
  private JSplitPane getJSplitPane() {
    if (jSplitPane == null) {
      jSplitPane = new JSplitPane();
      jSplitPane.setLeftComponent(getJScrollPane());
      // jSplitPane.setRightComponent(getImageViewer());
      jSplitPane.setRightComponent(getJPanel());
    }
    return jSplitPane;
View Full Code Here

    {
        super( new BorderLayout( ) );
        this.callback = callback;

        //Create main vertical split panel
        JSplitPane splitPane = new JSplitPane( JSplitPane.VERTICAL_SPLIT );
        add( splitPane, BorderLayout.CENTER );

        //create top half of split panel and add to parent
        JPanel topHalf = new JPanel( );
        topHalf.setLayout( new BoxLayout( topHalf, BoxLayout.X_AXIS ) );
        topHalf.setBorder( BorderFactory.createEmptyBorder( 5, 5, 0, 5 ) );
        topHalf.setMinimumSize( new Dimension( 400, 50 ) );
        topHalf.setPreferredSize( new Dimension( 450, 250 ) );
        splitPane.add( topHalf );

        //create bottom top half of split panel and add to parent
        JPanel bottomHalf = new JPanel( new BorderLayout( ) );
        bottomHalf.setMinimumSize( new Dimension( 400, 50 ) );
        bottomHalf.setPreferredSize( new Dimension( 450, 300 ) );
        splitPane.add( bottomHalf );

        //Container that list container that shows available store items
        JPanel listContainer = new JPanel( new GridLayout( 1, 1 ) );
        listContainer.setBorder( BorderFactory.createTitledBorder( "List" ) );
        topHalf.add( listContainer );
View Full Code Here

    chatBox.add(gameLog, SBoxLayout.constraint(SLayout.EXPAND_X, SLayout.EXPAND_Y));
    chatBox.setMinimumSize(chatText.getPlayerChatText().getMinimumSize());
    chatBox.setMaximumSize(new Dimension(screenSize.width, Integer.MAX_VALUE));

    // Give the user the ability to make the the game area less tall
    final JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, pane, chatBox);
    splitPane.setBorder(null);
    // Works for showing the resize, but is extremely flickery
    //splitPane.setContinuousLayout(true);
    pane.addComponentListener(new SplitPaneResizeListener(screen, splitPane));

    containerPanel = createContainerPanel();

    // Avoid panel drawing overhead
    final Container windowContent = SBoxLayout.createContainer(SBoxLayout.HORIZONTAL);
    mainFrame.getMainFrame().setContentPane(windowContent);

    // Finally add the left pane, and the games screen + chat combo
    // Make the panel take any horizontal resize
    windowContent.add(leftColumn, SBoxLayout.constraint(SLayout.EXPAND_X, SLayout.EXPAND_Y));
    leftColumn.setMinimumSize(new Dimension());

    /*
     * Put the splitpane and the container panel to a subcontainer to make
     * squeezing the window affect the left pane first rather than the right
     */
    JComponent rightSide = SBoxLayout.createContainer(SBoxLayout.HORIZONTAL);
    rightSide.add(splitPane, SBoxLayout.constraint(SLayout.EXPAND_Y));
    rightSide.add(containerPanel, SBoxLayout.constraint(SLayout.EXPAND_Y));
    rightSide.setMinimumSize(rightSide.getPreferredSize());
    windowContent.add(rightSide, SBoxLayout.constraint(SLayout.EXPAND_Y));

    /*
     * Handle focus assertion and window closing
     */
    mainFrame.getMainFrame().addWindowListener(new WindowAdapter() {
      @Override
      public void windowOpened(final WindowEvent ev) {
        chatText.getPlayerChatText().requestFocus();
      }

      @Override
      public void windowActivated(final WindowEvent ev) {
        chatText.getPlayerChatText().requestFocus();
      }

      @Override
      public void windowGainedFocus(final WindowEvent ev) {
        chatText.getPlayerChatText().requestFocus();
      }

      @Override
      public void windowClosing(final WindowEvent e) {
        requestQuit();
      }
    });

    mainFrame.getMainFrame().pack();
    setInitialWindowStates();

    /*
     *  A bit roundabout way to calculate the desired minsize, but
     *  different java versions seem to take the window decorations
     *  in account in rather random ways.
     */
    final int width = mainFrame.getMainFrame().getWidth()
    - minimap.getComponent().getWidth() - containerPanel.getWidth();
    final int height = mainFrame.getMainFrame().getHeight() - gameLog.getHeight();

    mainFrame.getMainFrame().setMinimumSize(new Dimension(width, height));
    mainFrame.getMainFrame().setVisible(true);

    /*
     * For small screens. Setting the maximum window size does
     * not help - pack() happily ignores it.
     */
    Rectangle maxBounds = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
    Dimension current = mainFrame.getMainFrame().getSize();
    mainFrame.getMainFrame().setSize(Math.min(current.width, maxBounds.width),
        Math.min(current.height, maxBounds.height));

    /*
     * Needed for small screens; Sometimes the divider is placed
     * incorrectly unless we explicitly set it. Try to fit it on the
     * screen and show a bit of the chat.
     */
    splitPane.setDividerLocation(Math.min(stendhal.getScreenSize().height,
        maxBounds.height  - 80));

    directionRelease = null;

    // register the slash actions in the client side command line parser
View Full Code Here

                    Main.m_settings.setLocation(getLocation());
            }
        });
        Container contentPane = getContentPane();

        m_splitPaneHor = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true);
        m_splitPaneHor.setOneTouchExpandable(true);
        m_splitPaneHor.setResizeWeight(Main.m_settings.getVertResizeWeight());

        m_splitPaneVert = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true);
        m_splitPaneVert.setOneTouchExpandable(true);
        m_splitPaneVert.setResizeWeight(Main.m_settings.getHorResizeWeight());

        m_treeScrollPane = new JScrollPane();
        m_imgScrollPane = new JScrollPane();
View Full Code Here

   * where we create the headerPanel and editorPane and add them to the
   * splitPane.
   */
  public void configureMessageDisplay() throws MessagingException {

    splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    tabbedPane = new JTabbedPane();

    inputTable = new Hashtable();

    headerPanel = createHeaderInputPanel(getMessageProxy(), inputTable);
View Full Code Here

          mainScrollPanel = new JScrollPane(mainPanel);
          mainScrollPanel.setMinimumSize(new Dimension(100, 400));
         
          logPanel = new JLogPanel();
         
          horizSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, treePanel, mainScrollPanel);
          horizSplitPane.setOneTouchExpandable(true);
          horizSplitPane.setDividerLocation(155);
         
          verticalSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, horizSplitPane,logPanel);
          verticalSplitPane.setOneTouchExpandable(true);
          verticalSplitPane.setResizeWeight(1.0);
          verticalSplitPane.setDividerLocation(0.75);
         
          //load the default env if set
View Full Code Here

    BorderLayout borderLayout1 = new BorderLayout();

  public MultiStructureViewPanel(StructureViewPanel topPanel, StructureViewPanel bottomPanel) {
      super();
        try {
          views_splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, topPanel, bottomPanel);
            jbInit();
        } catch(Exception e) {
          Message msg = new Message("Could not initialize GUI.",IMessage.ERROR,e,null);
          Ajde.getDefault().getMessageHandler().handleMessage(msg);
        }
View Full Code Here

        JScrollPane regexpDataPane = GuiUtils.makeScrollPane(regexpDataField);
        regexpDataPane.setMinimumSize(new Dimension(0, 200));

        JPanel pane = new JPanel(new BorderLayout(0, 5));

        JSplitPane mainSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
                regexpDataPane, createRegexpTasksPanel());
        mainSplit.setDividerLocation(300);
        pane.add(mainSplit, BorderLayout.CENTER);
        return pane;
    }
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.