/** * @see org.eclipse.jface.preference.BooleanFieldEditor#getChangeControl(Composite) */ @Override public Button getChangeControl(Composite parent) { if (fChangeControl == null) { fChangeControl = super.getChangeControl(parent); } return fChangeControl; }
@Override public void setEnabled(boolean enabled, Composite parent) { // Only call super if there is a label already if (style == SEPARATE_LABEL) { super.setEnabled(enabled, parent); } getChangeControl(parent).setEnabled(enabled); }
@Override public void setEnabled(boolean enabled, Composite parent) { // Only call super if there is a label already if (style == SEPARATE_LABEL) { super.setEnabled(enabled, parent); } getChangeControl(parent).setEnabled(enabled); }
public void setEnabled(boolean enabled, Composite parent) { //Only call super if there is a label already if (style == SEPARATE_LABEL) { super.setEnabled(enabled, parent); } getChangeControl(parent).setEnabled(enabled); }
/** * Returns the control responsible for displaying this field editor's label. * This method can be used to set a tooltip for a * <code>BooleanFieldEditor</code>. Note that the normal pattern of * <code>getLabelControl(parent).setToolTipText(tooltipText)</code> does not * work for boolean field editors, as it can lead to duplicate text (see bug * 259952). * * @param parent * the parent composite * @return the control responsible for displaying the label * * @since 1.3 */ public Control getDescriptionControl(Composite parent) { if (style == SEPARATE_LABEL) { return getLabelControl(parent); } return getChangeControl(parent); }
/** * Returns the control responsible for displaying this field editor's label. * This method can be used to set a tooltip for a * <code>BooleanFieldEditor</code>. Note that the normal pattern of * <code>getLabelControl(parent).setToolTipText(tooltipText)</code> does not * work for boolean field editors, as it can lead to duplicate text (see bug * 259952). * * @param parent * the parent composite * @return the control responsible for displaying the label * * @since 3.5 */ public Control getDescriptionControl(Composite parent) { if (style == SEPARATE_LABEL) { return getLabelControl(parent); } return getChangeControl(parent); }
/** * Returns the control responsible for displaying this field editor's label. * This method can be used to set a tooltip for a * <code>BooleanFieldEditor</code>. Note that the normal pattern of * <code>getLabelControl(parent).setToolTipText(tooltipText)</code> does not * work for boolean field editors, as it can lead to duplicate text (see bug * 259952). * * @param parent * the parent composite * @return the control responsible for displaying the label * * @since 3.5 */ public Control getDescriptionControl(Composite parent) { if (style == SEPARATE_LABEL) { return getLabelControl(parent); } return getChangeControl(parent); }
protected void doFillIntoGrid(Composite parent, int numColumns) { String text = getLabelText(); switch (style) { case SEPARATE_LABEL: getLabelControl(parent); numColumns--; text = null; //$FALL-THROUGH$ default: checkBox = getChangeControl(parent); GridData gd = new GridData(); gd.horizontalSpan = numColumns; checkBox.setLayoutData(gd); if (text != null) { checkBox.setText(text); } } }
@Override protected void doFillIntoGrid(Composite parent, int numColumns) { String text = getLabelText(); switch (style) { case SEPARATE_LABEL: getLabelControl(parent); numColumns--; text = null; //$FALL-THROUGH$ default: checkBox = getChangeControl(parent); GridData gd = new GridData(); gd.horizontalSpan = numColumns; checkBox.setLayoutData(gd); if (text != null) { checkBox.setText(text); } } }
@Override protected void doFillIntoGrid(Composite parent, int numColumns) { String text = getLabelText(); switch (style) { case SEPARATE_LABEL: getLabelControl(parent); numColumns--; text = null; //$FALL-THROUGH$ default: checkBox = getChangeControl(parent); GridData gd = new GridData(); gd.horizontalSpan = numColumns; checkBox.setLayoutData(gd); if (text != null) { checkBox.setText(text); } } }