Skip to content

Commit 90c8615

Browse files
committed
Update JavaDoc for Zoom plugin
1 parent 07b2bd8 commit 90c8615

File tree

10 files changed

+90
-37
lines changed

10 files changed

+90
-37
lines changed

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/Plugins.java

+3
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ public Zoom getZoom()
9595
/**
9696
* A zoom and pan plugin for Chart.js. Panning can be done via the mouse or with a finger. Zooming is done via the
9797
* mouse wheel or via a pinch gesture.
98+
* <p>
99+
* Note: Requires the {@link Zoom} plugin installed.
100+
* </p>
98101
*/
99102
public Plugins setZoom(final Zoom zoom)
100103
{

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/plugins/zoom/Zoom.java

+11-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,19 @@
1515
*/
1616
package software.xdev.chartjs.model.options.plugins.zoom;
1717

18+
import software.xdev.chartjs.model.options.plugins.zoom.limits.LimitOptions;
19+
import software.xdev.chartjs.model.options.plugins.zoom.pan.PanOptions;
20+
import software.xdev.chartjs.model.options.plugins.zoom.zoom.ZoomOptions;
21+
22+
23+
/**
24+
* <a href="https://www.chartjs.org/chartjs-plugin-zoom/latest/guide/options.html">ChartJS docs</a>
25+
*/
1826
public class Zoom
1927
{
2028
protected PanOptions pan;
2129
protected LimitOptions limits;
30+
@SuppressWarnings("java:S1700")
2231
protected ZoomOptions zoom;
2332

2433
public PanOptions getPan()
@@ -34,7 +43,7 @@ public Zoom setPan(final PanOptions pan)
3443

3544
public LimitOptions getLimits()
3645
{
37-
return limits;
46+
return this.limits;
3847
}
3948

4049
public Zoom setLimits(final LimitOptions limits)
@@ -45,7 +54,7 @@ public Zoom setLimits(final LimitOptions limits)
4554

4655
public ZoomOptions getZoom()
4756
{
48-
return zoom;
57+
return this.zoom;
4958
}
5059

5160
public Zoom setZoom(final ZoomOptions zoom)

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/plugins/zoom/LimitOptions.java renamed to chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/plugins/zoom/limits/LimitOptions.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,19 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package software.xdev.chartjs.model.options.plugins.zoom;
16+
package software.xdev.chartjs.model.options.plugins.zoom.limits;
1717

18+
/**
19+
* <a href="https://www.chartjs.org/chartjs-plugin-zoom/latest/guide/options.html#limit-options">ChartJS docs</a>
20+
*/
1821
public class LimitOptions
1922
{
2023
protected ScaleLimits x;
2124
protected ScaleLimits y;
2225

2326
public ScaleLimits getX()
2427
{
25-
return x;
28+
return this.x;
2629
}
2730

2831
public LimitOptions setX(final ScaleLimits x)
@@ -33,7 +36,7 @@ public LimitOptions setX(final ScaleLimits x)
3336

3437
public ScaleLimits getY()
3538
{
36-
return y;
39+
return this.y;
3740
}
3841

3942
public LimitOptions setY(final ScaleLimits y)

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/plugins/zoom/ScaleLimits.java renamed to chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/plugins/zoom/limits/ScaleLimits.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package software.xdev.chartjs.model.options.plugins.zoom;
16+
package software.xdev.chartjs.model.options.plugins.zoom.limits;
1717

1818
import java.math.BigDecimal;
1919

2020

21+
/**
22+
* <a href="https://www.chartjs.org/chartjs-plugin-zoom/latest/guide/options.html#scale-limits">ChartJS docs</a>
23+
*/
2124
public class ScaleLimits
2225
{
2326
protected Object min;
@@ -26,7 +29,7 @@ public class ScaleLimits
2629

2730
public Object getMin()
2831
{
29-
return min;
32+
return this.min;
3033
}
3134

3235
public ScaleLimits setMin(final Object min)
@@ -37,7 +40,7 @@ public ScaleLimits setMin(final Object min)
3740

3841
public Object getMax()
3942
{
40-
return max;
43+
return this.max;
4144
}
4245

4346
public ScaleLimits setMax(final Object max)
@@ -48,7 +51,7 @@ public ScaleLimits setMax(final Object max)
4851

4952
public BigDecimal getMinRange()
5053
{
51-
return minRange;
54+
return this.minRange;
5255
}
5356

5457
public ScaleLimits setMinRange(final BigDecimal minRange)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright © 2023 XDEV Software (https://xdev.software)
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
/**
17+
* This package describes options for the
18+
* <a href="https://www.chartjs.org/chartjs-plugin-zoom/latest">ChartJS Zoom Plugin</a>
19+
*/
20+
package software.xdev.chartjs.model.options.plugins.zoom;

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/plugins/zoom/PanOptions.java renamed to chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/plugins/zoom/pan/PanOptions.java

+10-7
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package software.xdev.chartjs.model.options.plugins.zoom;
16+
package software.xdev.chartjs.model.options.plugins.zoom.pan;
1717

18+
/**
19+
* <a href="https://www.chartjs.org/chartjs-plugin-zoom/latest/guide/options.html#pan-options">ChartJS docs</a>
20+
*/
1821
public class PanOptions
1922
{
2023
protected Boolean enabled;
@@ -26,7 +29,7 @@ public class PanOptions
2629

2730
public Boolean getEnabled()
2831
{
29-
return enabled;
32+
return this.enabled;
3033
}
3134

3235
public PanOptions setEnabled(final Boolean enabled)
@@ -37,7 +40,7 @@ public PanOptions setEnabled(final Boolean enabled)
3740

3841
public String getMode()
3942
{
40-
return mode;
43+
return this.mode;
4144
}
4245

4346
public PanOptions setMode(final String mode)
@@ -48,7 +51,7 @@ public PanOptions setMode(final String mode)
4851

4952
public String getModifierKey()
5053
{
51-
return modifierKey;
54+
return this.modifierKey;
5255
}
5356

5457
public PanOptions setModifierKey(final String modifierKey)
@@ -59,7 +62,7 @@ public PanOptions setModifierKey(final String modifierKey)
5962

6063
public String getScaleMode()
6164
{
62-
return scaleMode;
65+
return this.scaleMode;
6366
}
6467

6568
public PanOptions setScaleMode(final String scaleMode)
@@ -70,7 +73,7 @@ public PanOptions setScaleMode(final String scaleMode)
7073

7174
public String getOverScaleMode()
7275
{
73-
return overScaleMode;
76+
return this.overScaleMode;
7477
}
7578

7679
public PanOptions setOverScaleMode(final String overScaleMode)
@@ -81,7 +84,7 @@ public PanOptions setOverScaleMode(final String overScaleMode)
8184

8285
public Integer getThreshold()
8386
{
84-
return threshold;
87+
return this.threshold;
8588
}
8689

8790
public PanOptions setThreshold(final Integer threshold)

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/plugins/zoom/DragOptions.java renamed to chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/plugins/zoom/zoom/DragOptions.java

+11-8
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package software.xdev.chartjs.model.options.plugins.zoom;
16+
package software.xdev.chartjs.model.options.plugins.zoom.zoom;
1717

1818
import software.xdev.chartjs.model.color.Color;
1919

2020

21+
/**
22+
* <a href="https://www.chartjs.org/chartjs-plugin-zoom/latest/guide/options.html#drag-options">ChartJS docs</a>
23+
*/
2124
public class DragOptions
2225
{
2326
protected Boolean enabled;
@@ -30,7 +33,7 @@ public class DragOptions
3033

3134
public Boolean getEnabled()
3235
{
33-
return enabled;
36+
return this.enabled;
3437
}
3538

3639
public DragOptions setEnabled(final Boolean enabled)
@@ -41,7 +44,7 @@ public DragOptions setEnabled(final Boolean enabled)
4144

4245
public Color getBackgroundColor()
4346
{
44-
return backgroundColor;
47+
return this.backgroundColor;
4548
}
4649

4750
public DragOptions setBackgroundColor(final Color backgroundColor)
@@ -52,7 +55,7 @@ public DragOptions setBackgroundColor(final Color backgroundColor)
5255

5356
public Color getBorderColor()
5457
{
55-
return borderColor;
58+
return this.borderColor;
5659
}
5760

5861
public DragOptions setBorderColor(final Color borderColor)
@@ -63,7 +66,7 @@ public DragOptions setBorderColor(final Color borderColor)
6366

6467
public Integer getBorderWidth()
6568
{
66-
return borderWidth;
69+
return this.borderWidth;
6770
}
6871

6972
public DragOptions setBorderWidth(final Integer borderWidth)
@@ -74,7 +77,7 @@ public DragOptions setBorderWidth(final Integer borderWidth)
7477

7578
public String getDrawTime()
7679
{
77-
return drawTime;
80+
return this.drawTime;
7881
}
7982

8083
public DragOptions setDrawTime(final String drawTime)
@@ -85,7 +88,7 @@ public DragOptions setDrawTime(final String drawTime)
8588

8689
public Integer getThreshold()
8790
{
88-
return threshold;
91+
return this.threshold;
8992
}
9093

9194
public DragOptions setThreshold(final Integer threshold)
@@ -96,7 +99,7 @@ public DragOptions setThreshold(final Integer threshold)
9699

97100
public String getModifierKey()
98101
{
99-
return modifierKey;
102+
return this.modifierKey;
100103
}
101104

102105
public DragOptions setModifierKey(final String modifierKey)

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/plugins/zoom/PinchOptions.java renamed to chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/plugins/zoom/zoom/PinchOptions.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,18 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package software.xdev.chartjs.model.options.plugins.zoom;
16+
package software.xdev.chartjs.model.options.plugins.zoom.zoom;
1717

18+
/**
19+
* <a href="https://www.chartjs.org/chartjs-plugin-zoom/latest/guide/options.html#pinch-options">ChartJS docs</a>
20+
*/
1821
public class PinchOptions
1922
{
2023
protected Boolean enabled;
2124

2225
public Boolean getEnabled()
2326
{
24-
return enabled;
27+
return this.enabled;
2528
}
2629

2730
public PinchOptions setEnabled(final Boolean enabled)

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/plugins/zoom/WheelOptions.java renamed to chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/plugins/zoom/zoom/WheelOptions.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package software.xdev.chartjs.model.options.plugins.zoom;
16+
package software.xdev.chartjs.model.options.plugins.zoom.zoom;
1717

18+
/**
19+
* <a href="https://www.chartjs.org/chartjs-plugin-zoom/latest/guide/options.html#wheel-options">ChartJS docs</a>
20+
*/
1821
public class WheelOptions
1922
{
2023
protected Boolean enabled;
@@ -23,7 +26,7 @@ public class WheelOptions
2326

2427
public Boolean getEnabled()
2528
{
26-
return enabled;
29+
return this.enabled;
2730
}
2831

2932
public WheelOptions setEnabled(final Boolean enabled)
@@ -34,7 +37,7 @@ public WheelOptions setEnabled(final Boolean enabled)
3437

3538
public Number getSpeed()
3639
{
37-
return speed;
40+
return this.speed;
3841
}
3942

4043
public WheelOptions setSpeed(final Number speed)
@@ -45,7 +48,7 @@ public WheelOptions setSpeed(final Number speed)
4548

4649
public String getModifierKey()
4750
{
48-
return modifierKey;
51+
return this.modifierKey;
4952
}
5053

5154
public WheelOptions setModifierKey(final String modifierKey)

0 commit comments

Comments
 (0)