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.
private String backgroundGradientEnd = "EEEEEE";
private boolean scrollbarVisibility = true;
- @Override
- public String getTag() {
- return "cover";
- }
-
/**
* Paints the uidl
*
init();\r
}\r
\r
- /*\r
- * Gets the components UIDL tag string. Don't add a JavaDoc comment here, we\r
- * use the default documentation from implemented interface.\r
- */\r
- @Override\r
- public String getTag() {\r
- return TAGNAME;\r
- }\r
-\r
public void init() {\r
super.setResolution(RESOLUTION_HOUR);\r
\r
private Object itemMarkerXPropertyId = new Object();\r
private Object itemMarkerYPropertyId = new Object();\r
\r
- @Override\r
- public String getTag() {\r
- return "googlemap";\r
- }\r
-\r
@Override\r
public void paintContent(PaintTarget target) throws PaintException {\r
super.paintContent(target);\r
super(caption, resource);
}
- @Override
- public String getTag() {
- return TAG;
- }
-
static {
try {
LINK_FOLLOWED_METHOD = LinkActivatedListener.class
super(content, CONTENT_PREFORMATTED);
}
- @Override
- public String getTag() {
- return TAG;
- }
-
@Override
public void setContentMode(int contentMode) {
if (contentMode != CONTENT_PREFORMATTED) {
this.domainName = domainName;
}
- @Override
- public String getTag() {
- return TAG;
- }
-
public String getTrackerId() {
return trackerId;
}
}
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) {
setSizeFull();
}
- @Override
- public String getTag() {
- return VAbsoluteLayout.TAGNAME;
- }
-
public Iterator<Component> getComponentIterator() {
return components.iterator();
}
/**
* 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
* @see ClientWidget
*/
@Deprecated
- public String getTag() {
+ public final String getTag() {
return "";
}
protected MarginInfo margins = new MarginInfo(false);
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.ui.AbstractComponent#getTag()
- */
- @Override
- public abstract String getTag();
-
/*
* (non-Javadoc)
*
/*
* (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) {
/*
* (non-Javadoc)
*
- * @see
- * com.vaadin.ui.AbstractComponent#paintContent(com.vaadin
+ * @see com.vaadin.ui.AbstractComponent#paintContent(com.vaadin
* .terminal.PaintTarget)
*/
@Override
*/
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.
}
}
- /**
- * 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
@ClientWidget(VAccordion.class)
public class Accordion extends TabSheet {
- @Override
- public String getTag() {
- return "accordion";
- }
-
}
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.
*
/**
* 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();
}
private static final long serialVersionUID = -6408703812053460073L;
- @Override
- public String getTag() {
- return VCssLayout.TAGNAME;
- }
-
/**
* Custom layout slots containing the components.
*/
this.componentType = componentType;
}
- @Override
- public String getTag() {
- return "customcomponent";
- }
-
private class ComponentIterator implements Iterator, Serializable {
boolean first = getCompositionRoot() != null;
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.
}
}
- /*
- * 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
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.
*/
setWidth(100, UNITS_PERCENTAGE);
}
- /* Documented in interface */
- @Override
- public String getTag() {
- return "form";
- }
-
/* Documented in interface */
@Override
public void paintContent(PaintTarget target) throws PaintException {
setMargin(true, false, true, false);
}
- @Override
- public String getTag() {
- return "formlayout";
- }
-
}
}
}
- /**
- * 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
}
- @Override
- public String getTag() {
- return "horizontallayout";
- }
-
}
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.
*
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.
*
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 {
super(caption, dataSource);
}
- @Override
- public String getTag() {
- return "nativebutton";
- }
-
}
\ No newline at end of file
}
}
- /**
- * Gets the component UIDL tag.
- *
- * @return the Component UIDL tag as string.
- */
- @Override
- public String getTag() {
- return "panel";
- }
-
/**
* Adds the component into this container.
*
* 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.
*
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.
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;
}
requestRepaint();
}
- @Override
- public String getTag() {
- return "slider";
- }
-
@Override
public void paintContent(PaintTarget target) throws PaintException {
super.paintContent(target);
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.
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.
target.endTag("visiblecolumns");
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.ui.AbstractSelect#getTag()
- */
- @Override
- public String getTag() {
- return "table";
- }
-
/**
* Gets the cached visible table contents.
*
}
/*
- * 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) {
/* 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) {
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.
*
setImmediate(true);
}
- @Override
- public String getTag() {
- return "urifragment";
- }
-
@Override
public void paintContent(PaintTarget target) throws PaintException {
super.paintContent(target);
setWidth("100%");
}
- @Override
- public String getTag() {
- return "verticallayout";
- }
-
}
super.setParent(parent);
}
- /**
- * Gets the component UIDL tag.
- *
- * @return the Component UIDL tag as string.
- */
- @Override
- public String getTag() {
- return "window";
- }
-
/* ********************************************************************* */
/**