From 05964e7adaed15b7bda6ba3c49ce226ec4ff723a Mon Sep 17 00:00:00 2001 From: Pekka Hyvönen Date: Tue, 28 Aug 2012 10:16:58 +0300 Subject: Renamed Component.debugId to id (#3700) Applied patch from Pekka with minor changes (@deprecation javadoc, call the real methods from deprecated methods in AbstractComponent) --- .../gwt/server/ComponentSizeValidator.java | 6 ++-- server/src/com/vaadin/ui/AbstractComponent.java | 32 ++++++++++++++++++++-- server/src/com/vaadin/ui/Component.java | 14 +++++----- 3 files changed, 39 insertions(+), 13 deletions(-) (limited to 'server') diff --git a/server/src/com/vaadin/terminal/gwt/server/ComponentSizeValidator.java b/server/src/com/vaadin/terminal/gwt/server/ComponentSizeValidator.java index 6ebdace3e3..2349be1974 100644 --- a/server/src/com/vaadin/terminal/gwt/server/ComponentSizeValidator.java +++ b/server/src/com/vaadin/terminal/gwt/server/ComponentSizeValidator.java @@ -372,9 +372,9 @@ public class ComponentSizeValidator implements Serializable { err.append("\""); } - if (component.getDebugId() != null) { - err.append(" debugId: "); - err.append(component.getDebugId()); + if (component.getId() != null) { + err.append(" id: "); + err.append(component.getId()); } if (createLoc != null) { diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java index a52a07f266..917b1a516d 100644 --- a/server/src/com/vaadin/ui/AbstractComponent.java +++ b/server/src/com/vaadin/ui/AbstractComponent.java @@ -111,14 +111,40 @@ public abstract class AbstractComponent extends AbstractClientConnector /* Get/Set component properties */ + /* + * (non-Javadoc) + * + * @see com.vaadin.ui.Component#setId(java.lang.String) + */ @Override - public void setDebugId(String id) { - getState().setDebugId(id); + public void setId(String id) { + getState().setId(id); } + /* + * (non-Javadoc) + * + * @see com.vaadin.ui.Component#getId() + */ @Override + public String getId() { + return getState().getId(); + } + + /** + * @deprecated as of 7.0. Use {@link #setId(String)} + */ + @Deprecated + public void setDebugId(String id) { + setId(id); + } + + /** + * @deprecated as of 7.0. Use {@link #getId()} + */ + @Deprecated public String getDebugId() { - return getState().getDebugId(); + return getId(); } /* diff --git a/server/src/com/vaadin/ui/Component.java b/server/src/com/vaadin/ui/Component.java index 400dd66cac..0559cc5e6a 100644 --- a/server/src/com/vaadin/ui/Component.java +++ b/server/src/com/vaadin/ui/Component.java @@ -510,8 +510,8 @@ public interface Component extends ClientConnector, Sizeable, Serializable { * Gets the UI the component is attached to. * *

- * If the component is not attached to a UI through a component - * containment hierarchy, null is returned. + * If the component is not attached to a UI through a component containment + * hierarchy, null is returned. *

* * @return the UI of the component or null if it is not @@ -574,8 +574,8 @@ public interface Component extends ClientConnector, Sizeable, Serializable { * {@link #setParent(Component)}. *

*

- * This method must call {@link UI#componentAttached(Component)} to let - * the UI know that a new Component has been attached. + * This method must call {@link UI#componentAttached(Component)} to let the + * UI know that a new Component has been attached. *

* * @@ -630,14 +630,14 @@ public interface Component extends ClientConnector, Sizeable, Serializable { * @param id * An alphanumeric id */ - public void setDebugId(String id); + public void setId(String id); /** * Get's currently set debug identifier * - * @return current debug id, null if not set + * @return current id, null if not set */ - public String getDebugId(); + public String getId(); /* Component event framework */ -- cgit v1.2.3