Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.birt.report.model.api.util
Class CopyUtil

    java.lang.Object
      org.eclipse.birt.report.model.api.util.CopyUtil

    public class CopyUtil

extends java.lang.Object

The utility class for copy/paste. It is for the UI usage. Other uses should use `DesignElementHandle.copy()`.

Constructor Summary
`CopyUtil()`

Method Summary
`static boolean` | `canPaste(IElementCopy copy, DesignElementHandle container, int slotID)` /** Checks whether the given copy can be pasted into the given slot of the specified element.
`static boolean` | `canPaste(IElementCopy copy, DesignElementHandle container, java.lang.String propName)` /** Checks whether the given copy can be pasted into the given slot of the specified element.
`static IElementCopy` | `copy(DesignElementHandle source)` Returns the copy of the current element.
`static java.util.List` | `paste(IElementCopy copy, DesignElementHandle container, int slotID)` Pastes a report item to the slot.
`static java.util.List` | `paste(IElementCopy copy, DesignElementHandle container, int slotID, int newPos)` Pastes a report item to the slot.
`static java.util.List` | `paste(IElementCopy copy, DesignElementHandle container, java.lang.String propName)` Pastes a report item to the slot.
`static java.util.List` | `paste(IElementCopy copy, DesignElementHandle container, java.lang.String propName, int newPos)` Pastes a report item to the slot.

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

Constructor Detail

### CopyUtil

    public CopyUtil()

Method Detail

### copy

    public static IElementCopy copy(DesignElementHandle source)

  Returns the copy of the current element.

  Parameters:
    `source` - the given element
  Returns:
    the copy of the given element

### paste

    public static java.util.List paste(IElementCopy copy,
                                       DesignElementHandle container,
                                       int slotID)
                                throws SemanticException

  Pastes a report item to the slot. The item must be newly created and not yet added to the design.

  Parameters:
    `copy` - the copy from the return value of `copy`
    `container` - the target container
    `slotID` - the id of the target slot
  Returns:
    a list containing all errors for the pasted element
  Throws:
    `SemanticException` - if the element is not allowed in the slot

### paste

    public static java.util.List paste(IElementCopy copy,
                                       DesignElementHandle container,
                                       int slotID,
                                       int newPos)
                                throws SemanticException

  Pastes a report item to the slot. The item must be newly created and not yet added to the design.

  Parameters:
    `copy` - the copy from the return value of `copy`
    `container` - the target container
    `slotID` - the id of the target slot
    `newPos` - the target position
  Returns:
    a list containing all errors for the pasted element
  Throws:
    `SemanticException` - if the element is not allowed in the slot

### paste

    public static java.util.List paste(IElementCopy copy,
                                       DesignElementHandle container,
                                       java.lang.String propName)
                                throws SemanticException

  Pastes a report item to the slot. The item must be newly created and not yet added to the design.

  Parameters:
    `copy` - the copy from the return value of `copy`
    `container` - the target container
    `propName` - the property name of the target container
  Returns:
    a list containing all errors for the pasted element
  Throws:
    `SemanticException` - if the element is not allowed in the slot

### paste

    public static java.util.List paste(IElementCopy copy,
                                       DesignElementHandle container,
                                       java.lang.String propName,
                                       int newPos)
                                throws SemanticException

  Pastes a report item to the slot. The item must be newly created and not yet added to the design.

  Parameters:
    `copy` - the copy from the return value of `copy`
    `container` - the target container
    `propName` - the property name of the target container
    `newPos` - the target position
  Returns:
    a list containing all errors for the pasted element
  Throws:
    `SemanticException` - if the element is not allowed in the slot

### canPaste

    public static boolean canPaste(IElementCopy copy,
                                   DesignElementHandle container,
                                   int slotID)

  /** Checks whether the given copy can be pasted into the given slot of the specified element.

  Parameters:
    `copy` - the copied instance
    `container` - the target element
    `slotID` - the target slot id
  Returns:
    `true` is the copy is good for pasting. Otherwise `false`.

### canPaste

    public static boolean canPaste(IElementCopy copy,
                                   DesignElementHandle container,
                                   java.lang.String propName)

  /** Checks whether the given copy can be pasted into the given slot of the specified element.

  Parameters:
    `copy` - the copied instance
    `container` - the target element
    `propName` - the target property name
  Returns:
    `true` is the copy is good for pasting. Otherwise `false`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Actuate Corp. All rights reserved.