Package org.odftoolkit.simple.style

Examples of org.odftoolkit.simple.style.GraphicProperties


   * Return the horizontal relative
   * @return the horizontal relative
   */
  public HorizontalRelative getHorizontalRelative()
  {
    GraphicProperties graphicPropertiesForRead = getGraphicPropertiesForRead();
    return graphicPropertiesForRead.getHorizontalRelative();
  }
View Full Code Here


        Document.OdfMediaType.TEXT.getMediaTypeString())
        && !mDocument.getMediaTypeString().equals(
            Document.OdfMediaType.TEXT_TEMPLATE
                .getMediaTypeString()))
      return;
    GraphicProperties graphicPropertiesForWrite = getGraphicPropertiesForWrite();

    DrawControlElement controlElement = (DrawControlElement) mOdfElement;
    controlElement.setTextAnchorTypeAttribute(achorType.toString());

    // set default relative
    switch (achorType) {
    case AS_CHARACTER:
      graphicPropertiesForWrite
          .setVerticalRelative(VerticalRelative.BASELINE);
      graphicPropertiesForWrite
          .setVerticalPosition(FrameVerticalPosition.TOP);
      break;
    case TO_CHARACTER:
      graphicPropertiesForWrite
          .setVerticalRelative(VerticalRelative.PARAGRAPH);
      graphicPropertiesForWrite
          .setVerticalPosition(FrameVerticalPosition.TOP);
      graphicPropertiesForWrite
          .setHorizontalRelative(HorizontalRelative.PARAGRAPH);
      graphicPropertiesForWrite
          .setHorizontalPosition(FrameHorizontalPosition.CENTER);
      break;
    case TO_PAGE:
      controlElement.setTextAnchorPageNumberAttribute(Integer.valueOf(1));
      graphicPropertiesForWrite
          .setVerticalRelative(VerticalRelative.PAGE);
      graphicPropertiesForWrite
          .setVerticalPosition(FrameVerticalPosition.FROMTOP);
      graphicPropertiesForWrite
          .setHorizontalRelative(HorizontalRelative.PARAGRAPH);
      graphicPropertiesForWrite
          .setHorizontalPosition(FrameHorizontalPosition.FROMLEFT);
      break;
    case TO_PARAGRAPH:
      graphicPropertiesForWrite
          .setVerticalRelative(VerticalRelative.PARAGRAPH);
      graphicPropertiesForWrite
          .setVerticalPosition(FrameVerticalPosition.TOP);
      graphicPropertiesForWrite
          .setHorizontalRelative(HorizontalRelative.PARAGRAPH);
      graphicPropertiesForWrite
          .setHorizontalPosition(FrameHorizontalPosition.CENTER);
      break;
    case TO_FRAME:
      break;
    }
View Full Code Here

TOP

Related Classes of org.odftoolkit.simple.style.GraphicProperties

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.