Package com.jidesoft.swing

Examples of com.jidesoft.swing.JideSplitPane


  }

  @Override
  @NotNull
  protected JComponent createControl() {
    JideSplitPane splitPane = new JideSplitPane();

    R rootObject = getRootObject();

    treeModel = hierarchyModelFactory.createHierarchyTreeModel( rootObject );
    detailsModel = hierarchyModelFactory.createDetailsModel( rootObject );

    detailsModel.setContext( getContext() );

    //wire the models
    hierarchyTree = new HierarchyTree( treeModel );
    hierarchyTree.addSelectionListener( detailsModel );

    detailsModel.select( new DetailsTreeSelectionEvent( DetailsTreeSelectionEvent.Type.SELECTED, getEditorObject() ) );
    TreePath initialSelectionPath = getInitialSelectionPath();
    hierarchyTree.getSelectionModel().setSelectionPath( initialSelectionPath );
    hierarchyTree.addSelectionListener( detailsModel );

    splitPane.add( new JScrollPane( hierarchyTree ), JideBoxLayout.FLEXIBLE );
    DetailsPanel detailsPanel = new DetailsPanel( detailsModel );
    detailsPanel.setBorder( BorderFactory.createLineBorder( Color.BLACK ) );
    splitPane.add( detailsPanel, JideBoxLayout.VARY );
    //    splitPane.add( new JScrollPane( new DetailsPanel( detailsModel ) ), JideBoxLayout.VARY );

    splitPane.setBorder( BorderFactory.createEmptyBorder( 5, 5, 5, 5 ) );
    return splitPane;
  }
View Full Code Here


                totalHeight += Math.min(300, sp.getTrackPanel().getPreferredPanelHeight());
        }

        // Adjust dividers for data panel.  The data panel divider can be
        // zero if there are no data tracks loaded.
        final JideSplitPane centerSplitPane = contentPane.getMainPanel().getCenterSplitPane();
        int htotal = centerSplitPane.getHeight();
        int y = 0;
        int i = 0;
        for (Component c : centerSplitPane.getComponents()) {
            if (c instanceof TrackPanelScrollPane) {
                final TrackPanel trackPanel = ((TrackPanelScrollPane) c).getTrackPanel();
                if (trackPanel.getTracks().size() > 0) {
                    int panelWeight = Math.min(300, trackPanel.getPreferredPanelHeight());
                    int dh = (int) ((panelWeight / totalHeight) * htotal);
                    y += dh;
                }
                centerSplitPane.setDividerLocation(i, y);
                i++;
            }
        }

        contentPane.getMainPanel().invalidate();
View Full Code Here

TOP

Related Classes of com.jidesoft.swing.JideSplitPane

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.