2013-04-30 4 views
0

나는 eclipse progressbar와 같은 progressbar를 보여줄 수있는 대화 상자를 원한다. 그러나 나는 정보 아이콘을 원하지 않는다. 그 장소에서 위젯을 배치하고 싶다. 그래서 나는 progressbardialogclass를 확장 중이다. 하지만 내 질문은 어떻게 아이콘을 제거 할 수 있습니다.progressbardialog에서 정보 아이콘을 어떻게 바꿀 수 있습니까?

package viewerdemo;

public class Imagesequencerdialog extends ProgressMonitorDialog { 


/** 
* This is a label for the warning image 
*/ 
    private Label label; 
    /** 
    * This a reference of link class to provide the link to go to hex file 
    */ 
    private Link link; 

    /** 
    * This is the warning message which will be displayed in dialog 
    */ 
    private String warning_msg; 
    /**This is the path to the hex files 
    * 
    */ 
    private String linkpath; 

    /** 
    * This is a constructor which initializes warning message of the dialog and path of the hexfile 
    * @param shell 
    * @param warning_msg 
    * @param linkpath 
    */ 
    protected Imagesequencerdialog(Shell shell) { 
     super(shell); 



     // TODO Auto-generated constructor stub 
    } 


    /** 
    * This will create the dialog for the warning message 
    * 
    * @param parent 
    * @return Control 
    */ 

    protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent) { 




     Composite container = (Composite) super.createDialogArea(parent); 

     GridLayout gl_container = new GridLayout(2, false); 
     gl_container.verticalSpacing = 0; 
     gl_container.marginRight = 5; 
     gl_container.marginLeft = 10; 
     container.setLayout(gl_container); 




ImageSequencer imageSequencer=new ImageSequencer(container, SWT.NONE, new Image[]{ 
    SampleToolBoxImageRegistry. getImage(SampleToolBoxImageRegistry.IMG_INDICATOR_D_1), 
    SampleToolBoxImageRegistry.getImage(SampleToolBoxImageRegistry.IMG_INDICATOR_D_2), 
    SampleToolBoxImageRegistry. getImage(SampleToolBoxImageRegistry.IMG_INDICATOR_D_3), 
    SampleToolBoxImageRegistry. getImage(SampleToolBoxImageRegistry.IMG_INDICATOR_D_4), 
    SampleToolBoxImageRegistry. getImage(SampleToolBoxImageRegistry.IMG_INDICATOR_D_5), 
    SampleToolBoxImageRegistry. getImage(SampleToolBoxImageRegistry.IMG_INDICATOR_D_6), 
    SampleToolBoxImageRegistry. getImage(SampleToolBoxImageRegistry.IMG_INDICATOR_D_7), 
    SampleToolBoxImageRegistry. getImage(SampleToolBoxImageRegistry.IMG_INDICATOR_D_8), 
    SampleToolBoxImageRegistry.getImage(SampleToolBoxImageRegistry.IMG_INDICATOR_D_9), 
    SampleToolBoxImageRegistry. getImage(SampleToolBoxImageRegistry.IMG_INDICATOR_D_10), 
    SampleToolBoxImageRegistry. getImage(SampleToolBoxImageRegistry.IMG_INDICATOR_D_11), 
    SampleToolBoxImageRegistry. getImage(SampleToolBoxImageRegistry.IMG_INDICATOR_D_12),  
    }, 
    150,true); 
imageSequencer.setLayoutData(new GridData(SWT.BEGINNING,SWT.BEGINNING,false,false)); 


Label label=new Label(container, SWT.NONE); 
label.setText("Scanning.."); 




return parent; 

    } 
    /** 
    * This method creates the ok button in the dialog 
    * @param parent 
    */ 



    /** 
    * This method sets the title of the dialog 
    * @param shell 
    */ 
    protected void configureShell(Shell shell) { 
     super.configureShell(shell); 
     shell.setText("Initialization Status"); //$NON-NLS-1$ 
    } 

    /** * Return the initial size of the dialog. 
    *@return Point :size of the dialog 
    * 
    * 
    */ 

    @Override 
    protected Point getInitialSize() { 
     return new Point(450, 140); 
    } 

} 

답변

0

configureShell 메서드를 재정의해야합니다. 그런 다음 이미지를 제거 할 수 있습니다.

관련 문제