public CStandardProgressDialog( final Window parent, final String title, final String description, final IStandardProgressModel progressModel) { super(parent, title, ModalityType.DOCUMENT_MODAL); // m_description = description; m_progressModel = progressModel; setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); addWindowListener(new InternalWindowListener()); progressModel.addProgressListener(m_internalListener); m_progressPanel = new CProgressPanel(description, false, false); m_progressPanel.setBorder(new EmptyBorder(15, 15, 15, 15)); add(m_progressPanel); pack(); if (parent != null) { GuiHelper.centerChildToParent(parent, this, true); } else { GuiHelper.centerOnScreen(this); } }
public void setSubDescription(final String subDescription) { m_progressPanel.setSubText(subDescription); if (getParent() != null) { GuiHelper.centerChildToParent(getParent(), this, true); } else { GuiHelper.centerOnScreen(this); } }