From: amwaterhouse Date: Thu, 17 Mar 2005 10:38:00 +0000 (+0000) Subject: view full id name optional X-Git-Tag: Release_2_0~584 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=66abe88d03e7d0a228f45eaab5739b207174b632;p=jalview.git view full id name optional --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 9d7e2b7..f4139c6 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -33,7 +33,7 @@ public class AlignFrame extends GAlignFrame public AlignFrame(AlignmentI al) { super(); - viewport = new AlignViewport(al,true,true,true,false); + viewport = new AlignViewport(al,true,true,false); String fontName = jalview.bin.Cache.getProperty("FONT_NAME"); String fontStyle= jalview.bin.Cache.getProperty("FONT_STYLE"); @@ -533,6 +533,14 @@ public class AlignFrame extends GAlignFrame Desktop.addInternalFrame(frame, "Change Font", 480,100); } + protected void fullSeqId_actionPerformed(ActionEvent e) + { + viewport.setShowFullId( fullSeqId.isSelected() ); + + alignPanel.idPanel.idCanvas.setPreferredSize( alignPanel.calculateIdWidth() ); + alignPanel.RefreshPanels(); + } + protected void colourTextMenuItem_actionPerformed(ActionEvent e) { viewport.setColourText( colourTextMenuItem.isSelected() ); diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 2f40de4..0c9be38 100755 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -15,7 +15,7 @@ public class AlignViewport int startSeq; int endSeq; - boolean showScores=false; + boolean showFullId = false; boolean showText=true; boolean showColourText=false; boolean showBoxes=true; @@ -51,11 +51,10 @@ public class AlignViewport public AlignViewport(AlignmentI da, - boolean showScores, boolean showText, boolean showBoxes, boolean wrapAlignment) { - this(0,da.getWidth()-1,0,da.getHeight()-1,showScores, + this(0,da.getWidth()-1,0,da.getHeight()-1, showText, showBoxes, wrapAlignment); @@ -65,7 +64,6 @@ public class AlignViewport public AlignViewport(int startRes, int endRes, int startSeq, int endSeq, - boolean showScores, boolean showText, boolean showBoxes, boolean wrapAlignment) { @@ -74,14 +72,10 @@ public class AlignViewport this.endRes = endRes; this.startSeq = startSeq; this.endSeq = endSeq; - - this.showScores = showScores; this.showText = showText; this.showBoxes = showBoxes; this.wrapAlignment = wrapAlignment; - // og = new AlignmentOutputGenerator(this); - setFont( font ); } @@ -240,9 +234,7 @@ public class AlignViewport public void setAlignment(AlignmentI align) { this.alignment = align; } - public void setShowScores(boolean state) { - showScores = state; - } + public void setWrapAlignment(boolean state) { wrapAlignment = state; } @@ -273,9 +265,7 @@ public class AlignViewport public void setShowBoxes(boolean state) { showBoxes = state; } - public boolean getShowScores() { - return showScores; - } + public boolean getWrapAlignment() { return wrapAlignment; } @@ -355,5 +345,13 @@ public class AlignViewport public boolean getColourAppliesToAllGroups() {return colourAppliesToAllGroups; } + public boolean getShowFullId() + { + return showFullId; + } + public void setShowFullId(boolean b) + { + showFullId = b; + } }