Skip to content

Commit 320b152

Browse files
feat!: add getter and setter for buttonSpacing in ContextButton; remove widthAdjust from Title (#7932)
* feat: add getter and setter for buttonSpacing in ContextButton * refactor: remove widthAdjust property and its associated methods from Title class * refactor: change property type --------- Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
1 parent 8c95cc6 commit 320b152

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

vaadin-charts-flow-parent/vaadin-charts-flow/src/main/java/com/vaadin/flow/component/charts/model/ContextButton.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
public class ContextButton extends AbstractConfigurationObject {
1818

1919
private HorizontalAlign align;
20+
private Number buttonSpacing;
2021
private Boolean enabled;
2122
private Number height;
2223
private ContextButtonMenuItem[] menuItems;
@@ -57,6 +58,25 @@ public ContextButton(Boolean enabled) {
5758
this.enabled = enabled;
5859
}
5960

61+
/**
62+
* Gets the spacing between the context button and other exporting buttons.
63+
*
64+
* @return the button spacing
65+
*/
66+
public Number getButtonSpacing() {
67+
return buttonSpacing;
68+
}
69+
70+
/**
71+
* Sets the spacing between the context button and other exporting buttons.
72+
*
73+
* @param buttonSpacing
74+
* the spacing value
75+
*/
76+
public void setButtonSpacing(Number buttonSpacing) {
77+
this.buttonSpacing = buttonSpacing;
78+
}
79+
6080
/**
6181
* @see #setEnabled(Boolean)
6282
*/

vaadin-charts-flow-parent/vaadin-charts-flow/src/main/java/com/vaadin/flow/component/charts/model/Title.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public class Title extends AbstractConfigurationObject {
2222
private String text;
2323
private Boolean useHTML;
2424
private VerticalAlign verticalAlign;
25-
private Number widthAdjust;
2625
private Number x;
2726
private Number y;
2827

@@ -165,23 +164,6 @@ public void setVerticalAlign(VerticalAlign verticalAlign) {
165164
this.verticalAlign = verticalAlign;
166165
}
167166

168-
/**
169-
* @see #setWidthAdjust(Number)
170-
*/
171-
public Number getWidthAdjust() {
172-
return widthAdjust;
173-
}
174-
175-
/**
176-
* Adjustment made to the title width, normally to reserve space for the
177-
* exporting burger menu.
178-
* <p>
179-
* Defaults to: -44
180-
*/
181-
public void setWidthAdjust(Number widthAdjust) {
182-
this.widthAdjust = widthAdjust;
183-
}
184-
185167
/**
186168
* @see #setX(Number)
187169
*/

0 commit comments

Comments
 (0)