Class CreationPolicy

    • Constructor Detail

      • CreationPolicy

        public CreationPolicy()
    • Method Detail

      • create

        public IContentPart<? extends javafx.scene.Node> create​(java.lang.Object content,
                                                                IVisualPart<? extends javafx.scene.Node> parent,
                                                                int index,
                                                                SetMultimap<IContentPart<? extends javafx.scene.Node>,​java.lang.String> anchoreds,
                                                                boolean doFocus,
                                                                boolean doSelect)
        Creates an IContentPart for the given content Object and establishes parent and anchored relationships for the newly created part. Besides, operations are created for the establishment of the parent and anchored relationships within the content model. These operations are part of the operation returned by AbstractPolicy.commit().
        Parameters:
        content - The content Object to be created.
        parent - The IContentPart where the content is added as a child or the IRootPart for 'root' content.
        index - The index for the new element.
        anchoreds - The IContentPart whose content should be attached to the new content under the given roles.
        doFocus - true if the newly created part should be focused.
        doSelect - true if the newly created part should be selected.
        Returns:
        The IContentPart controlling the newly created content.
      • create

        public IContentPart<? extends javafx.scene.Node> create​(java.lang.Object content,
                                                                IVisualPart<? extends javafx.scene.Node> parent,
                                                                SetMultimap<IContentPart<? extends javafx.scene.Node>,​java.lang.String> anchoreds)
        Creates an IContentPart for the given content Object and establishes parent and anchored relationships for the newly created part. The respective content operations are also created. In case the given part is to be created for root contents, the root part is expected to be passed in as parent. The content will then be added to the viewer contents. Besides, operations are created for the establishment of the parent and anchored relationships within the content model. These operations are part of the operation returned by AbstractPolicy.commit().
        Parameters:
        content - The content Object to be created.
        parent - The IContentPart where the content is added as a child.
        anchoreds - The IContentPart whose content should be attached to the new content under the given roles.
        Returns:
        The IContentPart controlling the newly created content.