handle = ProgressHandleFactory.createHandle (PROGRESS_BAR_DISPLAY_NAME); final JComponent progressComp = ProgressHandleFactory.createProgressComponent (handle); final JLabel detailComp = ProgressHandleFactory.createDetailLabelComponent (handle); Mutex.EVENT.readAccess( new Runnable() { @Override
JLabel extractDetailLabel() { return ProgressHandleFactory.createDetailLabelComponent(handle); }
/** * Get the detail messages component for use in custom dialogs, the task won't * show in the progress bar anymore.The text of the label is changed by calls to contributors' <code>progress(String)</code> methods. * @return the component to use in custom UI. * @since org.netbeans.api.progress 1.8 */ public static JLabel createDetailLabelComponent(AggregateProgressHandle handle) { return ProgressHandleFactory.createDetailLabelComponent(getProgressHandle(handle)); } }
JLabel label = ProgressHandleFactory.createDetailLabelComponent(handle);
@NbBundle.Messages("ProgressPanel.progress.title=Synchronizing...") public ProgressPanel(SyncPanel.SyncInfo syncInfo) { assert SwingUtilities.isEventDispatchThread(); assert syncInfo != null; summaryPanel = new SummaryPanel(syncInfo.upload, syncInfo.download, syncInfo.delete, syncInfo.noop); progressHandle = ProgressHandleFactory.createHandle(Bundle.ProgressPanel_progress_title()); // #211494 progressMessageLabel = ProgressHandleFactory.createDetailLabelComponent(progressHandle); // set correct height of the component progressMessageLabel.setText(" "); // NOI18N initComponents(); summaryPanelHolder.add(summaryPanel, BorderLayout.CENTER); progressPanelHolder.add(ProgressHandleFactory.createProgressComponent(progressHandle), BorderLayout.CENTER); progressMessagePanelHolder.add(progressMessageLabel, BorderLayout.CENTER); revalidate(); repaint(); }