Changeset 11620 for trunk


Ignore:
Timestamp:
2006-04-07T12:36:40+12:00 (18 years ago)
Author:
mdewsnip
Message:

Rearranged some more workspace and collection tree code to reduce duplication.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionTree.java

    r11617 r11620  
    5353    setTextNonSelectionColor(Configuration.getColor("coloring.collection_tree_foreground", false));
    5454    setTextSelectionColor(Configuration.getColor("coloring.collection_selection_foreground", false));
     55
     56    filter.setBackground(Configuration.getColor("coloring.collection_heading_background", false));
     57    filter.setEditable(Configuration.getMode() > Configuration.LIBRARIAN_MODE);
    5558    }
    5659
  • trunk/gli/src/org/greenstone/gatherer/file/WorkspaceTree.java

    r11617 r11620  
    5858    setTextNonSelectionColor(Configuration.getColor("coloring.workspace_tree_foreground", false));
    5959    setTextSelectionColor(Configuration.getColor("coloring.workspace_selection_foreground", false));
     60
     61    filter.setBackground(Configuration.getColor("coloring.workspace_heading_background", false));
     62    filter.setEditable(Configuration.getMode() > Configuration.LIBRARIAN_MODE);
    6063    }
    6164
  • trunk/gli/src/org/greenstone/gatherer/gui/EnrichPane.java

    r11619 r11620  
    131131    collection_tree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
    132132    collection_tree.addTreeSelectionListener(this);
    133 
    134133    JScrollPane collection_scroll = new JScrollPane(collection_tree);
    135 
    136134    collection_filter = collection_tree.getFilter();
    137     collection_filter.setBackground(Configuration.getColor("coloring.collection_heading_background", false));
    138     collection_filter.setEditable(Configuration.getMode() > Configuration.LIBRARIAN_MODE);
    139     Dictionary.registerTooltip(collection_filter.getComboBox(), "Collection.Filter_Tooltip");
    140135
    141136    // Layout
  • trunk/gli/src/org/greenstone/gatherer/gui/Filter.java

    r11063 r11620  
    115115    label = new JLabel();
    116116    Dictionary.setText(label, "Filter.Filter_Tree");
     117    Dictionary.registerTooltip(combobox, "Collection.Filter_Tooltip");
     118
    117119    // Add listeners.
    118120    combobox.addActionListener(new ComboBoxListener());
  • trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java

    r11619 r11620  
    221221    workspace_tree = new WorkspaceTree(Utility.WORKSPACE_TREE);
    222222    group.add(workspace_tree);
    223 
    224223    workspace_scroll = new JScrollPane(workspace_tree);
    225 
    226224    workspace_filter = workspace_tree.getFilter();
    227     workspace_filter.setBackground(Configuration.getColor("coloring.workspace_heading_background", false));
    228     workspace_filter.setEditable(Configuration.getMode() > Configuration.LIBRARIAN_MODE);
    229     Dictionary.registerTooltip(workspace_filter.getComboBox(), "Collection.Filter_Tooltip");
    230225
    231226    // Collection Tree
     
    242237    collection_tree.setEnabled(Gatherer.c_man.getCollectionTreeModel() != null);
    243238    group.add(collection_tree);
    244 
    245239    collection_scroll = new JScrollPane(collection_tree);
    246 
    247240    collection_filter = collection_tree.getFilter();
    248     collection_filter.setBackground(Configuration.getColor("coloring.collection_heading_background", false));
    249     collection_filter.setEditable(Configuration.getMode() > Configuration.LIBRARIAN_MODE);
    250     Dictionary.registerTooltip(collection_filter.getComboBox(), "Collection.Filter_Tooltip");
    251241
    252242    tree_pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
  • trunk/gli/src/org/greenstone/gatherer/gui/tree/DragTree.java

    r11619 r11620  
    3333    private DragGroup group;
    3434    /** The filter for this tree. */
    35     private Filter filter = null;
     35    protected Filter filter = null;
    3636    /** The image to use for the disabled background. */
    3737    private ImageIcon disabled_background;
Note: See TracChangeset for help on using the changeset viewer.