Package org.odftoolkit.simple.style

Examples of org.odftoolkit.simple.style.GraphicProperties


      // change the bounding box
      find.setAnchorType(AnchorType.TO_CHARACTER);
      // validate
      ControlStyleHandler frameStyleHandler = find.getDrawControl()
          .getStyleHandler();
      GraphicProperties graphicPropertiesForWrite = frameStyleHandler
          .getGraphicPropertiesForWrite();
      Assert.assertEquals(VerticalRelative.PARAGRAPH,
          graphicPropertiesForWrite.getVerticalRelative());
      Assert.assertEquals(FrameVerticalPosition.TOP,
          graphicPropertiesForWrite.getVerticalPosition());
      Assert.assertEquals(HorizontalRelative.PARAGRAPH,
          graphicPropertiesForWrite.getHorizontalRelative());
      Assert.assertEquals(FrameHorizontalPosition.CENTER,
          graphicPropertiesForWrite.getHorizontalPosition());

      textDoc.save(ResourceUtilities
          .newTestOutputFile("TestSetRadioButtonAnchorType.odt"));
    } catch (Exception e) {
      Logger.getLogger(RadioButtonTest.class.getName()).log(Level.SEVERE,
View Full Code Here


      // change the bounding box
      find.setAnchorType(AnchorType.AS_CHARACTER);
      // validate
      ControlStyleHandler frameStyleHandler = find.getDrawControl()
          .getStyleHandler();
      GraphicProperties graphicPropertiesForWrite = frameStyleHandler
          .getGraphicPropertiesForWrite();
      Assert.assertEquals(VerticalRelative.BASELINE,
          graphicPropertiesForWrite.getVerticalRelative());
      Assert.assertEquals(FrameVerticalPosition.TOP,
          graphicPropertiesForWrite.getVerticalPosition());

      textDoc.save(ResourceUtilities
          .newTestOutputFile("TestSetFieldAnchorType.odt"));
    } catch (Exception e) {
      Logger.getLogger(FieldTest.class.getName()).log(Level.SEVERE, null,
View Full Code Here

      // change the bounding box
      find.setAnchorType(AnchorType.AS_CHARACTER);
      // validate
      ControlStyleHandler frameStyleHandler = find.getDrawControl()
          .getStyleHandler();
      GraphicProperties graphicPropertiesForWrite = frameStyleHandler
          .getGraphicPropertiesForWrite();
      Assert.assertEquals(VerticalRelative.BASELINE,
          graphicPropertiesForWrite.getVerticalRelative());
      Assert.assertEquals(FrameVerticalPosition.TOP,
          graphicPropertiesForWrite.getVerticalPosition());

      textDoc.save(ResourceUtilities
          .newTestOutputFile("TestSetTextBoxAnchorType.odt"));
    } catch (Exception e) {
      Logger.getLogger(TextBoxTest.class.getName()).log(Level.SEVERE,
View Full Code Here

      // change the bounding box
      find.setAnchorType(AnchorType.AS_CHARACTER);
      // validate
      ControlStyleHandler frameStyleHandler = find.getDrawControl()
          .getStyleHandler();
      GraphicProperties graphicPropertiesForWrite = frameStyleHandler
          .getGraphicPropertiesForWrite();
      Assert.assertEquals(VerticalRelative.BASELINE,
          graphicPropertiesForWrite.getVerticalRelative());
      Assert.assertEquals(FrameVerticalPosition.TOP,
          graphicPropertiesForWrite.getVerticalPosition());

      textDoc.save(ResourceUtilities
          .newTestOutputFile("TestSetListBoxAnchorType.odt"));
    } catch (Exception e) {
      Logger.getLogger(ListBoxTest.class.getName()).log(Level.SEVERE,
View Full Code Here

      // change the bounding box
      find.setAnchorType(AnchorType.TO_CHARACTER);
      // validate
      ControlStyleHandler frameStyleHandler = find.getDrawControl()
          .getStyleHandler();
      GraphicProperties graphicPropertiesForWrite = frameStyleHandler
          .getGraphicPropertiesForWrite();
      Assert.assertEquals(VerticalRelative.PARAGRAPH,
          graphicPropertiesForWrite.getVerticalRelative());
      Assert.assertEquals(FrameVerticalPosition.TOP,
          graphicPropertiesForWrite.getVerticalPosition());
      Assert.assertEquals(HorizontalRelative.PARAGRAPH,
          graphicPropertiesForWrite.getHorizontalRelative());
      Assert.assertEquals(FrameHorizontalPosition.CENTER,
          graphicPropertiesForWrite.getHorizontalPosition());

      textDoc.save(ResourceUtilities
          .newTestOutputFile("TestSetCheckBoxAnchorType.odt"));
    } catch (Exception e) {
      Logger.getLogger(CheckBoxTest.class.getName()).log(Level.SEVERE,
View Full Code Here

      // change the bounding box
      find.setAnchorType(AnchorType.AS_CHARACTER);
      // validate
      ControlStyleHandler frameStyleHandler = find.getDrawControl()
          .getStyleHandler();
      GraphicProperties graphicPropertiesForWrite = frameStyleHandler
          .getGraphicPropertiesForWrite();
      Assert.assertEquals(VerticalRelative.BASELINE,
          graphicPropertiesForWrite.getVerticalRelative());
      Assert.assertEquals(FrameVerticalPosition.TOP,
          graphicPropertiesForWrite.getVerticalPosition());

      textDoc.save(ResourceUtilities
          .newTestOutputFile("TestSetButtonAnchorType.odt"));
    } catch (Exception e) {
      Logger.getLogger(ButtonTest.class.getName()).log(Level.SEVERE,
View Full Code Here

      // change the bounding box
      find.setAnchorType(AnchorType.AS_CHARACTER);
      // validate
      ControlStyleHandler frameStyleHandler = find.getDrawControl()
          .getStyleHandler();
      GraphicProperties graphicPropertiesForWrite = frameStyleHandler
          .getGraphicPropertiesForWrite();
      Assert.assertEquals(VerticalRelative.BASELINE,
          graphicPropertiesForWrite.getVerticalRelative());
      Assert.assertEquals(FrameVerticalPosition.TOP,
          graphicPropertiesForWrite.getVerticalPosition());

      textDoc.save(ResourceUtilities
          .newTestOutputFile("TestSetComboBoxAnchorType.odt"));
    } catch (Exception e) {
      Logger.getLogger(ComboBoxTest.class.getName()).log(Level.SEVERE,
View Full Code Here

     
      textDoc.changeMode(OdfMediaType.TEXT_TEMPLATE);
      frameStyleHandler.setAchorType(StyleTypeDefinitions.AnchorType.TO_CHARACTER);
     
      //validate
      GraphicProperties graphicPropertiesForWrite = frameStyleHandler.getGraphicPropertiesForWrite();
      Assert.assertEquals(VerticalRelative.PARAGRAPH, graphicPropertiesForWrite.getVerticalRelative());
      Assert.assertEquals(FrameVerticalPosition.TOP, graphicPropertiesForWrite.getVerticalPosition());
      Assert.assertEquals(HorizontalRelative.PARAGRAPH, graphicPropertiesForWrite.getHorizontalRelative());
      Assert.assertEquals(FrameHorizontalPosition.CENTER, graphicPropertiesForWrite.getHorizontalPosition());
     
      //save
      textDoc.save(ResourceUtilities.newTestOutputFile("textsample.odt"));

    } catch (Exception e) {
View Full Code Here

      // change the bounding box
      find.setAnchorType(AnchorType.AS_CHARACTER);
      // validate
      ControlStyleHandler frameStyleHandler = find.getDrawControl()
          .getStyleHandler();
      GraphicProperties graphicPropertiesForWrite = frameStyleHandler
          .getGraphicPropertiesForWrite();
      Assert.assertEquals(VerticalRelative.BASELINE,
          graphicPropertiesForWrite.getVerticalRelative());
      Assert.assertEquals(FrameVerticalPosition.TOP,
          graphicPropertiesForWrite.getVerticalPosition());

      textDoc.save(ResourceUtilities
          .newTestOutputFile("TestSetLabelAnchorType.odt"));
    } catch (Exception e) {
      Logger.getLogger(LabelTest.class.getName()).log(Level.SEVERE, null,
View Full Code Here

     
      textDoc.changeMode(OdfMediaType.TEXT_TEMPLATE);
      frameStyleHandler.setAchorType(StyleTypeDefinitions.AnchorType.AS_CHARACTER);
     
      //validate
      GraphicProperties graphicPropertiesForWrite = frameStyleHandler.getGraphicPropertiesForWrite();
      Assert.assertEquals(VerticalRelative.BASELINE, graphicPropertiesForWrite.getVerticalRelative());
      Assert.assertEquals(FrameVerticalPosition.TOP, graphicPropertiesForWrite.getVerticalPosition());
     
      //save
      textDoc.save(ResourceUtilities.newTestOutputFile("textsample.odt"));

    } catch (Exception e) {
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.