*/
package jalview.bin;
+import jalview.gui.UserDefinedColours;
+import jalview.io.PIRFile;
+import jalview.jbgui.GDesktop;
+import jalview.schemes.ColourSchemeProperty;
+import jalview.schemes.UserColourScheme;
+import jalview.util.Format;
import jalview.ws.dbsources.das.api.DasSourceRegistryI;
import jalview.ws.dbsources.das.datamodel.DasSourceRegistry;
// log output
Logger laxis = Logger.getLogger("org.apache.axis");
Logger lcastor = Logger.getLogger("org.exolab.castor");
- jalview.bin.Cache.log = Logger.getLogger("jalview.bin.Jalview");
+ Cache.log = Logger.getLogger("jalview.bin.Jalview");
laxis.setLevel(Level.toLevel(Cache.getDefault("logs.Axis.Level",
Level.INFO.toString())));
// lcastor = Logger.getLogger("org.exolab.castor.xml.Marshaller");
// lcastor.setLevel(Level.toLevel(Cache.getDefault("logs.Castor.Level",
// Level.INFO.toString())));
- jalview.bin.Cache.log.setLevel(Level.toLevel(Cache.getDefault(
+ Cache.log.setLevel(Level.toLevel(Cache.getDefault(
"logs.Jalview.level", Level.INFO.toString())));
// laxis.addAppender(ap);
// lcastor.addAppender(ap);
- // jalview.bin.Cache.log.addAppender(ap);
+ // Cache.log.addAppender(ap);
// Tell the user that debug is enabled
- jalview.bin.Cache.log.debug("Jalview Debugging Output Follows.");
+ Cache.log.debug("Jalview Debugging Output Follows.");
} catch (Exception ex)
{
System.err.println("Problems initializing the log4j system\n");
setProperty("VERSION", codeVersion);
// LOAD USERDEFINED COLOURS
- jalview.gui.UserDefinedColours
+ UserDefinedColours
.initUserColourSchemes(getProperty("USER_DEFINED_COLOURS"));
- jalview.io.PIRFile.useModellerOutput = Cache.getDefault("PIR_MODELLER",
+ PIRFile.useModellerOutput = Cache.getDefault("PIR_MODELLER",
false);
}
{
try
{
- if (jalview.jbgui.GDesktop.class.getClassLoader().loadClass(
+ if (GDesktop.class.getClassLoader().loadClass(
"uk.ac.vamsas.client.VorbaId") != null)
{
- jalview.bin.Cache.log
+ Cache.log
.debug("Found Vamsas Classes (uk.ac..vamsas.client.VorbaId can be loaded)");
vamsasJarsArePresent = 1;
Logger lvclient = Logger.getLogger("uk.ac.vamsas");
} catch (Exception e)
{
vamsasJarsArePresent = 0;
- jalview.bin.Cache.log.debug("Vamsas Classes are not present");
+ Cache.log.debug("Vamsas Classes are not present");
}
}
return (vamsasJarsArePresent > 0);
if (Cache.class.getClassLoader().loadClass(
"groovy.lang.GroovyObject") != null)
{
- jalview.bin.Cache.log
+ Cache.log
.debug("Found Groovy (groovy.lang.GroovyObject can be loaded)");
groovyJarsArePresent = 1;
Logger lgclient = Logger.getLogger("groovy");
} catch (Error e)
{
groovyJarsArePresent = 0;
- jalview.bin.Cache.log.debug("Groovy Classes are not present", e);
+ Cache.log.debug("Groovy Classes are not present", e);
} catch (Exception e)
{
groovyJarsArePresent = 0;
- jalview.bin.Cache.log.debug("Groovy Classes are not present");
+ Cache.log.debug("Groovy Classes are not present");
}
}
return (groovyJarsArePresent > 0);
new Object[]
{
"Jalview Desktop",
- (vrs = jalview.bin.Cache.getProperty("VERSION")
+ (vrs = Cache.getProperty("VERSION")
+ "_"
- + jalview.bin.Cache.getDefault("BUILD_DATE",
+ + Cache.getDefault("BUILD_DATE",
"unknown")), "UA-9060947-1" });
jgoogleanalyticstracker.getMethod("trackAsynchronously",
new Class[]
{
return defcolour;
}
- Color col = jalview.schemes.ColourSchemeProperty
- .getAWTColorFromName(colprop);
+ Color col = ColourSchemeProperty.getAWTColorFromName(colprop);
if (col == null)
{
try
{
- col = new jalview.schemes.UserColourScheme(colprop).findColour('A');
+ col = new UserColourScheme(colprop).findColour('A');
} catch (Exception ex)
{
log.warn("Couldn't parse '" + colprop + "' as a colour for "
*/
public static void setColourProperty(String property, Color colour)
{
- setProperty(property, jalview.util.Format.getHexString(colour));
+ setProperty(property, Format.getHexString(colour));
}
public static final DateFormat date_format = SimpleDateFormat
import jalview.gui.AlignFrame;
import jalview.gui.Desktop;
+import jalview.gui.PromptUserConfig;
+import jalview.io.AppletFormatAdapter;
import jalview.io.BioJsHTMLOutput;
+import jalview.io.FileLoader;
+import jalview.io.FormatAdapter;
import jalview.io.HtmlSvgOutput;
+import jalview.io.IdentifyFile;
+import jalview.io.NewickFile;
+import jalview.schemes.ColourSchemeI;
+import jalview.schemes.ColourSchemeProperty;
+import jalview.schemes.UserColourScheme;
import jalview.util.MessageManager;
import jalview.util.Platform;
import jalview.ws.jws2.Jws2Discoverer;
}
String file = null, protocol = null, format = null, data = null;
- jalview.io.FileLoader fileLoader = new jalview.io.FileLoader(!headless);
+ FileLoader fileLoader = new FileLoader(!headless);
Vector getFeatures = null; // vector of das source nicknames to fetch
// features from
// loading is done.
{
try
{
- String viprotocol = jalview.io.AppletFormatAdapter
+ String viprotocol = AppletFormatAdapter
.checkProtocol(vamsasImport);
- if (viprotocol == jalview.io.FormatAdapter.FILE)
+ if (viprotocol == FormatAdapter.FILE)
{
inSession = desktop.vamsasImport(new File(vamsasImport));
}
- else if (viprotocol == jalview.io.FormatAdapter.URL)
+ else if (viprotocol == FormatAdapter.URL)
{
inSession = desktop.vamsasImport(new URL(vamsasImport));
}
}
}
- protocol = jalview.io.AppletFormatAdapter.checkProtocol(file);
+ protocol = AppletFormatAdapter.checkProtocol(file);
- format = new jalview.io.IdentifyFile().Identify(file, protocol);
+ format = new IdentifyFile().Identify(file, protocol);
AlignFrame af = fileLoader.LoadFileWaitTillLoaded(file, protocol,
format);
{
data.replaceAll("%20", " ");
- jalview.schemes.ColourSchemeI cs = jalview.schemes.ColourSchemeProperty
+ ColourSchemeI cs = ColourSchemeProperty
.getColour(af.getViewport().getAlignment(), data);
if (cs == null)
{
- jalview.schemes.UserColourScheme ucs = new jalview.schemes.UserColourScheme(
+ UserColourScheme ucs = new UserColourScheme(
"white");
ucs.parseAppletParameter(data);
cs = ucs;
if (data != null)
{
af.parseFeaturesFile(data,
- jalview.io.AppletFormatAdapter.checkProtocol(data));
+ AppletFormatAdapter.checkProtocol(data));
System.out.println("Added " + data);
}
data = aparser.getValue("features", true);
if (data != null)
{
af.parseFeaturesFile(data,
- jalview.io.AppletFormatAdapter.checkProtocol(data));
+ AppletFormatAdapter.checkProtocol(data));
System.out.println("Added " + data);
}
data = aparser.getValue("tree", true);
if (data != null)
{
- jalview.io.NewickFile fin = null;
+ NewickFile fin = null;
try
{
- fin = new jalview.io.NewickFile(data,
- jalview.io.AppletFormatAdapter.checkProtocol(data));
+ fin = new NewickFile(data,
+ AppletFormatAdapter.checkProtocol(data));
if (fin != null)
{
af.getViewport().setCurrentTree(
{
// Execute the groovy script after we've done all the rendering stuff
// and before any images or figures are generated.
- if (jalview.bin.Cache.groovyJarsPresent())
+ if (Cache.groovyJarsPresent())
{
System.out.println("Executing script " + groovyscript);
executeGroovyScript(groovyscript, new Object[]
// ////////////////////
if (!headless && file == null && vamsasImport == null
- && jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true))
+ && Cache.getDefault("SHOW_STARTUP_FILE", true))
{
- file = jalview.bin.Cache.getDefault(
+ file = Cache.getDefault(
"STARTUP_FILE",
- jalview.bin.Cache.getDefault("www.jalview.org",
+ Cache.getDefault("www.jalview.org",
"http://www.jalview.org")
+ "/examples/exampleFile_2_7.jar");
if (file.equals("http://www.jalview.org/examples/exampleFile_2_3.jar"))
// hardwire upgrade of the startup file
file.replace("_2_3.jar", "_2_7.jar");
// and remove the stale setting
- jalview.bin.Cache.removeProperty("STARTUP_FILE");
+ Cache.removeProperty("STARTUP_FILE");
}
protocol = "File";
}
else
{
- format = new jalview.io.IdentifyFile().Identify(file, protocol);
+ format = new IdentifyFile().Identify(file, protocol);
}
startUpAlframe = fileLoader.LoadFileWaitTillLoaded(file, protocol,
// Once all other stuff is done, execute any groovy scripts (in order)
if (groovyscript != null)
{
- if (jalview.bin.Cache.groovyJarsPresent())
+ if (Cache.groovyJarsPresent())
{
System.out.println("Executing script " + groovyscript);
executeGroovyScript(groovyscript, new Object[]
/**
* start a User Config prompt asking if we can log usage statistics.
*/
- jalview.gui.PromptUserConfig prompter = new jalview.gui.PromptUserConfig(
+ PromptUserConfig prompter = new PromptUserConfig(
desktop.desktop,
"USAGESTATS",
"Jalview Usage Statistics",
*/
package jalview.bin;
+import jalview.analysis.SequenceIdMatcher;
import jalview.api.StructureSelectionManagerProvider;
import jalview.appletgui.AlignFrame;
import jalview.appletgui.AlignViewport;
import jalview.javascript.JSFunctionExec;
import jalview.javascript.JalviewLiteJsApi;
import jalview.javascript.JsCallBack;
+import jalview.javascript.JsSelectionSender;
+import jalview.javascript.MouseOverListener;
+import jalview.javascript.MouseOverStructureListener;
+import jalview.schemes.ColourSchemeProperty;
+import jalview.schemes.UserColourScheme;
import jalview.structure.SelectionListener;
import jalview.structure.StructureSelectionManager;
import jalview.util.MessageManager;
final String position, final String alignedPosition)
{
// TODO: could try to highlight in all alignments if alf==null
- jalview.analysis.SequenceIdMatcher matcher = new jalview.analysis.SequenceIdMatcher(
+ SequenceIdMatcher matcher = new SequenceIdMatcher(
alf.viewport.getAlignment().getSequencesArray());
final SequenceI sq = matcher.findIdMatch(sequenceId);
if (sq != null)
final SequenceGroup sel = new SequenceGroup();
final ColumnSelection csel = new ColumnSelection();
AlignmentI al = alf.viewport.getAlignment();
- jalview.analysis.SequenceIdMatcher matcher = new jalview.analysis.SequenceIdMatcher(
+ SequenceIdMatcher matcher = new SequenceIdMatcher(
alf.viewport.getAlignment().getSequencesArray());
int start = 0, end = al.getWidth(), alw = al.getWidth();
boolean seqsfound = true;
SequenceI[] sqs = null;
if (ids != null && ids.length > 0)
{
- jalview.analysis.SequenceIdMatcher matcher = new jalview.analysis.SequenceIdMatcher(
+ SequenceIdMatcher matcher = new SequenceIdMatcher(
alf.viewport.getAlignment().getSequencesArray());
int s = 0;
sqs = new SequenceI[ids.length];
setMouseoverListener(currentAlignFrame, listener);
}
- private Vector<jalview.javascript.JSFunctionExec> javascriptListeners = new Vector<jalview.javascript.JSFunctionExec>();
+ private Vector<JSFunctionExec> javascriptListeners = new Vector<JSFunctionExec>();
/*
* (non-Javadoc)
return;
}
}
- jalview.javascript.MouseOverListener mol = new jalview.javascript.MouseOverListener(
+ MouseOverListener mol = new MouseOverListener(
this, af, listener);
javascriptListeners.addElement(mol);
StructureSelectionManager.getStructureSelectionManager(this)
return;
}
}
- jalview.javascript.JsSelectionSender mol = new jalview.javascript.JsSelectionSender(
- this, af, listener);
+ JsSelectionSender mol = new JsSelectionSender(this, af, listener);
javascriptListeners.addElement(mol);
StructureSelectionManager.getStructureSelectionManager(this)
.addSelectionListener(mol);
return;
}
}
- jalview.javascript.MouseOverStructureListener mol = new jalview.javascript.MouseOverStructureListener(
+ MouseOverStructureListener mol = new MouseOverStructureListener(
this, listener, separatorListToArray(modelSet));
javascriptListeners.addElement(mol);
StructureSelectionManager.getStructureSelectionManager(this)
{
while (javascriptListeners.size() > 0)
{
- jalview.javascript.JSFunctionExec mol = javascriptListeners
- .elementAt(0);
+ JSFunctionExec mol = javascriptListeners.elementAt(0);
javascriptListeners.removeElement(mol);
if (mol instanceof SelectionListener)
{
StructureSelectionManager.release(this);
}
- private jalview.javascript.JSFunctionExec jsFunctionExec;
+ private JSFunctionExec jsFunctionExec;
/*
* (non-Javadoc)
// alignPdbStructures is true)
Vector pdbs = new Vector();
// create a lazy matcher if we're asked to
- jalview.analysis.SequenceIdMatcher matcher = (applet
- .getDefaultParameter("relaxedidmatch", false)) ? new jalview.analysis.SequenceIdMatcher(
+ SequenceIdMatcher matcher = (applet.getDefaultParameter(
+ "relaxedidmatch", false)) ? new SequenceIdMatcher(
alignFrame.getAlignViewport().getAlignment()
.getSequencesArray()) : null;
{
return defcolour;
}
- Color col = jalview.schemes.ColourSchemeProperty
- .getAWTColorFromName(colprop);
+ Color col = ColourSchemeProperty.getAWTColorFromName(colprop);
if (col == null)
{
try
{
- col = new jalview.schemes.UserColourScheme(colprop).findColour('A');
+ col = new UserColourScheme(colprop).findColour('A');
} catch (Exception ex)
{
System.err.println("Couldn't parse '" + colprop
import jalview.datamodel.AlignmentI;
import jalview.io.AppletFormatAdapter;
import jalview.io.FileParse;
+import jalview.io.IdentifyFile;
import java.applet.Applet;
import java.io.InputStream;
String format = getParameter("format");
if (format == null || format.length() == 0)
{
- format = new jalview.io.IdentifyFile().Identify(file, protocol);
+ format = new IdentifyFile().Identify(file, protocol);
System.out.println("Format is " + format);
}
else