Skip to content

Commit 47189f3

Browse files
committed
refactor: deprecate duplicated methods
1 parent 37583fd commit 47189f3

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/main/java/com/flowingcode/vaadin/addons/chipfield/ChipField.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,28 +213,40 @@ public boolean isClosable() {
213213
return getElement().getProperty("closable", false);
214214
}
215215

216+
/** @deprecated use {@link #setEnabled(boolean)} */
217+
@Deprecated
216218
public void setDisabled(boolean disabled) {
217219
getElement().setProperty("disabled", disabled);
218220
}
219221

222+
/** @deprecated use {@link #isEnabled()} */
223+
@Deprecated
220224
public boolean isDisabled() {
221225
return getElement().getProperty("disabled", false);
222226
}
223227

228+
/** @deprecated use {@link #setReadOnly()} */
229+
@Deprecated
224230
public void setReadonly(boolean readonly) {
225-
getElement().setProperty("readonly", readonly);
231+
setReadOnly(readonly);
226232
}
227233

234+
/** @deprecated use {@link #isReadOnly()} */
235+
@Deprecated
228236
public boolean isReadonly() {
229-
return getElement().getProperty("readonly", false);
237+
return this.isReadonly();
230238
}
231239

240+
/** @deprecated use {@link #setRequiredIndicatorVisible(boolean)} */
241+
@Deprecated
232242
public void setRequired(boolean required) {
233243
getElement().setProperty("required", required);
234244
}
235245

246+
/** @deprecated use {@link #isRequiredIndicatorVisible()} */
247+
@Deprecated
236248
public boolean isRequired() {
237-
return getElement().getProperty("required", false);
249+
return isRequiredIndicatorVisible();
238250
}
239251

240252
public void setValidationPattern(String pattern) {

0 commit comments

Comments
 (0)