Changeset 11603


Ignore:
Timestamp:
2006-04-06T15:29:42+12:00 (18 years ago)
Author:
mdewsnip
Message:

I'm not sure what the FocusListener stuff was all about, but it doesn't seem to be needed any longer (and it wasn't in the Enrich pane), so I'm removing it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java

    r11601 r11603  
    7171public class GatherPane
    7272    extends JPanel
    73     implements ActionListener, FocusListener {
     73    implements ActionListener
     74{
    7475    /** The group encompassing all of the components available as drop targets for drag and drop actions. Required so that only one component renders the ghost and higlights itself as a target, which the other members are restored to their original, pristine, condition. */
    7576    private DragGroup group               =  null;
     
    226227    workspace_tree = new WorkspaceTree(Utility.WORKSPACE_TREE);
    227228    group.add(workspace_tree);
    228     workspace_tree.addFocusListener(this);
    229229    workspace_tree.addMouseListener(mouse_listener);
    230230    workspace_tree.addMouseListener(Gatherer.g_man.foa_listener);
     
    257257    collection_tree.setEnabled(Gatherer.c_man.getCollectionTreeModel() != null);
    258258    group.add(collection_tree);
    259     collection_tree.addFocusListener(this);
    260259    collection_tree.addMouseListener(mouse_listener);
    261260    collection_tree.addMouseListener(Gatherer.g_man.foa_listener);
     
    346345    return collection_tree.getRowBounds(collection_tree.getRowForPath(path));
    347346    }
    348     /** Called whenever this pane gains focus, this method ensures that the various tree renderers are correctly colouring the tree (as these settings sometimes get lost).
    349      * @param event A <strong>FocusEvent</strong> containing details about the focus action performed.
    350      */
    351     public void focusGained(FocusEvent event) {
    352     DefaultTreeCellRenderer def = new DefaultTreeCellRenderer();
    353     DefaultTreeCellRenderer w = (DefaultTreeCellRenderer)workspace_tree.getCellRenderer();
    354     DefaultTreeCellRenderer c = (DefaultTreeCellRenderer)collection_tree.getCellRenderer();
    355     if(event.getSource() == workspace_tree) {
    356         w.setBackgroundSelectionColor(def.getBackgroundSelectionColor());
    357         c.setBackgroundSelectionColor(Color.lightGray);
    358     }
    359     else if(event.getSource() == collection_tree) {
    360         c.setBackgroundSelectionColor(def.getBackgroundSelectionColor());
    361         w.setBackgroundSelectionColor(Color.lightGray);
    362     }
    363     repaint();
    364     }
    365     /** Implementation side-effect, not used in any way.
    366      * @param event A <strong>FocusEvent</strong> containing details about the focus action performed.
    367      */
    368     public void focusLost(FocusEvent event) {
    369     }
     347
    370348
    371349    /** Called to inform this control panel that it has just gained focus as an effect of the user clicking on its tab.
Note: See TracChangeset for help on using the changeset viewer.