You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MultiStructureViewPanel.java 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* *******************************************************************
  2. * Copyright (c) 1999-2001 Xerox Corporation,
  3. * 2002 Palo Alto Research Center, Incorporated (PARC).
  4. * All rights reserved.
  5. * This program and the accompanying materials are made available
  6. * under the terms of the Eclipse Public License v 2.0
  7. * which accompanies this distribution and is available at
  8. * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
  9. *
  10. * Contributors:
  11. * Xerox/PARC initial implementation
  12. * Helen Hawkins Converted to new interface (bug 148190)
  13. * ******************************************************************/
  14. package org.aspectj.ajde.ui.swing;
  15. import java.awt.BorderLayout;
  16. import javax.swing.JPanel;
  17. import javax.swing.JSplitPane;
  18. import org.aspectj.ajde.Ajde;
  19. import org.aspectj.bridge.IMessage;
  20. import org.aspectj.bridge.Message;
  21. /**
  22. * @author Mik Kersten
  23. */
  24. public class MultiStructureViewPanel extends JPanel {
  25. private static final long serialVersionUID = -4409192026967597082L;
  26. JSplitPane views_splitPane;
  27. BorderLayout borderLayout1 = new BorderLayout();
  28. public MultiStructureViewPanel(StructureViewPanel topPanel, StructureViewPanel bottomPanel) {
  29. super();
  30. try {
  31. views_splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, topPanel, bottomPanel);
  32. jbInit();
  33. } catch(Exception e) {
  34. Message msg = new Message("Could not initialize GUI.",IMessage.ERROR,e,null);
  35. Ajde.getDefault().getMessageHandler().handleMessage(msg);
  36. }
  37. }
  38. private void jbInit() throws Exception {
  39. this.setLayout(borderLayout1);
  40. this.add(views_splitPane, BorderLayout.CENTER);
  41. views_splitPane.setDividerSize(4);
  42. views_splitPane.setDividerLocation(300);
  43. }
  44. }