@Override public void setLabelText(String text) { super.setLabelText(text); Label label = getLabelControl(); if (label == null && checkBox != null) { checkBox.setText(text); } }
public void setLabelText(String text) { super.setLabelText(text); Label label = getLabelControl(); if (label == null && checkBox != null) { checkBox.setText(text); } }
@Override public void setLabelText(String text) { super.setLabelText(text); Label label = getLabelControl(); if (label == null && checkBox != null) { checkBox.setText(text); } }
/** * 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); } } }