111 }
112
113 @Override public void removeListener(ChangeListener<? super String> changeListener) {
114 helper = ExpressionHelper.removeListener(helper, changeListener);
115 }
116
117 @Override public String getValue() {
118 return get();
119 }
120
121 @Override public void addListener(InvalidationListener listener) {
122 helper = ExpressionHelper.addListener(helper, this, listener);
123 }
124
125 @Override public void removeListener(InvalidationListener listener) {
126 helper = ExpressionHelper.removeListener(helper, listener);
127 }
128 }
129
130 /**
131 * The default value for {@link #prefColumnCount}.
132 */
133 public static final int DEFAULT_PREF_COLUMN_COUNT = 12;
134
135 /**
136 * Creates a {@code TextField} with empty text content.
137 */
138 public TextField() {
139 this("");
140 }
141
142 /**
143 * Creates a {@code TextField} with initial text content.
144 *
145 * @param text A string for text content.
146 */
147 public TextField(String text) {
148 super(new TextFieldContent());
149 getStyleClass().add("text-field");
150 setAccessibleRole(AccessibleRole.TEXT_FIELD);
151 setText(text);
|
111 }
112
113 @Override public void removeListener(ChangeListener<? super String> changeListener) {
114 helper = ExpressionHelper.removeListener(helper, changeListener);
115 }
116
117 @Override public String getValue() {
118 return get();
119 }
120
121 @Override public void addListener(InvalidationListener listener) {
122 helper = ExpressionHelper.addListener(helper, this, listener);
123 }
124
125 @Override public void removeListener(InvalidationListener listener) {
126 helper = ExpressionHelper.removeListener(helper, listener);
127 }
128 }
129
130 /**
131 * The default value for {@link #prefColumnCountProperty() prefColumnCount}.
132 */
133 public static final int DEFAULT_PREF_COLUMN_COUNT = 12;
134
135 /**
136 * Creates a {@code TextField} with empty text content.
137 */
138 public TextField() {
139 this("");
140 }
141
142 /**
143 * Creates a {@code TextField} with initial text content.
144 *
145 * @param text A string for text content.
146 */
147 public TextField(String text) {
148 super(new TextFieldContent());
149 getStyleClass().add("text-field");
150 setAccessibleRole(AccessibleRole.TEXT_FIELD);
151 setText(text);
|