KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > lobobrowser > html > renderer > RElement


1 /*
2     GNU LESSER GENERAL PUBLIC LICENSE
3     Copyright (C) 2006 The Lobo Project
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Lesser General Public
7     License as published by the Free Software Foundation; either
8     version 2.1 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13     Lesser General Public License for more details.
14
15     You should have received a copy of the GNU Lesser General Public
16     License along with this library; if not, write to the Free Software
17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19     Contact info: xamjadmin@users.sourceforge.net
20 */

21
22 package org.lobobrowser.html.renderer;
23
24 import org.lobobrowser.html.domimpl.*;
25 import org.lobobrowser.html.style.RenderState;
26
27 /**
28  * A renderer node for elements such as blocks, lists, tables, inputs, images, etc.
29  */

30 public interface RElement extends RCollection, UINode, BoundableRenderable {
31     /**
32      * Lays out the subtree below the RElement.
33      * The RElement is expected to set its own dimensions, but not its origin.
34      * @param availWidth The available width from the parent's canvas.
35      * @param availHeight The available height from the parent's canvas.
36      * @param expandWidth Whether width should be expanded to fill availWidth.
37      * @param expandHeight Whether height should be expanded to fill availHeight.
38      */

39     public void layout(int availWidth, int availHeight, boolean expandWidth, boolean expandHeight);
40     
41     /**
42      * Vertical alignment for elements rendered in a line.
43      * Returns one of the constants defined in this class.
44      */

45     public int getVAlign();
46     
47     public static final int VALIGN_TOP = 0;
48     public static final int VALIGN_MIDDLE = 1;
49     public static final int VALIGN_BOTTOM = 2;
50     public static final int VALIGN_ABSMIDDLE = 3;
51     public static final int VALIGN_ABSBOTTOM = 4;
52     public static final int VALIGN_BASELINE = 5;
53 }
54
Popular Tags