Changeset 8256 for trunk/gli/src/org


Ignore:
Timestamp:
2004-10-08T16:07:35+13:00 (20 years ago)
Author:
mdewsnip
Message:

Moved the current_modal static variable out of the Gatherer class into the ModalDialog class. This removes more dependencies on the Gatherer class.

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

Legend:

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

    r8236 r8256  
    9898    /** a reference to the Servlet Configuration is GS3 */
    9999    static public ServletConfiguration servlet_config;
    100     /** The current modal dialog being shown on screen, if any. */
    101     static public ModalDialog current_modal = null;
    102100    /** A public reference to the Dictionary. */
    103101    static public Dictionary dictionary;
  • trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r8253 r8256  
    146146    extends FocusAdapter {
    147147    public void focusGained(FocusEvent e) {
    148         if(Gatherer.current_modal != null) {
    149         Gatherer.current_modal.makeVisible();
    150         Gatherer.current_modal.toFront();
     148        if (ModalDialog.current_modal != null) {
     149        ModalDialog.current_modal.makeVisible();
     150        ModalDialog.current_modal.toFront();
    151151        }
    152152    }
  • trunk/gli/src/org/greenstone/gatherer/gui/ModalDialog.java

    r8236 r8256  
    3737public class ModalDialog
    3838    extends JDialog {
     39
     40    /** The current modal dialog being shown on screen, if any. */
     41    static public ModalDialog current_modal = null;
     42
    3943    /** true if this dialog should be modal, ie block user actions to its owner window, false otherwise. */
    4044    protected boolean modal = false;
     
    131135    public void setVisible (boolean visible) {
    132136    if(visible) {
    133         Gatherer.current_modal = this;
     137        current_modal = this;
    134138    }
    135139    else {
    136         Gatherer.current_modal = null;
     140        current_modal = null;
    137141    }
    138142    // If we are in the AWT Dispatch thread then it is all good.
Note: See TracChangeset for help on using the changeset viewer.