|
| 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 | +package software.xdev.chartjs.model.options; |
| 17 | + |
| 18 | +import software.xdev.chartjs.model.options.animation.DoughnutAnimationBase; |
| 19 | + |
| 20 | + |
| 21 | +/** |
| 22 | + * @see <a href="https://github.com/chartjs/Chart.js/blob/v4.4.6/src/types/index.d.ts#L298">ChartJS Source</a> |
| 23 | + */ |
| 24 | +public abstract class DoughnutOptionsBase<O extends DoughnutOptionsBase<O, A>, A extends DoughnutAnimationBase<A>> |
| 25 | + extends Options<O, A> |
| 26 | +{ |
| 27 | + protected Number circumference; |
| 28 | + protected Object cutout; // number or string |
| 29 | + protected Object offset; // number or number[] |
| 30 | + protected Object radius; // number or string |
| 31 | + protected Number rotation; |
| 32 | + protected Number spacing; |
| 33 | + |
| 34 | + public Number getCircumference() |
| 35 | + { |
| 36 | + return this.circumference; |
| 37 | + } |
| 38 | + |
| 39 | + public DoughnutOptionsBase<O, A> setCircumference(final Number circumference) |
| 40 | + { |
| 41 | + this.circumference = circumference; |
| 42 | + return this.self(); |
| 43 | + } |
| 44 | + |
| 45 | + public Object getCutout() |
| 46 | + { |
| 47 | + return this.cutout; |
| 48 | + } |
| 49 | + |
| 50 | + public DoughnutOptionsBase<O, A> setCutout(final Object cutout) |
| 51 | + { |
| 52 | + this.cutout = cutout; |
| 53 | + return this.self(); |
| 54 | + } |
| 55 | + |
| 56 | + public Object getOffset() |
| 57 | + { |
| 58 | + return this.offset; |
| 59 | + } |
| 60 | + |
| 61 | + public DoughnutOptionsBase<O, A> setOffset(final Object offset) |
| 62 | + { |
| 63 | + this.offset = offset; |
| 64 | + return this.self(); |
| 65 | + } |
| 66 | + |
| 67 | + public Object getRadius() |
| 68 | + { |
| 69 | + return this.radius; |
| 70 | + } |
| 71 | + |
| 72 | + public DoughnutOptionsBase<O, A> setRadius(final Object radius) |
| 73 | + { |
| 74 | + this.radius = radius; |
| 75 | + return this.self(); |
| 76 | + } |
| 77 | + |
| 78 | + public Number getRotation() |
| 79 | + { |
| 80 | + return this.rotation; |
| 81 | + } |
| 82 | + |
| 83 | + public DoughnutOptionsBase<O, A> setRotation(final Number rotation) |
| 84 | + { |
| 85 | + this.rotation = rotation; |
| 86 | + return this.self(); |
| 87 | + } |
| 88 | + |
| 89 | + public Number getSpacing() |
| 90 | + { |
| 91 | + return this.spacing; |
| 92 | + } |
| 93 | + |
| 94 | + public DoughnutOptionsBase<O, A> setSpacing(final Number spacing) |
| 95 | + { |
| 96 | + this.spacing = spacing; |
| 97 | + return this.self(); |
| 98 | + } |
| 99 | +} |
0 commit comments