当前位置: 首页>>代码示例>>Java>>正文


Java SwingWorker.firePropertyChange方法代码示例

本文整理汇总了Java中javax.swing.SwingWorker.firePropertyChange方法的典型用法代码示例。如果您正苦于以下问题:Java SwingWorker.firePropertyChange方法的具体用法?Java SwingWorker.firePropertyChange怎么用?Java SwingWorker.firePropertyChange使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.SwingWorker的用法示例。


在下文中一共展示了SwingWorker.firePropertyChange方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadRawDataFile

import javax.swing.SwingWorker; //导入方法依赖的package包/类
/**
 *
 *
 * @param loadDataTask the value of loadDataTask
 * @param usingFullPropagation the value of usingFullPropagation
 * @param leftShadeCount the value of leftShadeCount
 * @param ignoreFirstFractions the value of ignoreFirstFractions
 * @param inLiveMode the value of inLiveMode
 * @return the
 * java.util.SortedSet<org.earthtime.Tripoli.fractions.TripoliFraction>
 */
@Override
protected SortedSet<TripoliFraction> loadRawDataFile(//
        SwingWorker loadDataTask, boolean usingFullPropagation, int leftShadeCount, int ignoreFirstFractions, boolean inLiveMode) {

    SortedSet myTripoliFractions = new TreeSet<>();
    loadDataTask.firePropertyChange("progress", 10, 33);

    try {
        List<org.cirdles.calamari.shrimp.ShrimpFractionExpressionInterface> myShrimpFractions = null;

        PrawnFileHandler prawnFileHandler = new org.cirdles.calamari.core.PrawnFileHandler();
        myShrimpFractions = prawnFileHandler.extractShrimpFractionsFromPrawnFile(//"ILC-III-9peak-bkg3.xml", true, false);   //
                "https://raw.githubusercontent.com/bowring/XSD/master/SHRIMP/EXAMPLE_100142_G6147_10111109.43_10.33.37%20AM.xml", true, false, "T");

        // send name to project
        loadDataTask.firePropertyChange("projectName", "", myShrimpFractions.get(0).getNameOfMount());

        // assume we are golden   
        for (int f = ignoreFirstFractions; f < myShrimpFractions.size(); f++) {

            if (loadDataTask.isCancelled()) {
                break;
            }

            loadDataTask.firePropertyChange("progress", 33, 33 + ((67 * f) / myShrimpFractions.size()));

            TripoliFraction tripoliFraction = processRunFraction((org.cirdles.calamari.shrimp.ShrimpFraction)myShrimpFractions.get(f));

            // determine if standard reference material
            myTripoliFractions.add(tripoliFraction);

        } // end of files loop

        if (myTripoliFractions.isEmpty()) {
            myTripoliFractions = null;
        }

    } catch (JAXBException | IOException | SAXException readingException) {
        JOptionPane.showMessageDialog(
                null,
                new String[]{"Selected Prawn file does not conform to schema."},
                "ET Redux Warning",
                JOptionPane.WARNING_MESSAGE);
    }
    return myTripoliFractions;
}
 
开发者ID:CIRDLES,项目名称:ET_Redux,代码行数:58,代码来源:ShrimpFileHandler.java


注:本文中的javax.swing.SwingWorker.firePropertyChange方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。