summaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/com/vaadin/data/util/QueryContainer.java685
-rw-r--r--server/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java6
-rw-r--r--server/src/com/vaadin/ui/AbstractComponent.java28
-rw-r--r--server/src/com/vaadin/ui/AbstractOrderedLayout.java13
-rw-r--r--server/src/com/vaadin/ui/DragAndDropWrapper.java16
-rw-r--r--server/src/com/vaadin/ui/GridLayout.java46
-rw-r--r--server/src/com/vaadin/ui/Layout.java69
-rw-r--r--server/src/com/vaadin/ui/PopupView.java16
-rw-r--r--server/src/com/vaadin/ui/RichTextArea.java71
-rw-r--r--server/src/com/vaadin/ui/Select.java34
-rw-r--r--server/src/com/vaadin/ui/TabSheet.java81
-rw-r--r--server/src/com/vaadin/ui/Table.java35
-rw-r--r--server/src/com/vaadin/ui/Upload.java27
-rw-r--r--server/src/com/vaadin/ui/themes/BaseTheme.java12
-rw-r--r--server/src/com/vaadin/ui/themes/Reindeer.java18
15 files changed, 11 insertions, 1146 deletions
diff --git a/server/src/com/vaadin/data/util/QueryContainer.java b/server/src/com/vaadin/data/util/QueryContainer.java
deleted file mode 100644
index add93c25ee..0000000000
--- a/server/src/com/vaadin/data/util/QueryContainer.java
+++ /dev/null
@@ -1,685 +0,0 @@
-/*
- * Copyright 2011 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package com.vaadin.data.util;
-
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-
-import com.vaadin.data.Container;
-import com.vaadin.data.Item;
-import com.vaadin.data.Property;
-
-/**
- * <p>
- * The <code>QueryContainer</code> is the specialized form of Container which is
- * Ordered and Indexed. This is used to represent the contents of relational
- * database tables accessed through the JDBC Connection in the Vaadin Table.
- * This creates Items based on the queryStatement provided to the container.
- * </p>
- *
- * <p>
- * The <code>QueryContainer</code> can be visualized as a representation of a
- * relational database table.Each Item in the container represents the row
- * fetched by the query.All cells in a column have same data type and the data
- * type information is retrieved from the metadata of the resultset.
- * </p>
- *
- * <p>
- * Note : If data in the tables gets modified, Container will not get reflected
- * with the updates, we have to explicity invoke QueryContainer.refresh method.
- * {@link com.vaadin.data.util.QueryContainer#refresh() refresh()}
- * </p>
- *
- * @see com.vaadin.data.Container
- *
- * @author Vaadin Ltd.
- * @since 4.0
- *
- * @deprecated will be removed in the future, use the SQLContainer add-on
- */
-
-@Deprecated
-@SuppressWarnings("serial")
-public class QueryContainer implements Container, Container.Ordered,
- Container.Indexed {
-
- // default ResultSet type
- public static final int DEFAULT_RESULTSET_TYPE = ResultSet.TYPE_SCROLL_INSENSITIVE;
-
- // default ResultSet concurrency
- public static final int DEFAULT_RESULTSET_CONCURRENCY = ResultSet.CONCUR_READ_ONLY;
-
- private int resultSetType = DEFAULT_RESULTSET_TYPE;
-
- private int resultSetConcurrency = DEFAULT_RESULTSET_CONCURRENCY;
-
- private final String queryStatement;
-
- private final Connection connection;
-
- private ResultSet result;
-
- private Collection<String> propertyIds;
-
- private final HashMap<String, Class<?>> propertyTypes = new HashMap<String, Class<?>>();
-
- private int size = -1;
-
- private Statement statement;
-
- /**
- * Constructs new <code>QueryContainer</code> with the specified
- * <code>queryStatement</code>.
- *
- * @param queryStatement
- * Database query
- * @param connection
- * Connection object
- * @param resultSetType
- * @param resultSetConcurrency
- * @throws SQLException
- * when database operation fails
- */
- public QueryContainer(String queryStatement, Connection connection,
- int resultSetType, int resultSetConcurrency) throws SQLException {
- this.queryStatement = queryStatement;
- this.connection = connection;
- this.resultSetType = resultSetType;
- this.resultSetConcurrency = resultSetConcurrency;
- init();
- }
-
- /**
- * Constructs new <code>QueryContainer</code> with the specified
- * queryStatement using the default resultset type and default resultset
- * concurrency.
- *
- * @param queryStatement
- * Database query
- * @param connection
- * Connection object
- * @see QueryContainer#DEFAULT_RESULTSET_TYPE
- * @see QueryContainer#DEFAULT_RESULTSET_CONCURRENCY
- * @throws SQLException
- * when database operation fails
- */
- public QueryContainer(String queryStatement, Connection connection)
- throws SQLException {
- this(queryStatement, connection, DEFAULT_RESULTSET_TYPE,
- DEFAULT_RESULTSET_CONCURRENCY);
- }
-
- /**
- * Fills the Container with the items and properties. Invoked by the
- * constructor.
- *
- * @throws SQLException
- * when parameter initialization fails.
- * @see QueryContainer#QueryContainer(String, Connection, int, int).
- */
- private void init() throws SQLException {
- refresh();
- ResultSetMetaData metadata;
- metadata = result.getMetaData();
- final int count = metadata.getColumnCount();
- final ArrayList<String> list = new ArrayList<String>(count);
- for (int i = 1; i <= count; i++) {
- final String columnName = metadata.getColumnName(i);
- list.add(columnName);
- final Property<?> p = getContainerProperty(new Integer(1),
- columnName);
- propertyTypes.put(columnName,
- p == null ? Object.class : p.getType());
- }
- propertyIds = Collections.unmodifiableCollection(list);
- }
-
- /**
- * <p>
- * Restores items in the container. This method will update the latest data
- * to the container.
- * </p>
- * Note: This method should be used to update the container with the latest
- * items.
- *
- * @throws SQLException
- * when database operation fails
- *
- */
-
- public void refresh() throws SQLException {
- close();
- statement = connection.createStatement(resultSetType,
- resultSetConcurrency);
- result = statement.executeQuery(queryStatement);
- result.last();
- size = result.getRow();
- }
-
- /**
- * Releases and nullifies the <code>statement</code>.
- *
- * @throws SQLException
- * when database operation fails
- */
-
- public void close() throws SQLException {
- if (statement != null) {
- statement.close();
- }
- statement = null;
- }
-
- /**
- * Gets the Item with the given Item ID from the Container.
- *
- * @param id
- * ID of the Item to retrieve
- * @return Item Id.
- */
-
- @Override
- public Item getItem(Object id) {
- return new Row(id);
- }
-
- /**
- * Gets the collection of propertyId from the Container.
- *
- * @return Collection of Property ID.
- */
-
- @Override
- public Collection<String> getContainerPropertyIds() {
- return propertyIds;
- }
-
- /**
- * Gets an collection of all the item IDs in the container.
- *
- * @return collection of Item IDs
- */
- @Override
- public Collection<?> getItemIds() {
- final Collection<Integer> c = new ArrayList<Integer>(size);
- for (int i = 1; i <= size; i++) {
- c.add(new Integer(i));
- }
- return c;
- }
-
- /**
- * Gets the property identified by the given itemId and propertyId from the
- * container. If the container does not contain the property
- * <code>null</code> is returned.
- *
- * @param itemId
- * ID of the Item which contains the Property
- * @param propertyId
- * ID of the Property to retrieve
- *
- * @return Property with the given ID if exists; <code>null</code>
- * otherwise.
- */
-
- @Override
- public synchronized Property<?> getContainerProperty(Object itemId,
- Object propertyId) {
- if (!(itemId instanceof Integer && propertyId instanceof String)) {
- return null;
- }
- Object value;
- try {
- result.absolute(((Integer) itemId).intValue());
- value = result.getObject((String) propertyId);
- } catch (final Exception e) {
- return null;
- }
-
- // Handle also null values from the database
- return new ObjectProperty<Object>(value != null ? value
- : new String(""));
- }
-
- /**
- * Gets the data type of all properties identified by the given type ID.
- *
- * @param id
- * ID identifying the Properties
- *
- * @return data type of the Properties
- */
-
- @Override
- public Class<?> getType(Object id) {
- return propertyTypes.get(id);
- }
-
- /**
- * Gets the number of items in the container.
- *
- * @return the number of items in the container.
- */
- @Override
- public int size() {
- return size;
- }
-
- /**
- * Tests if the list contains the specified Item.
- *
- * @param id
- * ID the of Item to be tested.
- * @return <code>true</code> if given id is in the container;
- * <code>false</code> otherwise.
- */
- @Override
- public boolean containsId(Object id) {
- if (!(id instanceof Integer)) {
- return false;
- }
- final int i = ((Integer) id).intValue();
- if (i < 1) {
- return false;
- }
- if (i > size) {
- return false;
- }
- return true;
- }
-
- /**
- * Creates new Item with the given ID into the Container.
- *
- * @param itemId
- * ID of the Item to be created.
- *
- * @return Created new Item, or <code>null</code> if it fails.
- *
- * @throws UnsupportedOperationException
- * if the addItem method is not supported.
- */
- @Override
- public Item addItem(Object itemId) throws UnsupportedOperationException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Creates a new Item into the Container, and assign it an ID.
- *
- * @return ID of the newly created Item, or <code>null</code> if it fails.
- * @throws UnsupportedOperationException
- * if the addItem method is not supported.
- */
- @Override
- public Object addItem() throws UnsupportedOperationException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Removes the Item identified by ItemId from the Container.
- *
- * @param itemId
- * ID of the Item to remove.
- * @return <code>true</code> if the operation succeeded; <code>false</code>
- * otherwise.
- * @throws UnsupportedOperationException
- * if the removeItem method is not supported.
- */
- @Override
- public boolean removeItem(Object itemId)
- throws UnsupportedOperationException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Adds new Property to all Items in the Container.
- *
- * @param propertyId
- * ID of the Property
- * @param type
- * Data type of the new Property
- * @param defaultValue
- * The value all created Properties are initialized to.
- * @return <code>true</code> if the operation succeeded; <code>false</code>
- * otherwise.
- * @throws UnsupportedOperationException
- * if the addContainerProperty method is not supported.
- */
- @Override
- public boolean addContainerProperty(Object propertyId, Class<?> type,
- Object defaultValue) throws UnsupportedOperationException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Removes a Property specified by the given Property ID from the Container.
- *
- * @param propertyId
- * ID of the Property to remove
- * @return <code>true</code> if the operation succeeded; <code>false</code>
- * otherwise.
- * @throws UnsupportedOperationException
- * if the removeContainerProperty method is not supported.
- */
- @Override
- public boolean removeContainerProperty(Object propertyId)
- throws UnsupportedOperationException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Removes all Items from the Container.
- *
- * @return <code>true</code> if the operation succeeded; <code>false</code>
- * otherwise.
- * @throws UnsupportedOperationException
- * if the removeAllItems method is not supported.
- */
- @Override
- public boolean removeAllItems() throws UnsupportedOperationException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Adds new item after the given item.
- *
- * @param previousItemId
- * Id of the previous item in ordered container.
- * @param newItemId
- * Id of the new item to be added.
- * @return Returns new item or <code>null</code> if the operation fails.
- * @throws UnsupportedOperationException
- * if the addItemAfter method is not supported.
- */
- @Override
- public Item addItemAfter(Object previousItemId, Object newItemId)
- throws UnsupportedOperationException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Adds new item after the given item.
- *
- * @param previousItemId
- * Id of the previous item in ordered container.
- * @return Returns item id created new item or <code>null</code> if the
- * operation fails.
- * @throws UnsupportedOperationException
- * if the addItemAfter method is not supported.
- */
- @Override
- public Object addItemAfter(Object previousItemId)
- throws UnsupportedOperationException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Returns id of first item in the Container.
- *
- * @return ID of the first Item in the list.
- */
- @Override
- public Object firstItemId() {
- if (size < 1) {
- return null;
- }
- return new Integer(1);
- }
-
- /**
- * Returns <code>true</code> if given id is first id at first index.
- *
- * @param id
- * ID of an Item in the Container.
- */
- @Override
- public boolean isFirstId(Object id) {
- return size > 0 && (id instanceof Integer)
- && ((Integer) id).intValue() == 1;
- }
-
- /**
- * Returns <code>true</code> if given id is last id at last index.
- *
- * @param id
- * ID of an Item in the Container
- *
- */
- @Override
- public boolean isLastId(Object id) {
- return size > 0 && (id instanceof Integer)
- && ((Integer) id).intValue() == size;
- }
-
- /**
- * Returns id of last item in the Container.
- *
- * @return ID of the last Item.
- */
- @Override
- public Object lastItemId() {
- if (size < 1) {
- return null;
- }
- return new Integer(size);
- }
-
- /**
- * Returns id of next item in container at next index.
- *
- * @param id
- * ID of an Item in the Container.
- * @return ID of the next Item or null.
- */
- @Override
- public Object nextItemId(Object id) {
- if (size < 1 || !(id instanceof Integer)) {
- return null;
- }
- final int i = ((Integer) id).intValue();
- if (i >= size) {
- return null;
- }
- return new Integer(i + 1);
- }
-
- /**
- * Returns id of previous item in container at previous index.
- *
- * @param id
- * ID of an Item in the Container.
- * @return ID of the previous Item or null.
- */
- @Override
- public Object prevItemId(Object id) {
- if (size < 1 || !(id instanceof Integer)) {
- return null;
- }
- final int i = ((Integer) id).intValue();
- if (i <= 1) {
- return null;
- }
- return new Integer(i - 1);
- }
-
- /**
- * The <code>Row</code> class implements methods of Item.
- *
- * @author Vaadin Ltd.
- * @since 4.0
- */
- class Row implements Item {
-
- Object id;
-
- private Row(Object rowId) {
- id = rowId;
- }
-
- /**
- * Adds the item property.
- *
- * @param id
- * ID of the new Property.
- * @param property
- * Property to be added and associated with ID.
- * @return <code>true</code> if the operation succeeded;
- * <code>false</code> otherwise.
- * @throws UnsupportedOperationException
- * if the addItemProperty method is not supported.
- */
- @Override
- public boolean addItemProperty(Object id, Property property)
- throws UnsupportedOperationException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Gets the property corresponding to the given property ID stored in
- * the Item.
- *
- * @param propertyId
- * identifier of the Property to get
- * @return the Property with the given ID or <code>null</code>
- */
- @Override
- public Property<?> getItemProperty(Object propertyId) {
- return getContainerProperty(id, propertyId);
- }
-
- /**
- * Gets the collection of property IDs stored in the Item.
- *
- * @return unmodifiable collection containing IDs of the Properties
- * stored the Item.
- */
- @Override
- public Collection<String> getItemPropertyIds() {
- return propertyIds;
- }
-
- /**
- * Removes given item property.
- *
- * @param id
- * ID of the Property to be removed.
- * @return <code>true</code> if the item property is removed;
- * <code>false</code> otherwise.
- * @throws UnsupportedOperationException
- * if the removeItemProperty is not supported.
- */
- @Override
- public boolean removeItemProperty(Object id)
- throws UnsupportedOperationException {
- throw new UnsupportedOperationException();
- }
-
- }
-
- /**
- * Closes the statement.
- *
- * @see #close()
- */
- @Override
- public void finalize() {
- try {
- close();
- } catch (final SQLException ignored) {
-
- }
- }
-
- /**
- * Adds the given item at the position of given index.
- *
- * @param index
- * Index to add the new item.
- * @param newItemId
- * Id of the new item to be added.
- * @return new item or <code>null</code> if the operation fails.
- * @throws UnsupportedOperationException
- * if the addItemAt is not supported.
- */
- @Override
- public Item addItemAt(int index, Object newItemId)
- throws UnsupportedOperationException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Adds item at the position of provided index in the container.
- *
- * @param index
- * Index to add the new item.
- * @return item id created new item or <code>null</code> if the operation
- * fails.
- *
- * @throws UnsupportedOperationException
- * if the addItemAt is not supported.
- */
-
- @Override
- public Object addItemAt(int index) throws UnsupportedOperationException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Gets the Index id in the container.
- *
- * @param index
- * Index Id.
- * @return ID in the given index.
- */
- @Override
- public Object getIdByIndex(int index) {
- if (size < 1 || index < 0 || index >= size) {
- return null;
- }
- return new Integer(index + 1);
- }
-
- /**
- * Gets the index of the Item corresponding to id in the container.
- *
- * @param id
- * ID of an Item in the Container
- * @return index of the Item, or -1 if the Container does not include the
- * Item
- */
-
- @Override
- public int indexOfId(Object id) {
- if (size < 1 || !(id instanceof Integer)) {
- return -1;
- }
- final int i = ((Integer) id).intValue();
- if (i >= size || i < 1) {
- return -1;
- }
- return i - 1;
- }
-
-}
diff --git a/server/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java b/server/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java
index 0146c92b5c..6e5ba0dc57 100644
--- a/server/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java
+++ b/server/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java
@@ -69,7 +69,9 @@ final public class ColumnProperty implements Property {
* @param value
* @param type
*
- * @deprecated
+ * @deprecated as of 7.0. Use
+ * {@link #ColumnProperty(String, boolean, boolean, boolean, boolean, Object, Class)
+ * instead
*/
@Deprecated
public ColumnProperty(String propertyId, boolean readOnly,
@@ -144,7 +146,7 @@ final public class ColumnProperty implements Property {
@Override
public void setValue(Object newValue) throws ReadOnlyException,
- ConversionException {
+ ConversionException {
if (newValue == null && !nullable) {
throw new NotNullableException(
"Null values are not allowed for this property.");
diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java
index 1eb95311cd..585e3e2513 100644
--- a/server/src/com/vaadin/ui/AbstractComponent.java
+++ b/server/src/com/vaadin/ui/AbstractComponent.java
@@ -121,34 +121,6 @@ public abstract class AbstractComponent extends AbstractClientConnector
return getState().getDebugId();
}
- /**
- * Gets style for component. Multiple styles are joined with spaces.
- *
- * @return the component's styleValue of property style.
- * @deprecated Use getStyleName() instead; renamed for consistency and to
- * indicate that "style" should not be used to switch client
- * side implementation, only to style the component.
- */
- @Deprecated
- public String getStyle() {
- return getStyleName();
- }
-
- /**
- * Sets and replaces all previous style names of the component. This method
- * will trigger a {@link RepaintRequestEvent}.
- *
- * @param style
- * the new style of the component.
- * @deprecated Use setStyleName() instead; renamed for consistency and to
- * indicate that "style" should not be used to switch client
- * side implementation, only to style the component.
- */
- @Deprecated
- public void setStyle(String style) {
- setStyleName(style);
- }
-
/*
* Gets the component's style. Don't add a JavaDoc comment here, we use the
* default documentation from implemented interface.
diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java
index cac9c05fb8..ce6a3eafbd 100644
--- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java
+++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java
@@ -232,19 +232,6 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
}
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.ui.Layout.AlignmentHandler#setComponentAlignment(com
- * .vaadin.ui.Component, int, int)
- */
- @Override
- public void setComponentAlignment(Component childComponent,
- int horizontalAlignment, int verticalAlignment) {
- Alignment a = new Alignment(horizontalAlignment + verticalAlignment);
- setComponentAlignment(childComponent, a);
- }
-
@Override
public void setComponentAlignment(Component childComponent,
Alignment alignment) {
diff --git a/server/src/com/vaadin/ui/DragAndDropWrapper.java b/server/src/com/vaadin/ui/DragAndDropWrapper.java
index 3fd94210d8..1c41de81a0 100644
--- a/server/src/com/vaadin/ui/DragAndDropWrapper.java
+++ b/server/src/com/vaadin/ui/DragAndDropWrapper.java
@@ -156,22 +156,6 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
.valueOf((String) getData("horizontalLocation"));
}
- /**
- * @deprecated use {@link #getVerticalDropLocation()} instead
- */
- @Deprecated
- public VerticalDropLocation verticalDropLocation() {
- return getVerticalDropLocation();
- }
-
- /**
- * @deprecated use {@link #getHorizontalDropLocation()} instead
- */
- @Deprecated
- public HorizontalDropLocation horizontalDropLocation() {
- return getHorizontalDropLocation();
- }
-
}
public enum DragStartMode {
diff --git a/server/src/com/vaadin/ui/GridLayout.java b/server/src/com/vaadin/ui/GridLayout.java
index 52aef4c253..5abfb1a22e 100644
--- a/server/src/com/vaadin/ui/GridLayout.java
+++ b/server/src/com/vaadin/ui/GridLayout.java
@@ -806,14 +806,6 @@ public class GridLayout extends AbstractLayout implements
}
/**
- * @deprecated Use {@link #getColumn1()} instead.
- */
- @Deprecated
- public int getX1() {
- return getColumn1();
- }
-
- /**
* Gets the column of the top-left corner cell.
*
* @return the column of the top-left corner cell.
@@ -823,14 +815,6 @@ public class GridLayout extends AbstractLayout implements
}
/**
- * @deprecated Use {@link #getColumn2()} instead.
- */
- @Deprecated
- public int getX2() {
- return getColumn2();
- }
-
- /**
* Gets the column of the bottom-right corner cell.
*
* @return the column of the bottom-right corner cell.
@@ -840,14 +824,6 @@ public class GridLayout extends AbstractLayout implements
}
/**
- * @deprecated Use {@link #getRow1()} instead.
- */
- @Deprecated
- public int getY1() {
- return getRow1();
- }
-
- /**
* Gets the row of the top-left corner cell.
*
* @return the row of the top-left corner cell.
@@ -857,14 +833,6 @@ public class GridLayout extends AbstractLayout implements
}
/**
- * @deprecated Use {@link #getRow2()} instead.
- */
- @Deprecated
- public int getY2() {
- return getRow2();
- }
-
- /**
* Gets the row of the bottom-right corner cell.
*
* @return the row of the bottom-right corner cell.
@@ -1149,20 +1117,6 @@ public class GridLayout extends AbstractLayout implements
cursorY = 0;
}
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.ui.Layout.AlignmentHandler#setComponentAlignment(com
- * .vaadin.ui.Component, int, int)
- */
- @Override
- public void setComponentAlignment(Component childComponent,
- int horizontalAlignment, int verticalAlignment) {
- componentToAlignment.put(childComponent, new Alignment(
- horizontalAlignment + verticalAlignment));
- requestRepaint();
- }
-
@Override
public void setComponentAlignment(Component childComponent,
Alignment alignment) {
diff --git a/server/src/com/vaadin/ui/Layout.java b/server/src/com/vaadin/ui/Layout.java
index 9c7cd2b477..b32cf8c47d 100644
--- a/server/src/com/vaadin/ui/Layout.java
+++ b/server/src/com/vaadin/ui/Layout.java
@@ -18,7 +18,6 @@ package com.vaadin.ui;
import java.io.Serializable;
-import com.vaadin.shared.ui.AlignmentInfo.Bits;
import com.vaadin.shared.ui.MarginInfo;
/**
@@ -39,74 +38,6 @@ public interface Layout extends ComponentContainer, Serializable {
public interface AlignmentHandler extends Serializable {
/**
- * Contained component should be aligned horizontally to the left.
- *
- * @deprecated Use of {@link Alignment} class and its constants
- */
- @Deprecated
- public static final int ALIGNMENT_LEFT = Bits.ALIGNMENT_LEFT;
-
- /**
- * Contained component should be aligned horizontally to the right.
- *
- * @deprecated Use of {@link Alignment} class and its constants
- */
- @Deprecated
- public static final int ALIGNMENT_RIGHT = Bits.ALIGNMENT_RIGHT;
-
- /**
- * Contained component should be aligned vertically to the top.
- *
- * @deprecated Use of {@link Alignment} class and its constants
- */
- @Deprecated
- public static final int ALIGNMENT_TOP = Bits.ALIGNMENT_TOP;
-
- /**
- * Contained component should be aligned vertically to the bottom.
- *
- * @deprecated Use of {@link Alignment} class and its constants
- */
- @Deprecated
- public static final int ALIGNMENT_BOTTOM = Bits.ALIGNMENT_BOTTOM;
-
- /**
- * Contained component should be horizontally aligned to center.
- *
- * @deprecated Use of {@link Alignment} class and its constants
- */
- @Deprecated
- public static final int ALIGNMENT_HORIZONTAL_CENTER = Bits.ALIGNMENT_HORIZONTAL_CENTER;
-
- /**
- * Contained component should be vertically aligned to center.
- *
- * @deprecated Use of {@link Alignment} class and its constants
- */
- @Deprecated
- public static final int ALIGNMENT_VERTICAL_CENTER = Bits.ALIGNMENT_VERTICAL_CENTER;
-
- /**
- * Set alignment for one contained component in this layout. Alignment
- * is calculated as a bit mask of the two passed values.
- *
- * @deprecated Use {@link #setComponentAlignment(Component, Alignment)}
- * instead
- *
- * @param childComponent
- * the component to align within it's layout cell.
- * @param horizontalAlignment
- * the horizontal alignment for the child component (left,
- * center, right). Use ALIGNMENT constants.
- * @param verticalAlignment
- * the vertical alignment for the child component (top,
- * center, bottom). Use ALIGNMENT constants.
- */
- @Deprecated
- public void setComponentAlignment(Component childComponent,
- int horizontalAlignment, int verticalAlignment);
-
- /**
* Set alignment for one contained component in this layout. Use
* predefined alignments from Alignment class.
*
diff --git a/server/src/com/vaadin/ui/PopupView.java b/server/src/com/vaadin/ui/PopupView.java
index 4a5814f660..198ba00ed2 100644
--- a/server/src/com/vaadin/ui/PopupView.java
+++ b/server/src/com/vaadin/ui/PopupView.java
@@ -160,22 +160,6 @@ public class PopupView extends AbstractComponentContainer implements
}
/**
- * @deprecated Use {@link #setPopupVisible()} instead.
- */
- @Deprecated
- public void setPopupVisibility(boolean visible) {
- setPopupVisible(visible);
- }
-
- /**
- * @deprecated Use {@link #isPopupVisible()} instead.
- */
- @Deprecated
- public boolean getPopupVisibility() {
- return isPopupVisible();
- }
-
- /**
* Set the visibility of the popup. Does not hide the minimal
* representation.
*
diff --git a/server/src/com/vaadin/ui/RichTextArea.java b/server/src/com/vaadin/ui/RichTextArea.java
index e3d1168559..e954f78700 100644
--- a/server/src/com/vaadin/ui/RichTextArea.java
+++ b/server/src/com/vaadin/ui/RichTextArea.java
@@ -16,7 +16,6 @@
package com.vaadin.ui;
-import java.text.Format;
import java.util.Map;
import com.vaadin.data.Property;
@@ -35,12 +34,6 @@ public class RichTextArea extends AbstractField<String> implements
Vaadin6Component {
/**
- * Value formatter used to format the string contents.
- */
- @Deprecated
- private Format format;
-
- /**
* Null representation.
*/
private String nullRepresentation = "null";
@@ -123,7 +116,7 @@ public class RichTextArea extends AbstractField<String> implements
}
// Adds the content as variable
- String value = getFormattedValue();
+ String value = getValue();
if (value == null) {
value = getNullRepresentation();
}
@@ -167,37 +160,6 @@ public class RichTextArea extends AbstractField<String> implements
requestRepaint();
}
- /**
- * Gets the formatted string value. Sets the field value by using the
- * assigned Format.
- *
- * @return the Formatted value.
- * @see #setFormat(Format)
- * @see Format
- * @deprecated
- */
- @Deprecated
- protected String getFormattedValue() {
- Object v = getValue();
- if (v == null) {
- return null;
- }
- return v.toString();
- }
-
- @Override
- public String getValue() {
- String v = super.getValue();
- if (format == null || v == null) {
- return v;
- }
- try {
- return format.format(v);
- } catch (final IllegalArgumentException e) {
- return v;
- }
- }
-
@Override
public void changeVariables(Object source, Map<String, Object> variables) {
// Sets the text
@@ -207,7 +169,7 @@ public class RichTextArea extends AbstractField<String> implements
// has been updated
String newValue = (String) variables.get("text");
- final String oldValue = getFormattedValue();
+ final String oldValue = getValue();
if (newValue != null
&& (oldValue == null || isNullSettingAllowed())
&& newValue.equals(getNullRepresentation())) {
@@ -218,9 +180,9 @@ public class RichTextArea extends AbstractField<String> implements
boolean wasModified = isModified();
setValue(newValue, true);
- // If the modified status changes, or if we have a formatter,
+ // If the modified status changes,
// repaint is needed after all.
- if (format != null || wasModified != isModified()) {
+ if (wasModified != isModified()) {
requestRepaint();
}
}
@@ -323,31 +285,6 @@ public class RichTextArea extends AbstractField<String> implements
this.nullSettingAllowed = nullSettingAllowed;
}
- /**
- * Gets the value formatter of TextField.
- *
- * @return the Format used to format the value.
- * @deprecated replaced by {@link com.vaadin.data.util.PropertyFormatter}
- */
- @Deprecated
- public Format getFormat() {
- return format;
- }
-
- /**
- * Gets the value formatter of TextField.
- *
- * @param format
- * the Format used to format the value. Null disables the
- * formatting.
- * @deprecated replaced by {@link com.vaadin.data.util.PropertyFormatter}
- */
- @Deprecated
- public void setFormat(Format format) {
- this.format = format;
- requestRepaint();
- }
-
@Override
protected boolean isEmpty() {
return super.isEmpty() || getValue().length() == 0;
diff --git a/server/src/com/vaadin/ui/Select.java b/server/src/com/vaadin/ui/Select.java
index 698350cb30..898728b9cd 100644
--- a/server/src/com/vaadin/ui/Select.java
+++ b/server/src/com/vaadin/ui/Select.java
@@ -697,40 +697,6 @@ public class Select extends AbstractSelect implements AbstractSelect.Filtering,
return filteringMode;
}
- /**
- * Note, one should use more generic setWidth(String) method instead of
- * this. This now days actually converts columns to width with em css unit.
- *
- * Sets the number of columns in the editor. If the number of columns is set
- * 0, the actual number of displayed columns is determined implicitly by the
- * adapter.
- *
- * @deprecated
- *
- * @param columns
- * the number of columns to set.
- */
- @Deprecated
- public void setColumns(int columns) {
- if (columns < 0) {
- columns = 0;
- }
- if (this.columns != columns) {
- this.columns = columns;
- setWidth(columns, Select.UNITS_EM);
- requestRepaint();
- }
- }
-
- /**
- * @deprecated see setter function
- * @return
- */
- @Deprecated
- public int getColumns() {
- return columns;
- }
-
@Override
public void addListener(BlurListener listener) {
addListener(BlurEvent.EVENT_ID, BlurEvent.class, listener,
diff --git a/server/src/com/vaadin/ui/TabSheet.java b/server/src/com/vaadin/ui/TabSheet.java
index 5a1aa02845..868d97a09c 100644
--- a/server/src/com/vaadin/ui/TabSheet.java
+++ b/server/src/com/vaadin/ui/TabSheet.java
@@ -361,8 +361,9 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
String caption = null;
Resource icon = null;
if (TabSheet.class.isAssignableFrom(source.getClass())) {
- caption = ((TabSheet) source).getTabCaption(c);
- icon = ((TabSheet) source).getTabIcon(c);
+ Tab tab = ((TabSheet) source).getTab(c);
+ caption = tab.getCaption();
+ icon = tab.getIcon();
}
source.removeComponent(c);
addTab(c, caption, icon);
@@ -478,82 +479,6 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
}
/**
- * Gets tab caption. The tab is identified by the tab content component.
- *
- * @param c
- * the component in the tab
- * @deprecated Use {@link #getTab(Component)} and {@link Tab#getCaption()}
- * instead.
- */
- @Deprecated
- public String getTabCaption(Component c) {
- Tab info = tabs.get(c);
- if (info == null) {
- return "";
- } else {
- return info.getCaption();
- }
- }
-
- /**
- * Sets tab caption. The tab is identified by the tab content component.
- *
- * @param c
- * the component in the tab
- * @param caption
- * the caption to set.
- * @deprecated Use {@link #getTab(Component)} and
- * {@link Tab#setCaption(String)} instead.
- */
- @Deprecated
- public void setTabCaption(Component c, String caption) {
- Tab info = tabs.get(c);
- if (info != null) {
- info.setCaption(caption);
- requestRepaint();
- }
- }
-
- /**
- * Gets the icon for a tab. The tab is identified by the tab content
- * component.
- *
- * @param c
- * the component in the tab
- * @deprecated Use {@link #getTab(Component)} and {@link Tab#getIcon()}
- * instead.
- */
- @Deprecated
- public Resource getTabIcon(Component c) {
- Tab info = tabs.get(c);
- if (info == null) {
- return null;
- } else {
- return info.getIcon();
- }
- }
-
- /**
- * Sets icon for the given component. The tab is identified by the tab
- * content component.
- *
- * @param c
- * the component in the tab
- * @param icon
- * the icon to set
- * @deprecated Use {@link #getTab(Component)} and
- * {@link Tab#setIcon(Resource)} instead.
- */
- @Deprecated
- public void setTabIcon(Component c, Resource icon) {
- Tab info = tabs.get(c);
- if (info != null) {
- info.setIcon(icon);
- requestRepaint();
- }
- }
-
- /**
* Returns the {@link Tab} (metadata) for a component. The {@link Tab}
* object can be used for setting caption,icon, etc for the tab.
*
diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java
index 2bbb69beaf..120d1f9810 100644
--- a/server/src/com/vaadin/ui/Table.java
+++ b/server/src/com/vaadin/ui/Table.java
@@ -1507,31 +1507,6 @@ public class Table extends AbstractSelect implements Action.Container,
}
/**
- * Getter for property pageBuffering.
- *
- * @deprecated functionality is not needed in ajax rendering model
- *
- * @return the Value of property pageBuffering.
- */
- @Deprecated
- public boolean isPageBufferingEnabled() {
- return true;
- }
-
- /**
- * Setter for property pageBuffering.
- *
- * @deprecated functionality is not needed in ajax rendering model
- *
- * @param pageBuffering
- * the New value of property pageBuffering.
- */
- @Deprecated
- public void setPageBufferingEnabled(boolean pageBuffering) {
-
- }
-
- /**
* Getter for property selectable.
*
* <p>
@@ -2230,16 +2205,6 @@ public class Table extends AbstractSelect implements Action.Container,
}
/**
- * Refreshes the current page contents.
- *
- * @deprecated should not need to be used
- */
- @Deprecated
- public void refreshCurrentPage() {
-
- }
-
- /**
* Sets the row header mode.
* <p>
* The mode can be one of the following ones:
diff --git a/server/src/com/vaadin/ui/Upload.java b/server/src/com/vaadin/ui/Upload.java
index c4f15ebea9..b50ba03835 100644
--- a/server/src/com/vaadin/ui/Upload.java
+++ b/server/src/com/vaadin/ui/Upload.java
@@ -856,33 +856,6 @@ public class Upload extends AbstractComponent implements Component.Focusable,
}
/**
- * This method is deprecated, use addListener(ProgressListener) instead.
- *
- * @deprecated Use addListener(ProgressListener) instead.
- * @param progressListener
- */
- @Deprecated
- public void setProgressListener(ProgressListener progressListener) {
- addListener(progressListener);
- }
-
- /**
- * This method is deprecated.
- *
- * @deprecated Replaced with addListener/removeListener
- * @return listener
- *
- */
- @Deprecated
- public ProgressListener getProgressListener() {
- if (progressListeners == null || progressListeners.isEmpty()) {
- return null;
- } else {
- return progressListeners.iterator().next();
- }
- }
-
- /**
* ProgressListener receives events to track progress of upload.
*/
public interface ProgressListener extends Serializable {
diff --git a/server/src/com/vaadin/ui/themes/BaseTheme.java b/server/src/com/vaadin/ui/themes/BaseTheme.java
index bdb0087d2e..9e95627eec 100644
--- a/server/src/com/vaadin/ui/themes/BaseTheme.java
+++ b/server/src/com/vaadin/ui/themes/BaseTheme.java
@@ -45,18 +45,6 @@ public class BaseTheme {
public static final String BUTTON_LINK = "link";
/**
- * Removes extra decorations from the panel.
- *
- * @deprecated Base theme does not implement this style, but it is defined
- * here since it has been a part of the framework before
- * multiple themes were available. Use the constant provided by
- * the theme you're using instead, e.g.
- * {@link Reindeer#PANEL_LIGHT} or {@link Runo#PANEL_LIGHT}.
- */
- @Deprecated
- public static final String PANEL_LIGHT = "light";
-
- /**
* Adds the connector lines between a parent node and its child nodes to
* indicate the tree hierarchy better.
*/
diff --git a/server/src/com/vaadin/ui/themes/Reindeer.java b/server/src/com/vaadin/ui/themes/Reindeer.java
index 7bc6720465..037f59d7b4 100644
--- a/server/src/com/vaadin/ui/themes/Reindeer.java
+++ b/server/src/com/vaadin/ui/themes/Reindeer.java
@@ -48,12 +48,6 @@ public class Reindeer extends BaseTheme {
*/
public static final String LABEL_SMALL = "light";
- /**
- * @deprecated Use {@link #LABEL_SMALL} instead.
- */
- @Deprecated
- public static final String LABEL_LIGHT = "small";
-
/***************************************************************************
*
* Button styles
@@ -68,12 +62,6 @@ public class Reindeer extends BaseTheme {
public static final String BUTTON_DEFAULT = "primary";
/**
- * @deprecated Use {@link #BUTTON_DEFAULT} instead
- */
- @Deprecated
- public static final String BUTTON_PRIMARY = BUTTON_DEFAULT;
-
- /**
* Small sized button, use for context specific actions for example
*/
public static final String BUTTON_SMALL = "small";
@@ -129,12 +117,6 @@ public class Reindeer extends BaseTheme {
public static final String TABSHEET_SMALL = "bar";
/**
- * @deprecated Use {@link #TABSHEET_SMALL} instead.
- */
- @Deprecated
- public static final String TABSHEET_BAR = TABSHEET_SMALL;
-
- /**
* Removes borders and background color from the tab sheet. The tabs are
* presented with minimal lines indicating the selected tab.
*/