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 ShadowFormat

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

public class ShadowFormat
extends java.lang.Object

该类定义了设置阴影类型，阴影偏移和阴影颜色的一些方法。

Method Summary
`java.awt.Color` | `getColor()` 获取当前图形对象阴影颜色。
`int` | `getType()` 获取图形对象的阴影类型。
`int` | `getXOffset()` 获取图形对象阴影X坐标方向的偏移。
`int` | `getYOffset()` 获取图形对象的阴影Y坐标方向的偏移。
`void` | `setColor(java.awt.Color sideColor, int fillScheme)` 设置阴影颜色。
`void` | `setOffset(int shadowOffsetX, int shadowOffsetY)` 设置图形对象的阴影偏移。
`void` | `setType(int shadowType)` 设置图形对象的阴影类型。
`void` | `toggle()` 设置是否显示图形对象的阴影。

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

Method Detail

### getColor

    public java.awt.Color getColor()

  获取当前图形对象阴影颜色。

  Returns:
    当前图形对象阴影颜色

    例子:

         Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ;
         Shape shape = shapes.getShape("同心圆 1") ;
         ShadowFormat sf = shape.getShadowFormat() ;
         javax.swing.JOptionPane.showMessageDialog(null,"当前对象阴影的颜色是"+sf.getColor()) ;

### getType

    public int getType()

  获取图形对象的阴影类型。

  Returns:
    图形对象的阴影类型，为整型数值

    例子:

         Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ;
         Shape shape = shapes.getShape("同心圆 1") ;
         ShadowFormat sf = shape.getShadowFormat() ;
         javax.swing.JOptionPane.showMessageDialog(null,"当前对象的阴影格式是第"+sf.getType()+"种") ;

### getXOffset

    public int getXOffset()

  获取图形对象阴影X坐标方向的偏移。

  Returns:
    图形对象阴影X坐标方向的偏移，为整型数值

    例子:

         Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ;
         Shape shape = shapes.getShape("同心圆 1") ;
         ShadowFormat sf = shape.getShadowFormat() ;
         javax.swing.JOptionPane.showMessageDialog(null,"当前对象阴影X轴的偏移量是"+sf.getXOffset()) ;

### getYOffset

    public int getYOffset()

  获取图形对象的阴影Y坐标方向的偏移。

  Returns:
    图形对象的阴影Y坐标方向的偏移

    例子:

         Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ;
         Shape shape = shapes.getShape("同心圆 1") ;
         ShadowFormat sf = shape.getShadowFormat() ;
         javax.swing.JOptionPane.showMessageDialog(null,"当前对象阴影Y轴的偏移量是"+sf.getYOffset()) ;

### setColor

    public void setColor(java.awt.Color sideColor,
                         int fillScheme)

  设置阴影颜色。

  Parameters:
    `sideColor` - 阴影的颜色
    `fillScheme` - 阴影配色方案索引值，在电子表格与文字处理中默认为-1； 在简报制作中如使用配色方案，取值为0-7； 如果不使用配色方案，默认值为-1

    例子:

         Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ;
         Shape shape = shapes.getShape("同心圆 1") ;
         ShadowFormat sf = shape.getShadowFormat() ;
         sf.setColor(java.awt.Color.green,4) ;

### setOffset

    public void setOffset(int shadowOffsetX,
                          int shadowOffsetY)

  设置图形对象的阴影偏移。

  Parameters:
    `shadowOffsetX` - 阴影偏移的X坐标值
    `shadowOffsetY` - 阴影偏移的Y坐标值

    例子:

         Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ;
         Shape shape = shapes.getShape("同心圆 1") ;
         ShadowFormat sf = shape.getShadowFormat() ;
         sf.setOffset(50,130) ;

### setType

    public void setType(int shadowType)

  设置图形对象的阴影类型。

  Parameters:
    `shadowType` - 阴影的类型，为整型数值

    例子:

         Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ;
         Shape shape = shapes.getShape("同心圆 1") ;
         ShadowFormat sf = shape.getShadowFormat() ;
         sf.setType(3) ;

### toggle

    public void toggle()

  设置是否显示图形对象的阴影。

  例子:

       Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ;
       Shape shape = shapes.getShape("同心圆 1") ;
       ShadowFormat sf = shape.getShadowFormat() ;
       sf.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 无锡永中科技有限公司