com.aspose.words

Class TaskPaneDockState

  • java.lang.Object
    • com.aspose.words.TaskPaneDockState
public class TaskPaneDockState 
extends java.lang.Object

Utility class containing constants. Enumerates available locations of task pane object.

Example:

Shows how to create add-ins inside the document.
Document doc = new Document();

// Create taskpane with "MyScript" add-in which will be used by the document
TaskPane myScriptTaskPane = new TaskPane();
doc.getWebExtensionTaskPanes().add(myScriptTaskPane);

// Define task pane location when the document opens
myScriptTaskPane.setDockState(TaskPaneDockState.RIGHT);
myScriptTaskPane.isVisible(true);
myScriptTaskPane.setWidth(300.0);
myScriptTaskPane.isLocked(true);
// Use this option if you have several taskpanes
myScriptTaskPane.setRow(1);

// Add "MyScript Math Sample" add-in which will be displayed inside task pane
// Application Id from store
myScriptTaskPane.getWebExtension().getReference().setId("WA104380646");
// The current version of the application used
myScriptTaskPane.getWebExtension().getReference().setVersion("1.0.0.0");
// Type of marketplace
myScriptTaskPane.getWebExtension().getReference().setStoreType(WebExtensionStoreType.OMEX);
// Marketplace based on your locale
myScriptTaskPane.getWebExtension().getReference().setStore("en-us");
myScriptTaskPane.getWebExtension().getProperties().add(new WebExtensionProperty("MyScript", "MyScript Math Sample"));
myScriptTaskPane.getWebExtension().getBindings().add(new WebExtensionBinding("Binding1", WebExtensionBindingType.TEXT, "104380646"));
// Use this option if you need to block web extension from any action
myScriptTaskPane.getWebExtension().isFrozen(false);

doc.save(getArtifactsDir() + "Document.WebExtension.docx");

Field Summary
static final intRIGHT = 0
Dock the task pane on the right side of the document window.
static final intLEFT = 1
Dock the task pane on the left side of the document window.
 

    • Field Detail

      • RIGHT = 0

        public static final int RIGHT
        Dock the task pane on the right side of the document window.
      • LEFT = 1

        public static final int LEFT
        Dock the task pane on the left side of the document window.