Package io.keikai.axyra.sheets.content
Class FormControl.Builder
java.lang.Object
io.keikai.axyra.sheets.content.FormControl.Builder
- Enclosing class:
- FormControl
A fluent builder for a
FormControl. Values are checked only when
the control is added or updated on a sheet.-
Method Summary
Modifier and TypeMethodDescriptionanchor(int fromRow, int fromColumn, int toRow, int toColumn) Sets the two-cell anchor (0-based).anchorOffsets(long fromRowOffset, long fromColumnOffset, long toRowOffset, long toColumnOffset) Sets the offsets of the anchor's corners inside their cells, in EMU (914400 EMU = 1 inch).build()The immutable control.checked(boolean checked) Sets the state of a check box or option button.dropLines(int lines) Sets how many rows a combo box's drop-down shows; Excel uses 8 when not set.increment(int increment) Sets the step of one arrow click on a scroll bar or spin button.linkedCell(String a1Ref) Sets the cell that mirrors the control's state, in A1 form ("A1","Sheet2!B3");nullor an empty string sets none.listFillRange(String a1Range) Sets the range that supplies a combo box's or list box's items, in A1 form;nullor an empty string sets none.page(int page) Sets the step of one click on a scroll bar's track.range(int min, int max) Sets the minimum and maximum value of a scroll bar or spin button.selectedIndex(int index) Sets the 1-based selected item of a combo box or list box; 0 means no selection.Sets the caption of a button, check box, option button, label or group box;nullor an empty string shows the control name.threeD(boolean threeD) Sets the 3-D shading flag of Excel's Format Control dialog.value(int value) Sets the current value of a scroll bar or spin button.
-
Method Details
-
anchor
Sets the two-cell anchor (0-based). The control's top-left corner is at the top-left of cell (fromRow,fromColumn). Its bottom-right corner is at the top-left of cell (toRow,toColumn), so that cell is not covered unlessanchorOffsets(long, long, long, long)moves the corner into it. Example:anchor(1, 1, 3, 3)covers B2:C3. A negative index makes the add call throwAxyraException. -
anchorOffsets
public FormControl.Builder anchorOffsets(long fromRowOffset, long fromColumnOffset, long toRowOffset, long toColumnOffset) Sets the offsets of the anchor's corners inside their cells, in EMU (914400 EMU = 1 inch). Note the order: row offset before column offset for each corner, unlikeChart.Builder.anchorOffsets(int, int, int, int). -
linkedCell
Sets the cell that mirrors the control's state, in A1 form ("A1","Sheet2!B3");nullor an empty string sets none. -
listFillRange
Sets the range that supplies a combo box's or list box's items, in A1 form;nullor an empty string sets none. -
checked
Sets the state of a check box or option button. -
selectedIndex
Sets the 1-based selected item of a combo box or list box; 0 means no selection. Accepts 0–255; a larger or negative value makesSheet.addFormControlthrowAxyraException. -
dropLines
Sets how many rows a combo box's drop-down shows; Excel uses 8 when not set. A negative value makes the add call throwAxyraException. -
value
Sets the current value of a scroll bar or spin button. -
range
Sets the minimum and maximum value of a scroll bar or spin button. -
increment
Sets the step of one arrow click on a scroll bar or spin button. -
page
Sets the step of one click on a scroll bar's track. -
text
Sets the caption of a button, check box, option button, label or group box;nullor an empty string shows the control name. -
threeD
Sets the 3-D shading flag of Excel's Format Control dialog. -
build
The immutable control. The type and values are checked only when the control is added or updated on a sheet.
-