Skip to content

Commit b9c1598

Browse files
committed
Minor updates
1 parent 84ad5ec commit b9c1598

File tree

8 files changed

+74
-9
lines changed

8 files changed

+74
-9
lines changed

src/main/java/gwt/material/design/amcharts/client/TreeMap.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ public class TreeMap extends XYChart {
8282
@JsProperty
8383
public ListTemplate<TreeMapSeries> series;
8484

85+
/*
8586
@JsProperty
8687
public SpriteEventDispatcher<TreeMap> events;
88+
*/
8789

8890
@JsMethod
8991
public native void zoomToSeriesDataItem(TreeMapSeriesDataItem dataItem);

src/main/java/gwt/material/design/amcharts/client/axis/DateAxis.java

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,9 +28,12 @@
2828
import gwt.material.design.amcore.client.list.*;
2929
import gwt.material.design.amcore.client.properties.OrientationPoint;
3030
import jsinterop.annotations.JsMethod;
31+
import jsinterop.annotations.JsOverlay;
3132
import jsinterop.annotations.JsProperty;
3233
import jsinterop.annotations.JsType;
3334

35+
import java.util.Date;
36+
3437
@JsType(isNative = true, namespace = "am4charts")
3538
public class DateAxis extends ValueAxis {
3639

@@ -56,7 +59,7 @@ public class DateAxis extends ValueAxis {
5659
public boolean skipEmptyPeriods;
5760

5861
@JsProperty
59-
public String tooltipDateFormat ;
62+
public String tooltipDateFormat;
6063

6164
@JsProperty
6265
public DateAxisDataFields dataFields;
@@ -85,9 +88,19 @@ public class DateAxis extends ValueAxis {
8588
@JsMethod
8689
public native OrientationPoint dateToPoint(JsDate date);
8790

91+
@JsOverlay
92+
public final OrientationPoint dateToPoint(Date date) {
93+
return dateToPoint(JsDate.create(date.getTime()));
94+
}
95+
8896
@JsMethod
8997
public native double dateToPosition(JsDate date);
9098

99+
@JsOverlay
100+
public final double dateToPosition(Date date) {
101+
return dateToPosition(JsDate.create(date.getTime()));
102+
}
103+
91104
@JsMethod
92105
public native void fillRule(DateAxisDataItem dataItem);
93106

@@ -103,6 +116,11 @@ public class DateAxis extends ValueAxis {
103116
@JsMethod
104117
public native JsDate positionToDate(double position);
105118

119+
@JsOverlay
120+
public final Date _positionToDate(double position) {
121+
return new Date((long) positionToDate(position).getTime());
122+
}
123+
106124
@JsMethod
107125
public native void appendDataItem(DateAxisDataItem dataItem);
108126

@@ -112,6 +130,16 @@ public class DateAxis extends ValueAxis {
112130
@JsMethod
113131
public native void zoomToDates(JsDate startDate, JsDate endDate);
114132

133+
@JsOverlay
134+
public final void zoomToDates(Date startDate, Date endDate) {
135+
zoomToDates(JsDate.create(startDate.getTime()), JsDate.create(endDate.getTime()));
136+
}
137+
115138
@JsMethod
116139
public native void zoomToDates(JsDate startDate, JsDate endDate, boolean skipRangeEvent, boolean instantly);
140+
141+
@JsOverlay
142+
public final void zoomToDates(Date startDate, Date endDate, boolean skipRangeEvent, boolean instantly) {
143+
zoomToDates(JsDate.create(startDate.getTime()), JsDate.create(endDate.getTime()), skipRangeEvent, instantly);
144+
}
117145
}

src/main/java/gwt/material/design/amcharts/client/column/Column.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import gwt.material.design.amcharts.client.dataitem.ColumnSeriesDataItem;
2323
import gwt.material.design.amcharts.client.properties.ColumnProperties;
24+
import gwt.material.design.amcore.client.adapter.Adapter;
2425
import gwt.material.design.amcore.client.base.Container;
2526
import gwt.material.design.amcore.client.events.SpriteEventDispatcher;
2627
import gwt.material.design.amcore.client.list.DictionaryTemplate;

src/main/java/gwt/material/design/amcore/client/base/Sprite.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,15 @@
3535
import gwt.material.design.amcore.client.formatter.NumberFormatter;
3636
import gwt.material.design.amcore.client.list.Dictionary;
3737
import gwt.material.design.amcore.client.list.DictionaryTemplate;
38+
import gwt.material.design.amcore.client.list.List;
3839
import gwt.material.design.amcore.client.list.ListTemplate;
3940
import gwt.material.design.amcore.client.properties.*;
4041
import gwt.material.design.amcore.client.state.SpriteState;
4142
import gwt.material.design.jscore.client.api.core.Element;
4243
import jsinterop.annotations.JsMethod;
43-
import jsinterop.annotations.JsOverlay;
4444
import jsinterop.annotations.JsProperty;
4545
import jsinterop.annotations.JsType;
4646

47-
import java.util.List;
48-
4947

5048
@JsType(isNative = true, namespace = "am4core")
5149
public class Sprite extends BaseObjectsEvents {

src/main/java/gwt/material/design/amcore/client/data/ChartData.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ public JavaScriptObject get() {
6363
return array.getJavaScriptObject();
6464
}
6565

66-
6766
public List<T> getData() {
6867
return data;
6968
}

src/main/java/gwt/material/design/amcore/client/dataitem/DataItem.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@
2828
import gwt.material.design.amcore.client.base.Sprite;
2929
import gwt.material.design.amcore.client.constants.CalculatedValue;
3030
import jsinterop.annotations.JsMethod;
31+
import jsinterop.annotations.JsOverlay;
3132
import jsinterop.annotations.JsProperty;
3233
import jsinterop.annotations.JsType;
3334

35+
import java.util.Date;
36+
3437
@JsType(isNative = true, namespace = "am4charts")
3538
public class DataItem extends BaseObjectsEvents {
3639

@@ -118,6 +121,11 @@ public class DataItem extends BaseObjectsEvents {
118121
@JsMethod
119122
public native JsDate getDate(String name);
120123

124+
@JsOverlay
125+
public final Date _getDate(String name) {
126+
return new Date((long) getDate(name).getTime());
127+
}
128+
121129
@JsMethod
122130
public native int getDuration();
123131

@@ -157,9 +165,19 @@ public class DataItem extends BaseObjectsEvents {
157165
@JsMethod
158166
public native void setDate(String name, JsDate date);
159167

168+
@JsOverlay
169+
public final void setDate(String name, Date date) {
170+
setDate(name, JsDate.create(date.getTime()));
171+
}
172+
160173
@JsMethod
161174
public native void setDate(String name, JsDate date, int duration);
162175

176+
@JsOverlay
177+
public final void setDate(String name, Date date, int duration) {
178+
setDate(name, JsDate.create(date.getTime()), duration);
179+
}
180+
163181
@JsMethod
164182
public native void setLocation(String name, double value);
165183

src/main/java/gwt/material/design/amcore/client/formatter/DateFormatter.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,9 +24,12 @@
2424
import gwt.material.design.amcore.client.base.Language;
2525
import gwt.material.design.amcore.client.base.Sprite;
2626
import jsinterop.annotations.JsMethod;
27+
import jsinterop.annotations.JsOverlay;
2728
import jsinterop.annotations.JsProperty;
2829
import jsinterop.annotations.JsType;
2930

31+
import java.util.Date;
32+
3033
@JsType(isNative = true, namespace = "am4core")
3134
public class DateFormatter extends BaseObject {
3235

@@ -60,6 +63,16 @@ public class DateFormatter extends BaseObject {
6063
@JsMethod
6164
public native JsDate parse(Object source);
6265

66+
@JsOverlay
67+
public final Date _parse(Object source) {
68+
return new Date((long) parse(source).getTime());
69+
}
70+
6371
@JsMethod
6472
public native JsDate parse(Object source, String format);
73+
74+
@JsOverlay
75+
public final Date _parse(Object source, String format) {
76+
return new Date((long) parse(source, format).getTime());
77+
}
6578
}

src/main/java/gwt/material/design/amcore/client/ui/RoundedRectangle.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ public class RoundedRectangle extends Sprite {
3939
@JsProperty
4040
public double cornerRadiusTopRight;
4141

42+
@JsProperty
43+
public int tooltipY;
44+
45+
@JsProperty
46+
public int tooltipX;
47+
4248
@JsMethod
4349
public native void cornerRadius(double topLeft, double topRight, double belowLeft, double belowRight);
4450
}

0 commit comments

Comments
 (0)