*/
package jalview.appletgui;
-import java.util.*;
-
-import java.awt.*;
-import java.awt.event.*;
-
-import jalview.datamodel.*;
-import jalview.schemes.*;
+import jalview.datamodel.SequenceGroup;
+import jalview.schemes.ColourSchemeI;
import jalview.util.MessageManager;
+import java.awt.BorderLayout;
+import java.awt.Button;
+import java.awt.Checkbox;
+import java.awt.Color;
+import java.awt.FlowLayout;
+import java.awt.Frame;
+import java.awt.Label;
+import java.awt.Panel;
+import java.awt.Scrollbar;
+import java.awt.TextField;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.AdjustmentEvent;
+import java.awt.event.AdjustmentListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.util.Iterator;
+
public class SliderPanel extends Panel implements ActionListener,
AdjustmentListener, MouseListener
{
{
while ((toChange = allGroups.next().cs) == null
&& allGroups.hasNext())
+ {
;
+ }
}
else
{
*/
package jalview.appletgui;
-import java.util.*;
-
-import java.awt.*;
-import java.awt.event.*;
-
-import jalview.analysis.*;
-import jalview.datamodel.*;
-import jalview.schemes.*;
-import jalview.util.*;
+import jalview.analysis.Conservation;
+import jalview.analysis.NJTree;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.datamodel.SequenceNode;
+import jalview.schemes.ColourSchemeI;
+import jalview.schemes.ColourSchemeProperty;
+import jalview.schemes.ResidueProperties;
+import jalview.schemes.UserColourScheme;
+import jalview.util.Format;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Panel;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.ScrollPane;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Vector;
public class TreeCanvas extends Panel implements MouseListener,
MouseMotionListener
*/
package jalview.gui;
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.Image;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+
+import javax.swing.JPanel;
/**
* DOCUMENT ME!
*/
package jalview.gui;
-import java.util.*;
+import jalview.datamodel.SequenceGroup;
+import jalview.jbgui.GSliderPanel;
+import jalview.schemes.ColourSchemeI;
+import jalview.util.MessageManager;
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.event.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.util.Iterator;
-import jalview.datamodel.*;
-import jalview.jbgui.*;
-import jalview.schemes.*;
-import jalview.util.MessageManager;
+import javax.swing.JInternalFrame;
+import javax.swing.JLayeredPane;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
/**
* DOCUMENT ME!
*/
package jalview.gui;
-import java.util.*;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.print.*;
-import javax.swing.*;
-
-import jalview.analysis.*;
-import jalview.datamodel.*;
-import jalview.schemes.*;
-import jalview.util.*;
+import jalview.analysis.Conservation;
+import jalview.analysis.NJTree;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.datamodel.SequenceNode;
+import jalview.schemes.ColourSchemeI;
+import jalview.schemes.ColourSchemeProperty;
+import jalview.schemes.ResidueProperties;
+import jalview.schemes.UserColourScheme;
+import jalview.util.Format;
+import jalview.util.MessageManager;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+import java.awt.print.PageFormat;
+import java.awt.print.Printable;
+import java.awt.print.PrinterException;
+import java.awt.print.PrinterJob;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Vector;
+
+import javax.swing.JColorChooser;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.SwingUtilities;
+import javax.swing.ToolTipManager;
/**
* DOCUMENT ME!
if (node.element() instanceof SequenceI)
{
- SequenceI seq = (SequenceI) ((SequenceNode) node).element();
+ SequenceI seq = (SequenceI) node.element();
if (av.getSequenceColour(seq) == Color.white)
{
Rectangle rect = new Rectangle(xend + 10, ypos - charHeight / 2,
charWidth, charHeight);
- nameHash.put((SequenceI) node.element(), rect);
+ nameHash.put(node.element(), rect);
// Colour selected leaves differently
SequenceGroup selected = av.getSelectionGroup();
if ((selected != null)
&& selected.getSequences(null).contains(
- (SequenceI) node.element()))
+ node.element()))
{
g.setColor(Color.gray);
int xend = (int) (height * scale) + offx;
int ypos = (int) (node.ycount * chunk) + offy;
- g.setColor(((SequenceNode) node).color.darker());
+ g.setColor(node.color.darker());
// Draw horizontal line
g.drawLine(xstart, ypos, xend, ypos);
labelLength = fm.stringWidth(longestName) + 20; // 20 allows for scrollbar
- float wscale = (float) (width - labelLength - (offx * 2))
+ float wscale = (width - labelLength - (offx * 2))
/ tree.getMaxHeight();
SequenceNode top = tree.getTopNode();
g2.setColor(Color.gray);
}
- int x = (int) ((threshold * (float) (getWidth() - labelLength - (2 * offx))) + offx);
+ int x = (int) ((threshold * (getWidth() - labelLength - (2 * offx))) + offx);
g2.drawLine(x, 0, x, getHeight());
}