Changeset 37326 for main/trunk/gli/src


Ignore:
Timestamp:
2023-02-16T22:50:02+13:00 (16 months ago)
Author:
davidb
Message:

Initial set of changes that allows the webswing version of GLI call a Javascript callback hander

File:
1 edited

Legend:

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

    r26312 r37326  
    3434import java.awt.event.*;
    3535import javax.swing.*;
     36
     37import org.webswing.toolkit.api.WebswingUtil;
     38
    3639import org.greenstone.gatherer.Configuration;
    3740import org.greenstone.gatherer.Dictionary;
     
    163166        Gatherer.configGS3Server(Configuration.site_name, ServletConfiguration.ADD_COMMAND + Gatherer.c_man.getLoadedCollectionName());
    164167        }
     168
    165169        if(preview_address != null) {
    166         Gatherer.spawnBrowser(preview_address);
     170        if (Gatherer.isWebswing) {
     171            WebswingUtil.getWebswingApi().sendActionEvent("previewURL", preview_address, null);
     172        }
     173        else {
     174            Gatherer.spawnBrowser(preview_address);
     175        }
    167176        }
    168177
     178
     179       
    169180    }
    170181
Note: See TracChangeset for help on using the changeset viewer.