/* ColorScheme.java * * Copyright (c) 2003 by Benja Fallenstein * * This file is part of Fenfire. * * Fenfire 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. * * Fenfire 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 Fenfire; if not, write to the Free * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * */ /* * Written by Benja Fallenstein */ package gzz.loom; import java.awt.Color; /** A color scheme for the Loom editor. */ public interface ColorScheme { /** Get the window background color. */ Color getBg(); /** Get the color for the focus and the selected nodes. */ Color getCursorColor(); /** A green color scheme. */ ColorScheme green = new LightColorScheme(0.233f); /** A blue color scheme. */ ColorScheme blue = new LightColorScheme(0.6f); /** A simple implementation of ColorScheme. * (The code is so trivial that I couldn't come up * with tests for it.) */ public static class LightColorScheme implements ColorScheme { float hue; public LightColorScheme(float hue) { this.hue = hue; } public Color getBg() { return Color.getHSBColor(hue, 0.1f, 1f); } public Color getCursorColor() { return Color.getHSBColor(hue, 0.4f, 1f); } } }