本文整理了Java中javax.swing.ProgressMonitor.<init>()
方法的一些代码示例,展示了ProgressMonitor.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressMonitor.<init>()
方法的具体详情如下:
包路径:javax.swing.ProgressMonitor
类名称:ProgressMonitor
方法名:<init>
暂无
代码示例来源:origin: skylot/jadx
private void saveAll(boolean export) {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
fileChooser.setToolTipText(NLS.str("file.save_all_msg"));
String currentDirectory = settings.getLastSaveFilePath();
if (!currentDirectory.isEmpty()) {
fileChooser.setCurrentDirectory(new File(currentDirectory));
}
int ret = fileChooser.showDialog(mainPanel, NLS.str("file.select"));
if (ret == JFileChooser.APPROVE_OPTION) {
JadxArgs decompilerArgs = wrapper.getArgs();
decompilerArgs.setExportAsGradleProject(export);
if (export) {
decompilerArgs.setSkipSources(false);
decompilerArgs.setSkipResources(false);
} else {
decompilerArgs.setSkipSources(settings.isSkipSources());
decompilerArgs.setSkipResources(settings.isSkipResources());
}
settings.setLastSaveFilePath(fileChooser.getCurrentDirectory().getPath());
ProgressMonitor progressMonitor = new ProgressMonitor(mainPanel, NLS.str("msg.saving_sources"), "", 0, 100);
progressMonitor.setMillisToPopup(0);
wrapper.saveAll(fileChooser.getSelectedFile(), progressMonitor);
}
}
代码示例来源:origin: com.fifesoft.rtext/fife.common
/**
* Constructor.
*
* @param parent The parent component.
*/
public DefaultFilePasteCallback(Component parent) {
monitor = new ProgressMonitor(parent,
MSG.getString("Dialog.ProgressMonitor.Title"), "", 0, 1);
}
代码示例来源:origin: stackoverflow.com
public ProgBar() {
super("Progress Monitor Demo");
initComponents();
setSize(250, 100);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
pbar = new ProgressMonitor(null, "Monitoring Progress",
"Initializing . . .", 0, 100);
// Fire a timer every once in a while to update the progress.
Timer timer = new Timer(500, this);
timer.start();
setVisible(true);
}
代码示例来源:origin: org.icepdf.os/icepdf-viewer
public void run() {
// launch progress dialog
printProgressMonitor = new ProgressMonitor(viewer,
messageBundle.getString("viewer.dialog.printing.status.start.msg"),
"", 0, printHelper.getNumberOfPages());
}
});
代码示例来源:origin: org.boofcv/demonstrations
protected MyMonitor( Component comp , String message ) {
super( new ProgressMonitor(comp,
"Converting color space",
message, 0, input.getNumBands()));
}
代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql
public void run()
{
final JFrame frame = controller.getMainFrame();
progressMonitor =
new ProgressMonitor(frame, i18n.DOWNLOADING_UPDATES_MSG, i18n.DOWNLOADING_UPDATES_MSG, 0,
totalFiles);
setProgress(0);
}
});
代码示例来源:origin: realXuJiang/bigtable-sql
public void run()
{
final JFrame frame = controller.getMainFrame();
progressMonitor =
new ProgressMonitor(frame, i18n.DOWNLOADING_UPDATES_MSG, i18n.DOWNLOADING_UPDATES_MSG, 0,
totalFiles);
setProgress(0);
}
});
代码示例来源:origin: igvteam/igv
public static void main(String[] args) throws MalformedURLException {
URL url = HttpUtils.createURL(args[0]);
String localFile = args[1];
JComponent frame = null;
String message = "Downloading " + url.toString();
int min = 0;
int max = 100;
final javax.swing.ProgressMonitor monitor = new javax.swing.ProgressMonitor(frame, message, "", min, max);
monitor.setMillisToDecideToPopup(100);
Downloader dl = new Downloader(url, new File(localFile), monitor);
(new Thread(dl)).start();
}
代码示例来源:origin: lbalazscs/Pixelitor
public static ProgressMonitor createPercentageProgressMonitor(String msg,
String cancelButtonText) {
String oldText = UIManager.getString("OptionPane.cancelButtonText");
UIManager.put("OptionPane.cancelButtonText", cancelButtonText);
ProgressMonitor pm = new ProgressMonitor(PixelitorWindow.getInstance(),
msg, "", 0, 100);
UIManager.put("OptionPane.cancelButtonText", oldText);
return pm;
}
代码示例来源:origin: net.sf.squirrel-sql.plugins/dbcopy
public void run()
{
SessionInfoProvider prov = e.getSessionInfoProvider();
// TODO: set the total for the progress bar.
pm = new ProgressMonitor(parent,
"Analyzing column names in tables to be copied",
"",
0,
prov.getSourceDatabaseObjects().size());
}
};
代码示例来源:origin: protegeproject/protege
private void setupMonitor() {
monitor = new ProgressMonitor(getOWLWorkspace(), "Exporting Inferred Ontology", "Initializing", 0, taskCount);
precompute = EnumSet.noneOf(InferenceType.class);
int task = 1;
for (InferredAxiomGenerator<? extends OWLAxiom> generator : inferredAxiomGenerators) {
((MonitoredInferredAxiomGenerator<? extends OWLAxiom>) generator).setProgressMonitor(monitor, task++);
precompute.addAll(ExportInferredOntologyPanel.getInferenceType(generator));
}
}
代码示例来源:origin: net.sourceforge.owlapi/pellet-core-ignazio1977
protected void resetProgress() {
super.resetProgress();
monitor = new javax.swing.ProgressMonitor( null, progressTitle, progressMessage, 0,
progressLength );
monitor.setProgress( progress );
}
代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl
private void setupMonitor() {
monitor = new ProgressMonitor(getOWLWorkspace(), "Exporting Inferred Ontology", "Initializing", 0, taskCount);
precompute = EnumSet.noneOf(InferenceType.class);
int task = 1;
for (InferredAxiomGenerator<? extends OWLAxiom> generator : inferredAxiomGenerators) {
((MonitoredInferredAxiomGenerator<? extends OWLAxiom>) generator).setProgressMonitor(monitor, task++);
precompute.addAll(ExportInferredOntologyPanel.getInferenceType(generator));
}
}
代码示例来源:origin: com.github.ansell.pellet/pellet-common
protected void resetProgress() {
super.resetProgress();
monitor = new javax.swing.ProgressMonitor( null, progressTitle, progressMessage, 0,
progressLength );
monitor.setProgress( progress );
}
代码示例来源:origin: edu.stanford.protege/protege-editor-owl
private void setupMonitor() {
monitor = new ProgressMonitor(getOWLWorkspace(), "Exporting Inferred Ontology", "Initializing", 0, taskCount);
precompute = EnumSet.noneOf(InferenceType.class);
int task = 1;
for (InferredAxiomGenerator<? extends OWLAxiom> generator : inferredAxiomGenerators) {
((MonitoredInferredAxiomGenerator<? extends OWLAxiom>) generator).setProgressMonitor(monitor, task++);
precompute.addAll(ExportInferredOntologyPanel.getInferenceType(generator));
}
}
代码示例来源:origin: org.protege/protege-editor-owl
private void setupMonitor() {
monitor = new ProgressMonitor(getOWLWorkspace(), "Exporting Inferred Ontology", "Initializing", 0, taskCount);
precompute = EnumSet.noneOf(InferenceType.class);
int task = 1;
for (InferredAxiomGenerator<? extends OWLAxiom> generator : inferredAxiomGenerators) {
((MonitoredInferredAxiomGenerator<? extends OWLAxiom>) generator).setProgressMonitor(monitor, task++);
precompute.addAll(ExportInferredOntologyPanel.getInferenceType(generator));
}
}
代码示例来源:origin: Galigator/openllet
@Override
protected void resetProgress()
{
super.resetProgress();
_monitor = new javax.swing.ProgressMonitor(null, _progressTitle, _progressMessage, 0, _progressLength);
_monitor.setProgress(_progress);
}
代码示例来源:origin: igvteam/igv
@Override
public void actionPerformed(ActionEvent event) {
javax.swing.ProgressMonitor monitor = new javax.swing.ProgressMonitor(IGV.getInstance().getMainPanel(),
"Creating genome", null, 0, 100);
igv.defineGenome(monitor);
}
};
代码示例来源:origin: iTransformers/netTransformer
@Override
protected String performIPSecAction(IPsecPair[] ipsecpair) throws IOException {
//If this is first run we want to save the old key before generating new ones
List<String> userInput = firstTimeConfigurationCheck(ipsecpair);
progressMonitor = new ProgressMonitor(this, "Running routers", "", 0, 100);
progressMonitor.setMillisToPopup(0);
worker = new ChangeIPSecKeyWorker(ipsecpair, progressMonitor,userInput);
worker.addPropertyChangeListener(this);
worker.execute();
return "";
}
代码示例来源:origin: org.vesalainen.dsql/dsql
@Override
protected Void doInBackground() throws Exception
{
ProgressMonitor mon = new ProgressMonitor(frame, I18n.get("WAIT"), "", 0, 100);
mon.setNote("");
statement.getEngine().createProgressMonitor(mon);
fetchResult = statement.execute();
mon.close();
return null;
}
内容来源于网络,如有侵权,请联系作者删除!