Examples of WebSplitPane


Examples of com.alee.laf.splitpane.WebSplitPane

        WebLabel rightLabel = new WebLabel ( "right", WebLabel.CENTER );
        rightLabel.setMargin ( 5 );
        WebPanel rightPanel = new WebPanel ( true, rightLabel );

        // Split
        WebSplitPane splitPane = new WebSplitPane ( HORIZONTAL_SPLIT, leftPanel, rightPanel );
        splitPane.setOneTouchExpandable ( true );
        splitPane.setPreferredSize ( new Dimension ( 250, 200 ) );
        splitPane.setDividerLocation ( 125 );
        splitPane.setContinuousLayout ( true );

        return new GroupPanel ( splitPane );
    }
View Full Code Here

Examples of com.alee.laf.splitpane.WebSplitPane

        WebLabel bottomLabel = new WebLabel ( "bottom", WebLabel.CENTER );
        bottomLabel.setMargin ( 5 );
        WebPanel bottomPanel = new WebPanel ( true, bottomLabel );

        // Split
        WebSplitPane splitPane = new WebSplitPane ( VERTICAL_SPLIT, topPanel, bottomPanel );
        splitPane.setOneTouchExpandable ( true );
        splitPane.setPreferredSize ( new Dimension ( 250, 200 ) );
        splitPane.setDividerLocation ( 100 );
        splitPane.setContinuousLayout ( false );

        return new GroupPanel ( splitPane );
    }
View Full Code Here

Examples of com.alee.laf.splitpane.WebSplitPane

    private void initializeContainer ()
    {
        container = new WebPanel ();
        getContentPane ().add ( container, BorderLayout.CENTER );

        split = new WebSplitPane ( WebSplitPane.HORIZONTAL_SPLIT, true );
        split.setDividerLocation ( 300 );
        split.setDividerSize ( 8 );
        split.setDrawDividerBorder ( true );
        split.setOneTouchExpandable ( true );
        container.add ( split, BorderLayout.CENTER );
View Full Code Here

Examples of com.alee.laf.splitpane.WebSplitPane

     * @param first       first split element
     * @param last        last split element   @return new split component
     */
    protected WebSplitPane createSplit ( final int orientation, final StructureData first, final StructureData last )
    {
        final WebSplitPane splitPane = new WebSplitPane ( orientation, first.getComponent (), last.getComponent () );
        splitPane.putClientProperty ( WebDocumentPane.DATA_KEY, this );
        splitPane.setContinuousLayout ( true );
        splitPane.setDrawDividerBorder ( true );
        splitPane.setDividerSize ( 8 );
        splitPane.setResizeWeight ( 0.5 );
        splitPane.addPropertyChangeListener ( JSplitPane.DIVIDER_LOCATION_PROPERTY, new PropertyChangeListener ()
        {
            @Override
            public void propertyChange ( final PropertyChangeEvent evt )
            {
                SwingUtilities.invokeLater ( new Runnable ()
View Full Code Here

Examples of com.alee.laf.splitpane.WebSplitPane

        //- edit
        //----------------
        //- view
        //----------------

        centralSplit = new WebSplitPane ( WebSplitPane.HORIZONTAL_SPLIT );
        centralSplit.setOneTouchExpandable ( true );
        centralSplit.setLeftComponent ( treeScroll );
        centralSplit.setRightComponent ( fileListScroll );
        centralSplit.setDividerLocation ( 160 );
        centralSplit.setMargin ( 4, 4, 4, 4 );
View Full Code Here

Examples of com.alee.laf.splitpane.WebSplitPane

                root = splitData;
            }
            else
            {
                // Determining parent split
                final WebSplitPane parentSplit = ( WebSplitPane ) splittedPane.getTabbedPane ().getParent ();
                final SplitData<T> parentSplitData = getData ( parentSplit );
                if ( parentSplitData.getOrientation () == orientation && ltr && parentSplitData.getFirst () == splittedPane &&
                        parentSplitData.getLast () instanceof PaneData )
                {
                    // Using existing split and pane
View Full Code Here

Examples of com.alee.laf.splitpane.WebSplitPane

            // Merge only if actually inside of a split
            // Otherwise this is a root pane which can't be merged
            if ( parent instanceof WebSplitPane )
            {
                final WebSplitPane splitPane = ( WebSplitPane ) parent;
                mergeImpl ( ( SplitData<T> ) getData ( splitPane ) );

                // Updating document pane view
                revalidate ();
                repaint ();
View Full Code Here

Examples of com.alee.laf.splitpane.WebSplitPane

        {
            activePane = result.findClosestPane ();
        }

        // Removing merged split
        final WebSplitPane splitPane = splitData.getSplitPane ();
        if ( splitPane.getParent () == WebDocumentPane.this )
        {
            // Removing root split and adding tab pane
            remove ( splitPane );
            add ( result.getComponent (), BorderLayout.CENTER );

            // Changing root
            root = result;
        }
        else
        {
            // Retrieving parent split
            final WebSplitPane parentSplit = ( WebSplitPane ) splitPane.getParent ();
            final SplitData<T> parentSplitData = getData ( parentSplit );
            final int dividerLocation = parentSplit.getDividerLocation ();

            // Changing parent split component
            if ( parentSplit.getLeftComponent () == splitPane )
            {
                parentSplitData.setFirst ( result );
            }
            else
            {
                parentSplitData.setLast ( result );
            }

            // Restoring divider location
            parentSplit.setDividerLocation ( dividerLocation );
        }

        // Firing merged event
        fireMerged ( splitData, result );
    }
View Full Code Here

Examples of com.alee.laf.splitpane.WebSplitPane

            {
                @Override
                public void componentResized ( final ComponentEvent e )
                {
                    // Waiting until split is properly sized
                    final WebSplitPane splitPane = splitData.getSplitPane ();
                    if ( splitPane.getWidth () > 0 || splitPane.getHeight () > 0 )
                    {
                        // Updating proportional divider location
                        splitData.setDividerLocation ( state.getDividerLocation () );
                        splitPane.removeComponentListener ( this );
                    }
                }
            } );

            restored = splitData;
View Full Code Here

Examples of com.alee.laf.splitpane.WebSplitPane

        final WebScrollPane filesView = new WebScrollPane ( fileTree, false );
        filesView.setMinimumWidth ( 200 );
        filesView.setPreferredHeight ( 0 );
        //        filesView.setBorder ( BorderFactory.createMatteBorder ( 0, 0, 0, 1, WebToolBarStyle.borderColor ) );

        final WebSplitPane previewSplit = new WebSplitPane ( WebSplitPane.HORIZONTAL_SPLIT );
        previewSplit.setLeftComponent ( createEditorPanel () );
        previewSplit.setRightComponent ( createPreviewPanel () );
        previewSplit.setOneTouchExpandable ( true );
        previewSplit.setContinuousLayout ( true );
        previewSplit.setResizeWeight ( 1 );

        final WebSplitPane filesSplit = new WebSplitPane ( WebSplitPane.HORIZONTAL_SPLIT );
        filesSplit.setLeftComponent ( filesView );
        filesSplit.setRightComponent ( previewSplit );
        filesSplit.setOneTouchExpandable ( true );
        filesSplit.setContinuousLayout ( true );
        filesSplit.setResizeWeight ( 0 );
        add ( filesSplit, BorderLayout.CENTER );

        final Integer fsl = SettingsManager.get ( "NinePatchEditor", "filesSplitLocation", ( Integer ) null );
        filesSplit.setDividerLocation ( fsl != null ? fsl : 230 );
        filesSplit.addPropertyChangeListener ( WebSplitPane.DIVIDER_LOCATION_PROPERTY, new PropertyChangeListener ()
        {
            @Override
            public void propertyChange ( final PropertyChangeEvent pce )
            {
                SettingsManager.set ( "NinePatchEditor", "filesSplitLocation", filesSplit.getDividerLocation () );
            }
        } );

        final Integer psl = SettingsManager.get ( "NinePatchEditor", "splitLocation", ( Integer ) null );
        if ( psl != null )
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.