implement a few methods to make SWT 3.4 happy

This commit is contained in:
Joel Dice 2008-10-10 11:49:28 -06:00
parent f423d39b25
commit 96d7bf571d
3 changed files with 15 additions and 0 deletions

View File

@ -93,6 +93,11 @@ public class StringBuffer implements CharSequence {
return this;
}
public synchronized StringBuffer insert(int i, int v) {
sb.insert(i, v);
return this;
}
public synchronized StringBuffer delete(int start, int end) {
sb.delete(start, end);
return this;

View File

@ -154,6 +154,10 @@ public class StringBuilder implements CharSequence {
return insert(i, new String(new char[] { c }, 0, 1, false));
}
public StringBuilder insert(int i, int v) {
return insert(i, String.valueOf(v));
}
public StringBuilder delete(int start, int end) {
if (start >= end) {
return this;

View File

@ -45,6 +45,12 @@ public abstract class Calendar {
fields[field] = value;
}
public void set(int year, int month, int date) {
set(YEAR, year);
set(MONTH, month);
set(DAY_OF_MONTH, date);
}
public void setTime(Date date) {
time = date.getTime();
}