Changeset 4353 in josm for trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
- Timestamp:
- 2011-08-27T13:57:45+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
r4078 r4353 15 15 import java.text.NumberFormat; 16 16 import java.util.ArrayList; 17 import java.util.Arrays; 17 18 import java.util.Collection; 18 19 import java.util.Collections; … … 29 30 import javax.swing.JLabel; 30 31 import javax.swing.JOptionPane; 31 import javax.swing.JPanel;32 import javax.swing.JScrollPane;33 32 import javax.swing.JTable; 34 33 import javax.swing.ListSelectionModel; … … 87 86 } 88 87 89 protected JPanel buildButtonRow() {90 JPanel pnl = getButtonPanel(2);91 92 // -- select users primitives action93 //94 selectionUsersPrimitivesAction = new SelectUsersPrimitivesAction();95 userTable.getSelectionModel().addListSelectionListener(selectionUsersPrimitivesAction);96 pnl.add(new SideButton(selectionUsersPrimitivesAction));97 98 // -- info action99 //100 showUserInfoAction = new ShowUserInfoAction();101 userTable.getSelectionModel().addListSelectionListener(showUserInfoAction);102 pnl.add(new SideButton(showUserInfoAction));103 104 // -- load relicensing info action105 loadRelicensingInformationAction = new LoadRelicensingInformationAction();106 pnl.add(new SideButton(loadRelicensingInformationAction));107 return pnl;108 }109 110 88 protected void build() { 111 JPanel pnl = new JPanel();112 pnl.setLayout(new BorderLayout());113 89 model = new UserTableModel(); 114 90 userTable = new JTable(model); 115 91 userTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); 92 userTable.addMouseListener(new DoubleClickAdapter()); 116 93 TableColumnModel columnModel = userTable.getColumnModel(); 117 94 columnModel.getColumn(3).setPreferredWidth(20); … … 125 102 }; 126 103 }); 127 pnl.add(new JScrollPane(userTable), BorderLayout.CENTER); 128 129 // -- the button row 130 pnl.add(buildButtonRow(), BorderLayout.SOUTH); 131 userTable.addMouseListener(new DoubleClickAdapter()); 132 add(pnl, BorderLayout.CENTER); 104 105 // -- select users primitives action 106 // 107 selectionUsersPrimitivesAction = new SelectUsersPrimitivesAction(); 108 userTable.getSelectionModel().addListSelectionListener(selectionUsersPrimitivesAction); 109 110 // -- info action 111 // 112 showUserInfoAction = new ShowUserInfoAction(); 113 userTable.getSelectionModel().addListSelectionListener(showUserInfoAction); 114 115 // -- load relicensing info action 116 loadRelicensingInformationAction = new LoadRelicensingInformationAction(); 117 118 createLayout(userTable, true, Arrays.asList(new SideButton[] { 119 new SideButton(selectionUsersPrimitivesAction), 120 new SideButton(showUserInfoAction), 121 new SideButton(loadRelicensingInformationAction) 122 })); 133 123 } 134 124
Note:
See TracChangeset
for help on using the changeset viewer.
