*/
package jalview.appletgui;
-import java.util.*;
-
-import java.awt.*;
-import java.awt.event.*;
-
-import jalview.datamodel.*;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.Annotation;
import jalview.renderer.AnnotationRenderer;
import jalview.renderer.AwtRenderPanelI;
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.Image;
+import java.awt.MenuItem;
+import java.awt.Panel;
+import java.awt.PopupMenu;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.AdjustmentEvent;
+import java.awt.event.AdjustmentListener;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+
public class AnnotationPanel extends Panel implements AwtRenderPanelI,
AdjustmentListener, ActionListener, MouseListener,
MouseMotionListener
int activeRow = -1;
- Vector activeRes;
-
final String HELIX = "Helix";
final String SHEET = "Sheet";
if (av.getColumnSelection() != null
&& av.getColumnSelection().size() > 0
&& anot[av.getColumnSelection().getMin()] != null)
+ {
label = anot[av.getColumnSelection().getMin()].displayCharacter;
+ }
if (evt.getActionCommand().equals(REMOVE))
{
int index = av.getColumnSelection().columnAt(i);
if (!av.getColumnSelection().isVisible(index))
+ {
continue;
+ }
if (anot[index] == null)
{
int index = av.getColumnSelection().columnAt(i);
if (!av.getColumnSelection().isVisible(index))
+ {
continue;
+ }
if (anot[index] == null)
{
int index = av.getColumnSelection().columnAt(i);
if (!av.getColumnSelection().isVisible(index))
+ {
continue;
+ }
if (anot[index] == null)
{
anot[index] = new Annotation(label, "", type, 0);
}
-
anot[index].secondaryStructure = type != 'S' ? type : label
.length() == 0 ? ' ' : label.charAt(0);
anot[index].displayCharacter = label;
ap.alignFrame, "Enter Label", 400, 200, true);
if (dialog.accept)
+ {
return dialog.getName();
+ }
else
+ {
return null;
+ }
}
@Override
return;
}
- if (aa == null)
- {
- return;
- }
-
ap.scalePanel.mousePressed(evt);
}
}
}
}
-
- if (activeRes == null)
- {
- activeRes = new Vector();
- activeRes.addElement(String.valueOf(i));
- return;
- }
-
- activeRes.addElement(String.valueOf(i));
}
@Override
return bounds;
}
else
+ {
return null;
+ }
}
}
*/
package jalview.appletgui;
-import java.awt.*;
-import java.util.List;
+import jalview.datamodel.SequenceI;
-import jalview.datamodel.*;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Image;
+import java.awt.Panel;
+import java.util.List;
public class IdCanvas extends Panel
{
*/
package jalview.appletgui;
-import java.awt.*;
-import java.awt.event.*;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceFeature;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.util.UrlLink;
+
+import java.awt.BorderLayout;
+import java.awt.Panel;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
import java.util.List;
import java.util.Vector;
-import jalview.datamodel.*;
-import jalview.util.UrlLink;
-
public class IdPanel extends Panel implements MouseListener,
MouseMotionListener
{
int height)
{
gg.setFont(av.getFont());
-
// Fill in the background
gg.setColor(Color.white);
gg.fillRect(0, 0, width, height);
package jalview.appletgui;
import jalview.api.FeatureRenderer;
-import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
import jalview.schemes.ColourSchemeI;
public int printWrappedAlignment(Graphics pg, int pwidth, int pheight,
int pi) throws PrinterException
{
-
int annotationHeight = 0;
AnnotationLabels labels = null;
if (av.isShowAnnotation())
*/
package jalview.gui;
-import java.awt.*;
-import java.awt.image.*;
+import jalview.datamodel.SequenceI;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.image.BufferedImage;
import java.util.List;
-import javax.swing.*;
-
-import jalview.datamodel.*;
+import javax.swing.JPanel;
/**
* DOCUMENT ME!
import jalview.renderer.AnnotationRenderer;
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.*;
-import javax.swing.*;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.event.ComponentAdapter;
+import java.awt.event.ComponentEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseMotionAdapter;
+import java.awt.image.BufferedImage;
+
+import javax.swing.JPanel;
/**
* DOCUMENT ME!
package jalview.gui;
import jalview.api.FeatureRenderer;
-import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
import jalview.schemes.ColourSchemeI;
*/
package jalview.gui;
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.event.*;
-
-import jalview.datamodel.*;
+import jalview.datamodel.SequenceGroup;
import jalview.util.MessageManager;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+import javax.swing.BorderFactory;
+import javax.swing.JColorChooser;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JSlider;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
public class TextColourChooser
{
AlignmentPanel ap;