/** * This implementation of the <code>Dialog</code> framework method creates * and lays out a composite and calls <code>createMessageArea</code> and * <code>createCustomArea</code> to populate it. Subclasses should * override <code>createCustomArea</code> to add contents below the * message. */ protected Control createDialogArea(Composite parent) { // create message area createMessageArea(parent); // create the top level composite for the dialog area Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; composite.setLayout(layout); GridData data = new GridData(GridData.FILL_BOTH); data.horizontalSpan = 2; composite.setLayoutData(data); // allow subclasses to add custom controls customArea = createCustomArea(composite); //If it is null create a dummy label for spacing purposes if (customArea == null) { customArea = new Label(composite, SWT.NULL); } return composite; }
/** * This implementation of the <code>Dialog</code> framework method creates * and lays out a composite and calls <code>createMessageArea</code> and * <code>createCustomArea</code> to populate it. Subclasses should * override <code>createCustomArea</code> to add contents below the * message. */ @Override protected Control createDialogArea(Composite parent) { // create message area createMessageArea(parent); // create the top level composite for the dialog area Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; composite.setLayout(layout); GridData data = new GridData(GridData.FILL_BOTH); data.horizontalSpan = 2; composite.setLayoutData(data); // allow subclasses to add custom controls customArea = createCustomArea(composite); //If it is null create a dummy label for spacing purposes if (customArea == null) { customArea = new Label(composite, SWT.NULL); } return composite; }
/** * This implementation of the <code>Dialog</code> framework method creates * and lays out a composite and calls <code>createMessageArea</code> and * <code>createCustomArea</code> to populate it. Subclasses should * override <code>createCustomArea</code> to add contents below the * message. */ @Override protected Control createDialogArea(Composite parent) { // create message area createMessageArea(parent); // create the top level composite for the dialog area Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; composite.setLayout(layout); GridData data = new GridData(GridData.FILL_BOTH); data.horizontalSpan = 2; composite.setLayoutData(data); // allow subclasses to add custom controls customArea = createCustomArea(composite); //If it is null create a dummy label for spacing purposes if (customArea == null) { customArea = new Label(composite, SWT.NULL); } return composite; }
@Override protected Control createMessageArea(Composite composite) { Composite main = new Composite(composite, SWT.NONE); main.setLayout(new GridLayout(2, false)); GridDataFactory.fillDefaults().indent(0, 0).grab(true, true).applyTo( main); // add error image super.createMessageArea(main); StyledText text = new StyledText(main, SWT.FULL_SELECTION | SWT.WRAP); text.setEnabled(false); text.setBackground(main.getBackground()); String messageText = NLS.bind(UIText.CloneFailureDialog_checkList, cause); int newLinesCount = messageText.split("\n").length; //$NON-NLS-1$ Bullet bullet = createBullet(main); text.setText(messageText); text.setLineBullet(newLinesCount - 4, 2, bullet); return main; }
protected Control createMessageArea( Composite composite ) { Control control = super.createMessageArea( composite ); imageLabel.setBackground( GUIResource.getInstance().getColorWhite() ); messageLabel.setBackground( GUIResource.getInstance().getColorWhite() ); return control; }