git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-2733 redraw after changing the memory status display setting
[jalview.git]
/
src
/
jalview
/
gui
/
Desktop.java
diff --git
a/src/jalview/gui/Desktop.java
b/src/jalview/gui/Desktop.java
index
c8d900d
..
83d1e3e
100644
(file)
--- a/
src/jalview/gui/Desktop.java
+++ b/
src/jalview/gui/Desktop.java
@@
-41,7
+41,6
@@
import jalview.structure.StructureSelectionManager;
import jalview.urls.IdOrgSettings;
import jalview.util.ImageMaker;
import jalview.util.MessageManager;
import jalview.urls.IdOrgSettings;
import jalview.util.ImageMaker;
import jalview.util.MessageManager;
-import jalview.util.Platform;
import jalview.util.UrlConstants;
import jalview.viewmodel.AlignmentViewport;
import jalview.ws.params.ParamManager;
import jalview.util.UrlConstants;
import jalview.viewmodel.AlignmentViewport;
import jalview.ws.params.ParamManager;
@@
-95,7
+94,6
@@
import java.util.concurrent.Semaphore;
import javax.swing.AbstractAction;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.AbstractAction;
import javax.swing.Box;
import javax.swing.BoxLayout;
-import javax.swing.DefaultDesktopManager;
import javax.swing.DesktopManager;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.DesktopManager;
import javax.swing.JButton;
import javax.swing.JCheckBox;
@@
-269,12
+267,14
@@
public class Desktop extends jalview.jbgui.GDesktop
public void endDraggingFrame(JComponent f)
{
delegate.endDraggingFrame(f);
public void endDraggingFrame(JComponent f)
{
delegate.endDraggingFrame(f);
+ desktop.repaint();
}
@Override
public void endResizingFrame(JComponent f)
{
delegate.endResizingFrame(f);
}
@Override
public void endResizingFrame(JComponent f)
{
delegate.endResizingFrame(f);
+ desktop.repaint();
}
@Override
}
@Override
@@
-344,10
+344,6
@@
public class Desktop extends jalview.jbgui.GDesktop
boolean showjconsole = jalview.bin.Cache.getDefault("SHOW_JAVA_CONSOLE",
false);
desktop = new MyDesktopPane(selmemusage);
boolean showjconsole = jalview.bin.Cache.getDefault("SHOW_JAVA_CONSOLE",
false);
desktop = new MyDesktopPane(selmemusage);
- if (Platform.isAMac())
- {
- desktop.setDoubleBuffered(false);
- }
showMemusage.setSelected(selmemusage);
desktop.setBackground(Color.white);
getContentPane().setLayout(new BorderLayout());
showMemusage.setSelected(selmemusage);
desktop.setBackground(Color.white);
getContentPane().setLayout(new BorderLayout());
@@
-361,7
+357,7
@@
public class Desktop extends jalview.jbgui.GDesktop
// This line prevents Windows Look&Feel resizing all new windows to maximum
// if previous window was maximised
desktop.setDesktopManager(
// This line prevents Windows Look&Feel resizing all new windows to maximum
// if previous window was maximised
desktop.setDesktopManager(
- new MyDesktopManager(new DefaultDesktopManager()));
+ new MyDesktopManager(desktop.getDesktopManager()));
Rectangle dims = getLastKnownDimensions("");
if (dims != null)
Rectangle dims = getLastKnownDimensions("");
if (dims != null)
@@
-866,13
+862,7
@@
public class Desktop extends jalview.jbgui.GDesktop
frame.setResizable(resizable);
frame.setMaximizable(resizable);
frame.setIconifiable(resizable);
frame.setResizable(resizable);
frame.setMaximizable(resizable);
frame.setIconifiable(resizable);
- if (Platform.isAMac())
- {
- frame.setIconifiable(false);
- frame.setFrameIcon(null);
- // frame.setDesktopIcon(null);
- frame.setDoubleBuffered(false);
- }
+
if (frame.getX() < 1 && frame.getY() < 1)
{
frame.setLocation(xOffset * openFrameCount,
if (frame.getX() < 1 && frame.getY() < 1)
{
frame.setLocation(xOffset * openFrameCount,
@@
-1011,8
+1001,8
@@
public class Desktop extends jalview.jbgui.GDesktop
// Java's Transferable for native dnd
evt.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
Transferable t = evt.getTransferable();
// Java's Transferable for native dnd
evt.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
Transferable t = evt.getTransferable();
- List<String> files = new ArrayList<String>();
- List<DataSourceType> protocols = new ArrayList<DataSourceType>();
+ List<String> files = new ArrayList<>();
+ List<DataSourceType> protocols = new ArrayList<>();
try
{
try
{
@@
-1720,7
+1710,7
@@
public class Desktop extends jalview.jbgui.GDesktop
JPanel progressPanel;
JPanel progressPanel;
- ArrayList<JPanel> fileLoadingPanels = new ArrayList<JPanel>();
+ ArrayList<JPanel> fileLoadingPanels = new ArrayList<>();
public void startLoading(final String fileName)
{
public void startLoading(final String fileName)
{
@@
-1812,7
+1802,7
@@
public class Desktop extends jalview.jbgui.GDesktop
// TODO: verify that frames are recoverable when in headless mode
return null;
}
// TODO: verify that frames are recoverable when in headless mode
return null;
}
- List<AlignmentPanel> aps = new ArrayList<AlignmentPanel>();
+ List<AlignmentPanel> aps = new ArrayList<>();
AlignFrame[] frames = getAlignFrames();
if (frames == null)
{
AlignFrame[] frames = getAlignFrames();
if (frames == null)
{
@@
-1847,7
+1837,7
@@
public class Desktop extends jalview.jbgui.GDesktop
*/
public static AlignmentViewport[] getViewports(String sequenceSetId)
{
*/
public static AlignmentViewport[] getViewports(String sequenceSetId)
{
- List<AlignmentViewport> viewp = new ArrayList<AlignmentViewport>();
+ List<AlignmentViewport> viewp = new ArrayList<>();
if (desktop != null)
{
AlignFrame[] frames = Desktop.getAlignFrames();
if (desktop != null)
{
AlignFrame[] frames = Desktop.getAlignFrames();
@@
-2360,7
+2350,7
@@
public class Desktop extends jalview.jbgui.GDesktop
// SEQUENCE_ID which is not the default EMBL_EBI link
ListIterator<String> li = links.listIterator();
boolean check = false;
// SEQUENCE_ID which is not the default EMBL_EBI link
ListIterator<String> li = links.listIterator();
boolean check = false;
- List<JLabel> urls = new ArrayList<JLabel>();
+ List<JLabel> urls = new ArrayList<>();
while (li.hasNext())
{
String link = li.next();
while (li.hasNext())
{
String link = li.next();
@@
-2454,6
+2444,7
@@
public class Desktop extends jalview.jbgui.GDesktop
Thread worker = new Thread(this);
worker.start();
}
Thread worker = new Thread(this);
worker.start();
}
+ repaint();
}
public boolean isShowMemoryUsage()
}
public boolean isShowMemoryUsage()
@@
-2545,7
+2536,7
@@
public class Desktop extends jalview.jbgui.GDesktop
{
return null;
}
{
return null;
}
- List<AlignFrame> avp = new ArrayList<AlignFrame>();
+ List<AlignFrame> avp = new ArrayList<>();
// REVERSE ORDER
for (int i = frames.length - 1; i > -1; i--)
{
// REVERSE ORDER
for (int i = frames.length - 1; i > -1; i--)
{
@@
-2590,7
+2581,7
@@
public class Desktop extends jalview.jbgui.GDesktop
{
return null;
}
{
return null;
}
- List<GStructureViewer> avp = new ArrayList<GStructureViewer>();
+ List<GStructureViewer> avp = new ArrayList<>();
// REVERSE ORDER
for (int i = frames.length - 1; i > -1; i--)
{
// REVERSE ORDER
for (int i = frames.length - 1; i > -1; i--)
{
@@
-2733,8
+2724,8
@@
public class Desktop extends jalview.jbgui.GDesktop
{
if (progressBars == null)
{
{
if (progressBars == null)
{
- progressBars = new Hashtable<Long, JPanel>();
- progressBarHandlers = new Hashtable<Long, IProgressIndicatorHandler>();
+ progressBars = new Hashtable<>();
+ progressBarHandlers = new Hashtable<>();
}
if (progressBars.get(new Long(id)) != null)
}
if (progressBars.get(new Long(id)) != null)