org.eclipse.jface.dialogs.TrayDialog Java Examples

The following examples show how to use org.eclipse.jface.dialogs.TrayDialog. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DesignerApplication.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * @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( );
	}
}
 
Example #2
Source File: ChartUIFactory.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public TrayDialog createChartImageDialog( Shell parentShell, Fill fCurrent,
		ChartWizardContext context, boolean bEmbeddedImageEnabled,
		boolean bResourceImageEnabled )
{
	return new ImageDialog( parentShell,
			fCurrent,
			context,
			bEmbeddedImageEnabled,
			bResourceImageEnabled );
}
 
Example #3
Source File: AbapGitWizardPageRepositoryAndCredentials.java    From ADT_Frontend with MIT License 4 votes vote down vote up
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;
}
 
Example #4
Source File: ChartUIFactory.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
public TrayDialog createChartMarkerIconDialog( Shell parent, Fill fill,
		ChartWizardContext context )
{
	return new ImageDialog( parent, fill, context, true, false, true );
}
 
Example #5
Source File: IChartUIFactory.java    From birt with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Create marker icon dialog.
 * 
 * @param parent
 * @param fill
 * @param context
 * @return marker icon dialog
 */
TrayDialog createChartMarkerIconDialog( Shell parent, Fill fill,
		ChartWizardContext context );
 
Example #6
Source File: IChartUIFactory.java    From birt with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Create image dialog
 * 
 * @return image dialog
 */
TrayDialog createChartImageDialog( Shell parentShell, Fill fCurrent,
		ChartWizardContext context, boolean bEmbeddedImageEnabled,
		boolean bResourceImageEnabled );