Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/mvsteenb/javauitransformer/xmltransformer/components/generic/XmlHorizontalGap.java


1   package com.mvsteenb.javauitransformer.xmltransformer.components.generic;
2   
3   import com.mvsteenb.javauitransformer.xmltransformer.xmlelements.XmlAbstractDataElement;
4   
5   /**
6    * com.mvsteenb.javauitransformer.xmltransformer.components.generic
7    *
8    * <p><b>About</b></p>
9    *
10   * <p>
11   *   This class is part of the JavaUITransformer version @build.version@ (build #@build.number@) which was built on @build.date@.
12   * </p>
13   *
14   * <p><b>Description</b></p>
15   *
16   * <p>
17   *   This is a non-standard component to be able to add a gap component to the xml output
18   * </p>
19   *
20   * <p><b>Free Software</b></p>
21   *
22   * <p>
23   *   Copyright (C) 2003 Mario Van Steenberghe
24   * </p>
25   *
26   * <p>
27   *   <small>
28   *     This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser
29   *     General Public License as published by the Free Software Foundation; either version 2.1 of the License, or
30   *     (at your option) any later version. This library is distributed in the hope that it will be useful,
31   *     but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
32   *     PURPOSE.  See the GNU Lesser General Public License for more details. You should have received a copy of the
33   *     GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc.,
34   *     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
35   *   </small>
36   * </p>
37   *
38   * <p>
39   *   <small>
40   *     Please contact me at mario.vansteenberghe@pandora.be for more information.
41   *   </small>
42   * </p>
43   *
44   * <p><b>Revision History</b></p>
45   *
46   * <p>
47   *   Aug 30, 2003 : mvsteenb : Initial Revision
48   * </p>
49   *
50   */
51  
52  public class XmlHorizontalGap extends XmlAbstractDataElement {
53  
54    private int gap = 0;
55  
56    /**
57     * Constructor
58     */
59  
60    public XmlHorizontalGap(int gap) {
61      super(XmlGenericElementNames.xmlHorizontalGap);
62      this.gap = gap;
63    }
64  
65    // ================================================================================================================ //
66    // protected methods                                                                                                //
67    // ================================================================================================================ //
68  
69    /**
70     * Prepares attributes - this method should be overridden to prepare the element's attributes.
71     */
72  
73    protected void prepareAttributes() {
74      addAttribute("width", gap);
75    }
76  
77  
78  }