/* CombinedView.zob * * You may use and distribute under the terms of either the GNU Lesser * General Public License, either version 2 of the license or, * at your choice, any later version. Alternatively, you may use and * distribute under the terms of the XPL. * * See the LICENSE.lgpl and LICENSE.xpl files for the specific terms of * the licenses. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the README * file for more details. * */ /* * Written by Benjamin Fallenstein */ package org.gzigzag; import java.awt.*; /** A view that shows all views of the accursed cell next to each other. */ public class CombinedView implements FlobView, ZOb { public static final String rcsid = "$Id: CombinedView.zob,v 1.6 2000/12/31 15:15:50 bfallenstein Exp $"; /** Should we print out debugging info? */ public static boolean dbg = false; static final void p(String s) { if(dbg) pa(s); } static final void pa(String s) { System.out.println(s); } STRUCTPARAMS {} public void raster(FlobSet into, FlobFactory fact, ZZCell win, String[] dims, ZZCell accursed) { ZZCell[] apps = ApplitudeMgr.getApplitudes(accursed); if(apps.length == 0) apps = new ZZCell[] { ApplitudeMgr.getFallback(win.getSpace()) }; int n = apps.length; ZZCell pref = ApplitudeMgr.getWindowApp(win); Dimension size = new Dimension(into.getSize()); if(pref != null) fact.centerFlob(into, pref, pref, (float)1.5, new Point(size.width, size.height), 1, 1, 1); size.width = size.width / n; for(int i=0; i