Package ag.ion.bion.officelayer.document

Examples of ag.ion.bion.officelayer.document.IDocument


   
    try {
      IOfficeApplication officeAplication = OfficeApplicationRuntime.getApplication(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
      IDocument document = documentService.constructNewDocument(IDocument.WRITER, DocumentDescriptor.DEFAULT);
      ITextDocument textDocument = (ITextDocument)document;
     
      /*
       * Now we just place some text in the document
       */
 
View Full Code Here


   
    try {
      IOfficeApplication officeAplication = OfficeApplicationRuntime.getApplication(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
      IDocument document = documentService.constructNewDocument("TestDocument",documentDescriptor);
      ITextDocument textDocument = (ITextDocument)document;
      textDocument.addCloseListener(new SnippetDocumentCloseListener(officeAplication));
     
      /*
       * This stuff was already discussed in Snippet2 but now lets begin to
View Full Code Here

   
    try {
      IOfficeApplication officeAplication = OfficeApplicationRuntime.getApplication(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
      IDocument document = documentService.constructNewDocument(IDocument.WRITER, DocumentDescriptor.DEFAULT);
      ITextDocument textDocument = (ITextDocument)document;
      textDocument.addCloseListener(new SnippetDocumentCloseListener(officeAplication));
     
      /*
       * Now do the work with text content.
View Full Code Here

      final IOfficeApplication officeAplication = OfficeApplicationRuntime
          .getApplication(configuration);
      officeAplication.setConfiguration(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
      IDocument document = documentService.constructNewDocument(
          IDocument.WRITER, new DocumentDescriptor());

      ITextDocument textDocument = (ITextDocument) document;

      boolean useStream = true;
View Full Code Here

   
    try {
      officeAplication = OfficeApplicationRuntime.getApplication(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
      IDocument document = documentService.constructNewDocument(IDocument.WRITER, DocumentDescriptor.DEFAULT);
      ITextDocument textDocument = (ITextDocument)document;
      textDocument.addCloseListener(new InternalCloseListener());
    }
    catch (OfficeApplicationException exception) {
      exception.printStackTrace();
View Full Code Here

      configuration.put(IOfficeApplication.APPLICATION_TYPE_KEY, IOfficeApplication.LOCAL_APPLICATION);
      IOfficeApplication officeAplication = OfficeApplicationRuntime.getApplication(configuration)
      officeAplication.setConfiguration(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
      IDocument document = documentService.constructNewDocument(IDocument.CALC, DocumentDescriptor.DEFAULT);
      ISpreadsheetDocument spreadsheetDocument = (ISpreadsheetDocument) document;
      XSpreadsheets spreadsheets = spreadsheetDocument.getSpreadsheetDocument().getSheets();
      String sheetName= "Tabelle1";
      Object[][] rows = new Object[][]{
          new Object[]{"DataCell1","DataCell2","DataCell3","DataCell4"},
View Full Code Here

   
    try {
      IOfficeApplication officeAplication = OfficeApplicationRuntime.getApplication(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
      IDocument document = documentService.constructNewDocument(IDocument.WRITER, DocumentDescriptor.DEFAULT);
      ITextDocument textDocument = (ITextDocument)document;
      textDocument.addCloseListener(new SnippetDocumentCloseListener(officeAplication));

      /*
       * Now do the work with text content.
View Full Code Here

  private ITextDocument getCurrentTextDocument() {
    IEditorPart editor = getCurrentEditor();
    if (!(editor instanceof OfficeEditor))
      return null;

    IDocument document = ((OfficeEditor) editor).getDocument();
    if (!(document instanceof ITextDocument))
      return null;

    return (ITextDocument) document;
  }
View Full Code Here

                .getName(), FrameSearchFlag.ALL, props); //$NON-NLS-1$ //$NON-NLS-2$
      } else {
        xComponent = xComponentLoader.loadComponentFromURL(factoryURL,
            "_blank", 0, props); //$NON-NLS-1$
      }
      IDocument document = DocumentLoader.getDocument(xComponent,
          serviceProvider, props);
      if (document == null)
        throw new DocumentException(
            "The new document can not be constructed."); //$NON-NLS-1$
      return document;
View Full Code Here

   * @author Andreas Br�ker
   */
  public IDocument loadDocument(String url) throws DocumentException {
    try {
      url = URLAdapter.adaptURL(url);
      IDocument document = DocumentLoader.loadDocument(serviceProvider,
          url);
      if (document != null)
        return document;
      else
        throw new DocumentException(Messages
View Full Code Here

TOP

Related Classes of ag.ion.bion.officelayer.document.IDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.