Code example for Attributes

Methods: getValue

0
   * @param attrs the attributes. 
   * @throws SAXException if there is a parsing error. 
   */ 
  protected void startParsing(final Attributes attrs) throws SAXException
  { 
    final Dimension2D pageSize = DoubleDimensionConverter.getObject(attrs.getValue(getUri(), "pageSize"));
    final double topBorder = Double.parseDouble(attrs.getValue(getUri(), "topBorder"));
    final double leftBorder = Double.parseDouble(attrs.getValue(getUri(), "leftBorder"));
    final double bottomBorder = Double.parseDouble(attrs.getValue(getUri(), "bottomBorder"));
    final double rightBorder = Double.parseDouble(attrs.getValue(getUri(), "rightBorder"));
 
    final Paper paper = PageFormatFactory.getInstance().createPaper(pageSize.getWidth(), pageSize.getHeight());
    PageFormatFactory.getInstance().setBorders(paper, topBorder, leftBorder, bottomBorder, rightBorder);
 
    pageFormat = new PageFormat();
    pageFormat.setPaper(paper);
 
  } 
 
  /** 
   * Returns the object for this element or null, if this element does