/** * Creates the example layout. */ @Override void createLayout() { stackLayout = new StackLayout(); layoutComposite.setLayout(stackLayout); }
protected Composite createStackLayoutComposite(Composite parent) { Composite composite = new Composite(parent, SWT.NULL); stackLayout = new StackLayout(); composite.setLayout(stackLayout); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); return composite; }
public void createControl(Composite parent, int span, int indent) { Composite blockComposite = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_BOTH); fSpan = span; fIndent = indent; fLayout = new StackLayout(); blockComposite.setLayout(fLayout); fLayout.topControl = fPluginBlockComposite; fParent = blockComposite; }
public PageBook(Composite parent, int style) { super(parent, style); fLayout= new StackLayout(); setLayout(fLayout); fLayout.marginWidth= 5; fLayout.marginHeight= 5; } public void showPage(Control page) {
@Override public Object createWidget(MUIElement element, Object parent) { if (!(element instanceof MPerspectiveStack) || !(parent instanceof Composite)) return null; Composite perspStack = new Composite((Composite) parent, SWT.NONE); IStylingEngine stylingEngine = getContext(element).get(IStylingEngine.class); stylingEngine.setClassname(perspStack, "perspectiveLayout"); //$NON-NLS-1$ perspStack.setLayout(new StackLayout()); return perspStack; }
public void createPartControl(Composite parent) { fParent= new Composite(parent, SWT.NONE); fStackLayout= new StackLayout(); fParent.setLayout(fStackLayout); fDefaultComposite= new Composite(fParent, SWT.NONE); fDefaultComposite.setLayout(new FillLayout()); super.createPartControl(fDefaultComposite); updatePartControl(getEditorInput()); }
@Override public Object createWidget(MUIElement element, Object parent) { if (!(element instanceof MPerspectiveStack) || !(parent instanceof Composite)) return null; Composite perspStack = new Composite((Composite) parent, SWT.NONE); IStylingEngine stylingEngine = (IStylingEngine) getContext(element) .get(IStylingEngine.SERVICE_NAME); stylingEngine.setClassname(perspStack, "perspectiveLayout"); //$NON-NLS-1$ perspStack.setLayout(new StackLayout()); return perspStack; }
@Override public void createPartControl(Composite parent) { fParent= new Composite(parent, SWT.NONE); fStackLayout= new StackLayout(); fParent.setLayout(fStackLayout); fDefaultComposite= new Composite(fParent, SWT.NONE); fDefaultComposite.setLayout(new FillLayout()); super.createPartControl(fDefaultComposite); updatePartControl(getEditorInput()); }
@Override public void createPartControl(Composite parent) { fParent= new Composite(parent, SWT.NONE); fStackLayout= new StackLayout(); fParent.setLayout(fStackLayout); fDefaultComposite= new Composite(fParent, SWT.NONE); fDefaultComposite.setLayout(new FillLayout()); super.createPartControl(fDefaultComposite); updatePartControl(getEditorInput()); }
private Composite createMainPanel(final Composite parent) { topControl = new Composite(parent, SWT.NONE); StackLayout layout = new StackLayout(); topControl.setLayout(layout); final Composite c = new Composite(topControl, SWT.NULL); layout.topControl = c; // shown instead of the splitter if an error message was set errorText = new StyledText(topControl, SWT.NONE); // use the same font as in message viewer errorText.setFont(UIUtils .getFont(UIPreferences.THEME_CommitMessageFont)); final GridLayout parentLayout = new GridLayout(); parentLayout.marginHeight = 0; parentLayout.marginWidth = 0; parentLayout.verticalSpacing = 0; c.setLayout(parentLayout); return c; }
private void createParentPluginGroup(Composite container) { Group parentGroup = new Group(container, SWT.NONE); parentGroup.setLayout(new GridLayout(2, false)); parentGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); parentGroup.setText(PDEUIMessages.ContentPage_parentPluginGroup); fNotebook = new Composite(parentGroup, SWT.NONE); GridData gd = new GridData(GridData.FILL_BOTH); gd.horizontalSpan = 2; fNotebook.setLayoutData(gd); fNotebookLayout = new StackLayout(); fNotebook.setLayout(fNotebookLayout); fNewComp = createNewVersionComp(fNotebook); fOldComp = createOldVersionComp(fNotebook); fNotebookLayout.topControl = fNewVersion ? fNewComp : fOldComp; }
public void createPartControl(Composite parent) { fParent= new Composite(parent, SWT.NONE); fStackLayout= new StackLayout(); fParent.setLayout(fStackLayout); fViewerComposite= new Composite(fParent, SWT.NONE); fViewerComposite.setLayout(new FillLayout()); super.createPartControl(fViewerComposite); fStackLayout.topControl= fViewerComposite; fParent.layout(); try { verifyInput(getEditorInput()); } catch (CoreException e) { String title= JavaEditorMessages.ClassFileEditor_error_title; String message= JavaEditorMessages.ClassFileEditor_error_message; ExceptionHandler.handle(e, fParent.getShell(), title, message); } }
/** * Creates the UI based on how the InroPart has been configured. * * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite) */ @Override public void createPartControl(Composite parent) { container = new Composite(parent, SWT.NULL); StackLayout layout = new StackLayout(); layout.marginHeight = 0; layout.marginWidth = 0; container.setLayout(layout); if (model != null && model.hasValidConfig()) { presentation.createPartControl(container); // do not create the standby part here for performance. } if (Log.logPerformance) { PerformanceStats stats = PerformanceStats.getStats( IIntroConstants.PERF_UI_ZOOM, IIntroConstants.INTRO); stats.startRun(); } }
@Override public void createPartControl(Composite parent) { fParent= new Composite(parent, SWT.NONE); fStackLayout= new StackLayout(); fParent.setLayout(fStackLayout); fViewerComposite= new Composite(fParent, SWT.NONE); fViewerComposite.setLayout(new FillLayout()); super.createPartControl(fViewerComposite); fStackLayout.topControl= fViewerComposite; fParent.layout(); try { verifyInput(getEditorInput()); } catch (CoreException e) { String title= JavaEditorMessages.ClassFileEditor_error_title; String message= JavaEditorMessages.ClassFileEditor_error_message; ExceptionHandler.handle(e, fParent.getShell(), title, message); } }
@Override public void createPartControl(Composite parent) { fParent= new Composite(parent, SWT.NONE); fStackLayout= new StackLayout(); fParent.setLayout(fStackLayout); fViewerComposite= new Composite(fParent, SWT.NONE); fViewerComposite.setLayout(new FillLayout()); super.createPartControl(fViewerComposite); fStackLayout.topControl= fViewerComposite; fParent.layout(); try { verifyInput(getEditorInput()); } catch (CoreException e) { String title= JavaEditorMessages.ClassFileEditor_error_title; String message= JavaEditorMessages.ClassFileEditor_error_message; ExceptionHandler.handle(e, fParent.getShell(), title, message); } }
/** * Create a ProgressIndicator as a child under the given parent. * * @param parent * The widgets parent * @param style the SWT style constants for progress monitors created * by the receiver. * @since 3.4 */ public ProgressIndicator(Composite parent, int style) { super(parent, SWT.NULL); // Enforce horizontal only if vertical isn't set if ((style & SWT.VERTICAL) == 0) style |= SWT.HORIZONTAL; determinateProgressBar = new ProgressBar(this, style); indeterminateProgressBar = new ProgressBar(this, style | SWT.INDETERMINATE); layout = new StackLayout(); setLayout(layout); }
/** * Create a ProgressIndicator as a child under the given parent. * * @param parent * The widgets parent * @param style the SWT style constants for progress monitors created * by the receiver. * @since 3.4 */ public ProgressIndicator(Composite parent, int style) { super(parent, SWT.NULL); // Enforce horizontal only if vertical isn't set if ((style & SWT.VERTICAL) == 0) style |= SWT.HORIZONTAL; determinateProgressBar = new ProgressBar(this, style); indeterminateProgressBar = new ProgressBar(this, style | SWT.INDETERMINATE); layout = new StackLayout(); setLayout(layout); }
/** * Create a ProgressIndicator as a child under the given parent. * * @param parent * The widgets parent * @param style the SWT style constants for progress monitors created * by the receiver. * @since 1.1 */ public ProgressIndicator(Composite parent, int style) { super(parent, SWT.NULL); // Enforce horizontal only if vertical isn't set if ((style & SWT.VERTICAL) == 0) style |= SWT.HORIZONTAL; determinateProgressBar = new ProgressBar(this, style); indeterminateProgressBar = new ProgressBar(this, style | SWT.INDETERMINATE); layout = new StackLayout(); setLayout(layout); }
/** * * @param parent * @param isIndeterminate * @param useInputButton determines whether the <code>inputButton</code> is available or not * @param image an <code>Image</code> to display; may be null */ public AZProgressBar(Composite parent, boolean isIndeterminate) { super(parent, SWT.NULL); incrementalProgressBar = new ProgressBar(this, SWT.HORIZONTAL); indeterminateProgressBar = new ProgressBar(this, SWT.HORIZONTAL | SWT.INDETERMINATE); stack = new StackLayout(); setLayout(stack); pack(); setIndeterminate(isIndeterminate); }
public static Object create(ActionContext actionContext){ Thing self = (Thing) actionContext.get("self"); StackLayout layout = new StackLayout(); Object control = actionContext.get(self.getString("topControl")); if(control != null && control instanceof Control){ layout.topControl = (Control) control; } Composite parent = (Composite) actionContext.get("parent"); parent.setLayout(layout); parent.layout(); actionContext.getScope(0).put(self.getMetadata().getName(), layout); return layout; }