From 4468c1e39c57fbb67192207b4c8750dab1b1dedd Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Thu, 15 Jun 2023 16:59:03 +0100 Subject: [PATCH] JAL-3416 Use JalviewInternalFrame instead of new JInternalFrame --- src/jalview/bin/Jalview.java | 1 + src/jalview/fts/core/GFTSPanel.java | 6 ++-- src/jalview/gui/AlignFrame.java | 6 ++-- src/jalview/gui/AlignViewport.java | 4 +-- src/jalview/gui/AnnotationChooser.java | 6 ++-- src/jalview/gui/AnnotationColourChooser.java | 4 +-- src/jalview/gui/AnnotationColumnChooser.java | 4 +-- src/jalview/gui/AnnotationExporter.java | 6 ++-- src/jalview/gui/AnnotationRowFilter.java | 4 +-- src/jalview/gui/AppVarna.java | 4 +-- src/jalview/gui/CalculationChooser.java | 6 ++-- src/jalview/gui/ChimeraViewFrame.java | 4 +-- src/jalview/gui/Desktop.java | 21 ++++++------ src/jalview/gui/FeatureSettings.java | 6 ++-- src/jalview/gui/Finder.java | 4 +-- src/jalview/gui/FontChooser.java | 6 ++-- src/jalview/gui/JalviewInternalFrame.java | 25 ++++++++++++++ src/jalview/gui/JvOptionPane.java | 22 ++++++------ src/jalview/gui/OverviewPanel.java | 10 +++--- src/jalview/gui/PopupMenu.java | 10 +++--- src/jalview/gui/Preferences.java | 6 ++-- src/jalview/gui/PymolViewer.java | 4 +-- src/jalview/gui/RedundancyPanel.java | 6 ++-- src/jalview/gui/SequenceFetcher.java | 6 ++-- src/jalview/gui/SliderPanel.java | 14 ++++---- src/jalview/gui/SplashScreen.java | 6 ++-- src/jalview/gui/SplitFrame.java | 4 +-- src/jalview/gui/UserDefinedColours.java | 6 ++-- src/jalview/gui/VamsasApplication.java | 25 +++++++------- src/jalview/gui/WebserviceInfo.java | 6 ++-- src/jalview/io/VamsasAppDatastore.java | 41 +++++++++++------------ src/jalview/jbgui/GAlignFrame.java | 4 +-- src/jalview/jbgui/GCutAndPasteHtmlTransfer.java | 4 +-- src/jalview/jbgui/GCutAndPasteTransfer.java | 4 +-- src/jalview/jbgui/GPCAPanel.java | 4 +-- src/jalview/jbgui/GRnaStructureViewer.java | 4 +-- src/jalview/jbgui/GSplitFrame.java | 8 ++--- src/jalview/jbgui/GStructureChooser.java | 6 ++-- src/jalview/jbgui/GStructureViewer.java | 4 +-- src/jalview/jbgui/GTreePanel.java | 4 +-- src/jalview/project/Jalview2XML.java | 2 +- src/jalview/ws/jws2/MsaWSThread.java | 4 +-- 42 files changed, 178 insertions(+), 153 deletions(-) create mode 100644 src/jalview/gui/JalviewInternalFrame.java diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 6d2866a..eeac532 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -1403,6 +1403,7 @@ public class Jalview private static boolean setFlatLookAndFeel() { boolean set = false; + UIManager.put("InternalFrame.dropShadowPainted", false); if (SystemInfo.isMacOS) { try diff --git a/src/jalview/fts/core/GFTSPanel.java b/src/jalview/fts/core/GFTSPanel.java index dd7fd94..ba5f123 100644 --- a/src/jalview/fts/core/GFTSPanel.java +++ b/src/jalview/fts/core/GFTSPanel.java @@ -50,7 +50,7 @@ import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JFrame; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; @@ -90,7 +90,7 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI { private static final Font VERDANA_12 = new Font("Verdana", 0, 12); - protected JInternalFrame mainFrame = new JInternalFrame( + protected JalviewInternalFrame mainFrame = new JalviewInternalFrame( getFTSFrameTitle()); protected JTabbedPane tabs = new JTabbedPane(); @@ -826,7 +826,7 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI return cmb_searchTarget; } - public JInternalFrame getMainFrame() + public JalviewInternalFrame getMainFrame() { return mainFrame; } diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 5c2f2f6..41777d8 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -3496,7 +3496,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, pane = editPane; } - JInternalFrame frame = new JInternalFrame(); + JalviewInternalFrame frame = new JalviewInternalFrame(); frame.setFrameIcon(null); frame.getContentPane().add(new JScrollPane(pane)); @@ -3524,7 +3524,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { return alignPanel.overviewPanel; } - JInternalFrame frame = new JInternalFrame(); + JalviewInternalFrame frame = new JalviewInternalFrame(); frame.setFrameIcon(null); final OverviewPanel overview = new OverviewPanel(alignPanel, frame, showHidden); @@ -3803,7 +3803,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } else { - JInternalFrame frame = new JInternalFrame(); + JalviewInternalFrame frame = new JalviewInternalFrame(); frame.setFrameIcon(null); frame.setContentPane(new PairwiseAlignPanel(viewport)); Desktop.addInternalFrame(frame, diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 5613f16..f45455e 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -30,7 +30,7 @@ import java.util.ArrayList; import java.util.Hashtable; import java.util.List; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import jalview.analysis.AlignmentUtils; import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder; @@ -915,7 +915,7 @@ public class AlignViewport extends AlignmentViewport /* * Open in split pane. DNA sequence above, protein below. */ - JInternalFrame splitFrame = new SplitFrame(cdnaFrame, proteinFrame); + JalviewInternalFrame splitFrame = new SplitFrame(cdnaFrame, proteinFrame); Desktop.addInternalFrame(splitFrame, linkedTitle, -1, -1); return proteinFrame.viewport.getAlignment(); diff --git a/src/jalview/gui/AnnotationChooser.java b/src/jalview/gui/AnnotationChooser.java index d976815..fbfb6e0 100644 --- a/src/jalview/gui/AnnotationChooser.java +++ b/src/jalview/gui/AnnotationChooser.java @@ -36,7 +36,7 @@ import java.util.List; import java.util.Map; import javax.swing.JButton; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLayeredPane; import javax.swing.JPanel; @@ -63,7 +63,7 @@ public class AnnotationChooser extends JPanel private static final int MY_FRAME_HEIGHT = 250; - private JInternalFrame frame; + private JalviewInternalFrame frame; private AlignmentPanel ap; @@ -601,7 +601,7 @@ public class AnnotationChooser extends JPanel */ private void showFrame() { - frame = new JInternalFrame(); + frame = new JalviewInternalFrame(); frame.setFrameIcon(null); frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); diff --git a/src/jalview/gui/AnnotationColourChooser.java b/src/jalview/gui/AnnotationColourChooser.java index d898398..7e6a198 100644 --- a/src/jalview/gui/AnnotationColourChooser.java +++ b/src/jalview/gui/AnnotationColourChooser.java @@ -35,7 +35,7 @@ import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLayeredPane; import javax.swing.JPanel; @@ -90,7 +90,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter } } } - frame = new JInternalFrame(); + frame = new JalviewInternalFrame(); frame.setFrameIcon(null); frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); diff --git a/src/jalview/gui/AnnotationColumnChooser.java b/src/jalview/gui/AnnotationColumnChooser.java index 0483aa6..a7b9149 100644 --- a/src/jalview/gui/AnnotationColumnChooser.java +++ b/src/jalview/gui/AnnotationColumnChooser.java @@ -36,7 +36,7 @@ import java.awt.event.KeyEvent; import javax.swing.ButtonGroup; import javax.swing.JCheckBox; import javax.swing.JComboBox; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLayeredPane; import javax.swing.JPanel; import javax.swing.JRadioButton; @@ -101,7 +101,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter public AnnotationColumnChooser(AlignViewport av, final AlignmentPanel ap, AlignmentAnnotation selectedAnnotation) { super(av, ap); - frame = new JInternalFrame(); + frame = new JalviewInternalFrame(); frame.setFrameIcon(null); frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); diff --git a/src/jalview/gui/AnnotationExporter.java b/src/jalview/gui/AnnotationExporter.java index 894db79..4881176 100644 --- a/src/jalview/gui/AnnotationExporter.java +++ b/src/jalview/gui/AnnotationExporter.java @@ -32,7 +32,7 @@ import javax.swing.BoxLayout; import javax.swing.ButtonGroup; import javax.swing.JButton; import javax.swing.JCheckBox; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLabel; import javax.swing.JLayeredPane; import javax.swing.JPanel; @@ -59,7 +59,7 @@ import jalview.util.MessageManager; */ public class AnnotationExporter extends JPanel { - private JInternalFrame frame; + private JalviewInternalFrame frame; private AlignmentPanel ap; @@ -106,7 +106,7 @@ public class AnnotationExporter extends JPanel ex.printStackTrace(); } - frame = new JInternalFrame(); + frame = new JalviewInternalFrame(); frame.setFrameIcon(null); frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); diff --git a/src/jalview/gui/AnnotationRowFilter.java b/src/jalview/gui/AnnotationRowFilter.java index 44a1668..a9806fe 100644 --- a/src/jalview/gui/AnnotationRowFilter.java +++ b/src/jalview/gui/AnnotationRowFilter.java @@ -44,7 +44,7 @@ import java.util.Vector; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.event.ChangeEvent; @@ -73,7 +73,7 @@ public abstract class AnnotationRowFilter extends JPanel protected JTextField thresholdValue = new JTextField(20); - protected JInternalFrame frame; + protected JalviewInternalFrame frame; protected JButton ok = new JButton(); diff --git a/src/jalview/gui/AppVarna.java b/src/jalview/gui/AppVarna.java index 6fac8fc..02fdd7b 100644 --- a/src/jalview/gui/AppVarna.java +++ b/src/jalview/gui/AppVarna.java @@ -28,7 +28,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JSplitPane; import javax.swing.event.InternalFrameAdapter; import javax.swing.event.InternalFrameEvent; @@ -60,7 +60,7 @@ import jalview.util.Comparison; import jalview.util.MessageManager; import jalview.util.ShiftList; -public class AppVarna extends JInternalFrame +public class AppVarna extends JalviewInternalFrame implements SelectionListener, SecondaryStructureListener, InterfaceVARNASelectionListener, VamsasSource { diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index af41e58..e3af388 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -44,7 +44,7 @@ import javax.swing.DefaultComboBoxModel; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLabel; import javax.swing.JLayeredPane; import javax.swing.JPanel; @@ -92,7 +92,7 @@ public class CalculationChooser extends JPanel JButton calculate; - private JInternalFrame frame; + private JalviewInternalFrame frame; private JCheckBox includeGaps; @@ -129,7 +129,7 @@ public class CalculationChooser extends JPanel void init() { setLayout(new BorderLayout()); - frame = new JInternalFrame(); + frame = new JalviewInternalFrame(); frame.setFrameIcon(null); frame.setContentPane(this); this.setBackground(Color.white); diff --git a/src/jalview/gui/ChimeraViewFrame.java b/src/jalview/gui/ChimeraViewFrame.java index cc6a785..3f926e3 100644 --- a/src/jalview/gui/ChimeraViewFrame.java +++ b/src/jalview/gui/ChimeraViewFrame.java @@ -30,7 +30,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JMenu; import javax.swing.JMenuItem; import javax.swing.event.InternalFrameAdapter; @@ -312,7 +312,7 @@ public class ChimeraViewFrame extends StructureViewerBase * closeViewer will decide whether or not to close this frame * depending on whether user chooses to Cancel or not */ - setDefaultCloseOperation(JInternalFrame.DO_NOTHING_ON_CLOSE); + setDefaultCloseOperation(JalviewInternalFrame.DO_NOTHING_ON_CLOSE); } /** diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 6fd70a9..d308f62 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -890,7 +890,7 @@ public class Desktop extends jalview.jbgui.GDesktop * height */ public static synchronized void addInternalFrame( - final JInternalFrame frame, String title, int w, int h) + final JalviewInternalFrame frame, String title, int w, int h) { addInternalFrame(frame, title, true, w, h, true, false); } @@ -911,8 +911,8 @@ public class Desktop extends jalview.jbgui.GDesktop * height */ public static synchronized void addInternalFrame( - final JInternalFrame frame, String title, boolean makeVisible, - int w, int h) + final JalviewInternalFrame frame, String title, + boolean makeVisible, int w, int h) { addInternalFrame(frame, title, makeVisible, w, h, true, false); } @@ -932,7 +932,7 @@ public class Desktop extends jalview.jbgui.GDesktop * Allow resize */ public static synchronized void addInternalFrame( - final JInternalFrame frame, String title, int w, int h, + final JalviewInternalFrame frame, String title, int w, int h, boolean resizable) { addInternalFrame(frame, title, true, w, h, resizable, false); @@ -958,8 +958,9 @@ public class Desktop extends jalview.jbgui.GDesktop * Do not set the default minimum size for frame */ public static synchronized void addInternalFrame( - final JInternalFrame frame, String title, boolean makeVisible, - int w, int h, boolean resizable, boolean ignoreMinSize) + final JalviewInternalFrame frame, String title, + boolean makeVisible, int w, int h, boolean resizable, + boolean ignoreMinSize) { // TODO: allow callers to determine X and Y position of frame (eg. via @@ -1096,12 +1097,12 @@ public class Desktop extends jalview.jbgui.GDesktop } /** - * Add key bindings to a JInternalFrame so that Ctrl-W and Cmd-W will close - * the window + * Add key bindings to a JalviewInternalFrame so that Ctrl-W and Cmd-W will + * close the window * * @param frame */ - private static void setKeyBindings(JInternalFrame frame) + private static void setKeyBindings(JalviewInternalFrame frame) { @SuppressWarnings("serial") final Action closeAction = new AbstractAction() @@ -3213,7 +3214,7 @@ public class Desktop extends jalview.jbgui.GDesktop topPanel.av.setGatherViewsHere(false); bottomPanel.av.setGatherViewsHere(false); - JInternalFrame splitFrame = new SplitFrame(newTopFrame, + JalviewInternalFrame splitFrame = new SplitFrame(newTopFrame, newBottomFrame); if (geometry != null) { diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 2e9731d..a90ce59 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -62,7 +62,7 @@ import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JCheckBox; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLabel; import javax.swing.JLayeredPane; import javax.swing.JMenuItem; @@ -156,7 +156,7 @@ public class FeatureSettings extends JPanel private Map originalFilters; - final JInternalFrame frame; + final JalviewInternalFrame frame; JScrollPane scrollPane = new JScrollPane(); @@ -409,7 +409,7 @@ public class FeatureSettings extends JPanel } else { - frame = new JInternalFrame(); + frame = new JalviewInternalFrame(); frame.setContentPane(this); frame.setFrameIcon(null); Rectangle bounds = af.getFeatureSettingsGeometry(); diff --git a/src/jalview/gui/Finder.java b/src/jalview/gui/Finder.java index 2756b14..f641f4b 100755 --- a/src/jalview/gui/Finder.java +++ b/src/jalview/gui/Finder.java @@ -75,7 +75,7 @@ public class Finder extends GFinder private AlignmentPanel ap; - private JInternalFrame frame; + private JalviewInternalFrame frame; /* * Finder agent per viewport searched @@ -107,7 +107,7 @@ public class Finder extends GFinder ap = alignPanel; focusFixed = fixedFocus; finders = new HashMap<>(); - frame = new JInternalFrame(); + frame = new JalviewInternalFrame(); frame.setFrameIcon(null); frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); diff --git a/src/jalview/gui/FontChooser.java b/src/jalview/gui/FontChooser.java index f532706..6e5d7de 100755 --- a/src/jalview/gui/FontChooser.java +++ b/src/jalview/gui/FontChooser.java @@ -24,7 +24,7 @@ import java.awt.Font; import java.awt.FontMetrics; import java.awt.geom.Rectangle2D; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLayeredPane; import jalview.bin.Cache; @@ -66,7 +66,7 @@ public class FontChooser extends GFontChooser boolean init = true; - JInternalFrame frame; + JalviewInternalFrame frame; /* * The last font settings selected in the dialog @@ -111,7 +111,7 @@ public class FontChooser extends GFontChooser void init() { - frame = new JInternalFrame(); + frame = new JalviewInternalFrame(); frame.setFrameIcon(null); frame.setContentPane(this); diff --git a/src/jalview/gui/JalviewInternalFrame.java b/src/jalview/gui/JalviewInternalFrame.java new file mode 100644 index 0000000..c019629 --- /dev/null +++ b/src/jalview/gui/JalviewInternalFrame.java @@ -0,0 +1,25 @@ +package jalview.gui; + +import javax.swing.JInternalFrame; + +public class JalviewInternalFrame extends JInternalFrame +{ + public JalviewInternalFrame() + { + super(); + init(); + } + + public JalviewInternalFrame(String title) + { + super(title); + init(); + } + + private void init() + { + this.setFrameIcon(null); + this.setOpaque(true); + } + +} diff --git a/src/jalview/gui/JvOptionPane.java b/src/jalview/gui/JvOptionPane.java index c0efd4a..703958b 100644 --- a/src/jalview/gui/JvOptionPane.java +++ b/src/jalview/gui/JvOptionPane.java @@ -901,9 +901,9 @@ public class JvOptionPane extends JOptionPane if (raiseParent) { parentComponent.requestFocus(); - if (parentComponent instanceof JInternalFrame) + if (parentComponent instanceof JalviewInternalFrame) { - JInternalFrame jif = (JInternalFrame) parentComponent; + JalviewInternalFrame jif = (JalviewInternalFrame) parentComponent; jif.show(); jif.moveToFront(); jif.grabFocus(); @@ -1009,9 +1009,9 @@ public class JvOptionPane extends JOptionPane if (raiseParent) { parentComponent.requestFocus(); - if (parentComponent instanceof JInternalFrame) + if (parentComponent instanceof JalviewInternalFrame) { - JInternalFrame jif = (JInternalFrame) parentComponent; + JalviewInternalFrame jif = (JalviewInternalFrame) parentComponent; jif.show(); jif.moveToFront(); jif.grabFocus(); @@ -1421,9 +1421,9 @@ public class JvOptionPane extends JOptionPane if (raiseParent) { parentComponent.requestFocus(); - if (parentComponent instanceof JInternalFrame) + if (parentComponent instanceof JalviewInternalFrame) { - JInternalFrame jif = (JInternalFrame) parentComponent; + JalviewInternalFrame jif = (JalviewInternalFrame) parentComponent; jif.show(); jif.moveToFront(); jif.grabFocus(); @@ -1472,13 +1472,13 @@ public class JvOptionPane extends JOptionPane } /** - * This helper method makes the JInternalFrame wait until it is notified by an - * InternalFrameClosing event. This method also adds the given JOptionPane to - * the JInternalFrame and sizes it according to the JInternalFrame's preferred - * size. + * This helper method makes the JalviewInternalFrame wait until it is notified + * by an InternalFrameClosing event. This method also adds the given + * JOptionPane to the JalviewInternalFrame and sizes it according to the + * JalviewInternalFrame's preferred size. * * @param f - * The JInternalFrame to make modal. + * The JalviewInternalFrame to make modal. */ private static void startModal(JInternalFrame f) { diff --git a/src/jalview/gui/OverviewPanel.java b/src/jalview/gui/OverviewPanel.java index 872d142..cde4ea9 100755 --- a/src/jalview/gui/OverviewPanel.java +++ b/src/jalview/gui/OverviewPanel.java @@ -35,7 +35,7 @@ import java.beans.PropertyChangeEvent; import java.beans.PropertyVetoException; import javax.swing.JCheckBoxMenuItem; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JPanel; import javax.swing.JPopupMenu; import javax.swing.SwingUtilities; @@ -67,7 +67,7 @@ public class OverviewPanel extends JPanel private AlignmentPanel ap; - private JInternalFrame internalFrame; + private JalviewInternalFrame internalFrame; protected JCheckBoxMenuItem displayToggle; @@ -86,7 +86,7 @@ public class OverviewPanel extends JPanel * @param isShowHidden * TODO */ - public OverviewPanel(AlignmentPanel alPanel, JInternalFrame frame, + public OverviewPanel(AlignmentPanel alPanel, JalviewInternalFrame frame, boolean isShowHidden) { this.av = alPanel.av; @@ -413,8 +413,8 @@ public class OverviewPanel extends JPanel * close the parent frame (which also removes it from the * Desktop Windows menu) */ - ((JInternalFrame) SwingUtilities - .getAncestorOfClass(JInternalFrame.class, (this))) + ((JalviewInternalFrame) SwingUtilities + .getAncestorOfClass(JalviewInternalFrame.class, (this))) .setClosed(true); } catch (PropertyVetoException e) { diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index 57a2fa0..c8708bf 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -41,7 +41,7 @@ import java.util.Vector; import javax.swing.ButtonGroup; import javax.swing.JCheckBoxMenuItem; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuItem; @@ -902,10 +902,10 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener protected void showFeatureDetails(SequenceFeature sf, String seqName, MappedFeatures mf) { - JInternalFrame details; + JalviewInternalFrame details; if (Platform.isJS()) { - details = new JInternalFrame(); + details = new JalviewInternalFrame(); details.setFrameIcon(null); JPanel panel = new JPanel(new BorderLayout()); panel.setOpaque(true); @@ -1825,7 +1825,7 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener contents.append(""); String report = contents.toString(); - JInternalFrame frame; + JalviewInternalFrame frame; if (Platform.isJS()) { JLabel textLabel = new JLabel(); @@ -1835,7 +1835,7 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener pane.setOpaque(true); pane.setBackground(Color.WHITE); pane.add(textLabel, BorderLayout.NORTH); - frame = new JInternalFrame(); + frame = new JalviewInternalFrame(); frame.setFrameIcon(null); frame.getContentPane().add(new JScrollPane(pane)); } diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index c4f32c3..5769bb7 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -34,7 +34,7 @@ import java.util.concurrent.CompletableFuture; import javax.help.HelpSetException; import javax.swing.JComboBox; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JPanel; import javax.swing.ListSelectionModel; import javax.swing.RowFilter; @@ -188,7 +188,7 @@ public class Preferences extends GPreferences Cache.enableSessionProperties(); } - JInternalFrame frame; + JalviewInternalFrame frame; private WsPreferences wsPrefs; @@ -257,7 +257,7 @@ public class Preferences extends GPreferences // don't populate with session properties Cache.disableSessionProperties(); - frame = new JInternalFrame(); + frame = new JalviewInternalFrame(); frame.setFrameIcon(null); frame.setContentPane(this); if (!Platform.isJS()) diff --git a/src/jalview/gui/PymolViewer.java b/src/jalview/gui/PymolViewer.java index 52c253d..f68e503 100644 --- a/src/jalview/gui/PymolViewer.java +++ b/src/jalview/gui/PymolViewer.java @@ -27,7 +27,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JMenuItem; import javax.swing.event.InternalFrameAdapter; import javax.swing.event.InternalFrameEvent; @@ -63,7 +63,7 @@ public class PymolViewer extends StructureViewerBase * closeViewer will decide whether or not to close this frame * depending on whether user chooses to Cancel or not */ - setDefaultCloseOperation(JInternalFrame.DO_NOTHING_ON_CLOSE); + setDefaultCloseOperation(JalviewInternalFrame.DO_NOTHING_ON_CLOSE); } public PymolViewer(PDBEntry pdb, SequenceI[] seqs, Object object, diff --git a/src/jalview/gui/RedundancyPanel.java b/src/jalview/gui/RedundancyPanel.java index 8d66a44..0bf7477 100755 --- a/src/jalview/gui/RedundancyPanel.java +++ b/src/jalview/gui/RedundancyPanel.java @@ -26,7 +26,7 @@ import java.util.List; import java.util.Stack; import java.util.Vector; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JProgressBar; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @@ -62,7 +62,7 @@ public class RedundancyPanel extends GSliderPanel implements Runnable SequenceI[] originalSequences; - JInternalFrame frame; + JalviewInternalFrame frame; Vector redundantSeqs; @@ -99,7 +99,7 @@ public class RedundancyPanel extends GSliderPanel implements Runnable Thread worker = new Thread(this); worker.start(); - frame = new JInternalFrame(); + frame = new JalviewInternalFrame(); frame.setFrameIcon(null); frame.setContentPane(this); Desktop.addInternalFrame(frame, diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index 6b4c74a..cae7c02 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -35,7 +35,7 @@ import java.util.List; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; @@ -125,7 +125,7 @@ public class SequenceFetcher extends JPanel implements Runnable JTextArea textArea; - JInternalFrame frame; + JalviewInternalFrame frame; IProgressIndicator guiWindow; @@ -184,7 +184,7 @@ public class SequenceFetcher extends JPanel implements Runnable jbInit(selectedDb); textArea.setText(queryString); - frame = new JInternalFrame(); + frame = new JalviewInternalFrame(); frame.setContentPane(this); frame.setFrameIcon(null); Desktop.addInternalFrame(frame, getFrameTitle(), true, 400, diff --git a/src/jalview/gui/SliderPanel.java b/src/jalview/gui/SliderPanel.java index 1d59853..2a198d9 100755 --- a/src/jalview/gui/SliderPanel.java +++ b/src/jalview/gui/SliderPanel.java @@ -25,7 +25,7 @@ import java.awt.event.MouseEvent; import java.beans.PropertyVetoException; import java.util.List; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLayeredPane; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @@ -48,9 +48,9 @@ public class SliderPanel extends GSliderPanel { private static final String BACKGROUND = "Background"; - static JInternalFrame conservationSlider; + static JalviewInternalFrame conservationSlider; - static JInternalFrame PIDSlider; + static JalviewInternalFrame PIDSlider; AlignmentPanel ap; @@ -155,7 +155,7 @@ public class SliderPanel extends GSliderPanel if (conservationSlider == null) { sliderPanel = new SliderPanel(ap, rs.getConservationInc(), true, rs); - conservationSlider = new JInternalFrame(); + conservationSlider = new JalviewInternalFrame(); conservationSlider.setFrameIcon(null); conservationSlider.setContentPane(sliderPanel); conservationSlider.setLayer(JLayeredPane.PALETTE_LAYER); @@ -269,7 +269,7 @@ public class SliderPanel extends GSliderPanel if (PIDSlider == null) { sliderPanel = new SliderPanel(ap, threshold, false, rs); - PIDSlider = new JInternalFrame(); + PIDSlider = new JalviewInternalFrame(); PIDSlider.setFrameIcon(null); PIDSlider.setContentPane(sliderPanel); PIDSlider.setLayer(JLayeredPane.PALETTE_LAYER); @@ -304,7 +304,7 @@ public class SliderPanel extends GSliderPanel * * @return */ - public static JInternalFrame showPIDSlider() + public static JalviewInternalFrame showPIDSlider() { hideConservationSlider(); @@ -457,7 +457,7 @@ public class SliderPanel extends GSliderPanel return getValue(conservationSlider); } - static int getValue(JInternalFrame slider) + static int getValue(JalviewInternalFrame slider) { return slider == null ? 0 : ((SliderPanel) slider.getContentPane()).getValue(); diff --git a/src/jalview/gui/SplashScreen.java b/src/jalview/gui/SplashScreen.java index 61273c7..83cd0dc 100755 --- a/src/jalview/gui/SplashScreen.java +++ b/src/jalview/gui/SplashScreen.java @@ -31,7 +31,7 @@ import java.awt.MediaTracker; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLabel; import javax.swing.JLayeredPane; import javax.swing.JPanel; @@ -72,7 +72,7 @@ public class SplashScreen extends JPanel */ private Component splashText; - private JInternalFrame iframe; + private JalviewInternalFrame iframe; private Image image; @@ -184,7 +184,7 @@ public class SplashScreen extends JPanel this.setForeground(fg); this.setFont(font); - iframe = new JInternalFrame(); + iframe = new JalviewInternalFrame(); iframe.setFrameIcon(null); iframe.setClosable(true); this.setLayout(new BorderLayout()); diff --git a/src/jalview/gui/SplitFrame.java b/src/jalview/gui/SplitFrame.java index 73744b3..b2de97b 100644 --- a/src/jalview/gui/SplitFrame.java +++ b/src/jalview/gui/SplitFrame.java @@ -861,7 +861,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI * holds the frame for feature settings, so Protein and DNA tabs can be * managed */ - JInternalFrame featureSettingsUI; + JalviewInternalFrame featureSettingsUI; JTabbedPane featureSettingsPanels; @@ -898,7 +898,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI getAlignFrames().get(tab).showFeatureSettingsUI(); } }); - featureSettingsUI = new JInternalFrame(MessageManager.getString( + featureSettingsUI = new JalviewInternalFrame(MessageManager.getString( "label.sequence_feature_settings_for_CDS_and_Protein")); featureSettingsUI.setFrameIcon(null); featureSettingsPanels.setOpaque(true); diff --git a/src/jalview/gui/UserDefinedColours.java b/src/jalview/gui/UserDefinedColours.java index 14f9adf..9569918 100755 --- a/src/jalview/gui/UserDefinedColours.java +++ b/src/jalview/gui/UserDefinedColours.java @@ -34,7 +34,7 @@ import java.util.List; import java.util.Locale; import javax.swing.JButton; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.xml.bind.JAXBContext; @@ -94,7 +94,7 @@ public class UserDefinedColours extends GUserDefinedColours */ boolean changedButNotSaved; - JInternalFrame frame; + JalviewInternalFrame frame; List upperCaseButtons; @@ -147,7 +147,7 @@ public class UserDefinedColours extends GUserDefinedColours void showFrame() { colorChooser.getSelectionModel().addChangeListener(this); - frame = new JInternalFrame(); + frame = new JalviewInternalFrame(); frame.setFrameIcon(null); frame.setContentPane(this); Desktop.addInternalFrame(frame, diff --git a/src/jalview/gui/VamsasApplication.java b/src/jalview/gui/VamsasApplication.java index 8a8ba8d..e49fcaa 100644 --- a/src/jalview/gui/VamsasApplication.java +++ b/src/jalview/gui/VamsasApplication.java @@ -20,6 +20,16 @@ */ package jalview.gui; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.io.File; +import java.io.IOException; +import java.util.Hashtable; +import java.util.IdentityHashMap; +import java.util.Iterator; + +import javax.swing.JInternalFrame; + import jalview.bin.Cache; import jalview.bin.Console; import jalview.datamodel.AlignmentI; @@ -35,17 +45,6 @@ import jalview.structure.VamsasListener; import jalview.structure.VamsasSource; import jalview.util.MessageManager; import jalview.viewmodel.AlignmentViewport; - -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.io.File; -import java.io.IOException; -import java.util.Hashtable; -import java.util.IdentityHashMap; -import java.util.Iterator; - -import javax.swing.JInternalFrame; - import uk.ac.vamsas.client.ClientHandle; import uk.ac.vamsas.client.IClient; import uk.ac.vamsas.client.IClientDocument; @@ -932,8 +931,8 @@ public class VamsasApplication implements SelectionSource, VamsasSource jselection.setEndRes(prange[p + u] - 1); } // mark all the columns in the range. - for (int sr = prange[p], er = prange[p + 1], de = er - + d; sr != de; sr += d) + for (int sr = prange[p], er = prange[p + 1], + de = er + d; sr != de; sr += d) { colsel.addElement(sr - 1); } diff --git a/src/jalview/gui/WebserviceInfo.java b/src/jalview/gui/WebserviceInfo.java index 7eeee9a..20d5c34 100644 --- a/src/jalview/gui/WebserviceInfo.java +++ b/src/jalview/gui/WebserviceInfo.java @@ -36,7 +36,7 @@ import java.util.Vector; import javax.swing.JComponent; import javax.swing.JEditorPane; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTabbedPane; @@ -94,7 +94,7 @@ public class WebserviceInfo extends GWebserviceInfo boolean serviceIsCancellable; - JInternalFrame frame; + JalviewInternalFrame frame; private IProgressIndicator progressBar; @@ -322,7 +322,7 @@ public class WebserviceInfo extends GWebserviceInfo void init(String title, String info, int width, int height, boolean makeVisible) { - frame = new JInternalFrame(); + frame = new JalviewInternalFrame(); frame.setFrameIcon(null); frame.setContentPane(this); Desktop.addInternalFrame(frame, title, makeVisible, width, height); diff --git a/src/jalview/io/VamsasAppDatastore.java b/src/jalview/io/VamsasAppDatastore.java index dd4b72c..6119db2 100644 --- a/src/jalview/io/VamsasAppDatastore.java +++ b/src/jalview/io/VamsasAppDatastore.java @@ -20,6 +20,17 @@ */ package jalview.io; +import java.io.IOException; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.IdentityHashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Vector; +import java.util.jar.JarInputStream; +import java.util.jar.JarOutputStream; + import jalview.bin.Console; import jalview.datamodel.AlignedCodonFrame; import jalview.datamodel.AlignmentAnnotation; @@ -36,18 +47,6 @@ import jalview.io.vamsas.Rangetype; import jalview.project.Jalview2XML; import jalview.util.MessageManager; import jalview.viewmodel.AlignmentViewport; - -import java.io.IOException; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Hashtable; -import java.util.IdentityHashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Vector; -import java.util.jar.JarInputStream; -import java.util.jar.JarOutputStream; - import uk.ac.vamsas.client.IClientAppdata; import uk.ac.vamsas.client.IClientDocument; import uk.ac.vamsas.client.Vobject; @@ -506,8 +505,8 @@ public class VamsasAppDatastore } // //////////////////////////////////////////// // SAVE Alignment Sequence Features - for (int i = 0, iSize = alignment - .getAlignmentSequenceCount(); i < iSize; i++) + for (int i = 0, + iSize = alignment.getAlignmentSequenceCount(); i < iSize; i++) { AlignmentSequence valseq; SequenceI alseq = (SequenceI) getvObj2jv( @@ -1687,7 +1686,7 @@ public class VamsasAppDatastore + ((Vobject) dataset .getDataSetAnnotations(dsa) .getSeqRef(0)).getVorbaId() - .getId()); + .getId()); } else { @@ -1719,8 +1718,8 @@ public class VamsasAppDatastore { // LOAD ALIGNMENTS from DATASET - for (int al = 0, nal = dataset - .getAlignmentCount(); al < nal; al++) + for (int al = 0, + nal = dataset.getAlignmentCount(); al < nal; al++) { uk.ac.vamsas.objects.core.Alignment alignment = dataset .getAlignment(al); @@ -1837,8 +1836,8 @@ public class VamsasAppDatastore if (newasAnnots != null && newasAnnots.size() > 0) { // Add the new sequence annotations in to the alignment. - for (int an = 0, anSize = newasAnnots - .size(); an < anSize; an++) + for (int an = 0, + anSize = newasAnnots.size(); an < anSize; an++) { jal.addAnnotation( (AlignmentAnnotation) newasAnnots.elementAt(an)); @@ -1912,8 +1911,8 @@ public class VamsasAppDatastore .getAction(); if (alignment.getPropertyCount() > 0) { - for (int p = 0, pe = alignment - .getPropertyCount(); p < pe; p++) + for (int p = 0, + pe = alignment.getPropertyCount(); p < pe; p++) { if (alignment.getProperty(p).getName().equals("title")) { diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index 2d151bc..b43d17f 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -36,7 +36,7 @@ import java.util.Map; import javax.swing.BorderFactory; import javax.swing.ButtonGroup; import javax.swing.JCheckBoxMenuItem; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; @@ -62,7 +62,7 @@ import jalview.util.MessageManager; import jalview.util.Platform; @SuppressWarnings("serial") -public class GAlignFrame extends JInternalFrame +public class GAlignFrame extends JalviewInternalFrame { protected JMenuBar alignFrameMenuBar = new JMenuBar(); diff --git a/src/jalview/jbgui/GCutAndPasteHtmlTransfer.java b/src/jalview/jbgui/GCutAndPasteHtmlTransfer.java index ef09b6a..3c76977 100644 --- a/src/jalview/jbgui/GCutAndPasteHtmlTransfer.java +++ b/src/jalview/jbgui/GCutAndPasteHtmlTransfer.java @@ -29,7 +29,7 @@ import java.awt.event.MouseEvent; import javax.swing.JButton; import javax.swing.JCheckBoxMenuItem; import javax.swing.JEditorPane; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; @@ -47,7 +47,7 @@ import jalview.util.MessageManager; * @author $author$ * @version $Revision$ */ -public class GCutAndPasteHtmlTransfer extends JInternalFrame +public class GCutAndPasteHtmlTransfer extends JalviewInternalFrame { protected JEditorPane textarea = new JEditorPane("text/html", ""); diff --git a/src/jalview/jbgui/GCutAndPasteTransfer.java b/src/jalview/jbgui/GCutAndPasteTransfer.java index 3cd52ae..100ca95 100755 --- a/src/jalview/jbgui/GCutAndPasteTransfer.java +++ b/src/jalview/jbgui/GCutAndPasteTransfer.java @@ -27,7 +27,7 @@ import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import javax.swing.JButton; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; @@ -44,7 +44,7 @@ import jalview.util.MessageManager; * @author $author$ * @version $Revision$ */ -public class GCutAndPasteTransfer extends JInternalFrame +public class GCutAndPasteTransfer extends JalviewInternalFrame { protected JTextArea textarea = new JTextArea(); diff --git a/src/jalview/jbgui/GPCAPanel.java b/src/jalview/jbgui/GPCAPanel.java index cf7bc4e..1f1c728 100755 --- a/src/jalview/jbgui/GPCAPanel.java +++ b/src/jalview/jbgui/GPCAPanel.java @@ -31,7 +31,7 @@ import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JCheckBoxMenuItem; import javax.swing.JComboBox; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; @@ -43,7 +43,7 @@ import javax.swing.event.MenuListener; import jalview.util.ImageMaker.TYPE; import jalview.util.MessageManager; -public class GPCAPanel extends JInternalFrame +public class GPCAPanel extends JalviewInternalFrame { private static final Font VERDANA_12 = new Font("Verdana", 0, 12); diff --git a/src/jalview/jbgui/GRnaStructureViewer.java b/src/jalview/jbgui/GRnaStructureViewer.java index 663245f..df0786c 100644 --- a/src/jalview/jbgui/GRnaStructureViewer.java +++ b/src/jalview/jbgui/GRnaStructureViewer.java @@ -20,10 +20,10 @@ */ package jalview.jbgui; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; @SuppressWarnings("serial") -public class GRnaStructureViewer extends JInternalFrame +public class GRnaStructureViewer extends JalviewInternalFrame { public GRnaStructureViewer() { diff --git a/src/jalview/jbgui/GSplitFrame.java b/src/jalview/jbgui/GSplitFrame.java index 4d531be..4faab0a 100644 --- a/src/jalview/jbgui/GSplitFrame.java +++ b/src/jalview/jbgui/GSplitFrame.java @@ -25,13 +25,13 @@ import java.awt.MouseInfo; import java.awt.Point; import java.awt.Rectangle; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JSplitPane; import javax.swing.plaf.basic.BasicInternalFrameUI; import jalview.util.Platform; -public class GSplitFrame extends JInternalFrame +public class GSplitFrame extends JalviewInternalFrame { protected static final int DIVIDER_SIZE = 5; @@ -107,9 +107,9 @@ public class GSplitFrame extends JInternalFrame if (Platform.isAMacAndNotJS()) { // this saves some space - but doesn't hide the title bar - topFrame.putClientProperty("JInternalFrame.isPalette", true); + topFrame.putClientProperty("JalviewInternalFrame.isPalette", true); // topFrame.getRootPane().putClientProperty("Window.style", "small"); - bottomFrame.putClientProperty("JInternalFrame.isPalette", true); + bottomFrame.putClientProperty("JalviewInternalFrame.isPalette", true); } else { diff --git a/src/jalview/jbgui/GStructureChooser.java b/src/jalview/jbgui/GStructureChooser.java index 8cb5b3c..e9e12a5 100644 --- a/src/jalview/jbgui/GStructureChooser.java +++ b/src/jalview/jbgui/GStructureChooser.java @@ -49,7 +49,7 @@ import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JFrame; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; @@ -115,7 +115,7 @@ public abstract class GStructureChooser extends JPanel protected String frameTitle = MessageManager .getString("label.structure_chooser"); - protected JInternalFrame mainFrame = new JInternalFrame(frameTitle); + protected JalviewInternalFrame mainFrame = new JalviewInternalFrame(frameTitle); protected JComboBox cmb_filterOption = new JComboBox<>(); @@ -1067,7 +1067,7 @@ public abstract class GStructureChooser extends JPanel protected abstract void validateSelections(); - public JInternalFrame getFrame() + public JalviewInternalFrame getFrame() { return mainFrame; } diff --git a/src/jalview/jbgui/GStructureViewer.java b/src/jalview/jbgui/GStructureViewer.java index 18e4c9f..19196f8 100644 --- a/src/jalview/jbgui/GStructureViewer.java +++ b/src/jalview/jbgui/GStructureViewer.java @@ -25,7 +25,7 @@ import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; @@ -39,7 +39,7 @@ import jalview.util.ImageMaker.TYPE; import jalview.util.MessageManager; @SuppressWarnings("serial") -public abstract class GStructureViewer extends JInternalFrame +public abstract class GStructureViewer extends JalviewInternalFrame implements JalviewStructureDisplayI, ColourChangeListener { // private AAStructureBindingModel bindingModel; diff --git a/src/jalview/jbgui/GTreePanel.java b/src/jalview/jbgui/GTreePanel.java index 2a1b11f..a90771b 100755 --- a/src/jalview/jbgui/GTreePanel.java +++ b/src/jalview/jbgui/GTreePanel.java @@ -26,7 +26,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JCheckBoxMenuItem; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; @@ -38,7 +38,7 @@ import jalview.util.ImageMaker.TYPE; import jalview.util.MessageManager; @SuppressWarnings("serial") -public class GTreePanel extends JInternalFrame +public class GTreePanel extends JalviewInternalFrame { BorderLayout borderLayout1 = new BorderLayout(); diff --git a/src/jalview/project/Jalview2XML.java b/src/jalview/project/Jalview2XML.java index 6f26036..52d818c 100644 --- a/src/jalview/project/Jalview2XML.java +++ b/src/jalview/project/Jalview2XML.java @@ -26,7 +26,6 @@ import static jalview.math.RotatableMatrix.Axis.Z; import java.awt.Color; import java.awt.Font; -import java.awt.FontMetrics; import java.awt.Rectangle; import java.io.BufferedReader; import java.io.ByteArrayInputStream; @@ -2516,6 +2515,7 @@ public class Jalview2XML return BitSet.valueOf(newlongvals); } + private CalcIdParam createCalcIdParam(String calcId, AlignViewport av) { AutoCalcSetting settings = av.getCalcIdSettingsFor(calcId); diff --git a/src/jalview/ws/jws2/MsaWSThread.java b/src/jalview/ws/jws2/MsaWSThread.java index ee0fbc5..6ab0c4f 100644 --- a/src/jalview/ws/jws2/MsaWSThread.java +++ b/src/jalview/ws/jws2/MsaWSThread.java @@ -46,7 +46,7 @@ import java.util.List; import java.util.Map; import java.util.Vector; -import javax.swing.JInternalFrame; +import jalview.gui.JalviewInternalFrame; import compbio.data.msa.MsaWS; import compbio.metadata.Argument; @@ -1045,7 +1045,7 @@ class MsaWSThread extends AWS2Thread implements WSClientI af2.setTitle(complementTitle); String linkedTitle = MessageManager .getString("label.linked_view_title"); - JInternalFrame splitFrame = new SplitFrame( + JalviewInternalFrame splitFrame = new SplitFrame( al.isNucleotide() ? af : af2, al.isNucleotide() ? af2 : af); Desktop.addInternalFrame(splitFrame, linkedTitle, -1, -1); return; -- 1.7.10.2