Changeset 14232
- Timestamp:
- 2007-07-09T11:52:40+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/cdm/IndexManager.java
r13468 r14232 443 443 index_list.setVisibleRowCount(6); 444 444 index_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 445 445 index_list.addMouseListener(new ClickListener()); 446 446 447 JPanel movement_pane = new JPanel(); 447 448 move_up_button = new GLIButton(Dictionary.get("CDM.Move.Move_Up"), JarTools.getImage("arrow-up.gif"), Dictionary.get("CDM.Move.Move_Up_Tooltip")); … … 505 506 public void gainFocus() {} 506 507 public void destroy() {} 507 508 509 /** Listens for double clicks apon the list and react as if the configure button was pushed. */ 510 private class ClickListener 511 extends MouseAdapter { 512 /** Called whenever the mouse is clicked over a registered component, we use this to chain through to the configure prompt. 513 * @param event A <strong>MouseEvent</strong> containing information about the mouse click. 514 */ 515 public void mouseClicked(MouseEvent event) { 516 if(event.getClickCount() == 2 ) { 517 if(!index_list.isSelectionEmpty()) { 518 Index index = (Index) index_list.getSelectedValue(); 519 NewIndexPrompt nip = new NewIndexPrompt(build_type, index); 520 nip.destroy(); 521 } 522 } 523 } 524 } 525 526 508 527 private class IndexListListener 509 528 implements ListSelectionListener {
Note:
See TracChangeset
for help on using the changeset viewer.