001 /*
002 * Copyright 2002 - 2007 JEuclid, http://jeuclid.sf.net
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017 /* $Id: LayoutableNode.java,v 8afef6dd0d58 2007/09/14 08:29:58 maxberger $ */
018
019 package net.sourceforge.jeuclid.layout;
020
021 import java.util.List;
022
023 import net.sourceforge.jeuclid.LayoutContext;
024 import net.sourceforge.jeuclid.elements.JEuclidNode;
025
026 import org.w3c.dom.Node;
027
028 /**
029 * @version $Revision: 8afef6dd0d58 $
030 */
031 public interface LayoutableNode extends Node, JEuclidNode {
032
033 /**
034 * @return List of children to Layout. Normally, all children.
035 */
036 List<LayoutableNode> getChildrenToLayout();
037
038 /**
039 * @return List of children to Draw. Normally, all children.
040 */
041 List<LayoutableNode> getChildrenToDraw();
042
043 /**
044 * context insensitive layout.
045 *
046 * @param view
047 * LayoutView to use.
048 * @param info
049 * LayoutInfo to manipulate.
050 * @param childMinStage
051 * minimum stage of children. Either STAGE1 or STAGE2.
052 * @param context
053 * LayoutContext for this element.
054 */
055 void layoutStage1(LayoutView view, LayoutInfo info,
056 LayoutStage childMinStage, LayoutContext context);
057
058 /**
059 * context sensitive layout.
060 *
061 * @param view
062 * LayoutView to use.
063 * @param info
064 * LayoutInfo to manipulate.
065 * @param context
066 * LayoutContext for this element.
067 */
068 void layoutStage2(LayoutView view, LayoutInfo info, LayoutContext context);
069
070 }