2 // forester -- software libraries and applications
3 // for genomics and evolutionary biology research.
5 // Copyright (C) 2010 Christian M Zmasek
6 // Copyright (C) 2010 Sanford-Burnham Medical Research Institute
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License as published by the Free Software Foundation; either
12 // version 2.1 of the License, or (at your option) any later version.
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Lesser General Public License for more details.
19 // You should have received a copy of the GNU Lesser General Public
20 // License along with this library; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 // Contact: phylosoft @ gmail . com
24 // WWW: www.phylosoft.org/forester
26 package org.forester.development;
28 import java.awt.Color;
29 import java.awt.Graphics;
31 import javax.swing.JComponent;
33 public abstract class AbstractRenderer extends JComponent {
38 private static final long serialVersionUID = 7236434322552764776L;
39 static final Color DEFAULT_COLOR = new Color( 0, 0, 0 );
40 static final Color MARKED_COLOR = new Color( 255, 255, 0 );
41 static final Color USER_FLAGGED_COLOR = new Color( 255, 0, 255 );
42 static final Color SELECTED_COLOR = new Color( 255, 0, 0 );
48 public AbstractRenderer() {
51 abstract MsaRenderer getParentPlateRenderer();
71 abstract boolean isSelected();
74 public abstract void paint( Graphics g );
76 abstract void setIsSelected( boolean flag );
78 void setStatus( final byte status ) {
82 void setWellSize( final int well_size ) {
83 _well_size = well_size;
86 void setX( final int x ) {
90 void setY( final int y ) {