From: Jim Procter Date: Sun, 24 Apr 2016 12:18:38 +0000 (+0100) Subject: JAL-1551 JAL-2077 formatting X-Git-Tag: Release_2_10_0~249^2~5 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3fbc6c63da00d84e7ce7f24136d2bb8fcbc458dc;p=jalview.git JAL-1551 JAL-2077 formatting --- diff --git a/src/jalview/gui/CutAndPasteHtmlTransfer.java b/src/jalview/gui/CutAndPasteHtmlTransfer.java index 9c06f95..65d8670 100644 --- a/src/jalview/gui/CutAndPasteHtmlTransfer.java +++ b/src/jalview/gui/CutAndPasteHtmlTransfer.java @@ -100,6 +100,7 @@ public class CutAndPasteHtmlTransfer extends GCutAndPasteHtmlTransfer }); SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { textarea.requestFocus(); @@ -143,6 +144,7 @@ public class CutAndPasteHtmlTransfer extends GCutAndPasteHtmlTransfer textarea.setText(text); } + @Override public void save_actionPerformed(ActionEvent e) { JalviewFileChooser chooser = new JalviewFileChooser( @@ -173,6 +175,7 @@ public class CutAndPasteHtmlTransfer extends GCutAndPasteHtmlTransfer } } + @Override public void toggleHtml_actionPerformed(ActionEvent e) { String txt = textarea.getText(); @@ -187,6 +190,7 @@ public class CutAndPasteHtmlTransfer extends GCutAndPasteHtmlTransfer * @param e * DOCUMENT ME! */ + @Override public void copyItem_actionPerformed(ActionEvent e) { Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard(); @@ -210,6 +214,7 @@ public class CutAndPasteHtmlTransfer extends GCutAndPasteHtmlTransfer * @param e * DOCUMENT ME! */ + @Override public void cancel_actionPerformed(ActionEvent e) { try @@ -220,6 +225,7 @@ public class CutAndPasteHtmlTransfer extends GCutAndPasteHtmlTransfer } } + @Override public void textarea_mousePressed(MouseEvent e) { if (e.isPopupTrigger()) @@ -230,6 +236,7 @@ public class CutAndPasteHtmlTransfer extends GCutAndPasteHtmlTransfer MessageManager.getString("action.copy")); item.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { copyItem_actionPerformed(e); diff --git a/src/jalview/gui/DasSourceBrowser.java b/src/jalview/gui/DasSourceBrowser.java index 8158ee6..b176672 100644 --- a/src/jalview/gui/DasSourceBrowser.java +++ b/src/jalview/gui/DasSourceBrowser.java @@ -81,6 +81,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements ListSelectionModel rowSM = table.getSelectionModel(); rowSM.addListSelectionListener(new ListSelectionListener() { + @Override public void valueChanged(ListSelectionEvent e) { ListSelectionModel lsm = (ListSelectionModel) e.getSource(); @@ -94,6 +95,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements table.addMouseListener(new MouseAdapter() { + @Override public void mouseClicked(MouseEvent evt) { if (evt.getClickCount() == 2 || evt.isPopupTrigger()) @@ -118,6 +120,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements this(null); } + @Override public void paintComponent(java.awt.Graphics g) { if (sourceRegistry == null) @@ -144,6 +147,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements javax.swing.SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { TableSorter sorter = (TableSorter) table.getModel(); @@ -281,6 +285,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements fullDetails.setText(text.toString()); javax.swing.SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { fullDetailsScrollpane.getVerticalScrollBar().setValue(0); @@ -288,6 +293,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements }); } + @Override public void run() { loadingDasSources = true; @@ -357,6 +363,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements return selected; } + @Override public void refresh_actionPerformed(ActionEvent e) { saveProperties(jalview.bin.Cache.applicationProperties); @@ -410,6 +417,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements javax.swing.SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { filter1.setSelectedIndex(0); @@ -419,6 +427,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements }); } + @Override public void amendLocal(boolean newSource) { String url = "http://localhost:8080/", nickname = ""; @@ -502,6 +511,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { scrollPane.getVerticalScrollBar().setValue( @@ -570,6 +580,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements refreshTableData(data); SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { scrollPane.getVerticalScrollBar().setValue( @@ -581,6 +592,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements } } + @Override public void valueChanged(ListSelectionEvent evt) { // Called when the MainTable selection changes @@ -690,6 +702,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements } } + @Override public void reset_actionPerformed(ActionEvent e) { registryURL.setText(sourceRegistry.getDasRegistryURL()); @@ -742,21 +755,25 @@ public class DasSourceBrowser extends GDasSourceBrowser implements private Object[][] data; + @Override public int getColumnCount() { return columnNames.length; } + @Override public int getRowCount() { return data.length; } + @Override public String getColumnName(int col) { return columnNames[col]; } + @Override public Object getValueAt(int row, int col) { return data[row][col]; @@ -767,6 +784,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements * each cell. If we didn't implement this method, then the last column would * contain text ("true"/"false"), rather than a check box. */ + @Override public Class getColumnClass(int c) { return getValueAt(0, c).getClass(); @@ -775,6 +793,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements /* * Don't need to implement this method unless your table's editable. */ + @Override public boolean isCellEditable(int row, int col) { // Note that the data/cell address is constant, @@ -786,6 +805,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements /* * Don't need to implement this method unless your table's data can change. */ + @Override public void setValueAt(Object value, int row, int col) { data[row][col] = value; @@ -811,6 +831,7 @@ public class DasSourceBrowser extends GDasSourceBrowser implements Thread thr = new Thread(new Runnable() { + @Override public void run() { // this actually initialises the das source list diff --git a/src/jalview/gui/OptsAndParamsPage.java b/src/jalview/gui/OptsAndParamsPage.java index c591feb..801cb1f 100644 --- a/src/jalview/gui/OptsAndParamsPage.java +++ b/src/jalview/gui/OptsAndParamsPage.java @@ -130,9 +130,9 @@ public class OptsAndParamsPage add(enabled, BorderLayout.NORTH); for (Object str : opt.getPossibleValues()) { - val.addItem((String) str); + val.addItem(str); } - val.setSelectedItem((String) opt.getValue()); + val.setSelectedItem(opt.getValue()); if (opt.getPossibleValues().size() > 1) { setLayout(new GridLayout(1, 2)); @@ -145,6 +145,7 @@ public class OptsAndParamsPage setInitialValue(); } + @Override public void actionPerformed(ActionEvent e) { if (e.getSource() != enabled) @@ -206,6 +207,7 @@ public class OptsAndParamsPage return opt; } + @Override public void mouseClicked(MouseEvent e) { if (e.isPopupTrigger()) @@ -214,24 +216,28 @@ public class OptsAndParamsPage } } + @Override public void mouseEntered(MouseEvent e) { // TODO Auto-generated method stub } + @Override public void mouseExited(MouseEvent e) { // TODO Auto-generated method stub } + @Override public void mousePressed(MouseEvent e) { // TODO Auto-generated method stub } + @Override public void mouseReleased(MouseEvent e) { // TODO Auto-generated method stub @@ -412,6 +418,7 @@ public class OptsAndParamsPage showDesc.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { descisvisible = !descisvisible; @@ -451,6 +458,7 @@ public class OptsAndParamsPage validate(); } + @Override public void actionPerformed(ActionEvent e) { if (adjusting) @@ -526,6 +534,7 @@ public class OptsAndParamsPage lastVal = null; } + @Override public void mouseClicked(MouseEvent e) { if (e.isPopupTrigger()) @@ -534,37 +543,42 @@ public class OptsAndParamsPage } } + @Override public void mouseEntered(MouseEvent e) { // TODO Auto-generated method stub } + @Override public void mouseExited(MouseEvent e) { // TODO Auto-generated method stub } + @Override public void mousePressed(MouseEvent e) { // TODO Auto-generated method stub } + @Override public void mouseReleased(MouseEvent e) { // TODO Auto-generated method stub } + @Override public void stateChanged(ChangeEvent e) { if (!adjusting) { valueField.setText("" - + ((integ) ? ("" + (int) slider.getValue()) - : ("" + (float) (slider.getValue() / 1000f)))); + + ((integ) ? ("" + slider.getValue()) + : ("" + slider.getValue() / 1000f))); checkIfModified(); }