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 PatternFormat

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

All Implemented Interfaces:
  application.resource.com.ComExceptionConstants

public class PatternFormat
extends java.lang.Object
implements application.resource.com.ComExceptionConstants

该类定义了设置图形对象线条颜色和线条图案的方法。

Field Summary

Fields inherited from interface application.resource.com.ComExceptionConstants
`CANNOT_EDIT, CANNOT_MAKE_ARROW, DELETE_DOCFIELD, DELETE_SHAPE, DIRECTRY_NOT_FIND, ERROR_DOCFIELD, ERROR_MACRO_NAME, FILE_NOT_FIND, LOCKED_DOCFIELD, LOCKED_POSITION_DOCFIELD, NO_ARROW_STYLE, NO_BOOK_NAME, NO_BUILDER, NO_CONNECTOR_TYPE, NO_DOCFIELDNAME, NO_MACRO_FOUND, NO_OBJECT, NO_PATH_NAME, NO_PRINT_PREVIEW, NO_PRODUCT, NO_Seal, NO_Seal_File, NO_SELECTED_OBJECT, NO_SHAPE, NO_TOOLBAR, NO_UNDO_TIMES, NO_WINDOW, NO_WORKBOOK, NO_WORKBOOK_TYPE, NOT_CONNECT, NOT_IMAGE, NOT_PRESENTATION, NOT_SUPPORT_DIALOG_SHOW, NOT_SUPPORT_DIALOG_TYPE, NOT_TEXT_EFFECT, Repeat_Name, Seal_Sign, SHAPE_TYPE_ERROR, WRONG_FREEFORM_TYPE`

Method Summary
`java.awt.Color` | `getColor()` 获取图形对象的线条颜色。
`java.awt.Color` | `getPatternBackground()` 获取图形对象图案线条的背景色。
`java.awt.Color` | `getPatternForeground()` 获取图形对象图案线条的前景色。
`int` | `getPatternIndex()` 获取图形对象的线条图案索引。
`void` | `setColor(java.awt.Color color)` 设置图形对象线条的颜色。
`void` | `setNoColor()` 把图形对象的线条颜色设为无。
`void` | `setPatternBackground(java.awt.Color backColor)` 设置图形对象图案线条的背景色。
`void` | `setPatternForeground(java.awt.Color foreColor)` 设置图形对象线条图案的前景色。
`void` | `setPatternIndex(int patternIndex)` 设置图形对象的线条图案。

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") ;
         LineFormat line = shape.getLineFormat() ;
         PatternFormat pf = line.getPatternFormat() ;
         javax.swing.JOptionPane.showMessageDialog(null,"当前对象的线条颜色是"+pf.getColor()) ;

### getPatternBackground

    public java.awt.Color getPatternBackground()

  获取图形对象图案线条的背景色。

  Returns:
    图案线条的背景色

    例子:

         Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ;
         Shape shape = shapes.getShape("圆柱形 4") ;
         LineFormat line = shape.getLineFormat() ;
         PatternFormat pf = line.getPatternFormat() ;
         javax.swing.JOptionPane.showMessageDialog(null,"当前对象的图案背景色是"+pf.getPatternBackground()) ;

### getPatternForeground

    public java.awt.Color getPatternForeground()

  获取图形对象图案线条的前景色。

  Returns:
    图案线条的前景色

    例子:

         Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ;
         Shape shape = shapes.getShape("圆柱形 4") ;
         LineFormat line = shape.getLineFormat() ;
         PatternFormat pf = line.getPatternFormat() ;
         javax.swing.JOptionPane.showMessageDialog(null,"当前对象的图案前景色是"+pf.getPatternForeground()) ;

### getPatternIndex

    public int getPatternIndex()

  获取图形对象的线条图案索引。

  Returns:
    线条图案的索引，为整型值

    例子:

         Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ;
         Shape shape = shapes.getShape("圆柱形 4") ;
         LineFormat line = shape.getLineFormat() ;
         PatternFormat pf = line.getPatternFormat() ;
         javax.swing.JOptionPane.showMessageDialog(null,"当前对象的图案是第"+pf.getPatternIndex()+"种索引") ;

### setColor

    public void setColor(java.awt.Color color)

  设置图形对象线条的颜色。

  Parameters:
    `color` - 线条颜色

    例子:

         Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ;
         Shape shape = shapes.getShape("直线 1") ;
         LineFormat line = shape.getLineFormat() ;
         PatternFormat pf = line.getPatternFormat() ;
         pf.setColor(java.awt.Color.red) ;

### setNoColor

    public void setNoColor()

  把图形对象的线条颜色设为无。

  例子:

       Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ;
       Shape shape = shapes.getShape("直线 1") ;
       LineFormat line = shape.getLineFormat() ;
       PatternFormat pf = line.getPatternFormat() ;
       pf.setNoColor() ;

### setPatternBackground

    public void setPatternBackground(java.awt.Color backColor)

  设置图形对象图案线条的背景色。

  Parameters:
    `backColor` - 线条图案的背景色

    例子: Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("圆柱形 4") ; LineFormat line = shape.getLineFormat() ; PatternFormat pf = line.getPatternFormat() ; pf.setPatternBackground(java.awt.Color.red) ;

### setPatternForeground

    public void setPatternForeground(java.awt.Color foreColor)

  设置图形对象线条图案的前景色。

  Parameters:
    `foreColor` - 线条图案的前景色 Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("圆柱形 4") ; LineFormat line = shape.getLineFormat() ; PatternFormat pf = line.getPatternFormat() ; pf.setPatternForeground(java.awt.Color.yellow) ;

### setPatternIndex

    public void setPatternIndex(int patternIndex)

  设置图形对象的线条图案。

  Parameters:
    `patternIndex` - 线条图案索引

    例子:

         Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ;
         Shape shape = shapes.getShape("立方体 2") ;
         LineFormat line = shape.getLineFormat() ;
         PatternFormat pf = line.getPatternFormat() ;
         pf.setPatternIndex(2) ;

Overview | Package | Class | Tree | Index | Help

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

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