1 56 package org.objectstyle.cayenne.modeler.dialog.pref; 57 58 import java.awt.BorderLayout ; 59 60 import javax.swing.JButton ; 61 import javax.swing.JPanel ; 62 import javax.swing.JScrollPane ; 63 import javax.swing.JTable ; 64 65 import com.jgoodies.forms.builder.DefaultFormBuilder; 66 import com.jgoodies.forms.layout.FormLayout; 67 68 71 public class ClasspathPreferencesView extends JPanel { 72 73 protected JButton addJarButton; 74 protected JButton addDirButton; 75 protected JButton removeEntryButton; 76 protected JTable table; 77 78 public ClasspathPreferencesView() { 79 80 addJarButton = new JButton ("Add Jar/Zip"); 82 addDirButton = new JButton ("Add Class Folder"); 83 removeEntryButton = new JButton ("Remove"); 84 85 table = new JTable (); 86 table.setRowMargin(3); 87 table.setRowHeight(25); 88 89 91 FormLayout layout = new FormLayout("fill:min(150dlu;pref)", ""); 92 DefaultFormBuilder builder = new DefaultFormBuilder(layout); 93 builder.setDefaultDialogBorder(); 94 95 builder.append(addJarButton); 96 builder.append(addDirButton); 97 builder.append(removeEntryButton); 98 99 setLayout(new BorderLayout ()); 100 add(new JScrollPane (table), BorderLayout.CENTER); 101 add(builder.getPanel(), BorderLayout.EAST); 102 } 103 104 public JButton getAddDirButton() { 105 return addDirButton; 106 } 107 108 public JButton getAddJarButton() { 109 return addJarButton; 110 } 111 112 public JButton getRemoveEntryButton() { 113 return removeEntryButton; 114 } 115 116 public JTable getTable() { 117 return table; 118 } 119 } | Popular Tags |