下面列出了怎么用org.eclipse.jface.dialogs.TrayDialog的API类实例代码及写法,或者点击链接到github查看源代码。
/**
* @see org.eclipse.core.runtime.IPlatformRunnable#run(java.lang.Object)
*/
public Object run( Object args ) throws Exception
{
Display display = PlatformUI.createDisplay( );
TrayDialog.setDialogHelpAvailable( true );
try
{
int code = PlatformUI.createAndRunWorkbench( display,
new DesignerWorkbenchAdvisor( ) );
// exit the application with an appropriate return code
return code == PlatformUI.RETURN_RESTART ? EXIT_RESTART : EXIT_OK;
}
finally
{
if ( display != null )
display.dispose( );
}
}
public TrayDialog createChartImageDialog( Shell parentShell, Fill fCurrent,
ChartWizardContext context, boolean bEmbeddedImageEnabled,
boolean bResourceImageEnabled )
{
return new ImageDialog( parentShell,
fCurrent,
context,
bEmbeddedImageEnabled,
bResourceImageEnabled );
}
public boolean validateAll() {
if (!validateClientOnly()) {
return false;
}
if (this.cloneData.repositories == null) {
fetchRepositories();
if (this.cloneData.repositories == null) {
return false;
}
}
if (this.cloneData.repositories.getRepositories().stream()
.anyMatch(r -> r.getUrl().toString().equals(this.txtURL.getText())) && !this.pullAction) {
setPageComplete(false);
setMessage(Messages.AbapGitWizardPageRepositoryAndCredentials_repo_in_use_error, DialogPage.ERROR);
return false;
}
if (this.cloneData.externalRepoInfo == null) {
fetchExternalRepoInfo();
if (this.cloneData.externalRepoInfo == null) {
return false;
}
}
if (this.cloneData.externalRepoInfo.getAccessMode() == AccessMode.PRIVATE) {
if (!this.txtUser.isVisible()) {
setUserAndPassControlsVisible(true);
this.txtUser.setFocus();
setPageComplete(false);
setMessage(Messages.AbapGitWizardPageRepositoryAndCredentials_repo_is_private, DialogPage.INFORMATION);
return false;
} else {
// update the info, now that we have proper user/password
if (!fetchExternalRepoInfo()) {
return false;
}
}
}
//Close the tray of the dialog if it was open
TrayDialog dialog = (TrayDialog) getContainer();
if (dialog.getTray() != null) {
dialog.closeTray();
}
return true;
}
public TrayDialog createChartMarkerIconDialog( Shell parent, Fill fill,
ChartWizardContext context )
{
return new ImageDialog( parent, fill, context, true, false, true );
}
/**
* Create marker icon dialog.
*
* @param parent
* @param fill
* @param context
* @return marker icon dialog
*/
TrayDialog createChartMarkerIconDialog( Shell parent, Fill fill,
ChartWizardContext context );
/**
* Create image dialog
*
* @return image dialog
*/
TrayDialog createChartImageDialog( Shell parentShell, Fill fCurrent,
ChartWizardContext context, boolean bEmbeddedImageEnabled,
boolean bResourceImageEnabled );