001/*
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 */
021
022
023package org.biojava.bio.gui;
024
025import java.awt.Color;
026import java.awt.Paint;
027
028import org.biojava.bio.symbol.Symbol;
029
030/**
031 * A simple implementation of SymbolStyle that just uses a single paint for
032 * outlines and a single paint for filling.
033 *
034 * @author Matthew Pocock
035 */
036public class PlainStyle implements SymbolStyle {
037  private Paint outlinePaint;
038  private Paint fillPaint;
039  
040  public Paint outlinePaint(Symbol s) {
041    return outlinePaint;
042  }
043  
044  public Paint fillPaint(Symbol s) {
045    return fillPaint;
046  }
047  
048  public PlainStyle() {
049    this(Color.black, Color.gray);
050  }
051  
052  public PlainStyle(Paint outlinePaint, Paint fillPaint) {
053    this.outlinePaint = outlinePaint;
054    this.fillPaint = fillPaint;
055  }
056}