[]
        
(Showing Draft Content)

IButton

Interface IButton

All Superinterfaces:
IContentControl, IControl, IControlT<IButton>

public interface IButton extends IControlT<IButton>, IContentControl
Represents a button form control on a worksheet.

Use this interface to work with button controls that are added through a worksheet's control collection. An IButton supports button-specific settings such as default, cancel, dismiss, and help button behavior, and also inherits common control features from IControlT and text content members from IContentControl.


 IButton button = worksheet.getControls().addButton(50, 20, 120, 24);
 button.setText("Submit");
 button.setDefaultButton(true);
 button.setHorizontalTextAlignment(HorizontalAlignment.Center);
 
  • Method Details

    • getHorizontalTextAlignment

      HorizontalAlignment getHorizontalTextAlignment()
      Gets the horizontal text alignment of the button.
      
       IButton button = worksheet.getControls().addButton(20, 20, 120, 24);
       button.setHorizontalTextAlignment(HorizontalAlignment.Center);
       HorizontalAlignment alignment = button.getHorizontalTextAlignment();
       
      Returns:
      The horizontal text alignment of the button.
      API Note:
      Not all values are supported by the *.ssjson format.
    • setHorizontalTextAlignment

      void setHorizontalTextAlignment(HorizontalAlignment value)
      Sets the horizontal alignment of the button text.
      
       IButton button = worksheet.getControls().addButton(20, 20, 120, 24);
       button.setText("Submit");
       button.setHorizontalTextAlignment(HorizontalAlignment.Left);
       
      Parameters:
      value - The HorizontalAlignment value to apply to the button text.
      API Note:
      Not all values are supported by the *.ssjson format.
    • getOrientation

      TickLabelOrientation getOrientation()
      Gets text orientation.

      Use this property to determine how the button text is displayed, such as upward, downward, vertical, horizontal, or automatic.

      
       IButton button = worksheet.getControls().addButton(20, 20, 120, 24);
       button.setOrientation(TickLabelOrientation.OrientationVertical);
       TickLabelOrientation orientation = button.getOrientation();
       
      Returns:
      The text orientation of the button.
      API Note:
      Not all values are supported by the *.ssjson format.
    • setOrientation

      void setOrientation(TickLabelOrientation value)
      Sets text orientation.

      Use this method to control how the button text is displayed, such as upward, downward, vertical, or horizontal.

      
       IButton button = worksheet.getControls().addButton(20, 20, 120, 24);
       button.setText("Submit");
       button.setOrientation(TickLabelOrientation.OrientationHorizontal);
       
      Parameters:
      value - The TickLabelOrientation value to apply to the button text. This value must not be null. Unsupported values such as TickLabelOrientation.OrientationAutomatic are not allowed.
      Throws:
      IllegalArgumentException - if value is not supported.
      API Note:
      Not all values are supported by the *.ssjson format.
    • getVerticalTextAlignment

      VerticalAlignment getVerticalTextAlignment()
      Gets vertical alignment.

      Returns the vertical alignment applied to the button text.

      
       IButton button = worksheet.getControls().addButton(20, 20, 120, 24);
       button.setVerticalTextAlignment(VerticalAlignment.Center);
       VerticalAlignment alignment = button.getVerticalTextAlignment();
       
      Returns:
      The vertical alignment of the button text.
      API Note:
      Not all values are supported by the *.ssjson format.
    • setVerticalTextAlignment

      void setVerticalTextAlignment(VerticalAlignment value)
      Sets the vertical alignment of the button text.

      Use this method to align the button text within the button control.

      
       IButton button = worksheet.getControls().addButton(20, 20, 120, 24);
       button.setText("Submit");
       button.setVerticalTextAlignment(VerticalAlignment.Bottom);
       
      Parameters:
      value - The vertical alignment to apply to the button text.
      API Note:
      Not all values are supported by the *.ssjson format.
    • getCancelButton

      boolean getCancelButton()
      Gets whether the button is cancel button or not.

      Use this property to determine whether the button is configured as a cancel button.

      
       IButton button = worksheet.getControls().addButton(20, 20, 120, 24);
       button.setCancelButton(true);
       boolean isCancelButton = button.getCancelButton();
       
      Returns:
      true if the button is a cancel button; otherwise, false.
      API Note:
      Not supported by the *.ssjson format.
    • setCancelButton

      void setCancelButton(boolean value)
      Sets whether the button is cancel button or not.

      Use this property to set whether the button is configured as a cancel button.

      
       IButton button = worksheet.getControls().addButton(20, 20, 120, 24);
       button.setCancelButton(true);
       
      Parameters:
      value - true if the button is a cancel button; otherwise, false.
      API Note:
      Not supported by the *.ssjson format.
    • getDefaultButton

      boolean getDefaultButton()
      Gets whether the button is the default button.

      Use this property to determine whether the button is marked as the default button for the control. This property corresponds to the value set by setDefaultButton(boolean).

      
       IButton button = worksheet.getControls().addButton(50, 20, 120, 24);
       button.setText("Submit");
       button.setDefaultButton(true);
       boolean isDefaultButton = button.getDefaultButton();
       
      Returns:
      true if the button is the default button; otherwise, false.
      API Note:
      Not supported by the *.ssjson format.
    • setDefaultButton

      void setDefaultButton(boolean value)
      Sets whether the button is the default button.
      
       IButton button = worksheet.getControls().addButton(50, 20, 120, 24);
       button.setText("Submit");
       button.setDefaultButton(true);
       
      Parameters:
      value - true if the button is the default button; otherwise, false.
      API Note:
      Not supported by the *.ssjson format.
    • getDismissButton

      boolean getDismissButton()
      Gets whether the button is dismiss button or not.
      
       IButton button = worksheet.getControls().addButton(20, 20, 120, 24);
       button.setDismissButton(true);
       boolean isDismissButton = button.getDismissButton();
       
      Returns:
      true if the button is a dismiss button; otherwise, false.
      API Note:
      Not supported by the *.ssjson format.
    • setDismissButton

      void setDismissButton(boolean value)
      Sets whether the button is dismiss button or not.
      
       IButton button = worksheet.getControls().addButton(20, 20, 120, 24);
       button.setDismissButton(true);
       
      Parameters:
      value - true if the button is a dismiss button; otherwise, false.
      API Note:
      Not supported by the *.ssjson format.
    • getHelpButton

      boolean getHelpButton()
      Gets whether the button is help button or not.

      Use this property to determine whether the button is configured as a help button. This property corresponds to the value set by setHelpButton(boolean).

      
       IButton button = worksheet.getControls().addButton(50, 20, 120, 24);
       button.setHelpButton(true);
       boolean isHelpButton = button.getHelpButton();
       
      Returns:
      true if the button is a help button; otherwise, false.
      API Note:
      Not supported by the *.ssjson format.
    • setHelpButton

      void setHelpButton(boolean value)
      Sets whether the button is help button or not.
      
       IButton button = worksheet.getControls().addButton(50, 20, 120, 24);
       button.setHelpButton(true);
       
      Parameters:
      value - true if the button is a help button; otherwise, false.
      API Note:
      Not supported by the *.ssjson format.