public void resize() { ThreeComponentsSplitter threePane = getThreePanes(); assert (threePane.getLastComponent() instanceof JBSplitter); JBSplitter bottomSplitter = (JBSplitter)threePane.getLastComponent(); assert (threePane.getInnerComponent() instanceof JBSplitter); JBSplitter middleSplitter = (JBSplitter)threePane.getInnerComponent(); int scrubberHeight = getScrubberScrollPane().getMinimumSize().height; if (threePane.getFirstSize() < scrubberHeight) { int totalHeight = threePane.getHeight(); int residualHeightAfter = Math.max(0, totalHeight - scrubberHeight); threePane.setFirstSize(scrubberHeight); int middleSize = middleSplitter.getPreferredSize().height; int bottomSize = bottomSplitter.getPreferredSize().height; if (bottomSize + middleSize > 0) { threePane.setLastSize(residualHeightAfter * bottomSize / (bottomSize + middleSize)); // Split the middle and bottom panes evenly. } else { threePane.setLastSize(residualHeightAfter / 2); } } }
public WiseSplitter(final Runnable refresher, final Splitter parentSplitter) { myRefresher = refresher; myParentSplitter = parentSplitter; myInnerSplitter = new ThreeComponentsSplitter(false); Disposer.register(this, myInnerSplitter); myInnerSplitter.setHonorComponentsMinimumSize(true); myInnerSplitterContents = new HashMap<CommittedChangesFilterKey, Integer>(); updateBorders(); }
ToolWindowsPane(final IdeFrameImpl frame, ToolWindowManagerImpl manager) { myManager = manager; setOpaque(false); myFrame = frame; myId2Button = new HashMap<String, StripeButton>(); myId2Decorator = new HashMap<String, InternalDecorator>(); myButton2Info = new HashMap<StripeButton, WindowInfoImpl>(); myDecorator2Info = new HashMap<InternalDecorator, WindowInfoImpl>(); myUISettingsListener = new MyUISettingsListenerImpl(); myId2SplitProportion = new HashMap<String, Float>(); // Splitters myVerticalSplitter = new ThreeComponentsSplitter(true); Disposer.register(this, myVerticalSplitter); myVerticalSplitter.setDividerWidth(0); myVerticalSplitter.setDividerMouseZoneSize(Registry.intValue("ide.splitter.mouseZone")); myVerticalSplitter.setBackground(Color.gray); myHorizontalSplitter = new ThreeComponentsSplitter(false); Disposer.register(this, myHorizontalSplitter); myHorizontalSplitter.setDividerWidth(0); myHorizontalSplitter.setDividerMouseZoneSize(Registry.intValue("ide.splitter.mouseZone")); myHorizontalSplitter.setBackground(Color.gray); myWidescreen = UISettings.getInstance().WIDESCREEN_SUPPORT; myLeftHorizontalSplit = UISettings.getInstance().LEFT_HORIZONTAL_SPLIT; myRightHorizontalSplit = UISettings.getInstance().RIGHT_HORIZONTAL_SPLIT; if (myWidescreen) { myHorizontalSplitter.setInnerComponent(myVerticalSplitter); } else { myVerticalSplitter.setInnerComponent(myHorizontalSplitter); } // Tool stripes myTopStripe = new Stripe(SwingConstants.TOP, manager); myStripes.add(myTopStripe); myLeftStripe = new Stripe(SwingConstants.LEFT, manager); myStripes.add(myLeftStripe); myBottomStripe = new Stripe(SwingConstants.BOTTOM, manager); myStripes.add(myBottomStripe); myRightStripe = new Stripe(SwingConstants.RIGHT, manager); myStripes.add(myRightStripe); updateToolStripesVisibility(); // Layered pane myLayeredPane = new MyLayeredPane(myWidescreen ? myHorizontalSplitter : myVerticalSplitter); // Compose layout add(myTopStripe, JLayeredPane.POPUP_LAYER); add(myLeftStripe, JLayeredPane.POPUP_LAYER); add(myBottomStripe, JLayeredPane.POPUP_LAYER); add(myRightStripe, JLayeredPane.POPUP_LAYER); add(myLayeredPane, JLayeredPane.DEFAULT_LAYER); }
Splitter(ThreeComponentsSplitter splitter) { mySplitter = splitter; }
FirstComponent(ThreeComponentsSplitter splitter) { super(splitter); }
LastComponent(ThreeComponentsSplitter splitter) { super(splitter); }
public ThreeComponentsSplitter getThreePanes() { return myThreePanes; }
@Override public ThreeComponentsSplitter getContentSplitter() { return myContentSplitter; }
public final ThreeComponentsSplitter getContentSplitter() { return myContentSplitter; }
ToolWindowsPane(final IdeFrameImpl frame, ToolWindowManagerImpl manager){ myManager = manager; setOpaque(false); myFrame=frame; myId2Button=new HashMap<String,StripeButton>(); myId2Decorator=new HashMap<String,InternalDecorator>(); myButton2Info=new HashMap<StripeButton, WindowInfoImpl>(); myDecorator2Info=new HashMap<InternalDecorator, WindowInfoImpl>(); myUISettingsListener=new MyUISettingsListenerImpl(); myId2SplitProportion = new HashMap<String, Float>(); // Splitters myVerticalSplitter = new ThreeComponentsSplitter(true); Disposer.register(this, myVerticalSplitter); myVerticalSplitter.setDividerWidth(0); myVerticalSplitter.setDividerMouseZoneSize(Registry.intValue("ide.splitter.mouseZone")); myVerticalSplitter.setBackground(Color.gray); myHorizontalSplitter = new ThreeComponentsSplitter(false); Disposer.register(this, myHorizontalSplitter); myHorizontalSplitter.setDividerWidth(0); myHorizontalSplitter.setDividerMouseZoneSize(Registry.intValue("ide.splitter.mouseZone")); myHorizontalSplitter.setBackground(Color.gray); myWidescreen = UISettings.getInstance().WIDESCREEN_SUPPORT; if (myWidescreen) { myHorizontalSplitter.setInnerComponent(myVerticalSplitter); } else { myVerticalSplitter.setInnerComponent(myHorizontalSplitter); } // Tool stripes myTopStripe=new Stripe(SwingConstants.TOP, manager); myStripes.add(myTopStripe); myLeftStripe=new Stripe(SwingConstants.LEFT, manager); myStripes.add(myLeftStripe); myBottomStripe=new Stripe(SwingConstants.BOTTOM, manager); myStripes.add(myBottomStripe); myRightStripe=new Stripe(SwingConstants.RIGHT, manager); myStripes.add(myRightStripe); updateToolStripesVisibility(); // Layered pane myLayeredPane=new MyLayeredPane(myWidescreen ? myHorizontalSplitter : myVerticalSplitter); // Compose layout add(myTopStripe, JLayeredPane.POPUP_LAYER); add(myLeftStripe, JLayeredPane.POPUP_LAYER); add(myBottomStripe, JLayeredPane.POPUP_LAYER); add(myRightStripe, JLayeredPane.POPUP_LAYER); add(myLayeredPane, JLayeredPane.DEFAULT_LAYER); }
DesktopToolWindowPanelImpl(@Nonnull IdeFrameImpl frame, @Nonnull DesktopToolWindowManagerImpl manager) { myManager = manager; setOpaque(false); myFrame = frame; // Splitters myVerticalSplitter = new ThreeComponentsSplitter(true); Disposer.register(this, myVerticalSplitter); myVerticalSplitter.setDividerWidth(0); myVerticalSplitter.setDividerMouseZoneSize(Registry.intValue("ide.splitter.mouseZone")); myVerticalSplitter.setBackground(Color.gray); myHorizontalSplitter = new ThreeComponentsSplitter(false); Disposer.register(this, myHorizontalSplitter); myHorizontalSplitter.setDividerWidth(0); myHorizontalSplitter.setDividerMouseZoneSize(Registry.intValue("ide.splitter.mouseZone")); myHorizontalSplitter.setBackground(Color.gray); myWidescreen = UISettings.getInstance().getWideScreenSupport(); myLeftHorizontalSplit = UISettings.getInstance().getLeftHorizontalSplit(); myRightHorizontalSplit = UISettings.getInstance().getRightHorizontalSplit(); if (myWidescreen) { myHorizontalSplitter.setInnerComponent(myVerticalSplitter); } else { myVerticalSplitter.setInnerComponent(myHorizontalSplitter); } // Tool stripes myTopStripe = new DesktopStripePanelImpl(SwingConstants.TOP, manager); myStripes.add(myTopStripe); myLeftStripe = new DesktopStripePanelImpl(SwingConstants.LEFT, manager); myStripes.add(myLeftStripe); myBottomStripe = new DesktopStripePanelImpl(SwingConstants.BOTTOM, manager); myStripes.add(myBottomStripe); myRightStripe = new DesktopStripePanelImpl(SwingConstants.RIGHT, manager); myStripes.add(myRightStripe); updateToolStripesVisibility(); // Layered pane myLayeredPane = new MyLayeredPane(myWidescreen ? myHorizontalSplitter : myVerticalSplitter); // Compose layout add(myTopStripe, JLayeredPane.POPUP_LAYER); add(myLeftStripe, JLayeredPane.POPUP_LAYER); add(myBottomStripe, JLayeredPane.POPUP_LAYER); add(myRightStripe, JLayeredPane.POPUP_LAYER); add(myLayeredPane, JLayeredPane.DEFAULT_LAYER); }
Splitter(@Nonnull ThreeComponentsSplitter splitter) { mySplitter = splitter; }
FirstComponent(@Nonnull ThreeComponentsSplitter splitter) { super(splitter); }
LastComponent(@Nonnull ThreeComponentsSplitter splitter) { super(splitter); }
ThreeComponentsSplitter getContentSplitter();