X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fapi%2Fstructures%2FJalviewStructureDisplayI.java;h=d0351a805e2b95950b8f54ec6e95073a51629668;hb=0862857e6b49fefb790d20495b190a55b7b611f6;hp=c58e3c14a835461fcfffea1ad5f27ee9ff0a898e;hpb=91d45e7c90753d8061883f351da796c50f467ef5;p=jalview.git diff --git a/src/jalview/api/structures/JalviewStructureDisplayI.java b/src/jalview/api/structures/JalviewStructureDisplayI.java index c58e3c1..d0351a8 100644 --- a/src/jalview/api/structures/JalviewStructureDisplayI.java +++ b/src/jalview/api/structures/JalviewStructureDisplayI.java @@ -23,7 +23,6 @@ package jalview.api.structures; import jalview.api.AlignmentViewPanel; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; -import jalview.schemes.ColourSchemeI; import jalview.structures.models.AAStructureBindingModel; public interface JalviewStructureDisplayI @@ -59,25 +58,38 @@ public interface JalviewStructureDisplayI void closeViewer(boolean closeExternalViewer); /** - * apply a colourscheme to the structures in the viewer - * - * @param colourScheme - */ - void setJalviewColourScheme(ColourSchemeI colourScheme); - - /** * * @return true if all background sequence/structure binding threads have * completed for this viewer instance */ boolean hasMapping(); - // construction method - move to another interface ? + /** + * Checks if the PDB file is already loaded in this viewer, if so just adds + * mappings as necessary and answers true, else answers false. This supports + * the use case of adding additional chains of the same structure to a viewer. + * + * @param seq + * @param chains + * @param apanel + * @param pdbId + * @return + */ boolean addAlreadyLoadedFile(SequenceI[] seq, String[] chains, AlignmentViewPanel apanel, String pdbId); - // construction method - move to another interface ? - boolean addToExistingViewer(PDBEntry pdbentry, SequenceI[] seq, + /** + * Adds one or more chains (sequences) of a PDB structure to this structure + * viewer + * + * @param pdbentry + * @param seq + * @param chains + * @param apanel + * @param pdbId + * @return + */ + void addToExistingViewer(PDBEntry pdbentry, SequenceI[] seq, String[] chains, AlignmentViewPanel apanel, String pdbId); /** @@ -85,4 +97,74 @@ public interface JalviewStructureDisplayI */ void updateTitleAndMenus(); + /** + * Answers true if the viewer should attempt to align any added structures, + * else false + * + * @return + */ + boolean isAlignAddedStructures(); + + /** + * Sets the flag for whether added structures should be aligned + * + * @param alignAdded + */ + void setAlignAddedStructures(boolean alignAdded); + + /** + * Raise the panel to the top of the stack... + */ + void raiseViewer(); + + AlignmentViewPanel getAlignmentPanel(); + + /** + * Answers true if the given alignment view is used to colour structures by + * sequence, false if not + * + * @param ap + * @return + */ + boolean isUsedForColourBy(AlignmentViewPanel ap); + + /** + * If implemented, shows a command line console in the structure viewer + * + * @param show + * true to show, false to hide + */ + void showConsole(boolean show); + + /** + * Remove references to the given alignment view for this structure viewer + * + * @param avp + */ + void removeAlignmentPanel(AlignmentViewPanel avp); + + /** + * Updates the progress bar if there is one. Call stopProgressBar with the + * returned handle to remove the message. + * + * @param msg + * @return handle + */ + long startProgressBar(String msg); + + /** + * Ends the progress bar with the specified handle, leaving a message (if not + * null) on the status bar + * + * @param msg + * @param handle + */ + void stopProgressBar(String msg, long handle); + + /** + * + * @return true if the actions menu is shown for this viewer + */ + boolean hasViewerActionsMenu(); + }