private static void applyLayoutDataTo(Control control) { defaultsFor(control).applyTo(control); }
/** * Creates a new RowDataFactory that creates copies of the given RowData by * default. * * @param data * RowData to copy * @return a new RowDataFactory that creates copies of the argument by * default */ public static RowDataFactory createFrom(RowData data) { return new RowDataFactory(copyData(data)); }
/** * Returns the default dialog margins, in pixels * * @return the default dialog margins, in pixels */ public static final Point getMargins() { initializeConstants(); return dialogMargins; }
protected Control createContents(Composite parent) { // initialize the dialog units initializeDialogUnits(parent); Point defaultSpacing = LayoutConstants.getSpacing(); GridLayoutFactory.fillDefaults().margins(LayoutConstants.getMargins()) .spacing(defaultSpacing.x * 2, defaultSpacing.y).numColumns(getColumnCount()).applyTo(parent); GridDataFactory.fillDefaults().grab(true, true).applyTo(parent); createDialogAndButtonArea(parent); return parent; }
private static void attachGridData(Control c) { GridDataFactory .defaultsFor(c) .align(SWT.FILL, SWT.CENTER) .grab(true, false) .applyTo(c); } }
GridDataFactory.swtDefaults().grab(true, false).applyTo(authorLabel); websiteLink = new Link(themeDetails, SWT.NONE); GridDataFactory.swtDefaults().grab(true, false).applyTo(websiteLink);
private static GridDataFactory getGrabBothGridData() { if (grabBothGridDataFactory == null) { grabBothGridDataFactory = GridDataFactory.fillDefaults().grab(true, true); } return grabBothGridDataFactory; }
private static GridLayoutFactory getPopupLayout() { if (popupLayoutFactory == null) { popupLayoutFactory = GridLayoutFactory.fillDefaults() .margins(POPUP_MARGINWIDTH, POPUP_MARGINHEIGHT) .spacing(POPUP_HORIZONTALSPACING, POPUP_VERTICALSPACING); } return popupLayoutFactory; }
/** * Creates a copy of the receiver. * * @return a copy of the receiver */ public GridDataFactory copy() { return new GridDataFactory(create()); }
/** * Creates a copy of the receiver. * * @return a copy of the receiver */ public RowDataFactory copy() { return new RowDataFactory(create()); }
/** * Creates a new GridDataFactory that creates copies of the given GridData * by default. * * @param data GridData to copy * @return a new GridDataFactory that creates copies of the argument by default */ public static GridDataFactory createFrom(GridData data) { return new GridDataFactory(copyData(data)); }
/** * Creates a factory that creates copies of the given layout. * * @param l layout to copy * @return a new GridLayoutFactory instance that creates copies of the given layout */ public static GridLayoutFactory createFrom(GridLayout l) { return new GridLayoutFactory(copyLayout(l)); }
/** * Creates a factory that creates copies of the given layout. * * @param layout * layout to copy * @return a new RowLayoutFactory instance that creates copies of the given * layout */ public static RowLayoutFactory createFrom(RowLayout layout) { return new RowLayoutFactory(copyLayout(layout)); }
/** * Creates a new RowLayout, and initializes it with values from the factory. * * @return a new initialized RowLayout. * @see #applyTo */ public RowLayout create() { return copyLayout(layout); }
public void handleEvent(Event event) { if (!inupdateMode) { updateColumnData(event.widget); } }
@Override protected Control createContents(Composite parent) { // initialize the dialog units initializeDialogUnits(parent); Point defaultSpacing = LayoutConstants.getSpacing(); GridLayoutFactory.fillDefaults().margins(LayoutConstants.getMargins()) .spacing(defaultSpacing.x * 2, defaultSpacing.y).numColumns(getColumnCount()).applyTo(parent); GridDataFactory.fillDefaults().grab(true, true).applyTo(parent); createDialogAndButtonArea(parent); return parent; }
/** * Creates a new RowDataFactory that creates copies of the given RowData by * default. * * @param data * RowData to copy * @return a new RowDataFactory that creates copies of the argument by * default */ public static RowDataFactory createFrom(RowData data) { return new RowDataFactory(copyData(data)); }
/** * Returns the default minimum button size, in pixels * * @return the default minimum button size, in pixels */ public static final Point getMinButtonSize() { initializeConstants(); return minButtonSize; }
@Override protected Control createContents(Composite parent) { // initialize the dialog units initializeDialogUnits(parent); Point defaultSpacing = LayoutConstants.getSpacing(); GridLayoutFactory.fillDefaults().margins(LayoutConstants.getMargins()) .spacing(defaultSpacing.x * 2, defaultSpacing.y).numColumns(getColumnCount()).applyTo(parent); GridDataFactory.fillDefaults().grab(true, true).applyTo(parent); createDialogAndButtonArea(parent); return parent; }
/** * Returns the default dialog margins, in pixels * * @return the default dialog margins, in pixels */ public static final Point getMargins() { initializeConstants(); return dialogMargins; }