- Timestamp:
- 2011-08-27T23:57:30+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Bounds.java
r4181 r4363 63 63 String[] components = asString.split(separator); 64 64 if (components.length != 4) 65 throw new IllegalArgumentException(MessageFormat.format("Exactly four doubles excpected in string, got {0} ", components.length));65 throw new IllegalArgumentException(MessageFormat.format("Exactly four doubles excpected in string, got {0}: {1}", components.length, asString)); 66 66 double[] values = new double[4]; 67 67 for (int i=0; i<4; i++) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java
r4191 r4363 12 12 import java.awt.event.MouseAdapter; 13 13 import java.awt.event.MouseEvent; 14 import java.util.Arrays; 14 15 import java.util.Collection; 15 16 import java.util.HashSet; … … 175 176 } 176 177 177 protected JPanel buildButtonPanel() {178 JPanel tp = getButtonPanel(5);179 180 // -- select objects action181 selectObjectsAction = new SelectObjectsAction();182 tp.add(new SideButton(selectObjectsAction, false));183 cbInSelectionOnly.addItemListener(selectObjectsAction);184 lstInActiveDataLayer.getSelectionModel().addListSelectionListener(selectObjectsAction);185 lstInSelection.getSelectionModel().addListSelectionListener(selectObjectsAction);186 187 // -- read changesets action188 readChangesetAction = new ReadChangesetsAction();189 tp.add(new SideButton(readChangesetAction, false));190 cbInSelectionOnly.addItemListener(readChangesetAction);191 lstInActiveDataLayer.getSelectionModel().addListSelectionListener(readChangesetAction);192 lstInSelection.getSelectionModel().addListSelectionListener(readChangesetAction);193 194 // -- close changesets action195 closeChangesetAction = new CloseOpenChangesetsAction();196 tp.add(new SideButton(closeChangesetAction, false));197 cbInSelectionOnly.addItemListener(closeChangesetAction);198 lstInActiveDataLayer.getSelectionModel().addListSelectionListener(closeChangesetAction);199 lstInSelection.getSelectionModel().addListSelectionListener(closeChangesetAction);200 201 // -- show info action202 showChangesetInfoAction = new ShowChangesetInfoAction();203 tp.add(new SideButton(showChangesetInfoAction, false));204 cbInSelectionOnly.addItemListener(showChangesetInfoAction);205 lstInActiveDataLayer.getSelectionModel().addListSelectionListener(showChangesetInfoAction);206 lstInSelection.getSelectionModel().addListSelectionListener(showChangesetInfoAction);207 208 // -- launch changeset manager action209 launchChangesetManagerAction = new LaunchChangesetManagerAction();210 tp.add(new SideButton(launchChangesetManagerAction, false));211 cbInSelectionOnly.addItemListener(launchChangesetManagerAction);212 lstInActiveDataLayer.getSelectionModel().addListSelectionListener(launchChangesetManagerAction);213 lstInSelection.getSelectionModel().addListSelectionListener(launchChangesetManagerAction);214 215 return tp;216 }217 218 178 protected void build() { 219 179 JPanel pnl = new JPanel(new BorderLayout()); 220 180 pnl.add(buildFilterPanel(), BorderLayout.NORTH); 221 181 pnl.add(pnlList = buildListPanel(), BorderLayout.CENTER); 222 pnl.add(buildButtonPanel(), BorderLayout.SOUTH);223 add(pnl, BorderLayout.CENTER);224 182 225 183 cbInSelectionOnly.addItemListener(new FilterChangeHandler()); 226 184 227 185 HelpUtil.setHelpContext(pnl, HelpUtil.ht("/Dialog/ChangesetListDialog")); 186 187 // -- select objects action 188 selectObjectsAction = new SelectObjectsAction(); 189 cbInSelectionOnly.addItemListener(selectObjectsAction); 190 lstInActiveDataLayer.getSelectionModel().addListSelectionListener(selectObjectsAction); 191 lstInSelection.getSelectionModel().addListSelectionListener(selectObjectsAction); 192 193 // -- read changesets action 194 readChangesetAction = new ReadChangesetsAction(); 195 cbInSelectionOnly.addItemListener(readChangesetAction); 196 lstInActiveDataLayer.getSelectionModel().addListSelectionListener(readChangesetAction); 197 lstInSelection.getSelectionModel().addListSelectionListener(readChangesetAction); 198 199 // -- close changesets action 200 closeChangesetAction = new CloseOpenChangesetsAction(); 201 cbInSelectionOnly.addItemListener(closeChangesetAction); 202 lstInActiveDataLayer.getSelectionModel().addListSelectionListener(closeChangesetAction); 203 lstInSelection.getSelectionModel().addListSelectionListener(closeChangesetAction); 204 205 // -- show info action 206 showChangesetInfoAction = new ShowChangesetInfoAction(); 207 cbInSelectionOnly.addItemListener(showChangesetInfoAction); 208 lstInActiveDataLayer.getSelectionModel().addListSelectionListener(showChangesetInfoAction); 209 lstInSelection.getSelectionModel().addListSelectionListener(showChangesetInfoAction); 210 211 // -- launch changeset manager action 212 launchChangesetManagerAction = new LaunchChangesetManagerAction(); 213 cbInSelectionOnly.addItemListener(launchChangesetManagerAction); 214 lstInActiveDataLayer.getSelectionModel().addListSelectionListener(launchChangesetManagerAction); 215 lstInSelection.getSelectionModel().addListSelectionListener(launchChangesetManagerAction); 216 217 createLayout(pnl, false, Arrays.asList(new SideButton[] { 218 new SideButton(selectObjectsAction, false), 219 new SideButton(readChangesetAction, false), 220 new SideButton(closeChangesetAction, false), 221 new SideButton(showChangesetInfoAction, false), 222 new SideButton(launchChangesetManagerAction, false) 223 })); 228 224 } 229 225 -
trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
r3801 r4363 13 13 import java.awt.event.MouseEvent; 14 14 import java.util.ArrayList; 15 import java.util.Arrays; 15 16 import java.util.LinkedHashSet; 16 17 import java.util.List; … … 102 103 treesPanel.setBackground(redoTree.getBackground()); 103 104 104 scrollPane = new JScrollPane(treesPanel); 105 add(scrollPane, BorderLayout.CENTER); 106 add(createButtonPanel(), BorderLayout.SOUTH); 105 SelectAction selectAction = new SelectAction(); 106 wireUpdateEnabledStateUpdater(selectAction, undoTree); 107 wireUpdateEnabledStateUpdater(selectAction, redoTree); 108 109 UndoRedoAction undoAction = new UndoRedoAction(UndoRedoType.UNDO); 110 wireUpdateEnabledStateUpdater(undoAction, undoTree); 111 112 UndoRedoAction redoAction = new UndoRedoAction(UndoRedoType.REDO); 113 wireUpdateEnabledStateUpdater(redoAction, redoTree); 114 115 scrollPane = (JScrollPane)createLayout(treesPanel, true, Arrays.asList(new SideButton[] { 116 new SideButton(selectAction), 117 new SideButton(undoAction), 118 new SideButton(redoAction) 119 })); 107 120 } 108 121 … … 144 157 } 145 158 } 146 }147 148 protected JPanel createButtonPanel() {149 JPanel buttonPanel = getButtonPanel(3);150 151 SelectAction selectAction = new SelectAction();152 wireUpdateEnabledStateUpdater(selectAction, undoTree);153 wireUpdateEnabledStateUpdater(selectAction, redoTree);154 buttonPanel.add(new SideButton(selectAction));155 156 UndoRedoAction undoAction = new UndoRedoAction(UndoRedoType.UNDO);157 wireUpdateEnabledStateUpdater(undoAction, undoTree);158 buttonPanel.add(new SideButton(undoAction));159 160 UndoRedoAction redoAction = new UndoRedoAction(UndoRedoType.REDO);161 wireUpdateEnabledStateUpdater(redoAction, redoTree);162 buttonPanel.add(new SideButton(redoAction));163 164 return buttonPanel;165 159 } 166 160 -
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
r3973 r4363 6 6 import static org.openstreetmap.josm.tools.I18n.tr; 7 7 8 import java.awt.BorderLayout;9 8 import java.awt.Color; 10 9 import java.awt.Graphics; … … 14 13 import java.awt.event.MouseAdapter; 15 14 import java.awt.event.MouseEvent; 15 import java.util.Arrays; 16 16 import java.util.Collection; 17 17 import java.util.Iterator; … … 21 21 import javax.swing.AbstractAction; 22 22 import javax.swing.JList; 23 import javax.swing.JPanel;24 import javax.swing.JScrollPane;25 23 import javax.swing.ListModel; 26 24 import javax.swing.ListSelectionModel; … … 95 93 }); 96 94 97 add(new JScrollPane(lstConflicts), BorderLayout.CENTER);98 99 95 SideButton btnResolve = new SideButton(actResolve = new ResolveAction()); 100 96 lstConflicts.getSelectionModel().addListSelectionListener(actResolve); … … 103 99 lstConflicts.getSelectionModel().addListSelectionListener(actSelect); 104 100 105 JPanel buttonPanel = getButtonPanel(2); 106 buttonPanel.add(btnResolve); 107 buttonPanel.add(btnSelect); 108 add(buttonPanel, BorderLayout.SOUTH); 101 createLayout(lstConflicts, true, Arrays.asList(new SideButton[] { 102 btnResolve, btnSelect 103 })); 109 104 } 110 105 -
trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
r4223 r4363 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 6 7 import java.awt.BorderLayout;8 7 import java.awt.Component; 9 8 import java.awt.Graphics2D; … … 12 11 import java.awt.event.KeyEvent; 13 12 import java.awt.event.MouseEvent; 13 import java.util.Arrays; 14 14 import java.util.Collection; 15 15 import java.util.HashSet; … … 18 18 19 19 import javax.swing.JCheckBox; 20 import javax.swing.JPanel;21 import javax.swing.JScrollPane;22 20 import javax.swing.JTable; 23 21 import javax.swing.ListSelectionModel; … … 82 80 } 83 81 84 protected JPanel buildButtonRow() {85 JPanel pnl = getButtonPanel(5);86 87 addButton = new SideButton(marktr("Add"), "add", "SelectionList", tr("Add filter."),88 new ActionListener(){89 public void actionPerformed(ActionEvent evt){90 Filter filter = (Filter)SearchAction.showSearchDialog(new Filter());91 if(filter != null){92 filterModel.addFilter(filter);93 }94 }95 });96 pnl.add(addButton);97 98 editButton = new SideButton(marktr("Edit"), "edit", "SelectionList", tr("Edit filter."),99 new ActionListener(){100 public void actionPerformed(ActionEvent evt){101 int index = userTable.getSelectionModel().getMinSelectionIndex();102 if(index < 0) return;103 Filter f = filterModel.getFilter(index);104 Filter filter = (Filter)SearchAction.showSearchDialog(f);105 if(filter != null){106 filterModel.setFilter(index, filter);107 }108 }109 });110 pnl.add(editButton);111 112 deleteButton = new SideButton(marktr("Delete"), "delete", "SelectionList", tr("Delete filter."),113 new ActionListener(){114 public void actionPerformed(ActionEvent evt){115 int index = userTable.getSelectionModel().getMinSelectionIndex();116 if(index < 0) return;117 filterModel.removeFilter(index);118 }119 });120 pnl.add(deleteButton);121 122 upButton = new SideButton(marktr("Up"), "up", "SelectionList", tr("Move filter up."),123 new ActionListener(){124 public void actionPerformed(ActionEvent evt){125 int index = userTable.getSelectionModel().getMinSelectionIndex();126 if(index < 0) return;127 filterModel.moveUpFilter(index);128 userTable.getSelectionModel().setSelectionInterval(index-1, index-1);129 }130 });131 pnl.add(upButton);132 133 downButton = new SideButton(marktr("Down"), "down", "SelectionList", tr("Move filter down."),134 new ActionListener(){135 public void actionPerformed(ActionEvent evt){136 int index = userTable.getSelectionModel().getMinSelectionIndex();137 if(index < 0) return;138 filterModel.moveDownFilter(index);139 userTable.getSelectionModel().setSelectionInterval(index+1, index+1);140 }141 });142 pnl.add(downButton);143 return pnl;144 }145 146 82 protected String[] columnToolTips = { 147 83 tr("Enable filter"), … … 153 89 154 90 protected void build() { 155 JPanel pnl = new JPanel();156 pnl.setLayout(new BorderLayout());157 91 userTable = new JTable(filterModel){ 158 92 @Override … … 185 119 userTable.setDefaultRenderer(String.class, new StringRenderer()); 186 120 187 pnl.add(new JScrollPane(userTable), BorderLayout.CENTER); 188 189 // -- the button row 190 pnl.add(buildButtonRow(), BorderLayout.SOUTH); 191 /*userTable.addMouseListener(new DoubleClickAdapter());*/ 192 add(pnl, BorderLayout.CENTER); 121 addButton = new SideButton(marktr("Add"), "add", "SelectionList", tr("Add filter."), 122 new ActionListener(){ 123 public void actionPerformed(ActionEvent evt){ 124 Filter filter = (Filter)SearchAction.showSearchDialog(new Filter()); 125 if(filter != null){ 126 filterModel.addFilter(filter); 127 } 128 } 129 }); 130 131 editButton = new SideButton(marktr("Edit"), "edit", "SelectionList", tr("Edit filter."), 132 new ActionListener(){ 133 public void actionPerformed(ActionEvent evt){ 134 int index = userTable.getSelectionModel().getMinSelectionIndex(); 135 if(index < 0) return; 136 Filter f = filterModel.getFilter(index); 137 Filter filter = (Filter)SearchAction.showSearchDialog(f); 138 if(filter != null){ 139 filterModel.setFilter(index, filter); 140 } 141 } 142 }); 143 144 deleteButton = new SideButton(marktr("Delete"), "delete", "SelectionList", tr("Delete filter."), 145 new ActionListener(){ 146 public void actionPerformed(ActionEvent evt){ 147 int index = userTable.getSelectionModel().getMinSelectionIndex(); 148 if(index < 0) return; 149 filterModel.removeFilter(index); 150 } 151 }); 152 153 upButton = new SideButton(marktr("Up"), "up", "SelectionList", tr("Move filter up."), 154 new ActionListener(){ 155 public void actionPerformed(ActionEvent evt){ 156 int index = userTable.getSelectionModel().getMinSelectionIndex(); 157 if(index < 0) return; 158 filterModel.moveUpFilter(index); 159 userTable.getSelectionModel().setSelectionInterval(index-1, index-1); 160 } 161 }); 162 163 downButton = new SideButton(marktr("Down"), "down", "SelectionList", tr("Move filter down."), 164 new ActionListener(){ 165 public void actionPerformed(ActionEvent evt){ 166 int index = userTable.getSelectionModel().getMinSelectionIndex(); 167 if(index < 0) return; 168 filterModel.moveDownFilter(index); 169 userTable.getSelectionModel().setSelectionInterval(index+1, index+1); 170 } 171 }); 172 173 createLayout(userTable, true, Arrays.asList(new SideButton[] { 174 addButton, editButton, deleteButton, upButton, downButton 175 })); 193 176 } 194 177 -
trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java
r4072 r4363 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.BorderLayout;7 6 import java.awt.Component; 8 7 import java.awt.event.ActionEvent; … … 11 10 import java.awt.event.MouseEvent; 12 11 import java.util.ArrayList; 12 import java.util.Arrays; 13 13 import java.util.Collection; 14 14 import java.util.Collections; … … 20 20 import javax.swing.JComponent; 21 21 import javax.swing.JLabel; 22 import javax.swing.JPanel;23 import javax.swing.JScrollPane;24 22 import javax.swing.JTable; 25 23 import javax.swing.ListSelectionModel; … … 75 73 76 74 /** 77 * builds the row with the command buttons78 *79 * @return the rows with the command buttons80 */81 protected JPanel buildButtonRow() {82 JPanel buttons = getButtonPanel(2);83 84 SideButton btn = new SideButton(reloadAction = new ReloadAction());85 btn.setName("btn.reload");86 buttons.add(btn);87 88 btn = new SideButton(showHistoryAction = new ShowHistoryAction());89 btn.setName("btn.showhistory");90 buttons.add(btn);91 92 return buttons;93 }94 95 /**96 75 * builds the GUI 97 76 */ … … 104 83 ); 105 84 historyTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); 106 historyTable.setName("table.historyitems");107 85 final TableCellRenderer oldRenderer = historyTable.getTableHeader().getDefaultRenderer(); 108 86 historyTable.getTableHeader().setDefaultRenderer(new DefaultTableCellRenderer(){ … … 121 99 }); 122 100 historyTable.addMouseListener(new ShowHistoryMouseAdapter()); 123 124 JScrollPane pane = new JScrollPane(historyTable);125 pane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);126 pane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);127 101 historyTable.setTableHeader(null); 128 pane.setColumnHeaderView(null); 129 add(pane, BorderLayout.CENTER); 130 131 add(buildButtonRow(), BorderLayout.SOUTH); 102 103 createLayout(historyTable, true, Arrays.asList(new SideButton[] { 104 new SideButton(reloadAction = new ReloadAction()), 105 new SideButton(showHistoryAction = new ShowHistoryAction()) 106 })); 132 107 133 108 // wire actions -
trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
r4222 r4363 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.BorderLayout;7 6 import java.awt.Component; 8 7 import java.awt.Dimension; … … 25 24 import java.io.InputStreamReader; 26 25 import java.util.ArrayList; 26 import java.util.Arrays; 27 27 import java.util.List; 28 28 … … 91 91 92 92 protected void build() { 93 JPanel pnl = new JPanel();94 pnl.setLayout(new BorderLayout());95 96 93 model = new StylesModel(); 97 94 … … 136 133 p.add(tblStyles, GBC.std(0, 1).span(2).fill()); 137 134 138 pnl.add(new JScrollPane(p), BorderLayout.CENTER);139 140 pnl.add(buildButtonRow(), BorderLayout.SOUTH);141 142 add(pnl, BorderLayout.CENTER);143 }144 145 protected static class StylesTable extends JTable {146 147 public StylesTable(TableModel dm) {148 super(dm);149 }150 151 public void scrollToVisible(int row, int col) {152 if (!(getParent() instanceof JViewport))153 return;154 JViewport viewport = (JViewport) getParent();155 Rectangle rect = getCellRect(row, col, true);156 Point pt = viewport.getViewPosition();157 rect.setLocation(rect.x - pt.x, rect.y - pt.y);158 viewport.scrollRectToVisible(rect);159 }160 }161 162 protected JPanel buildButtonRow() {163 JPanel p = getButtonPanel(4);164 135 reloadAction = new ReloadAction(); 165 136 onoffAction = new OnOffAction(); … … 170 141 selectionModel.addListSelectionListener(upAction); 171 142 selectionModel.addListSelectionListener(downAction); 172 p.add(new SideButton(onoffAction)); 173 p.add(new SideButton(upAction)); 174 p.add(new SideButton(downAction)); 175 p.add(new SideButton(new LaunchMapPaintPreferencesAction())); 176 177 return p; 143 144 createLayout(p, true, Arrays.asList(new SideButton[] { 145 new SideButton(onoffAction), 146 new SideButton(upAction), 147 new SideButton(downAction), 148 new SideButton(new LaunchMapPaintPreferencesAction()) 149 })); 150 } 151 152 protected static class StylesTable extends JTable { 153 154 public StylesTable(TableModel dm) { 155 super(dm); 156 } 157 158 public void scrollToVisible(int row, int col) { 159 if (!(getParent() instanceof JViewport)) 160 return; 161 JViewport viewport = (JViewport) getParent(); 162 Rectangle rect = getCellRect(row, col, true); 163 Point pt = viewport.getViewPosition(); 164 rect.setLocation(rect.x - pt.x, rect.y - pt.y); 165 viewport.scrollRectToVisible(rect); 166 } 178 167 } 179 168 -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r4355 r4363 670 670 } 671 671 672 protected voidcreateLayout(Component data, boolean scroll, Collection<SideButton> buttons) {672 protected Component createLayout(Component data, boolean scroll, Collection<SideButton> buttons) { 673 673 if(scroll) 674 add(new JScrollPane(data), BorderLayout.CENTER); 675 else 676 add(data, BorderLayout.CENTER); 674 data = new JScrollPane(data); 675 add(data, BorderLayout.CENTER); 677 676 if(buttons != null && buttons.size() != 0) { 678 677 buttonsPanel = new JPanel(Main.pref.getBoolean("dialog.align.left", false) … … 686 685 } 687 686 } 687 return data; 688 688 } 689 689 -
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r4035 r4363 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 6 7 import java.awt.BorderLayout;8 7 import java.awt.GridLayout; 9 8 import java.awt.event.ActionEvent; … … 15 14 import java.lang.reflect.InvocationTargetException; 16 15 import java.util.ArrayList; 16 import java.util.Arrays; 17 17 import java.util.Collection; 18 18 import java.util.Enumeration; … … 24 24 import javax.swing.JMenuItem; 25 25 import javax.swing.JOptionPane; 26 import javax.swing.JPanel;27 26 import javax.swing.JPopupMenu; 28 import javax.swing.JScrollPane;29 27 import javax.swing.SwingUtilities; 30 28 import javax.swing.event.TreeSelectionEvent; … … 108 106 tree.addTreeSelectionListener(new SelectionWatch()); 109 107 110 add(new JScrollPane(tree), BorderLayout.CENTER); 111 112 JPanel buttonPanel = new JPanel(new GridLayout(1, 3)); 113 108 List<SideButton> buttons = new LinkedList<SideButton>(); 114 109 selectButton = new SideButton(marktr("Select"), "select", "Validator", 115 110 tr("Set the selected elements on the map to the selected items in the list above."), this); 116 111 selectButton.setEnabled(false); 117 buttonPanel.add(selectButton); 118 buttonPanel.add(new SideButton(Main.main.validator.validateAction), "refresh"); 112 buttons.add(selectButton); 113 114 buttons.add(new SideButton(Main.main.validator.validateAction)); 115 119 116 fixButton = new SideButton(marktr("Fix"), "fix", "Validator", tr("Fix the selected issue."), this); 120 117 fixButton.setEnabled(false); 121 buttonPanel.add(fixButton); 118 buttons.add(fixButton); 119 122 120 if (Main.pref.getBoolean(ValidatorPreference.PREF_USE_IGNORE, true)) { 123 121 ignoreButton = new SideButton(marktr("Ignore"), "delete", "Validator", 124 122 tr("Ignore the selected issue next time."), this); 125 123 ignoreButton.setEnabled(false); 126 button Panel.add(ignoreButton);124 buttons.add(ignoreButton); 127 125 } else { 128 126 ignoreButton = null; 129 127 } 130 add(buttonPanel, BorderLayout.SOUTH);128 createLayout(tree, true, buttons); 131 129 } 132 130 … … 466 464 } 467 465 selectButton.setEnabled(false); 468 469 if (e.getSource() instanceof JScrollPane) {470 System.out.println(e.getSource());471 return;472 }473 466 474 467 boolean hasFixes = setSelection(null, false); -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r4356 r4363 759 759 } 760 760 761 DblClickWatch dblClickWatch = new DblClickWatch();762 propertyTable.addMouseListener(dblClickWatch);763 membershipTable.addMouseListener(dblClickWatch);764 JScrollPane scrollPane = new JScrollPane(bothTables);765 scrollPane.addMouseListener(dblClickWatch);766 767 selectSth.setPreferredSize(scrollPane.getSize());768 presets.setSize(scrollPane.getSize());769 770 761 // -- add action and shortcut 771 762 this.btnAdd = new SideButton(addAction); … … 792 783 getActionMap().put("delete", deleteAction); 793 784 794 createLayout(scrollPane, false, Arrays.asList(new SideButton[] {785 JScrollPane scrollPane = (JScrollPane) createLayout(bothTables, true, Arrays.asList(new SideButton[] { 795 786 this.btnAdd, this.btnEdit, this.btnDel 796 787 })); 788 789 DblClickWatch dblClickWatch = new DblClickWatch(); 790 propertyTable.addMouseListener(dblClickWatch); 791 membershipTable.addMouseListener(dblClickWatch); 792 scrollPane.addMouseListener(dblClickWatch); 793 794 selectSth.setPreferredSize(scrollPane.getSize()); 795 presets.setSize(scrollPane.getSize()); 797 796 798 797 // -- help action
Note:
See TracChangeset
for help on using the changeset viewer.