/* AbstractBgVob.java * * Copyright (c) 2003 by Asko Soukka * * This file is part of Gzz. * * Gzz is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Gzz 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 GNU Lesser General * Public License for more details. * * You should have received a copy of the GNU Lesser General * Public License along with Gzz; if not, write to the Free * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * * */ /* * Written by Asko Soukka */ package gzz.vob; import java.awt.Color; import java.util.List; import java.util.ArrayList; /** Background Vob is a very basic vob type, which enhances the Vob * currently with the the following features: * * */ public abstract class AbstractBgVob extends Vob implements Colored, Background{ public static final String rcsid = "$Id: AbstractBgVob.java,v 1.1 2003/03/10 14:11:57 humppake Exp $"; public static boolean dbg = false; static final void pa(String s) { System.out.println(s); } /** Flag for drawing the border. */ protected boolean drawBorder = true; /** Background color of the Vob */ protected Color bgColor = Color.white; /** Border color of the Vob */ protected Color borderColor = Color.black; /** List to store Colors. */ protected ArrayList colors = null; /** Add one more color to be drawn inside the Vob. */ public void addColor(Color c) { if (colors == null) colors = new ArrayList(5); if (c != null) colors.add(c); } /** Return the List of colors to be drawn inside the Vob. */ public List getColors() { return colors; } /** Set the background color of the Vob. */ public void setBgColor(Color c) { if (c != null) bgColor = c; } /** Return the background color of the Vob. */ public Color getBgColor() { return bgColor; } /** Set the border color. */ public void setBorderColor(Color c) { if (c != null) borderColor = c; } /** Return the border color. */ public Color getBorderColor() { return borderColor; } /** Enable or disable drawing of border of the Vob. * @param b True if border should be drawn, false otherwise. */ public void setDrawBorder(boolean b) { drawBorder = b; } /** Return the Flag for drawing the border. * @return True if border will be drawn, false otherwise. */ public boolean getDrawBorder() { return drawBorder; } }