本文整理匯總了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;
}