public class CheckBoxControl extends MorphDataControl
Remarks:
It has three possible states: selected, cleared, and neither selected nor cleared, meaning a combination of on and off states.
Examples:
Shows how to change state of the CheckBox control.
Document doc = new Document(getMyDir() + "ActiveX controls.docx");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);
CheckBoxControl checkBoxControl = (CheckBoxControl)shape.getOleFormat().getOleControl();
checkBoxControl.setChecked(true);
Assert.assertEquals(true, checkBoxControl.getChecked());
Assert.assertEquals(Forms2OleControlType.CHECK_BOX, checkBoxControl.getType());
CHECK_BOX_CONTROL_CLSID, COMBO_BOX_CONTROL_CLSID, COMMAND_BUTTON_CONTROL_CLSID, FORM_CONTROL_CLSID, FRAME_CONTROL_CLSID, HTML_HIDDEN_CLSID, HTML_SELECT_CLSID, HTML_SUBMIT_BUTTON_CLSID, HTML_TEXT_CLSID, IMAGE_CONTROL_CLSID, LABEL_CONTROL_CLSID, LIST_BOX_CONTROL_CLSID, MULTI_PAGE_CONTROL_CLSID, OPTION_BUTTON_CONTROL_CLSID, SCROLL_BAR_CONTROL_CLSID, SPIN_BUTTON_CONTROL_CLSID, TAB_STRIP_CONTROL_CLSID, TEXT_BOX_CONTROL_CLSID, TOGGLE_BUTTON_CONTROL_CLSID| Modifier and Type | Method and Description |
|---|---|
boolean |
getChecked()
Gets a boolean value indicating either this
CheckBoxControl is checked or not. |
protected java.lang.String |
getClsidVirtual() |
int |
getType()
Gets type of Forms 2.0 control.
|
void |
setChecked(boolean value)
Sets a boolean value indicating either this
CheckBoxControl is checked or not. |
getBackColor, getCaption, getChildNodes, getEnabled, getForeColor, getGroupName, getHeight, getProgId, getUserType, getValue, getWidth, setBackColor, setCaption, setForeColor, setGroupName, setHeight, setWidthgetClsidInternal, getExtensionForUser, getFileNameForUser, getId, getName, isEmpty, isForms2OleControl, isForms2OleControlInternal, setId, setNamepublic int getType()
Examples:
Shows how to change state of the CheckBox control.
Document doc = new Document(getMyDir() + "ActiveX controls.docx");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);
CheckBoxControl checkBoxControl = (CheckBoxControl)shape.getOleFormat().getOleControl();
checkBoxControl.setChecked(true);
Assert.assertEquals(true, checkBoxControl.getChecked());
Assert.assertEquals(Forms2OleControlType.CHECK_BOX, checkBoxControl.getType());
getType in class Forms2OleControlForms2OleControlType constants.public boolean getChecked()
CheckBoxControl is checked or not. The default value is false.
Examples:
Shows how to change state of the CheckBox control.
Document doc = new Document(getMyDir() + "ActiveX controls.docx");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);
CheckBoxControl checkBoxControl = (CheckBoxControl)shape.getOleFormat().getOleControl();
checkBoxControl.setChecked(true);
Assert.assertEquals(true, checkBoxControl.getChecked());
Assert.assertEquals(Forms2OleControlType.CHECK_BOX, checkBoxControl.getType());
CheckBoxControl is checked or not.public void setChecked(boolean value)
CheckBoxControl is checked or not. The default value is false.
Examples:
Shows how to change state of the CheckBox control.
Document doc = new Document(getMyDir() + "ActiveX controls.docx");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);
CheckBoxControl checkBoxControl = (CheckBoxControl)shape.getOleFormat().getOleControl();
checkBoxControl.setChecked(true);
Assert.assertEquals(true, checkBoxControl.getChecked());
Assert.assertEquals(Forms2OleControlType.CHECK_BOX, checkBoxControl.getType());
value - A boolean value indicating either this CheckBoxControl is checked or not.protected java.lang.String getClsidVirtual()
getClsidVirtual in class OleControl