Changeset 5218
- Timestamp:
- 2003-08-19T17:21:20+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java
r5209 r5218 48 48 import org.greenstone.gatherer.cdm.DOMProxyListModel; 49 49 import org.greenstone.gatherer.file.FileNode; 50 import org.greenstone.gatherer.gui.DoubleImageButton; 50 51 import org.greenstone.gatherer.gui.GComboBox; 51 52 import org.greenstone.gatherer.msm.MSMEvent; … … 576 577 JPanel move_button_pane = new JPanel(); 577 578 578 move_bottom_button = new JButton(); 579 JLabel move_bottom_label = new JLabel(get("CDM.Move.Move_Bottom")); 580 move_bottom_label.setHorizontalAlignment(JLabel.CENTER); 581 move_bottom_label.setPreferredSize(LABEL_SIZE); 582 ImageIcon move_bottom_icon = Utility.getImage("arrow-bottom.gif"); 583 move_bottom_button.setLayout(new BorderLayout()); 584 move_bottom_button.add(new JLabel(move_bottom_icon), BorderLayout.WEST); 585 move_bottom_button.add(move_bottom_label, BorderLayout.CENTER); 586 move_bottom_button.add(new JLabel(move_bottom_icon), BorderLayout.EAST); 579 move_top_button = new DoubleImageButton(get("CDM.Move.Move_Top"), Utility.getImage("arrow-top.gif"), Utility.getImage("arrow-top-disabled.gif")); 580 move_top_button.setEnabled(false); 581 move_top_button.setMnemonic(KeyEvent.VK_T); 582 move_top_button.setDisplayedMnemonicIndex(8); // !! English-centric hack 583 move_top_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE); 584 585 move_up_button = new DoubleImageButton(get("CDM.Move.Move_Up"), Utility.getImage("arrow-up.gif"), Utility.getImage("arrow-up-disabled.gif")); 586 move_up_button.setEnabled(false); 587 move_up_button.setMnemonic(KeyEvent.VK_U); 588 move_up_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE); 589 590 move_down_button = new DoubleImageButton(get("CDM.Move.Move_Down"), Utility.getImage("arrow-down.gif"), Utility.getImage("arrow-down-disabled.gif")); 591 move_down_button.setEnabled(false); 592 move_down_button.setMnemonic(KeyEvent.VK_D); 593 move_down_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE); 594 595 move_bottom_button = new DoubleImageButton(get("CDM.Move.Move_Bottom"), Utility.getImage("arrow-bottom.gif"), Utility.getImage("arrow-bottom-disabled.gif")); 596 move_bottom_button.setEnabled(false); 587 597 move_bottom_button.setMnemonic(KeyEvent.VK_B); 588 589 move_down_button = new JButton(); 590 JLabel move_down_label = new JLabel(get("CDM.Move.Move_Down")); 591 move_down_label.setHorizontalAlignment(JLabel.CENTER); 592 move_down_label.setPreferredSize(LABEL_SIZE); 593 ImageIcon move_down_icon = Utility.getImage("arrow-down.gif"); 594 move_down_button.setLayout(new BorderLayout()); 595 move_down_button.add(new JLabel(move_down_icon), BorderLayout.WEST); 596 move_down_button.add(move_down_label, BorderLayout.CENTER); 597 move_down_button.add(new JLabel(move_down_icon), BorderLayout.EAST); 598 move_down_button.setMnemonic(KeyEvent.VK_D); 599 600 move_top_button = new JButton(); 601 JLabel move_top_label = new JLabel(get("CDM.Move.Move_Top")); 602 move_top_label.setHorizontalAlignment(JLabel.CENTER); 603 move_top_label.setPreferredSize(LABEL_SIZE); 604 ImageIcon move_top_icon = Utility.getImage("arrow-top.gif"); 605 move_top_button.setLayout(new BorderLayout()); 606 move_top_button.add(new JLabel(move_top_icon), BorderLayout.WEST); 607 move_top_button.add(move_top_label, BorderLayout.CENTER); 608 move_top_button.add(new JLabel(move_top_icon), BorderLayout.EAST); 609 move_top_button.setMnemonic(KeyEvent.VK_T); 610 611 move_up_button = new JButton(); 612 JLabel move_up_label = new JLabel(get("CDM.Move.Move_Up")); 613 move_up_label.setHorizontalAlignment(JLabel.CENTER); 614 move_up_label.setPreferredSize(LABEL_SIZE); 615 ImageIcon move_up_icon = Utility.getImage("arrow-up.gif"); 616 move_up_button.setLayout(new BorderLayout()); 617 move_up_button.add(new JLabel(move_up_icon), BorderLayout.WEST); 618 move_up_button.add(move_up_label, BorderLayout.CENTER); 619 move_up_button.add(new JLabel(move_up_icon), BorderLayout.EAST); 620 move_up_button.setMnemonic(KeyEvent.VK_U); 598 move_bottom_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE); 621 599 622 600 // Listeners … … 799 777 if (!e.getValueIsAdjusting()) { // we get two events for one change in list selection - use the false one ( the second one) 800 778 if (classifier_list.isSelectionEmpty()) { 779 move_top_button.setEnabled(false); 780 move_up_button.setEnabled(false); 781 move_down_button.setEnabled(false); 782 move_bottom_button.setEnabled(false); 801 783 configure.setEnabled(false); 802 784 remove.setEnabled(false); 803 } else { 785 } 786 else { 787 move_top_button.setEnabled(true); 788 move_up_button.setEnabled(true); 789 move_down_button.setEnabled(true); 790 move_bottom_button.setEnabled(true); 804 791 configure.setEnabled(true); 805 792 remove.setEnabled(true);
Note:
See TracChangeset
for help on using the changeset viewer.