Duvida com Splash Screen

1 resposta
G

Boa tarde,
Estou com a seguinte duvida, estou criando um splas screen porem, a imagem é maior que o shell, entao o shell aperce no fundo dai fica feio, eu gostaria de saber como eu faço para poder deixar minha imagem, sem aparecer o shell atraz

public class SplashScreen {

	private static Shell shell = new Shell(SWT.NONE);
	private static ProgressBar bar;
	
	public static void open() {
		if( shell.isDisposed() ) return;

		shell.setImage(ImageFactory.GI_ICON.img());
		shell.setLayout(new FormLayout());
		bar = new ProgressBar(shell, SWT.NONE);
		bar.setMaximum(10);
	    bar.setSelection(0);
	    FormData progressData = new FormData();
	    progressData.left = new FormAttachment(0, 0);
	    progressData.right = new FormAttachment(100, 0);
	    progressData.bottom = new FormAttachment(100, 0);
	    bar.setLayoutData(progressData);
	    Label label = new Label(shell, SWT.NONE);
	    label.setImage(ImageFactory.GI_BACK.img() );
	    FormData labelData = new FormData();
	    labelData.right = new FormAttachment(100, 0);
	    labelData.bottom = new FormAttachment(100, 0);
	    label.setLayoutData(labelData);
	    shell.pack();
	    Rectangle splashRect = shell.getBounds();
	    Rectangle displayRect = shell.getDisplay().getBounds();
	    int x = (displayRect.width - splashRect.width) / 2;
	    int y = (displayRect.height - splashRect.height) / 2;
	    shell.setLocation(x, y);
	    shell.open();
	}
	
	public static void close() {
		shell.close();
		shell.dispose();
	}
	
	public static void step() {
		if( shell.isDisposed() ) return;
		bar.setSelection(bar.getSelection()+15);
		shell.update();
	}

1 Resposta

G

Bem galera essa eh minha imagen daii quando eu coloco a imagem saindo da tela fica atraz aparecendo a borda do composite como eu faço?

Criado 8 de outubro de 2009
Ultima resposta 9 de out. de 2009
Respostas 1
Participantes 1