[]
        
首页
开发者学堂
文档
论坛
市场
生态机会
活动
立即试用
(Showing Draft Content)

ViewType

Enum Class ViewType

java.lang.Object
java.lang.Enum<ViewType>
com.grapecity.documents.excel.ViewType
All Implemented Interfaces:
Serializable, Comparable<ViewType>, Constable

public enum ViewType extends Enum<ViewType>
表示工作表视图类型。

将此枚举与 IWorksheetView.setViewType(ViewType) 一起使用,可以在普通编辑视图、分页预览和页面布局视图之间切换工作表。


 IWorksheetView sheetView = worksheet.getSheetView();
 sheetView.setViewType(ViewType.PageLayoutView);
 ViewType viewType = sheetView.getViewType();
 
  • Enum Constant Details

    • NormalView

      public static final ViewType NormalView
      正常。
    • PageBreakPreview

      public static final ViewType PageBreakPreview
      页面中断预览。
    • PageLayoutView

      public static final ViewType PageLayoutView
      页面布局视图。
  • Method Details

    • values

      public static ViewType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ViewType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Gets the integer value of this view type.
      Returns:
      The integer value of this view type.
    • forValue

      public static ViewType forValue(int value)
      Gets the view type for the specified integer value.
      Parameters:
      value - The integer value of the view type.
      Returns:
      The view type that corresponds to the specified integer value.