1 19 20 package edu.umd.cs.findbugs.gui2; 21 22 import java.awt.BorderLayout ; 23 import java.awt.event.KeyEvent ; 24 25 import javax.swing.JLabel ; 26 import javax.swing.JMenu ; 27 import javax.swing.JPanel ; 28 import javax.swing.JSplitPane ; 29 import javax.swing.JTabbedPane ; 30 import javax.swing.UIManager ; 31 32 35 public class SplitLayout implements FindBugsLayoutManager { 36 37 final MainFrame frame; 38 JLabel sourceTitle; 39 40 43 public SplitLayout(MainFrame frame) { 44 this.frame = frame; 45 } 46 47 50 public JMenu createWindowMenu() { 51 return null; 52 } 53 54 57 public void initialize() { 58 59 JSplitPane topLeft = new JSplitPane (JSplitPane.VERTICAL_SPLIT, 60 frame.bugListPanel(), frame.createCommentsInputPanel()); 61 topLeft.setOneTouchExpandable(true); 62 topLeft.setDividerLocation(250); 63 64 JPanel sourcePanel = new JPanel (); 65 sourcePanel.setLayout(new BorderLayout ()); 66 sourceTitle = new JLabel (); 67 sourceTitle.setText(edu.umd.cs.findbugs.L10N.getLocalString("txt.source_listing", "<source listing>")); 68 sourcePanel.add(sourceTitle, BorderLayout.NORTH); 69 sourcePanel.add(frame.createSourceCodePanel(), BorderLayout.CENTER); 70 sourcePanel.add(frame.createSourceSearchPanel(), BorderLayout.SOUTH); 71 JSplitPane top = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT, 72 topLeft, sourcePanel 73 ); 74 top.setOneTouchExpandable(true); 75 77 JSplitPane main = new JSplitPane (JSplitPane.VERTICAL_SPLIT, 78 top, frame.summaryTab()); 79 main.setOneTouchExpandable(true); 80 main.setDividerLocation(400); 81 82 frame.setLayout(new BorderLayout ()); 83 frame.add(main, BorderLayout.CENTER); 84 frame.add(frame.statusBar(), BorderLayout.SOUTH); 85 86 } 87 88 91 public void makeCommentsVisible() { 92 93 } 94 95 98 public void makeSourceVisible() { 99 100 } 101 102 105 public void saveState() { 106 108 } 109 110 113 public void setSourceTitle(String title) { 114 sourceTitle.setText(title); 115 } 116 117 } 118 | Popular Tags |