View Javadoc
1   /**
2    * 
3    */
4   package de.japrost.excerpt;
5   
6   import java.awt.Rectangle;
7   
8   
9   /**
10   *
11   */
12  public class FixedSpace implements RenderLine {
13  
14  	private int height = 5;
15  
16  	public FixedSpace(final int height) {
17  		super();
18  		this.height = height;
19  	}
20  
21  	/**
22  	 * {@inheritDoc} FixedSpace has a expand of 0.
23  	 */
24  	@Override
25  	public int expand() {
26  		return 0;
27  	}
28  
29  	/**
30  	 * {@inheritDoc}
31  	 */
32  	@Override
33  	public int height() {
34  		return height;
35  	}
36  
37  	/**
38  	 * {@inheritDoc} FixedSpace do not render anything.
39  	 */
40  	@Override
41  	public void render(final Rectangle borders) {
42  		// A spacer does not render
43  		// TODO render somebox on debug?
44  	}
45  
46  	/**
47  	 * {@inheritDoc} FixedSpace aligns centered.
48  	 */
49  	@Override
50  	public int align() {
51  		return 0;
52  	}
53  
54  	/**
55  	 * {@inheritDoc} FixedSpace has no widht.
56  	 */
57  	@Override
58  	public int width() {
59  		return 0;
60  	}
61  
62  }