Can you disable the cancel button in a jface wizard?

爱⌒轻易说出口 提交于 2019-12-11 22:35:35

问题


When the user presses the 'next' button in my jface wizard, it will be communicating with my server asynchronouly. However this operation cannnot be cancelled, so I want to basically disable the 'Cancel' button temporarily in my jface wizard and also if possible the 'close' button in the title bar.

Is this possible?


回答1:


How are you communicating with the server? Are you running it inside IWizardContainer.run()? you can pass cancellable = false.




回答2:


pass your long-running code wrapped by IRunnableWithProgress into wizard.getContainer().run(true, false, rwp). Inside your code you will have access to IProgressMonitor, which basically controls the visual progress bar.



来源:https://stackoverflow.com/questions/5827595/can-you-disable-the-cancel-button-in-a-jface-wizard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!