瀏覽代碼

"removed" (finalized + deprecated) getTag from AbstractComponent

svn changeset:9095/svn branch:2009-09-widget-packaging_3332
tags/6.7.0.beta1
Matti Tahvonen 14 年之前
父節點
當前提交
6d4e40f6e3
共有 43 個文件被更改,包括 37 次插入326 次删除
  1. 0
    6
      src/com/vaadin/demo/colorpicker/ColorPicker.java
  2. 0
    5
      src/com/vaadin/demo/coverflow/Coverflow.java
  3. 0
    9
      src/com/vaadin/demo/reservation/CalendarField.java
  4. 0
    5
      src/com/vaadin/demo/reservation/GoogleMap.java
  5. 0
    5
      src/com/vaadin/demo/sampler/ActiveLink.java
  6. 0
    5
      src/com/vaadin/demo/sampler/CodeLabel.java
  7. 0
    5
      src/com/vaadin/demo/sampler/GoogleAnalytics.java
  8. 1
    5
      src/com/vaadin/tests/book/BookTestApplication.java
  9. 0
    5
      src/com/vaadin/ui/AbsoluteLayout.java
  10. 11
    1
      src/com/vaadin/ui/AbstractComponent.java
  11. 2
    12
      src/com/vaadin/ui/AbstractLayout.java
  12. 0
    10
      src/com/vaadin/ui/AbstractOrderedLayout.java
  13. 0
    10
      src/com/vaadin/ui/AbstractSelect.java
  14. 0
    5
      src/com/vaadin/ui/Accordion.java
  15. 0
    10
      src/com/vaadin/ui/Button.java
  16. 15
    1
      src/com/vaadin/ui/ClientWidget.java
  17. 0
    5
      src/com/vaadin/ui/CssLayout.java
  18. 0
    5
      src/com/vaadin/ui/CustomComponent.java
  19. 0
    10
      src/com/vaadin/ui/CustomLayout.java
  20. 0
    9
      src/com/vaadin/ui/DateField.java
  21. 0
    10
      src/com/vaadin/ui/Embedded.java
  22. 0
    6
      src/com/vaadin/ui/Form.java
  23. 0
    5
      src/com/vaadin/ui/FormLayout.java
  24. 0
    11
      src/com/vaadin/ui/GridLayout.java
  25. 0
    5
      src/com/vaadin/ui/HorizontalLayout.java
  26. 0
    10
      src/com/vaadin/ui/Label.java
  27. 0
    10
      src/com/vaadin/ui/Link.java
  28. 0
    6
      src/com/vaadin/ui/MenuBar.java
  29. 0
    5
      src/com/vaadin/ui/NativeButton.java
  30. 0
    10
      src/com/vaadin/ui/Panel.java
  31. 0
    8
      src/com/vaadin/ui/PopupView.java
  32. 0
    10
      src/com/vaadin/ui/ProgressIndicator.java
  33. 0
    10
      src/com/vaadin/ui/Select.java
  34. 0
    5
      src/com/vaadin/ui/Slider.java
  35. 0
    10
      src/com/vaadin/ui/SplitPanel.java
  36. 0
    10
      src/com/vaadin/ui/TabSheet.java
  37. 0
    10
      src/com/vaadin/ui/Table.java
  38. 4
    12
      src/com/vaadin/ui/TextField.java
  39. 4
    15
      src/com/vaadin/ui/Tree.java
  40. 0
    10
      src/com/vaadin/ui/Upload.java
  41. 0
    5
      src/com/vaadin/ui/UriFragmentUtility.java
  42. 0
    5
      src/com/vaadin/ui/VerticalLayout.java
  43. 0
    10
      src/com/vaadin/ui/Window.java

+ 0
- 6
src/com/vaadin/demo/colorpicker/ColorPicker.java 查看文件

@@ -27,12 +27,6 @@ public class ColorPicker extends AbstractField {
return String.class;
}

/** Tag is the UIDL element name for client-server communications. */
@Override
public String getTag() {
return "colorpicker";
}

/** Set the currently selected color. */
public void setColor(String newcolor) {
// Sets the color name as the property of the component.

+ 0
- 5
src/com/vaadin/demo/coverflow/Coverflow.java 查看文件

@@ -18,11 +18,6 @@ public class Coverflow extends AbstractSelect {
private String backgroundGradientEnd = "EEEEEE";
private boolean scrollbarVisibility = true;

@Override
public String getTag() {
return "cover";
}

/**
* Paints the uidl
*

+ 0
- 9
src/com/vaadin/demo/reservation/CalendarField.java 查看文件

@@ -63,15 +63,6 @@ public class CalendarField extends DateField implements Container.Viewer {
init();
}
/*
* Gets the components UIDL tag string. Don't add a JavaDoc comment here, we
* use the default documentation from implemented interface.
*/
@Override
public String getTag() {
return TAGNAME;
}
public void init() {
super.setResolution(RESOLUTION_HOUR);

+ 0
- 5
src/com/vaadin/demo/reservation/GoogleMap.java 查看文件

@@ -33,11 +33,6 @@ public class GoogleMap extends AbstractComponent implements Sizeable,
private Object itemMarkerXPropertyId = new Object();
private Object itemMarkerYPropertyId = new Object();
@Override
public String getTag() {
return "googlemap";
}
@Override
public void paintContent(PaintTarget target) throws PaintException {
super.paintContent(target);

+ 0
- 5
src/com/vaadin/demo/sampler/ActiveLink.java 查看文件

@@ -37,11 +37,6 @@ public class ActiveLink extends Link {
super(caption, resource);
}

@Override
public String getTag() {
return TAG;
}

static {
try {
LINK_FOLLOWED_METHOD = LinkActivatedListener.class

+ 0
- 5
src/com/vaadin/demo/sampler/CodeLabel.java 查看文件

@@ -18,11 +18,6 @@ public class CodeLabel extends Label {
super(content, CONTENT_PREFORMATTED);
}

@Override
public String getTag() {
return TAG;
}

@Override
public void setContentMode(int contentMode) {
if (contentMode != CONTENT_PREFORMATTED) {

+ 0
- 5
src/com/vaadin/demo/sampler/GoogleAnalytics.java 查看文件

@@ -25,11 +25,6 @@ public class GoogleAnalytics extends AbstractComponent {
this.domainName = domainName;
}

@Override
public String getTag() {
return TAG;
}

public String getTrackerId() {
return trackerId;
}

+ 1
- 5
src/com/vaadin/tests/book/BookTestApplication.java 查看文件

@@ -612,12 +612,8 @@ public class BookTestApplication extends com.vaadin.Application {
}
main.addComponent(new SSNField());
}
// TODO add ClientWidget annotation if test is in use
class PagingTable extends Table {
@Override
public String getTag() {
return "pagingtable";
}
}

void example_Table(Window main, String param) {

+ 0
- 5
src/com/vaadin/ui/AbsoluteLayout.java 查看文件

@@ -30,11 +30,6 @@ public class AbsoluteLayout extends AbstractLayout {
setSizeFull();
}

@Override
public String getTag() {
return VAbsoluteLayout.TAGNAME;
}

public Iterator<Component> getComponentIterator() {
return components.iterator();
}

+ 11
- 1
src/com/vaadin/ui/AbstractComponent.java 查看文件

@@ -145,6 +145,16 @@ public abstract class AbstractComponent implements Component, MethodEventSource
/**
* Gets the UIDL tag corresponding to the component.
*
* <p>
* Note! In version 6.2 the method for mapping server side components to
* their client side counterparts was enhanced. This method was made final
* to intentionally "break" code where it is needed. If your code does not
* compile due overriding this method, it is very likely that you need to:
* <ul>
* <li>remove the implementation of getTag
* <li>add {@link ClientWidget} annotation to your component
* </ul>
*
* @return the component's UIDL tag as <code>String</code>
* @deprecated tags are no more required for components. Instead of tags we
* are now using {@link ClientWidget} annotations to map server
@@ -153,7 +163,7 @@ public abstract class AbstractComponent implements Component, MethodEventSource
* @see ClientWidget
*/
@Deprecated
public String getTag() {
public final String getTag() {
return "";
}


+ 2
- 12
src/com/vaadin/ui/AbstractLayout.java 查看文件

@@ -23,14 +23,6 @@ public abstract class AbstractLayout extends AbstractComponentContainer

protected MarginInfo margins = new MarginInfo(false);

/*
* (non-Javadoc)
*
* @see com.vaadin.ui.AbstractComponent#getTag()
*/
@Override
public abstract String getTag();

/*
* (non-Javadoc)
*
@@ -63,8 +55,7 @@ public abstract class AbstractLayout extends AbstractComponentContainer
/*
* (non-Javadoc)
*
* @see com.vaadin.ui.Layout#setMargin(boolean, boolean, boolean,
* boolean)
* @see com.vaadin.ui.Layout#setMargin(boolean, boolean, boolean, boolean)
*/
public void setMargin(boolean topEnabled, boolean rightEnabled,
boolean bottomEnabled, boolean leftEnabled) {
@@ -77,8 +68,7 @@ public abstract class AbstractLayout extends AbstractComponentContainer
/*
* (non-Javadoc)
*
* @see
* com.vaadin.ui.AbstractComponent#paintContent(com.vaadin
* @see com.vaadin.ui.AbstractComponent#paintContent(com.vaadin
* .terminal.PaintTarget)
*/
@Override

+ 0
- 10
src/com/vaadin/ui/AbstractOrderedLayout.java 查看文件

@@ -38,16 +38,6 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
*/
private boolean spacing = false;

/**
* Gets the component UIDL tag.
*
* @return the Component UIDL tag as string.
*/
@Override
public String getTag() {
return "orderedlayout";
}

/**
* Add a component into this container. The component is added to the right
* or under the previous component.

+ 0
- 10
src/com/vaadin/ui/AbstractSelect.java 查看文件

@@ -511,16 +511,6 @@ public abstract class AbstractSelect extends AbstractField implements
}
}

/**
* Gets the component UIDL tag.
*
* @return the Component UIDL tag as string.
*/
@Override
public String getTag() {
return "select";
}

/**
* Gets the visible item ids. In Select, this returns list of all item ids,
* but can be overriden in subclasses if they paint only part of the items

+ 0
- 5
src/com/vaadin/ui/Accordion.java 查看文件

@@ -6,9 +6,4 @@ import com.vaadin.terminal.gwt.client.ui.VAccordion;
@ClientWidget(VAccordion.class)
public class Accordion extends TabSheet {

@Override
public String getTag() {
return "accordion";
}

}

+ 0
- 10
src/com/vaadin/ui/Button.java 查看文件

@@ -113,16 +113,6 @@ public class Button extends AbstractField {
setPropertyDataSource(dataSource);
}

/**
* Gets component UIDL tag.
*
* @return the Component UIDL tag as string.
*/
@Override
public String getTag() {
return "button";
}

/**
* Paints the content of this component.
*

+ 15
- 1
src/com/vaadin/ui/ClientWidget.java 查看文件

@@ -12,10 +12,24 @@ import com.vaadin.terminal.gwt.client.Paintable;

/**
* Annotation defining the default client side counterpart in GWT terminal for
* {@link Component}
* {@link Component}.
* <p>
* With this annotation server side Vaadin component is marked to have a client
* side counterpart. The value of the annotation is the class of client side
* implementation.
*
* <p>
* Note, even though client side implementation is needed during development,
* one may safely remove them from classpath of the production server.
*
*
* @since 6.2
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface ClientWidget {
/**
* @return the client side counterpart for the annotated component
*/
Class<? extends Paintable> value();
}

+ 0
- 5
src/com/vaadin/ui/CssLayout.java 查看文件

@@ -55,11 +55,6 @@ public class CssLayout extends AbstractLayout {

private static final long serialVersionUID = -6408703812053460073L;

@Override
public String getTag() {
return VCssLayout.TAGNAME;
}

/**
* Custom layout slots containing the components.
*/

+ 0
- 5
src/com/vaadin/ui/CustomComponent.java 查看文件

@@ -145,11 +145,6 @@ public class CustomComponent extends AbstractComponentContainer {
this.componentType = componentType;
}

@Override
public String getTag() {
return "customcomponent";
}

private class ComponentIterator implements Iterator, Serializable {
boolean first = getCompositionRoot() != null;


+ 0
- 10
src/com/vaadin/ui/CustomLayout.java 查看文件

@@ -97,16 +97,6 @@ public class CustomLayout extends AbstractLayout {
setWidth(100, UNITS_PERCENTAGE);
}

/**
* Gets the component UIDL tag.
*
* @return the Component UIDL tag as string.
*/
@Override
public String getTag() {
return "customlayout";
}

/**
* Adds the component into this container to given location. If the location
* is already populated, the old component is removed.

+ 0
- 9
src/com/vaadin/ui/DateField.java 查看文件

@@ -243,15 +243,6 @@ public class DateField extends AbstractField {
}
}

/*
* Gets the components UIDL tag string. Don't add a JavaDoc comment here, we
* use the default documentation from implemented interface.
*/
@Override
public String getTag() {
return "datefield";
}

/*
* Invoked when a variable of the component changes. Don't add a JavaDoc
* comment here, we use the default documentation from implemented

+ 0
- 10
src/com/vaadin/ui/Embedded.java 查看文件

@@ -101,16 +101,6 @@ public class Embedded extends AbstractComponent {
setSource(source);
}

/**
* Gets the component UIDL tag.
*
* @return the Component UIDL tag as string.
*/
@Override
public String getTag() {
return "embedded";
}

/**
* Invoked when the component state should be painted.
*/

+ 0
- 6
src/com/vaadin/ui/Form.java 查看文件

@@ -175,12 +175,6 @@ public class Form extends AbstractField implements Item.Editor, Buffered, Item,
setWidth(100, UNITS_PERCENTAGE);
}

/* Documented in interface */
@Override
public String getTag() {
return "form";
}

/* Documented in interface */
@Override
public void paintContent(PaintTarget target) throws PaintException {

+ 0
- 5
src/com/vaadin/ui/FormLayout.java 查看文件

@@ -31,9 +31,4 @@ public class FormLayout extends OrderedLayout {
setMargin(true, false, true, false);
}

@Override
public String getTag() {
return "formlayout";
}

}

+ 0
- 11
src/com/vaadin/ui/GridLayout.java 查看文件

@@ -638,17 +638,6 @@ public class GridLayout extends AbstractLayout implements
}
}

/**
* Gets the components UIDL tag.
*
* @return the Component UIDL tag as string.
* @see com.vaadin.ui.AbstractComponent#getTag()
*/
@Override
public String getTag() {
return "gridlayout";
}

/**
* This class defines an area on a grid. An Area is defined by the cells of
* its upper left corner (column1,row1) and lower right corner

+ 0
- 5
src/com/vaadin/ui/HorizontalLayout.java 查看文件

@@ -21,9 +21,4 @@ public class HorizontalLayout extends AbstractOrderedLayout {

}

@Override
public String getTag() {
return "horizontallayout";
}

}

+ 0
- 10
src/com/vaadin/ui/Label.java 查看文件

@@ -151,16 +151,6 @@ public class Label extends AbstractComponent implements Property,
setWidth(100, UNITS_PERCENTAGE);
}

/**
* Get the component UIDL tag.
*
* @return the Component UIDL tag as string.
*/
@Override
public String getTag() {
return "label";
}

/**
* Set the component to read-only. Readonly is not used in label.
*

+ 0
- 10
src/com/vaadin/ui/Link.java 查看文件

@@ -86,16 +86,6 @@ public class Link extends AbstractComponent {
setTargetBorder(border);
}

/**
* Gets the component UIDL tag.
*
* @return the Component UIDL tag as string.
*/
@Override
public String getTag() {
return "link";
}

/**
* Paints the content of this component.
*

+ 0
- 6
src/com/vaadin/ui/MenuBar.java 查看文件

@@ -33,12 +33,6 @@ public class MenuBar extends AbstractComponent {
private Resource submenuIcon;
private MenuItem moreItem;

/** Tag is the UIDL element name for client-server communications. */
@Override
public java.lang.String getTag() {
return "menubar";
}

/** Paint (serialise) the component for the client. */
@Override
public void paintContent(PaintTarget target) throws PaintException {

+ 0
- 5
src/com/vaadin/ui/NativeButton.java 查看文件

@@ -43,9 +43,4 @@ public class NativeButton extends Button {
super(caption, dataSource);
}

@Override
public String getTag() {
return "nativebutton";
}

}

+ 0
- 10
src/com/vaadin/ui/Panel.java 查看文件

@@ -276,16 +276,6 @@ public class Panel extends AbstractComponentContainer implements Scrollable,
}
}

/**
* Gets the component UIDL tag.
*
* @return the Component UIDL tag as string.
*/
@Override
public String getTag() {
return "panel";
}

/**
* Adds the component into this container.
*

+ 0
- 8
src/com/vaadin/ui/PopupView.java 查看文件

@@ -276,14 +276,6 @@ public class PopupView extends AbstractComponentContainer {
* Methods for server-client communications.
*/

/**
* @see com.vaadin.ui.AbstractComponent#getTag()
*/
@Override
public java.lang.String getTag() {
return "popupview";
}

/**
* Paint (serialize) the component for the client.
*

+ 0
- 10
src/com/vaadin/ui/ProgressIndicator.java 查看文件

@@ -72,16 +72,6 @@ public class ProgressIndicator extends AbstractField implements Property,
setPropertyDataSource(contentSource);
}

/**
* Gets the component UIDL tag.
*
* @return the Component UIDL tag as string.
*/
@Override
public String getTag() {
return "progressindicator";
}

/**
* Sets the component to read-only. Readonly is not used in
* ProgressIndicator.

+ 0
- 10
src/com/vaadin/ui/Select.java 查看文件

@@ -425,16 +425,6 @@ public class Select extends AbstractSelect implements AbstractSelect.Filtering {
super.requestRepaint();
}

/**
* Gets the component UIDL tag.
*
* @return the Component UIDL tag as string.
*/
@Override
public String getTag() {
return "select";
}

public void setFilteringMode(int filteringMode) {
this.filteringMode = filteringMode;
}

+ 0
- 5
src/com/vaadin/ui/Slider.java 查看文件

@@ -395,11 +395,6 @@ public class Slider extends AbstractField {
requestRepaint();
}

@Override
public String getTag() {
return "slider";
}

@Override
public void paintContent(PaintTarget target) throws PaintException {
super.paintContent(target);

+ 0
- 10
src/com/vaadin/ui/SplitPanel.java 查看文件

@@ -75,16 +75,6 @@ public class SplitPanel extends AbstractLayout {
setOrientation(orientation);
}

/**
* Gets the component UIDL tag.
*
* @return the Component UIDL tag as string.
*/
@Override
public String getTag() {
return "splitpanel";
}

/**
* Add a component into this container. The component is added to the right
* or under the previous component.

+ 0
- 10
src/com/vaadin/ui/TabSheet.java 查看文件

@@ -159,16 +159,6 @@ public class TabSheet extends AbstractComponentContainer implements
return null;
}

/**
* Gets the component UIDL tag.
*
* @return the Component UIDL tag as string.
*/
@Override
public String getTag() {
return "tabsheet";
}

/**
* Moves all components from another container to this container. The
* components are removed from the other container.

+ 0
- 10
src/com/vaadin/ui/Table.java 查看文件

@@ -2366,16 +2366,6 @@ public class Table extends AbstractSelect implements Action.Container,
target.endTag("visiblecolumns");
}

/*
* (non-Javadoc)
*
* @see com.vaadin.ui.AbstractSelect#getTag()
*/
@Override
public String getTag() {
return "table";
}

/**
* Gets the cached visible table contents.
*

+ 4
- 12
src/com/vaadin/ui/TextField.java 查看文件

@@ -231,18 +231,10 @@ public class TextField extends AbstractField {
}

/*
* Gets the components UIDL tag string. Don't add a JavaDoc comment here, we
* use the default documentation from implemented interface.
*/
@Override
public String getTag() {
return "textfield";
}

/*
* Invoked when a variable of the component changes. Don't add a JavaDoc
* comment here, we use the default documentation from implemented
* interface.
* (non-Javadoc)
*
* @see com.vaadin.ui.AbstractField#changeVariables(java.lang.Object,
* java.util.Map)
*/
@Override
public void changeVariables(Object source, Map variables) {

+ 4
- 15
src/com/vaadin/ui/Tree.java 查看文件

@@ -319,22 +319,11 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,

/* Component API */

/**
* Gets the UIDL tag corresponding to the component.
*
* @see com.vaadin.ui.AbstractComponent#getTag()
*/
@Override
public String getTag() {
return "tree";
}

/**
* Called when one or more variables handled by the implementing class are
* changed.
/*
* (non-Javadoc)
*
* @see com.vaadin.terminal.VariableOwner#changeVariables(Object source, Map
* variables)
* @see com.vaadin.ui.AbstractSelect#changeVariables(java.lang.Object,
* java.util.Map)
*/
@Override
public void changeVariables(Object source, Map variables) {

+ 0
- 10
src/com/vaadin/ui/Upload.java 查看文件

@@ -114,16 +114,6 @@ public class Upload extends AbstractComponent implements Component.Focusable {
receiver = uploadReceiver;
}

/**
* Gets the component type.
*
* @return Component type as string.
*/
@Override
public String getTag() {
return "upload";
}

/**
* This method is called by terminal when upload is received.
*

+ 0
- 5
src/com/vaadin/ui/UriFragmentUtility.java 查看文件

@@ -85,11 +85,6 @@ public class UriFragmentUtility extends AbstractComponent {
setImmediate(true);
}

@Override
public String getTag() {
return "urifragment";
}

@Override
public void paintContent(PaintTarget target) throws PaintException {
super.paintContent(target);

+ 0
- 5
src/com/vaadin/ui/VerticalLayout.java 查看文件

@@ -22,9 +22,4 @@ public class VerticalLayout extends AbstractOrderedLayout {
setWidth("100%");
}

@Override
public String getTag() {
return "verticallayout";
}

}

+ 0
- 10
src/com/vaadin/ui/Window.java 查看文件

@@ -257,16 +257,6 @@ public class Window extends Panel implements URIHandler, ParameterHandler {
super.setParent(parent);
}

/**
* Gets the component UIDL tag.
*
* @return the Component UIDL tag as string.
*/
@Override
public String getTag() {
return "window";
}

/* ********************************************************************* */

/**

Loading…
取消
儲存