Skip to content

Commit

Permalink
Merge pull request #366 from tedpet/integration
Browse files Browse the repository at this point in the history
ERDEditDatePopupCommon.java
  • Loading branch information
darkv committed Jan 25, 2013
2 parents 7c57b65 + 27c5882 commit 42c09ed
Showing 1 changed file with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ public class ERDEditDatePopupCommon extends ERDCustomEditComponent {
protected String month;
protected String year;
public String currentMonth;
protected NSMutableArray yearList;
protected static NSArray monthList;
protected NSArray monthNameList;
protected static NSArray defaultMonthNameList;
protected static NSArray dayList;
protected NSMutableArray<String> yearList;
protected static NSArray<String> monthList;
protected NSArray<String> monthNameList;
protected static NSArray<String> defaultMonthNameList;
protected static NSArray<String> dayList;

protected static final NSTimestampFormatter DAY_FORMAT =
new NSTimestampFormatter("%d");
Expand Down Expand Up @@ -83,43 +83,44 @@ public void reset() {
monthNameList = null;
}

public NSArray dayList() {
public NSArray<String> dayList() {
if (dayList == null) {
dayList = new NSMutableArray(new Object[] {
dayList = new NSMutableArray<String> (
"01","02","03","04","05","06","07","08","09","10",
"11","12","13","14","15","16","17","18","19","20",
"21","22","23","24","25","26","27","28","29","30","31"
});
);
}
return dayList;
}

public NSArray monthNameList() {
@SuppressWarnings("unchecked")
public NSArray<String> monthNameList() {
if (monthNameList == null) {
monthNameList = (NSArray)ERXLocalizer.currentLocalizer().valueForKey("ERDDatePopup.monthList");
monthNameList = (NSArray<String>)ERXLocalizer.currentLocalizer().valueForKey("ERDDatePopup.monthList");
if(monthNameList == null) {
if(defaultMonthNameList == null) {
defaultMonthNameList = new NSArray(new Object[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"});
defaultMonthNameList = new NSArray<String>("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
}
monthNameList = defaultMonthNameList;
}
}
return monthNameList;
}

public NSArray monthList() {
public NSArray<String> monthList() {
if (monthList == null) {
monthList = new NSArray(new Object[] {
monthList = new NSArray<String>(
"01","02","03","04","05","06",
"07","08","09","10","11","12"
});
);
}
return monthList;
}

public NSArray yearList() {
public NSArray<String> yearList() {
if (yearList == null) {
yearList = new NSMutableArray();
yearList = new NSMutableArray<String>();
int startYear = 1950, endYear = 2050;
String yearRangeTop = null, yearRangeBottom = null;
if ((valueForBinding("yearRangeTop") != null) && (valueForBinding("yearRangeBottom") != null)) {
Expand Down

0 comments on commit 42c09ed

Please sign in to comment.