public NestedViewSplitPane(JSplitPane parentSplitPane, String locationInParent, int orientation) { super(orientation); this.parentComponent = parentSplitPane; this.locationInParent = locationInParent; addContainerListener(new ContainerListener() { public void componentAdded(ContainerEvent e) { processComponentAdded(); } public void componentRemoved(ContainerEvent e) { processComponentRemoved(); } }); }
private void processComponentAdded() { if (getComponentCount() == ZERO_CONTENT_COUNT + 1) { if (locationInParent.equals(JSplitPane.LEFT) || locationInParent.equals(JSplitPane.TOP)) { parentComponent.setLeftComponent(this); } else { parentComponent.setBottomComponent(this); } } }
private void processComponentAdded() { if (getComponentCount() == ZERO_CONTENT_COUNT + 1) { if (locationInParent.equals(JSplitPane.LEFT) || locationInParent.equals(JSplitPane.TOP)) { parentComponent.setLeftComponent(this); } else { parentComponent.setBottomComponent(this); } } }
private void processComponentAdded() { if (getComponentCount() == ZERO_CONTENT_COUNT + 1) { if (locationInParent.equals(JSplitPane.LEFT) || locationInParent.equals(JSplitPane.TOP)) { parentComponent.setLeftComponent(this); } else { parentComponent.setBottomComponent(this); } } }
public NestedViewSplitPane(JSplitPane parentSplitPane, String locationInParent, int orientation) { super(orientation); this.parentComponent = parentSplitPane; this.locationInParent = locationInParent; addContainerListener(new ContainerListener() { public void componentAdded(ContainerEvent e) { processComponentAdded(); } public void componentRemoved(ContainerEvent e) { processComponentRemoved(); } }); }
private void processComponentRemoved() { if (getComponentCount() == ZERO_CONTENT_COUNT) { if (locationInParent.equals(JSplitPane.LEFT) || locationInParent.equals(JSplitPane.TOP)) { parentComponent.setTopComponent(null); } else { parentComponent.setBottomComponent(null); } } } }
public NestedViewSplitPane(JSplitPane parentSplitPane, String locationInParent, int orientation) { super(orientation); this.parentComponent = parentSplitPane; this.locationInParent = locationInParent; addContainerListener(new ContainerListener() { public void componentAdded(ContainerEvent e) { processComponentAdded(); } public void componentRemoved(ContainerEvent e) { processComponentRemoved(); } }); }
private void processComponentRemoved() { if (getComponentCount() == ZERO_CONTENT_COUNT) { if (locationInParent.equals(JSplitPane.LEFT) || locationInParent.equals(JSplitPane.TOP)) { parentComponent.setTopComponent(null); } else { parentComponent.setBottomComponent(null); } } } }
private void processComponentRemoved() { if (getComponentCount() == ZERO_CONTENT_COUNT) { if (locationInParent.equals(JSplitPane.LEFT) || locationInParent.equals(JSplitPane.TOP)) { parentComponent.setTopComponent(null); } else { parentComponent.setBottomComponent(null); } } } }