/** * Returns the indent of dependent controls, in pixels. * <p> * <strong>Note:</strong> Use this method instead of {@link LayoutConstants#getIndent()} for * compatibility reasons. * </p> * * @return the indent of dependent controls, in pixels. * @since 3.9 */ public static final int getIndent() { return LayoutConstants.getIndent(); }
/** * Returns the indent of dependent controls, in pixels. * <p> * <strong>Note:</strong> Use this method instead of {@link LayoutConstants#getIndent()} for * compatibility reasons. * </p> * * @return the indent of dependent controls, in pixels. * @since 3.9 */ public static final int getIndent() { return LayoutConstants.getIndent(); }
selectOnHoverButton.addSelectionListener(widgetSelectedAdapter(e -> selectOnHover = selectOnHoverButton.getSelection())); data = new GridData(); data.horizontalIndent = LayoutConstants.getIndent(); selectOnHoverButton.setLayoutData(data); openAfterDelayButton.addSelectionListener(widgetSelectedAdapter(e -> openAfterDelay = openAfterDelayButton.getSelection())); data = new GridData(); data.horizontalIndent = LayoutConstants.getIndent(); openAfterDelayButton.setLayoutData(data);
GridData groupData = new GridData(GridData.FILL_BOTH); groupData.horizontalSpan = 2; groupData.horizontalIndent = LayoutConstants.getIndent(); Object compositeLayout = composite.getLayout(); if (compositeLayout instanceof GridLayout) {
private void createBidiPreferencesGroup(Composite composite) { layoutDirectionCombo = addComboBox(composite, WorkbenchMessages.GlobalizationPreference_layoutDirection, 0); layoutDirectionCombo.setItems(new String[] { DEFAULT_DIR, LTR_DIR, RTL_DIR }); layoutDirectionCombo.select(getLayoutDirectionIndex(layoutDirection)); layoutDirectionCombo.addSelectionListener(widgetSelectedAdapter( e -> layoutDirection = getLayoutDirectionInteger(layoutDirectionCombo.getSelectionIndex()))); createSpace(composite); bidiSupportClickButton = new Button(composite, SWT.CHECK | SWT.LEFT); bidiSupportClickButton.setLayoutData(GridDataFactory.swtDefaults().span(2, 1).create()); bidiSupportClickButton.setText(WorkbenchMessages.GlobalizationPreference_bidiSupport); bidiSupportClickButton.setSelection(bidiSupport); bidiSupportClickButton.addSelectionListener(widgetSelectedAdapter(e -> selectClickMode(bidiSupportClickButton.getSelection()))); textDirectionCombo = addComboBox(composite, WorkbenchMessages.GlobalizationPreference_textDirection, LayoutConstants.getIndent()); textDirectionCombo.setItems(new String[] { DEFAULT_DIR, LTR_DIR, AUTO_DIR, RTL_DIR }); textDirectionCombo.setEnabled(bidiSupport); textDirectionCombo.select(getTextDirectionIndex(textDirection)); textDirectionCombo.addSelectionListener(widgetSelectedAdapter(e -> textDirection = getTextDirectionString(textDirectionCombo.getSelectionIndex()))); createSpace(composite); Font font = composite.getFont(); Composite note = createNoteComposite(font, composite, WorkbenchMessages.Preference_note, WorkbenchMessages.GlobalizationPreference_restartWidget); note.setLayoutData(GridDataFactory.swtDefaults().span(2, 1).create()); }