Selaa lähdekoodia

Suppressed warnings

Replaced deprecated classes with new ones

svn changeset:16017/svn branch:6.5
tags/6.7.0.beta1
Artur Signell 13 vuotta sitten
vanhempi
commit
4d32a233c6

+ 2
- 3
src/com/vaadin/terminal/gwt/client/ApplicationConnection.java Näytä tiedosto

@@ -140,8 +140,8 @@ public class ApplicationConnection {
private Set<Paintable> zeroHeightComponents = null;

/**
* Keeps track of if there are (potentially) {@link DeferredCommand}s that
* are being executed. 0 == no DeferredCommands currently in progress, > 0
* Keeps track of if there are (potentially) deferred commands that are
* being executed. 0 == no deferred commands currently in progress, > 0
* otherwise.
*/
private int deferredCommandTrackers = 0;
@@ -762,7 +762,6 @@ public class ApplicationConnection {
*
* @return
*/
@SuppressWarnings("unused")
private boolean isExecutingDeferredCommands() {
return (deferredCommandTrackers > 0);
}

+ 0
- 2
src/com/vaadin/terminal/gwt/client/DateTimeService.java Näytä tiedosto

@@ -311,7 +311,6 @@ public class DateTimeService {
private String formatMonthNames(Date date, String formatStr) {
if (formatStr.contains("MMMM")) {
@SuppressWarnings("deprecation")
String monthName = getMonth(date.getMonth());
if (monthName != null) {
@@ -332,7 +331,6 @@ public class DateTimeService {
if (formatStr.contains("MMM")) {
@SuppressWarnings("deprecation")
String monthName = getShortMonth(date.getMonth());
if (monthName != null) {

+ 0
- 2
src/com/vaadin/terminal/gwt/client/HistoryImplIEVaadin.java Näytä tiedosto

@@ -70,7 +70,6 @@ public class HistoryImplIEVaadin extends HistoryImpl {
* untrusted string that may contain html
* @return sanitized string
*/
@SuppressWarnings("unused")
private static String escapeHtml(String maybeHtml) {
final Element div = DOM.createDiv();
DOM.setInnerText(div, maybeHtml);
@@ -82,7 +81,6 @@ public class HistoryImplIEVaadin extends HistoryImpl {
* the fragment contains a '?'. To avoid this bug, we use location.href
* instead.
*/
@SuppressWarnings("unused")
private static native String getLocationHash()
/*-{
var href = $wnd.location.href;

+ 2
- 0
src/com/vaadin/terminal/gwt/client/ui/CalendarEntry.java Näytä tiedosto

@@ -16,6 +16,7 @@ public class CalendarEntry {
private String description;
private boolean notime;
@SuppressWarnings("deprecation")
public CalendarEntry(String styleName, Date start, Date end, String title,
String description, boolean notime) {
this.styleName = styleName;
@@ -90,6 +91,7 @@ public class CalendarEntry {
this.notime = notime;
}
@SuppressWarnings("deprecation")
public String getStringForDate(Date d) {
// TODO format from DateTimeService
String s = "";

+ 2
- 0
src/com/vaadin/terminal/gwt/client/ui/VDateFieldCalendar.java Näytä tiedosto

@@ -45,6 +45,7 @@ public class VDateFieldCalendar extends VDateField {
}
@Override
@SuppressWarnings("deprecation")
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
super.updateFromUIDL(uidl, client);
calendarPanel.setShowISOWeekNumbers(isShowISOWeekNumbers());
@@ -103,6 +104,7 @@ public class VDateFieldCalendar extends VDateField {
/**
* TODO refactor: almost same method as in VPopupCalendar.updateValue
*/
@SuppressWarnings("deprecation")
private void updateValueFromPanel() {
Date date2 = calendarPanel.getDate();
Date currentDate = getCurrentDate();

+ 2
- 0
src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java Näytä tiedosto

@@ -99,6 +99,7 @@ public class VPopupCalendar extends VTextualDate implements Paintable, Field,
}
@SuppressWarnings("deprecation")
private void updateValue(Date newDate) {
Date currentDate = getCurrentDate();
if (currentDate == null || newDate.getTime() != currentDate.getTime()) {
@@ -148,6 +149,7 @@ public class VPopupCalendar extends VTextualDate implements Paintable, Field,
* com.vaadin.terminal.gwt.client.ApplicationConnection)
*/
@Override
@SuppressWarnings("deprecation")
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
boolean lastReadOnlyState = readonly;
parsable = uidl.getBooleanAttribute("parsable");

+ 1
- 0
src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java Näytä tiedosto

@@ -211,6 +211,7 @@ public class VTextualDate extends VDateField implements Paintable, Field,
}
}

@SuppressWarnings("deprecation")
public void onChange(ChangeEvent event) {
if (!text.getText().equals("")) {
try {

+ 89
- 88
tests/src/com/vaadin/tests/layouts/OrderedLayoutBasics.java Näytä tiedosto

@@ -18,6 +18,7 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Select;
import com.vaadin.ui.TextArea;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
@@ -1073,43 +1074,43 @@ public class OrderedLayoutBasics extends TestBase {
// ol.setWidth("");
ol.setCaption("100 % filled with fixed width (" + ol.getWidth()
+ "px) and fixed height (" + ol.getHeight() + "px)");
TextField tf;
tf = new TextField();
tf.setCaption("This one has a caption");
tf.setValue("60% expand TextField");
tf.setWidth("100%");
tf.setHeight("100%");
// tf.setRequired(true);
// tf.setComponentError(new UserError("It's broken!"));
// tf.setHeight("100%");
// tf.setWidth("100px");
tf.setRows(2);
ol.addComponent(tf);
ol.setExpandRatio(tf, 60);
tf = new TextField();
tf.setValue("100px 100px TextField");
tf.setWidth("100px");
tf.setHeight("100px");
tf.setRows(2);
ol.addComponent(tf);
ol.setComponentAlignment(tf, Alignment.MIDDLE_CENTER);
TextArea ta;
ta = new TextArea();
ta.setCaption("This one has a caption");
ta.setValue("60% expand TextField");
ta.setWidth("100%");
ta.setHeight("100%");
// ta.setRequired(true);
// ta.setComponentError(new UserError("It's broken!"));
// ta.setHeight("100%");
// ta.setWidth("100px");
ta.setRows(2);
ol.addComponent(ta);
ol.setExpandRatio(ta, 60);
ta = new TextArea();
ta.setValue("100px 100px TextField");
ta.setWidth("100px");
ta.setHeight("100px");
ta.setRows(2);
ol.addComponent(ta);
ol.setComponentAlignment(ta, Alignment.MIDDLE_CENTER);
//
tf = new TextField("40%x40% Field");
// tf.setCaption(null);
tf.setValue("40% expand (40% height) TextField");
tf.setWidth("100%");
tf.setHeight("40%");
ol.addComponent(tf);
ol.setExpandRatio(tf, 40);
// tf.setRequired(true);
ol.setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);
ta = new TextArea("40%x40% Field");
// ta.setCaption(null);
ta.setValue("40% expand (40% height) TextField");
ta.setWidth("100%");
ta.setHeight("40%");
ol.addComponent(ta);
ol.setExpandRatio(ta, 40);
// ta.setRequired(true);
ol.setComponentAlignment(ta, Alignment.BOTTOM_RIGHT);
tf.setRows(2);
ta.setRows(2);
return ol;
}
@@ -1124,32 +1125,32 @@ public class OrderedLayoutBasics extends TestBase {
// ol.setWidth("");
ol.setCaption("100 % filled with fixed width (" + ol.getWidth()
+ "px) and fixed height (" + ol.getHeight() + "px)");
TextField tf;
tf = new TextField();
// tf.setCaption("This one has a caption");
tf.setValue("80% x 20% TextField");
tf.setWidth("80%");
tf.setHeight("20%");
// tf.setRequired(true);
// tf.setComponentError(new UserError("It's broken!"));
// tf.setHeight("100%");
// tf.setWidth("100px");
tf.setRows(2);
ol.addComponent(tf);
TextArea ta;
ta = new TextArea();
// ta.setCaption("This one has a caption");
ta.setValue("80% x 20% TextField");
ta.setWidth("80%");
ta.setHeight("20%");
// ta.setRequired(true);
// ta.setComponentError(new UserError("It's broken!"));
// ta.setHeight("100%");
// ta.setWidth("100px");
ta.setRows(2);
ol.addComponent(ta);
//
tf = new TextField("20%x60% Field");
tf.setCaption(null);
tf.setValue("20% x 60% TextField");
tf.setWidth("20%");
tf.setHeight("60%");
// tf.setRequired(true);
ol.setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);
ta = new TextArea("20%x60% Field");
ta.setCaption(null);
ta.setValue("20% x 60% TextField");
ta.setWidth("20%");
ta.setHeight("60%");
// ta.setRequired(true);
ol.setComponentAlignment(ta, Alignment.BOTTOM_RIGHT);
tf.setRows(2);
ol.addComponent(tf);
ta.setRows(2);
ol.addComponent(ta);
return ol;
}
@@ -1163,38 +1164,38 @@ public class OrderedLayoutBasics extends TestBase {
// ol.setWidth("");
ol.setCaption("Underfilled with fixed width (" + ol.getWidth()
+ "px) and fixed height (" + ol.getHeight() + "px)");
TextField tf;
tf = new TextField("60%x100% Field");
tf.setCaption("Short capt");
tf.setValue("60% x 100% TextField");
tf.setWidth("60%");
tf.setHeight("100%");
tf.setRequired(true);
tf.setRows(2);
ol.addComponent(tf);
ol.setComponentAlignment(tf, Alignment.MIDDLE_CENTER);
tf = new TextField("200px x 200px Field");
// tf.setIcon(new ThemeResource("icons/16/document-add.png"));
tf.setValue("200x200 field");
tf.setRows(2);
// tf.setSizeFull();
tf.setHeight("200px");
tf.setWidth("200px");
ol.addComponent(tf);
ol.setComponentAlignment(tf, Alignment.TOP_LEFT);
tf = new TextField("200px x 200px Field");
// tf.setIcon(new ThemeResource("icons/16/document-add.png"));
tf.setValue("200x200 field");
tf.setRows(2);
// tf.setSizeFull();
tf.setHeight("200px");
tf.setWidth("200px");
ol.addComponent(tf);
ol.setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);
TextArea ta;
ta = new TextArea("60%x100% Field");
ta.setCaption("Short capt");
ta.setValue("60% x 100% TextField");
ta.setWidth("60%");
ta.setHeight("100%");
ta.setRequired(true);
ta.setRows(2);
ol.addComponent(ta);
ol.setComponentAlignment(ta, Alignment.MIDDLE_CENTER);
ta = new TextArea("200px x 200px Field");
// ta.setIcon(new ThemeResource("icons/16/document-add.png"));
ta.setValue("200x200 field");
ta.setRows(2);
// ta.setSizeFull();
ta.setHeight("200px");
ta.setWidth("200px");
ol.addComponent(ta);
ol.setComponentAlignment(ta, Alignment.TOP_LEFT);
ta = new TextArea("200px x 200px Field");
// ta.setIcon(new ThemeResource("icons/16/document-add.png"));
ta.setValue("200x200 field");
ta.setRows(2);
// ta.setSizeFull();
ta.setHeight("200px");
ta.setWidth("200px");
ol.addComponent(ta);
ol.setComponentAlignment(ta, Alignment.BOTTOM_RIGHT);
return ol;
}

Loading…
Peruuta
Tallenna