From 8aba54b0ee1e65c1df4f89a76747dc3d172bc998 Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Wed, 24 Jan 2018 12:33:21 +0000 Subject: [PATCH] JAL-2872 added setters for GUI sizes --- src/jalview/ext/archaeopteryx/AptxFrame.java | 13 +++++++++++++ src/jalview/ext/archaeopteryx/AptxTreePanel.java | 22 ++++++++++++++++++++++ src/jalview/ext/treeviewer/TreeFrameI.java | 8 ++++++-- src/jalview/ext/treeviewer/TreePanelI.java | 7 +++++++ src/jalview/ext/treeviewer/TreeViewerUtils.java | 2 +- 5 files changed, 49 insertions(+), 3 deletions(-) diff --git a/src/jalview/ext/archaeopteryx/AptxFrame.java b/src/jalview/ext/archaeopteryx/AptxFrame.java index f4ee9c4..919d00e 100644 --- a/src/jalview/ext/archaeopteryx/AptxFrame.java +++ b/src/jalview/ext/archaeopteryx/AptxFrame.java @@ -431,5 +431,18 @@ public class AptxFrame implements TreeFrameI } + @Override + public void setMaximumSize(Dimension maximumSize) + { + aptxFrame.setMaximumSize(maximumSize); + + } + + @Override + public void setPreferredSize(Dimension preferredSize) + { + aptxFrame.setPreferredSize(preferredSize); + + } } \ No newline at end of file diff --git a/src/jalview/ext/archaeopteryx/AptxTreePanel.java b/src/jalview/ext/archaeopteryx/AptxTreePanel.java index e397248..77b2ddd 100644 --- a/src/jalview/ext/archaeopteryx/AptxTreePanel.java +++ b/src/jalview/ext/archaeopteryx/AptxTreePanel.java @@ -5,6 +5,7 @@ import jalview.ext.treeviewer.TreeNodeI; import jalview.ext.treeviewer.TreePanelI; import jalview.gui.PaintRefresher; +import java.awt.Dimension; import java.awt.Event; import java.awt.Font; import java.awt.Graphics2D; @@ -198,4 +199,25 @@ public class AptxTreePanel implements TreePanelI { return treeView.getThreshold(); } + + @Override + public void setMinimumSize(Dimension minimumSize) + { + treeView.setMinimumSize(minimumSize); + + } + + @Override + public void setMaximumSize(Dimension maximumSize) + { + treeView.setMaximumSize(maximumSize); + + } + + @Override + public void setPreferredSize(Dimension preferredSize) + { + treeView.setPreferredSize(preferredSize); + + } } diff --git a/src/jalview/ext/treeviewer/TreeFrameI.java b/src/jalview/ext/treeviewer/TreeFrameI.java index 2758229..fef927c 100644 --- a/src/jalview/ext/treeviewer/TreeFrameI.java +++ b/src/jalview/ext/treeviewer/TreeFrameI.java @@ -32,8 +32,6 @@ public interface TreeFrameI public void repaint(); - public void setMinimumSize(Dimension dimension); - public boolean isShowing(); public Container getTopLevelAncestor(); @@ -45,4 +43,10 @@ public interface TreeFrameI public void setViewBinding(TreeViewerBindingI alignmentBinding); + public void setMinimumSize(Dimension minimumSize); + + public void setMaximumSize(Dimension maximumSize); + + public void setPreferredSize(Dimension preferredSize); + } diff --git a/src/jalview/ext/treeviewer/TreePanelI.java b/src/jalview/ext/treeviewer/TreePanelI.java index 38a8026..e0612d0 100644 --- a/src/jalview/ext/treeviewer/TreePanelI.java +++ b/src/jalview/ext/treeviewer/TreePanelI.java @@ -1,5 +1,6 @@ package jalview.ext.treeviewer; +import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.MenuContainer; import java.awt.Rectangle; @@ -53,4 +54,10 @@ public interface TreePanelI extends Accessible, MenuContainer public abstract Rectangle getVisibleArea(); + public void setMinimumSize(Dimension minimumSize); + + public void setMaximumSize(Dimension maximumSize); + + public void setPreferredSize(Dimension preferredSize); + } diff --git a/src/jalview/ext/treeviewer/TreeViewerUtils.java b/src/jalview/ext/treeviewer/TreeViewerUtils.java index a34d9fa..9531cf1 100644 --- a/src/jalview/ext/treeviewer/TreeViewerUtils.java +++ b/src/jalview/ext/treeviewer/TreeViewerUtils.java @@ -50,7 +50,7 @@ public final class TreeViewerUtils activeViews.put(treeFrame, treeFrame.getViewBinding()); treeFrame.addFrameToJalview(frameTitle, true, width, height, true, - true); + false); return treeFrame; } -- 1.7.10.2