001 /*--------------------------------------------------------------------------+ 002 $Id: ITreeMapLayoutAlgorithm.java 26931 2010-03-17 14:53:13Z besenreu $ 003 | | 004 | Copyright 2005-2010 Technische Universitaet Muenchen | 005 | | 006 | Licensed under the Apache License, Version 2.0 (the "License"); | 007 | you may not use this file except in compliance with the License. | 008 | You may obtain a copy of the License at | 009 | | 010 | http://www.apache.org/licenses/LICENSE-2.0 | 011 | | 012 | Unless required by applicable law or agreed to in writing, software | 013 | distributed under the License is distributed on an "AS IS" BASIS, | 014 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 015 | See the License for the specific language governing permissions and | 016 | limitations under the License. | 017 +--------------------------------------------------------------------------*/ 018 package edu.tum.cs.commons.treemap; 019 020 import java.awt.geom.Rectangle2D; 021 022 /** 023 * Interface for tree map layout algorithms. 024 * 025 * @author Benjamin Hummel 026 * @author $Author: besenreu $ 027 * @version $Rev: 26931 $ 028 * @levd.rating GREEN Hash: C54FF1C4247AFEB5CBBEE81A2848B9E2 029 */ 030 public interface ITreeMapLayoutAlgorithm { 031 032 /** 033 * Modifies the given tree by adding layout information. The topmost 034 * rectangle will be the given target rectangle. All other nodes will be 035 * assigned rectangles which sum exactly to the the rectangle of they target 036 * node and have areas proportional to their size. 037 */ 038 public <T> void layout(ITreeMapNode<T> tree, Rectangle2D target); 039 }