X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Farchaeopteryx%2FColorSchemeChooser.java;h=9eafb0d2767f2df4a13fa84c00d2da9fe3735057;hb=cb49ee5684c6907b3161db82ff9aea72961b8548;hp=cc76278eb5e05dce172e05cb08930880415e2b4d;hpb=ccf4c584032d16ed0ed8d0678f01305887724f96;p=jalview.git diff --git a/forester/java/src/org/forester/archaeopteryx/ColorSchemeChooser.java b/forester/java/src/org/forester/archaeopteryx/ColorSchemeChooser.java index cc76278..9eafb0d 100644 --- a/forester/java/src/org/forester/archaeopteryx/ColorSchemeChooser.java +++ b/forester/java/src/org/forester/archaeopteryx/ColorSchemeChooser.java @@ -8,7 +8,7 @@ // and Howard Hughes Medical Institute // Copyright (C) 2003-2007 Ethalinda K.S. Cannon // All rights reserved -// +// // This library 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 @@ -18,13 +18,13 @@ // 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 this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // // Contact: phylosoft @ gmail . com -// WWW: www.phylosoft.org/forester +// WWW: https://sites.google.com/site/cmzmasek/home/software/forester package org.forester.archaeopteryx; @@ -49,16 +49,16 @@ import javax.swing.event.ListDataListener; final class ColorSchemeChooser extends JDialog implements ActionListener { - private static final long serialVersionUID = 6150960100859081126L; - private final TreeColorSet _colorset; - private final JComboBox _selector; - private final JPanel _color_panel; - private final JPanel _color_labels[]; - private final JButton _ok_btn; - private final JButton _cancel_btn; - private final MainPanel _main_panel; - private final int _prev_selected_scheme; - private int _selected_scheme; + private static final long serialVersionUID = 6150960100859081126L; + private final TreeColorSet _colorset; + private final JComboBox _selector; + private final JPanel _color_panel; + private final JPanel _color_labels[]; + private final JButton _ok_btn; + private final JButton _cancel_btn; + private final MainPanel _main_panel; + private final int _prev_selected_scheme; + private int _selected_scheme; ColorSchemeChooser( final MainPanel parent, final TreeColorSet colorset ) { setName( "Color Scheme Chooser" ); @@ -77,19 +77,22 @@ final class ColorSchemeChooser extends JDialog implements ActionListener { for( final String element : TreeColorSet.SCHEME_NAMES ) { list.add( element ); } - _selector = new JComboBox( list ); + _selector = new JComboBox( list ); _selector.setMaximumRowCount( list.size() ); _selector.getModel().addListDataListener( new ListDataListener() { + @Override public void contentsChanged( final ListDataEvent e ) { final int selection = _selector.getSelectedIndex(); changeDialogColors( selection ); } + @Override public void intervalAdded( final ListDataEvent e ) { // Not needed. } + @Override public void intervalRemoved( final ListDataEvent e ) { // Not needed. } @@ -117,6 +120,7 @@ final class ColorSchemeChooser extends JDialog implements ActionListener { _ok_btn = new JButton( "OK" ); _ok_btn.addActionListener( new ActionListener() { + @Override public void actionPerformed( final ActionEvent e ) { ok(); } @@ -125,6 +129,7 @@ final class ColorSchemeChooser extends JDialog implements ActionListener { _cancel_btn = new JButton( "Cancel" ); _cancel_btn.addActionListener( new ActionListener() { + @Override public void actionPerformed( final ActionEvent e ) { cancel(); } @@ -135,6 +140,7 @@ final class ColorSchemeChooser extends JDialog implements ActionListener { setCurrentColor( colorset.getCurrentColorScheme() ); } + @Override public void actionPerformed( final ActionEvent e ) { // Not needed. }