summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-08-22 21:48:34 +0300
committerArtur Signell <artur@vaadin.com>2012-08-22 22:24:34 +0300
commit8d2d0adb625f478658b7115ae2dfb007aad079b5 (patch)
treeb25f26f846a111a0eb557a377357568fb14ee898 /server/src/com/vaadin/ui
parentaf2638fc57cf3d9f6dc84957bb6ee4b256ec60e7 (diff)
downloadvaadin-framework-8d2d0adb625f478658b7115ae2dfb007aad079b5.tar.gz
vaadin-framework-8d2d0adb625f478658b7115ae2dfb007aad079b5.zip
Removed API deprecated in Vaadin 6 (#9071)
Diffstat (limited to 'server/src/com/vaadin/ui')
-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
13 files changed, 7 insertions, 459 deletions
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.
*/