[]
        
(Showing Draft Content)

IContentControl

Interface IContentControl

All Superinterfaces:
IControl
All Known Subinterfaces:
IButton, ICheckBox, IGroupBox, ILabel, IOptionButton

public interface IContentControl extends IControl
Represents the common text-related members of form controls that display text.

Use this interface to work with text content shared by form controls such as IButton, ICheckBox, IGroupBox, ILabel, and IOptionButton. It provides members for reading or changing the displayed text and for controlling whether that text is locked.


 IContentControl control = worksheet.getControls().addLabel(20, 20, 120, 24);
 control.setText("Name");
 control.setLockedText(true);
 String text = control.getText();
 boolean lockedText = control.getLockedText();
 
  • Method Details

    • getLockedText

      boolean getLockedText()
      Gets whether the text is locked.

      Use this method to determine whether the displayed text of the control is currently locked.

      
       IContentControl control = worksheet.getControls().addLabel(20, 20, 120, 24);
       control.setText("Name");
       control.setLockedText(true);
       boolean lockedText = control.getLockedText();
       
      Returns:
      true if the control text is locked; otherwise, false.
    • setLockedText

      void setLockedText(boolean value)
      Sets whether the text is locked.

      Use this method to set whether the displayed text of the control is currently locked.

      
       IContentControl control = worksheet.getControls().addLabel(20, 20, 120, 24);
       control.setText("Name");
       control.setLockedText(true);
       
      Parameters:
      value - true if the control text is locked; otherwise, false.
    • getText

      String getText()
      Gets the text to display.

      Use this method to read the current text shown by the control.

      
       IContentControl control = worksheet.getControls().addLabel(20, 20, 120, 24);
       control.setText("Name");
       String text = control.getText();
       
      Returns:
      The text displayed by the control.
    • setText

      void setText(String value)
      Sets the text to display.

      Use this method to change the current text shown by the control.

      
       IContentControl control = worksheet.getControls().addLabel(20, 20, 120, 24);
       control.setText("Name");
       
      Parameters:
      value - The text displayed by the control.