Package com.sun.star.text

Examples of com.sun.star.text.XTextField


   *            the event listener wrapper to be added
   *
   * @author Sebastian R�sgen
   */
  private void addEventListener(XEventListener xEventListener) {
    XTextField xTextField = (XTextField) UnoRuntime.queryInterface(
        XTextField.class, xDependentTextField);
    xTextField.addEventListener(wrapper);
  }
View Full Code Here


   *            the event listener wrapper to be removed
   *
   * @author Sebastian R�sgen
   */
  private void removeEventListener(XEventListener xEventListener) {
    XTextField xTextField = (XTextField) UnoRuntime.queryInterface(
        XTextField.class, xDependentTextField);
    xTextField.removeEventListener(wrapper);
  }
View Full Code Here

      while (xTextRangeCompare.compareRegionEnds(textCursor.getStart(),
          xTextRange.getEnd()) != -1) {
        XPropertySet propertySet = (XPropertySet) UnoRuntime
            .queryInterface(XPropertySet.class, textCursor);
        Any any = (Any) propertySet.getPropertyValue("TextField");
        XTextField xTextField = (XTextField) any.getObject();
        if (xTextField != null)
          arrayList.add(new TextField(textDocument, xTextField));
        if (!textCursor.goRight((short) 1, false))
          break;
      }
View Full Code Here

      XEnumerationAccess xEnumerationAccess = xTextFieldsSupplier.getTextFields();
      XEnumeration xEnumeration = xEnumerationAccess.createEnumeration();
      ArrayList arrayList = new ArrayList();
      while(xEnumeration.hasMoreElements()) {
        Object object = xEnumeration.nextElement();
        XTextField xTextField = (XTextField)UnoRuntime.queryInterface(XTextField.class, object);
        arrayList.add(new TextField(textDocument, xTextField));
      }
      return (ITextField[])arrayList.toArray(new ITextField[arrayList.size()]);
    }
    catch(Exception exception) {
View Full Code Here

      XEnumerationAccess xEnumerationAccess = xTextFieldsSupplier.getTextFields();
      XEnumeration xEnumeration = xEnumerationAccess.createEnumeration();
      ArrayList arrayList = new ArrayList();
      while(xEnumeration.hasMoreElements()) {
        Object object = xEnumeration.nextElement();
        XTextField xTextField = (XTextField)UnoRuntime.queryInterface(XTextField.class, object);
        XServiceInfo xInfo = (XServiceInfo)UnoRuntime.queryInterface(XServiceInfo.class, xTextField);
        if(xInfo.supportsService(ITextFieldService.PLACEHOLDER_TEXTFIELD_ID)){
          arrayList.add(new TextField(textDocument, xTextField));
        }
      }
View Full Code Here

      if(placeholderType < 0 || placeholderType > 4)
        throw new TextException("The placeholder type must be one of the valid static members of com.sun.star.text.PlaceholderType.");
      XMultiServiceFactory xMultiServiceFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class, textDocument.getXTextDocument());
      Object textField = xMultiServiceFactory.createInstance(ITextFieldService.PLACEHOLDER_TEXTFIELD_ID);

      XTextField xTextField = (XTextField)UnoRuntime.queryInterface(XTextField.class, textField);
     
      XPropertySet xPropertySet = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xTextField);
 
      // Grundeinstellung festlegen
      xPropertySet.setPropertyValue("PlaceHolder", name);
View Full Code Here

          .getTextFields();
      XEnumeration xEnumeration = xEnumerationAccess.createEnumeration();
      ArrayList arrayList = new ArrayList();
      while (xEnumeration.hasMoreElements()) {
        Object object = xEnumeration.nextElement();
        XTextField xTextField = (XTextField) UnoRuntime.queryInterface(
            XTextField.class, object);
        arrayList.add(new TextField(textDocument, xTextField));
      }
      return (ITextField[]) arrayList.toArray(new ITextField[arrayList
          .size()]);
View Full Code Here

          .getTextFields();
      XEnumeration xEnumeration = xEnumerationAccess.createEnumeration();
      ArrayList arrayList = new ArrayList();
      while (xEnumeration.hasMoreElements()) {
        Object object = xEnumeration.nextElement();
        XTextField xTextField = (XTextField) UnoRuntime.queryInterface(
            XTextField.class, object);
        XServiceInfo xInfo = (XServiceInfo) UnoRuntime.queryInterface(
            XServiceInfo.class, xTextField);
        if (xInfo
            .supportsService(ITextFieldService.PLACEHOLDER_TEXTFIELD_ID)) {
View Full Code Here

          .queryInterface(XMultiServiceFactory.class, textDocument
              .getXTextDocument());
      Object textField = xMultiServiceFactory
          .createInstance(ITextFieldService.PLACEHOLDER_TEXTFIELD_ID);

      XTextField xTextField = (XTextField) UnoRuntime.queryInterface(
          XTextField.class, textField);

      XPropertySet xPropertySet = (XPropertySet) UnoRuntime
          .queryInterface(XPropertySet.class, xTextField);
View Full Code Here

    XTextRangeCompare xTextRangeCompare = (XTextRangeCompare)UnoRuntime.queryInterface(XTextRangeCompare.class, xTextRange.getText());
    try {     
      while(xTextRangeCompare.compareRegionEnds(textCursor.getStart(), xTextRange.getEnd()) != -1) {
        XPropertySet propertySet = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, textCursor);
        Any any = (Any)propertySet.getPropertyValue("TextField");
        XTextField xTextField = (XTextField)any.getObject()
        if(xTextField != null)
          arrayList.add(new TextField(textDocument, xTextField));
        if(!textCursor.goRight((short)1, false))
          break;
      }
View Full Code Here

TOP

Related Classes of com.sun.star.text.XTextField

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.