package jalview.structure;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
/**
* A base class holding methods useful to all classes that implement commands
* for structure viewers
*
* @author gmcarstairs
*
*/
public abstract class StructureCommandsBase implements StructureCommandsI
{
private static final String CMD_SEPARATOR = ";";
public static final String NAMESPACE_PREFIX = "jv_";
/**
* Returns something that separates concatenated commands
*
* @return
*/
protected static String getCommandSeparator()
{
return CMD_SEPARATOR;
}
/**
* Returns the lowest model number used by the structure viewer
*
* @return
*/
@Override
public int getModelStartNo()
{
return 0;
}
/**
* Helper method to add one contiguous range to the AtomSpec model for the given
* value (creating the model if necessary). As used by Jalview, {@code value} is
*
*
a colour, when building a 'colour structure by sequence' command
*
a feature value, when building a 'set Chimera attributes from features'
* command
*
*
* @param map
* @param value
* @param model
* @param startPos
* @param endPos
* @param chain
*/
public static final void addAtomSpecRange(Map