public void closeView(View view) { // Remove the tab view, which should belong to // this container. remove(view); // Remove this from the parent, as we're just an empty container now Container parent = getParent(); parent.remove(this); // If the parent is a split pane, then collapse // the split pane if (parent instanceof TabViewContainerSplitPane) { collapseSplitPane((TabViewContainerSplitPane) parent); } else { parent.validate(); } }
public void closeView(View view) { // Remove the tab view, which should belong to // this container. remove(view); // Remove this from the parent, as we're just an empty container now Container parent = getParent(); parent.remove(this); // If the parent is a split pane, then collapse // the split pane if (parent instanceof TabViewContainerSplitPane) { collapseSplitPane((TabViewContainerSplitPane) parent); } else { parent.validate(); } }
public void closeView(View view) { // Remove the tab view, which should belong to // this container. remove(view); // Remove this from the parent, as we're just an empty container now Container parent = getParent(); parent.remove(this); // If the parent is a split pane, then collapse // the split pane if (parent instanceof TabViewContainerSplitPane) { collapseSplitPane((TabViewContainerSplitPane) parent); } else { parent.validate(); } }
public void splitVertically(View bottomView) { bottomView.setSyncronizing(false); JSplitPane sp = createSplitPane(JSplitPane.HORIZONTAL_SPLIT); View view = (View) getComponent(0); remove(view); add(sp); validate(); sp.setLeftComponent(new ViewContainer(view)); sp.setRightComponent(new ViewContainer(bottomView)); sp.setDividerLocation(sp.getWidth() / 2); }
public void splitVertically(View bottomView) { bottomView.setSyncronizing(false); JSplitPane sp = createSplitPane(JSplitPane.HORIZONTAL_SPLIT); View view = (View) getComponent(0); remove(view); add(sp); validate(); sp.setLeftComponent(new ViewContainer(view)); sp.setRightComponent(new ViewContainer(bottomView)); sp.setDividerLocation(sp.getWidth() / 2); }
public void splitVertically(View bottomView) { bottomView.setSyncronizing(false); JSplitPane sp = createSplitPane(JSplitPane.HORIZONTAL_SPLIT); View view = (View) getComponent(0); remove(view); add(sp); validate(); sp.setLeftComponent(new ViewContainer(view)); sp.setRightComponent(new ViewContainer(bottomView)); sp.setDividerLocation(sp.getWidth() / 2); }
public void splitHorizontally(View rightView) { rightView.setSyncronizing(false); JSplitPane sp = createSplitPane(JSplitPane.VERTICAL_SPLIT); View view = (View) getComponent(0); remove(view); add(sp); validate(); sp.setTopComponent(new ViewContainer(view)); sp.setBottomComponent(new ViewContainer(rightView)); sp.setDividerLocation(sp.getHeight() / 2); }
public void splitHorizontally(View rightView) { rightView.setSyncronizing(false); JSplitPane sp = createSplitPane(JSplitPane.VERTICAL_SPLIT); View view = (View) getComponent(0); remove(view); add(sp); validate(); sp.setTopComponent(new ViewContainer(view)); sp.setBottomComponent(new ViewContainer(rightView)); sp.setDividerLocation(sp.getHeight() / 2); }
public void splitHorizontally(View rightView) { rightView.setSyncronizing(false); JSplitPane sp = createSplitPane(JSplitPane.VERTICAL_SPLIT); View view = (View) getComponent(0); remove(view); add(sp); validate(); sp.setTopComponent(new ViewContainer(view)); sp.setBottomComponent(new ViewContainer(rightView)); sp.setDividerLocation(sp.getHeight() / 2); }