import eu.etaxonomy.cdm.common.CdmUtils;
import eu.etaxonomy.taxeditor.preference.Resources;
-import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
/**
* <p>
/** Constant <code>SINGLE=-1</code> */
public static final int SINGLE = -1;
+ protected TextWithLabelElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString,
+ String initialText, Integer textHeight, int style) {
+ this(formFactory, parentElement, labelString, initialText, textHeight, null, style);
+ }
/**
* <p>
* Constructor for TextWithLabelElement.
* a {@link java.lang.String} object.
* @param textHeight
* a {@link java.lang.Integer} object.
+ * @param textLimit max characters allowed to enter
* @param style
* a int.
* @wbp.parser.entryPoint
*/
protected TextWithLabelElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString,
- String initialText, Integer textHeight, int style) {
+ String initialText, Integer textHeight, Integer textLimit, int style) {
super(formFactory, parentElement);
if (labelString != null) {
}
text = formFactory.createText(getLayoutComposite(), "", combinedStyle);
+ text.setTextLimit(textLimit!=null?textLimit:Text.LIMIT);
addControl(text);
text.setForeground(getColor(symbolicName));
}
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement#isEnabled()
+ */
+ @Override
+ public boolean isEnabled() {
+ return text.isEnabled();
+ }
+
/** {@inheritDoc} */
@Override
public void setIrrelevant(boolean irrelevant) {
public void setTextLimit(int limit) {
text.setTextLimit(limit);
}
+
}