Changeset 5217
- Timestamp:
- 2003-08-19T16:56:40+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/PlugInManager.java
r5207 r5217 43 43 import org.greenstone.gatherer.cdm.DynamicListModel; 44 44 import org.greenstone.gatherer.cdm.PlugIn; 45 import org.greenstone.gatherer.gui.DoubleImageButton; 45 46 import org.greenstone.gatherer.gui.GComboBox; 46 47 import org.greenstone.gatherer.msm.MSMUtils; … … 594 595 instructions.setRows(6); 595 596 instructions.setWrapStyleWord(true); 596 move_bottom = new JButton(); 597 JLabel move_bottom_label = new JLabel(get("CDM.Move.Move_Bottom")); 598 move_bottom_label.setHorizontalAlignment(JLabel.CENTER); 599 move_bottom_label.setPreferredSize(LABEL_SIZE); 600 move_bottom.setLayout(new BorderLayout()); 601 move_bottom.add(new JLabel(Utility.getImage("arrow-bottom.gif")), BorderLayout.WEST); 602 move_bottom.add(move_bottom_label, BorderLayout.CENTER); 603 move_bottom.add(new JLabel(Utility.getImage("arrow-bottom.gif")), BorderLayout.EAST); 597 598 move_top = new DoubleImageButton(get("CDM.Move.Move_Top"), Utility.getImage("arrow-top.gif"), Utility.getImage("arrow-top-disabled.gif")); 599 move_top.setEnabled(false); 600 move_top.setMnemonic(KeyEvent.VK_T); 601 move_top.setDisplayedMnemonicIndex(8); // !! English-centric hack 602 move_top.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE); 603 move_up = new DoubleImageButton(get("CDM.Move.Move_Up"), Utility.getImage("arrow-up.gif"), Utility.getImage("arrow-up-disabled.gif")); 604 move_up.setEnabled(false); 605 move_up.setMnemonic(KeyEvent.VK_U); 606 move_up.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE); 607 move_down = new DoubleImageButton(get("CDM.Move.Move_Down"), Utility.getImage("arrow-down.gif"), Utility.getImage("arrow-down-disabled.gif")); 608 move_down.setEnabled(false); 609 move_down.setMnemonic(KeyEvent.VK_D); 610 move_down.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE); 611 move_bottom = new DoubleImageButton(get("CDM.Move.Move_Bottom"), Utility.getImage("arrow-bottom.gif"), Utility.getImage("arrow-bottom-disabled.gif")); 612 move_bottom.setEnabled(false); 604 613 move_bottom.setMnemonic(KeyEvent.VK_B); 605 move_down = new JButton(); 606 JLabel move_down_label = new JLabel(get("CDM.Move.Move_Down")); 607 move_down_label.setHorizontalAlignment(JLabel.CENTER); 608 move_down_label.setPreferredSize(LABEL_SIZE); 609 move_down.setLayout(new BorderLayout()); 610 move_down.add(new JLabel(Utility.getImage("arrow-down.gif")), BorderLayout.WEST); 611 move_down.add(move_down_label, BorderLayout.CENTER); 612 move_down.add(new JLabel(Utility.getImage("arrow-down.gif")), BorderLayout.EAST); 613 move_down.setMnemonic(KeyEvent.VK_D); 614 move_top = new JButton(); 615 JLabel move_top_label = new JLabel(get("CDM.Move.Move_Top")); 616 move_top_label.setHorizontalAlignment(JLabel.CENTER); 617 move_top_label.setPreferredSize(LABEL_SIZE); 618 move_top.setLayout(new BorderLayout()); 619 move_top.add(new JLabel(Utility.getImage("arrow-top.gif")), BorderLayout.WEST); 620 move_top.add(move_top_label, BorderLayout.CENTER); 621 move_top.add(new JLabel(Utility.getImage("arrow-top.gif")), BorderLayout.EAST); 622 move_top.setMnemonic(KeyEvent.VK_T); 623 move_up = new JButton(); 624 JLabel move_up_label = new JLabel(get("CDM.Move.Move_Up")); 625 move_up_label.setHorizontalAlignment(JLabel.CENTER); 626 move_up_label.setPreferredSize(LABEL_SIZE); 627 move_up.setLayout(new BorderLayout()); 628 move_up.add(new JLabel(Utility.getImage("arrow-up.gif")), BorderLayout.WEST); 629 move_up.add(move_up_label, BorderLayout.CENTER); 630 move_up.add(new JLabel(Utility.getImage("arrow-up.gif")), BorderLayout.EAST); 631 move_up.setMnemonic(KeyEvent.VK_U); 614 move_bottom.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE); 615 632 616 movement_pane = new JPanel(); 633 617 … … 696 680 plugin_pane.add(plugin); 697 681 698 682 // Scope these mad bordering skillz. 699 683 JPanel temp = new JPanel(new BorderLayout()); 700 684 temp.setBorder … … 704 688 (BorderFactory.createTitledBorder(get("Controls")), 705 689 BorderFactory.createEmptyBorder(2,2,2,2)))); 706 690 707 691 temp.add(plugin_pane, BorderLayout.NORTH); 708 692 temp.add(button_pane, BorderLayout.SOUTH); … … 841 825 842 826 public void valueChanged(ListSelectionEvent e) { 843 if (!e.getValueIsAdjusting()) { // we get two events for one change in list selection - use the false one ( 827 if (!e.getValueIsAdjusting()) { // we get two events for one change in list selection - use the false one (the second one) 844 828 if (plugin_list.isSelectionEmpty()) { 829 move_top.setEnabled(false); 830 move_up.setEnabled(false); 831 move_down.setEnabled(false); 832 move_bottom.setEnabled(false); 845 833 configure.setEnabled(false); 846 834 remove.setEnabled(false); 847 } else { 835 } 836 else { 837 move_top.setEnabled(true); 838 move_up.setEnabled(true); 839 move_down.setEnabled(true); 840 move_bottom.setEnabled(true); 848 841 configure.setEnabled(true); 849 842 remove.setEnabled(true);
Note:
See TracChangeset
for help on using the changeset viewer.