Interface IPattern

    • Method Detail

      • isPaletteApplicable

        boolean isPaletteApplicable()
        Determines whether the pattern supports the creation of new business objects from the palette. Setting this to false will suppress the creation of a palette item for this pattern.
        Returns:
        true if the pattern supports the ICreate methods and a palette item should be generated
      • getCreateName

        java.lang.String getCreateName()
        Gets the create name.
        Specified by:
        getCreateName in interface ICreateInfo
        Returns:
        name for UI representation
      • getCreateDescription

        java.lang.String getCreateDescription()
        Gets the create description.
        Specified by:
        getCreateDescription in interface ICreateInfo
        Returns:
        description for UI representation
      • setFeatureProvider

        void setFeatureProvider​(IFeatureProvider fp)
        Sets the feature provider.
        Parameters:
        fp - the new feature provider
      • isMainBusinessObjectApplicable

        boolean isMainBusinessObjectApplicable​(java.lang.Object mainBusinessObject)
        This method must be implemented by the pattern user. The main pictogram element of the pattern is linked with the main business object.
        Parameters:
        mainBusinessObject - the main business object
        Returns:
        True, if this pattern is responsible for the main business object
      • completeInfo

        void completeInfo​(IDirectEditingInfo info,
                          java.lang.Object bo)
        Complete the directEditing info. This information is needed to switch automatically into the direct editing mode. (e.g. after creation of a new object)
        Parameters:
        info - the directEditing info
        bo - the business object
      • completeInfo

        void completeInfo​(IDirectEditingInfo info,
                          java.lang.Object bo,
                          java.lang.String keyProperty)
        Complete the directEditing info. This information is needed to switch automatically into the direct editing mode. (e.g. after creation of a new object)
        Parameters:
        info - the directEditing info
        bo - the business object
        keyProperty - the key property
      • add

        PictogramElement add​(IAddContext context)
        Clients must override this method to provide the functionality to add an existing domain object to a diagram. Corresponds to the IAdd.add(IAddContext) method. The default implementation simply does nothing and returns null.
        Specified by:
        add in interface IAdd
        Parameters:
        context - The add context holding information about the added domain object.
        Returns:
        The root shape of the created pictogram tree.
      • canAdd

        boolean canAdd​(IAddContext context)
        Clients must override this method to indicate the framework that this pattern can add a domain object to the diagram. Corresponds to the IAdd.canAdd(IAddContext) method. The default implementation simply returns false.
        Specified by:
        canAdd in interface IAdd
        Parameters:
        context - The add context holding information about the added domain object.
        Returns:
        true, if the domain object can be added, false otherwise.
      • getResizeConfiguration

        IResizeConfiguration getResizeConfiguration​(IResizeShapeContext context)
        Provides configuration object, which describes the resize behavior.
        Parameters:
        context - the resizing context
        Returns:
        the resize configuration object
      • hasDoneChanges

        boolean hasDoneChanges​(java.lang.Class<?> actionType)
        Is queried by the framework after a pattern has been executed to find out if this pattern should appear in the undo stack. By default all patterns should appear there (see implementation in AbstractPattern), but single pattern may decide to override this behavior. Note that this is a dynamic attribute of the pattern that is queried each time after the pattern has been executed.

        IMPORTANT NOTE: The implementor of the feature is responsible for correctly implementing this method! It will lead to inconsistencies if this method returns false although the pattern did changes.

        Parameters:
        actionType - the followings types are currently supported: IDelete.class, IRemove.class
        Returns:
        true if the last action of the pattern from this action type should appear in the undo stack, false otherwise
        Since:
        0.9