Overview | Package | Class | Tree | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## application.workbooks.workbook.shapes
Class ThreeDFormat

    java.lang.Object
      application.workbooks.workbook.shapes.ThreeDFormat

public class ThreeDFormat
extends java.lang.Object

该类定义了对三维格式对象进行操作的一些方法，如设置三维格式的深度，方向，照明角度等。

Method Summary
`float` | `getDepth()` 获取3D的深度。
`int` | `getDirectionType()` 获取3D的方向。
`int` | `getLightType()` 获取3D光照类型。
`java.awt.Color` | `getSideColor()` 获取3D边框颜色。
`int` | `getType()` 获取3D类型。
`void` | `rotateDown()` 设置三维效果向下旋转。
`void` | `rotateLeft()` 设置三维效果向左旋转。
`void` | `rotateRight()` 设置三维效果向右旋转。
`void` | `rotateUp()` 设置三维效果向上旋转。
`void` | `set3DOff()` 无三维效果。
`void` | `setDepth(float depth)` 设置3D的深度。
`void` | `setDepthType(int type)` 设置3D的深度类型。
`void` | `setDirectionType(int type)` 设置3D的方向。
`void` | `setLightType(int threedLightType)` 设置3D光照类型。
`void` | `setSideColor(java.awt.Color sideColor, int schemeIndex)` 设置3D边框颜色。
`void` | `setType(int threedType)` 设置3D类型。
`void` | `toggle()` 设置是否显示三维效果。

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getDepth

    public float getDepth()

  获取3D的深度。

  Returns:
    3D的深度，为float型

    例子:

         Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
         ThreeDFormat thdformat = shape.getThreeDFormat() ;
         javax.swing.JOptionPane.showMessageDialog(null,"当前对象的3D深度为"+" "+thdformat.getDepth()+"磅") ;

### getDirectionType

    public int getDirectionType()

  获取3D的方向。

  Returns:
    3D方向类型，0-8之间的数值

    例子:

         Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
         ThreeDFormat thdformat = shape.getThreeDFormat() ;
         javax.swing.JOptionPane.showMessageDialog(null,"当前对象的3D方向为第"+thdformat.getDirectionType()+"种类型") ;

### getLightType

    public int getLightType()

  获取3D光照类型。

  Returns:
    3D光照类型，为整型数值，返回一0-8之间的值

    例子:

         Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
         ThreeDFormat thdformat = shape.getThreeDFormat() ;
         javax.swing.JOptionPane.showMessageDialog(null,"当前对象的3D灯光效果为第"+thdformat.getLightType()+"类型") ;

### getSideColor

    public java.awt.Color getSideColor()

  获取3D边框颜色。

  Returns:
    3D边框颜色

    例子:

         Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
         ThreeDFormat thdformat = shape.getThreeDFormat() ;
         javax.swing.JOptionPane.showMessageDialog(null,"当前对象的3D边框颜色为"+thdformat.getSideColor()) ;

### getType

    public int getType()

  获取3D类型。

  Returns:
    3D类型，为整型数值，返回一0-19之间的数值

    例子:

         Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
         ThreeDFormat thdformat = shape.getThreeDFormat() ;
         javax.swing.JOptionPane.showMessageDialog(null,"当前对象为第"+thdformat.getType()+"种3D样式") ;

### rotateDown

    public void rotateDown()

  设置三维效果向下旋转。

  例子:

       Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
       ThreeDFormat thdformat = shape.getThreeDFormat() ;
       thdformat.rotateDown() ;

### rotateLeft

    public void rotateLeft()

  设置三维效果向左旋转。

  例子:

       Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
       ThreeDFormat thdformat = shape.getThreeDFormat() ;
       thdformat.rotateLeft() ;

### rotateRight

    public void rotateRight()

  设置三维效果向右旋转。

  例子:

       Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
       ThreeDFormat thdformat = shape.getThreeDFormat() ;
       thdformat.rotateRight() ;

### rotateUp

    public void rotateUp()

  设置三维效果向上旋转。

  例子:

       Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
       ThreeDFormat thdformat = shape.getThreeDFormat() ;
       thdformat.rotateUp() ;

### set3DOff

    public void set3DOff()

  无三维效果。

  例子:

       Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
       ThreeDFormat thdformat = shape.getThreeDFormat() ;
       thdformat.set3DOff() ;

### setDepth

    public void setDepth(float depth)

  设置3D的深度。

  Parameters:
    `depth` - 3D的深度，为float型

    例子:

         Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
         ThreeDFormat thdformat = shape.getThreeDFormat() ;
         thdformat.setDepth(80) ;

### setDepthType

    public void setDepthType(int type)

  设置3D的深度类型。

  Parameters:
    `type` - 3D的深度类型， 只能取以下5个值之一：

                       0表示设深度为0磅；
                       1表示设深度为36磅；
                       2表示设深度为72磅；
                       3表示设深度为144磅；
                       4表示设深度为288磅；
                       5表示设深度为无限

    例子:

         Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
         ThreeDFormat thdformat = shape.getThreeDFormat() ;
         thdformat.setDepthType(3) ;

### setDirectionType

    public void setDirectionType(int type)

  设置3D的方向。

  Parameters:
    `type` - 3D的方向类型，为整型数值，取值范围为0－8

    例子:

         Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
         ThreeDFormat thdformat = shape.getThreeDFormat() ;
         thdformat.setDirectionType(10) ;

### setLightType

    public void setLightType(int threedLightType)

  设置3D光照类型。

  Parameters:
    `threedLightType` - 3D光照类型,为整型数值，取值范围为0-8

    例子:

         Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
         ThreeDFormat thdformat = shape.getThreeDFormat() ;
         thdformat.setLightType(4) ;

### setSideColor

    public void setSideColor(java.awt.Color sideColor,
                             int schemeIndex)

  设置3D边框颜色。

  Parameters:
    `sideColor` - 边框颜色
    `schemeIndex` - 颜色配置索引值

    例子:

         Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
         ThreeDFormat thdformat = shape.getThreeDFormat() ;
         thdformat.setSideColor(java.awt.Color.red,3) ;

### setType

    public void setType(int threedType)

  设置3D类型。

  Parameters:
    `threedType` - 3D类型，为整型数值，取值范围为0-19

    例子:

         Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
         ThreeDFormat thdformat = shape.getThreeDFormat() ;
         thdformat.setType(10) ;

### toggle

    public void toggle()

  设置是否显示三维效果。

  例子:

       Shape shape = Application.getWorkbooks().getActiveWorkbook().getActiveShapes().getShape(1) ;
       ThreeDFormat thdformat = shape.getThreeDFormat() ;
       thdformat.toggle() ;

Overview | Package | Class | Tree | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

版权所有 2001-2004 无锡永中科技有限公司