com.aspose.words
Class TaskPaneCollection

java.lang.Object
  extended by BaseWebExtensionCollection
      extended by com.aspose.words.TaskPaneCollection
All Implemented Interfaces:
java.lang.Iterable

public class TaskPaneCollection 
extends BaseWebExtensionCollection

Specifies a list of persisted task pane objects.

Example:

Shows how to add a web extension to a document.
Document doc = new Document();

// Create task pane with "MyScript" add-in, which will be used by the document,
// then set its default location.
TaskPane myScriptTaskPane = new TaskPane();
doc.getWebExtensionTaskPanes().add(myScriptTaskPane);
myScriptTaskPane.setDockState(TaskPaneDockState.RIGHT);
myScriptTaskPane.isVisible(true);
myScriptTaskPane.setWidth(300.0);
myScriptTaskPane.isLocked(true);

// If there are multiple task panes in the same docking location, we can set this index to arrange them.
myScriptTaskPane.setRow(1);

// Create an add-in called "MyScript Math Sample", which the task pane will display within.
WebExtension webExtension = myScriptTaskPane.getWebExtension();

// Set application store reference parameters for our add-in, such as the ID.
webExtension.getReference().setId("WA104380646");
webExtension.getReference().setVersion("1.0.0.0");
webExtension.getReference().setStoreType(WebExtensionStoreType.OMEX);
webExtension.getReference().setStore("English (United States)");
webExtension.getProperties().add(new WebExtensionProperty("MyScript", "MyScript Math Sample"));
webExtension.getBindings().add(new WebExtensionBinding("MyScript", WebExtensionBindingType.TEXT, "104380646"));

// Allow the user to interact with the add-in.
webExtension.isFrozen(false);

// We can access the web extension in Microsoft Word via Developer -> Add-ins.
doc.save(getArtifactsDir() + "Document.WebExtension.docx");

// Remove all web extension task panes at once like this.
doc.getWebExtensionTaskPanes().clear();

Assert.assertEquals(0, doc.getWebExtensionTaskPanes().getCount());

Property Getters/Setters Summary
intgetCount()→ inherited from BaseWebExtensionCollection<TaskPane>
          
TaskPaneget(int index)→ inherited from BaseWebExtensionCollection<TaskPane>
          
 
Method Summary
voidclear()→ inherited from BaseWebExtensionCollection<TaskPane>
          
java.util.Iterator<TaskPane>iterator()→ inherited from BaseWebExtensionCollection<TaskPane>
          
voidremove(int index)→ inherited from BaseWebExtensionCollection<TaskPane>
          
 

Property Getters/Setters Detail

getCount

→ inherited from BaseWebExtensionCollection<TaskPane>
public int getCount()

get

→ inherited from BaseWebExtensionCollection<TaskPane>
public TaskPane get(int index)

Method Detail

clear

→ inherited from BaseWebExtensionCollection<TaskPane>
public void clear()

iterator

→ inherited from BaseWebExtensionCollection<TaskPane>
public java.util.Iterator<TaskPaneiterator()

remove

→ inherited from BaseWebExtensionCollection<TaskPane>
public void remove(int index)

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.