Package com.sun.star.form

Examples of com.sun.star.form.XForm


    public static XLoadable bindForm( XTextDocument aDoc, String formName ) {
        XLoadable formLoader = null;

        try {
            XForm the_form = (XForm) FormTools.getForms(WriterTools.getDrawPage(aDoc)).getByName(formName);
            XPropertySet formProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, the_form);
            formProps.setPropertyValue("DataSourceName","Bibliography");
            formProps.setPropertyValue("Command","biblio");
            formProps.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.TABLE));
            formLoader = (XLoadable) UnoRuntime.queryInterface(XLoadable.class, the_form);
View Full Code Here


  * implementation which is the bound form inside the document.
  */
    public static XLoadable bindForm( XTextDocument aDoc, String formName, String sourceName,
      String tableName) throws com.sun.star.uno.Exception {

        XForm the_form = (XForm) AnyConverter.toObject(new Type(XForm.class),
            FormTools.getForms(WriterTools.getDrawPage(aDoc)).getByName(formName));
        XPropertySet formProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, the_form);
        formProps.setPropertyValue("DataSourceName",sourceName);
        formProps.setPropertyValue("Command",tableName);
        formProps.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.TABLE));
View Full Code Here

           
            tEnv.addObjRelation("XUserInputInterception.XModel", aModel);
           
            // XForm for com.sun.star.view.XFormLayerAccess
           
            XForm myForm = null;
            String kindOfControl="CommandButton";
            XShape aShape = null;
            try{
                log.println("adding contol shape '" + kindOfControl + "'");
                XComponent oComp = (XComponent) UnoRuntime.queryInterface(XComponent.class, xSpreadsheetDoc) ;
View Full Code Here

        // a test is the last one cleanup was called twice. The second call
        // causes then nasty exceptions...
        if (m_ConnectionColsed) return;
       
        try {
            XForm myForm = (XForm) AnyConverter.toObject(new Type(XForm.class),
                                                 (FormTools.getForms(
                                                         WriterTools.getDrawPage(
                                                                 m_xTextDoc)))
                                                     .getByName("Standard"));
           
View Full Code Here

        tEnv.addObjRelation("DATAAREA", dataArea);
       
        // XForm for com.sun.star.view.XFormLayerAccess
        log.println("adding relation for com.sun.star.view.XFormLayerAccess: XForm");
       
        XForm myForm = null;
        String kindOfControl="CommandButton";
        XShape aShape = null;
        try{
            log.println("adding contol shape '" + kindOfControl + "'");
            XComponent oComp = (XComponent) UnoRuntime.queryInterface(XComponent.class, xSpreadsheetDoc) ;
View Full Code Here

        try {
            xCtrl1 = access.getControl(model);
        } catch (Exception e) {
        }

        XForm form = null;

        try {
            form = (XForm) AnyConverter.toObject(new Type(XForm.class),
                                                 (FormTools.getForms(
                                                         WriterTools.getDrawPage(
View Full Code Here

          XIndexContainer indexContainer = (XIndexContainer) UnoRuntime
              .queryInterface(XIndexContainer.class,
                  nameContainer);
          int len = indexContainer.getCount();
          for (int i = 0; i < len; i++) {
            XForm tmpForm = (XForm) UnoRuntime.queryInterface(
                XForm.class, indexContainer.getByIndex(i));
            if (tmpForm != null
                && UnoRuntime.areSame(form.getXFormComponent(),
                    tmpForm)) {
              XEventAttacherManager tmpEventAttacherManager = (XEventAttacherManager) UnoRuntime
View Full Code Here

          XIndexContainer indexContainer = (XIndexContainer) UnoRuntime
              .queryInterface(XIndexContainer.class,
                  nameContainer);
          int len = indexContainer.getCount();
          for (int i = 0; i < len; i++) {
            XForm tmpForm = (XForm) UnoRuntime.queryInterface(
                XForm.class, indexContainer.getByIndex(i));
            if (tmpForm != null
                && UnoRuntime.areSame(form.getXFormComponent(),
                    tmpForm)) {
              XIndexContainer container = (XIndexContainer) UnoRuntime
View Full Code Here

        if(formsSupplier != null) {
          XNameContainer nameContainer = formsSupplier.getForms();
          XIndexContainer indexContainer = (XIndexContainer) UnoRuntime.queryInterface(XIndexContainer.class, nameContainer);
          int len = indexContainer.getCount();
          for(int i = 0; i < len; i++) {
            XForm tmpForm = (XForm) UnoRuntime.queryInterface(XForm.class, indexContainer.getByIndex(i));
            if(tmpForm != null && UnoRuntime.areSame(form.getXFormComponent(),tmpForm)) {
              XEventAttacherManager tmpEventAttacherManager =
                (XEventAttacherManager) UnoRuntime.queryInterface(XEventAttacherManager.class, tmpForm);
              return tmpEventAttacherManager;
            }
View Full Code Here

        if(formsSupplier != null) {
          XNameContainer nameContainer = formsSupplier.getForms();
          XIndexContainer indexContainer = (XIndexContainer) UnoRuntime.queryInterface(XIndexContainer.class, nameContainer);
          int len = indexContainer.getCount();
          for(int i = 0; i < len; i++) {
            XForm tmpForm = (XForm) UnoRuntime.queryInterface(XForm.class, indexContainer.getByIndex(i));
            if(tmpForm != null && UnoRuntime.areSame(form.getXFormComponent(),tmpForm)) {   
              XIndexContainer container = (XIndexContainer) UnoRuntime.queryInterface(XIndexContainer.class, tmpForm);
              int lenFormPComponents = container.getCount();          
              for(int j = 0; j < lenFormPComponents; j++) {
                Object tmpObject = container.getByIndex(j);
View Full Code Here

TOP

Related Classes of com.sun.star.form.XForm

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.