rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
window.readPedGenotypes(inputArray, 3);
window.readGenotypes(inputArray, PED);
public static void main(String[] args) { boolean nogui = false; //HaploView window; for(int i = 0;i<args.length;i++) { if(args[i].equals("-n") || args[i].equals("-h") || args[i].equals("-help")) { nogui = true; } } if(nogui) { HaploT...
window.readPedGenotypes(inputArray, 4);
window.readGenotypes(inputArray, DCC);
public static void main(String[] args) { boolean nogui = false; //HaploView window; for(int i = 0;i<args.length;i++) { if(args[i].equals("-n") || args[i].equals("-h") || args[i].equals("-help")) { nogui = true; } } if(nogui) { HaploT...
theData.infoKnown = false; File markerFile; if (inputOptions[1].equals("")){ markerFile = null; }else{ markerFile = new File(inputOptions[1]); } readMarkers(markerFile, hminfo);
public Object construct(){ dPrimeDisplay=null; theData.infoKnown = false; File markerFile; if (inputOptions[1].equals("")){ markerFile = null; }else{ markerFile = new File(inputOptions[1]); ...
setTitle(TITLE_STRING + " -- " + inputOptions[0]);
setTitle(TITLE_STRING + " -- " + inFile.getName());
public Object construct(){ dPrimeDisplay=null; theData.infoKnown = false; File markerFile; if (inputOptions[1].equals("")){ markerFile = null; }else{ markerFile = new File(inputOptions[1]); ...
checkPanel.refreshNames();
checkPanel = new CheckDataPanel(theData); Container checkTab = (Container)tabs.getComponentAt(VIEW_CHECK_NUM); checkTab.removeAll(); JPanel metaCheckPanel = new JPanel(); metaCheckPanel.setLayout(new BoxLayout(metaCheckPanel, BoxLayout.Y_AXIS)); JLabel countsLabel = new JLabel("Using " + theData.numSingletons + " sing...
void readMarkers(File inputFile, String[][] hminfo){ try { theData.prepareMarkerInput(inputFile,maxCompDist,hminfo); if (checkPanel != null){ checkPanel.refreshNames(); } if (tdtPanel != null){ tdtPanel.refreshNames(); } ...
}catch (PedFileException pfe){
void readMarkers(File inputFile, String[][] hminfo){ try { theData.prepareMarkerInput(inputFile,maxCompDist,hminfo); if (checkPanel != null){ checkPanel.refreshNames(); } if (tdtPanel != null){ tdtPanel.refreshNames(); } ...
if(haps == null) { return ; }
public void makeTable(Haplotype[][] haps) { this.removeAll(); initialHaplotypeDisplayThreshold = Options.getHaplotypeDisplayThreshold(); Vector colNames = new Vector(); colNames.add("Haplotype"); colNames.add("Freq."); if (Options.getAssocTest() == ASSOC_TRIO){ c...
public static double gammq (double a, double x) throws CheckDataException {
public static double gammq (double a, double x) {
public static double gammq (double a, double x) throws CheckDataException { double gamser, gammcf; //, gln; if ((x < 0.0 )|| (a <= 0.0 )) throw new CheckDataException("Invalid arguments in routine gammq" ); if (x < (a + 1.0) ) { gamser = gser(a , x); return (1.0 - gamser) ; } else { gammcf = gcf (a , x); ...
if ((x < 0.0 )|| (a <= 0.0 )) throw new CheckDataException("Invalid arguments in routine gammq" );
try{
public static double gammq (double a, double x) throws CheckDataException { double gamser, gammcf; //, gln; if ((x < 0.0 )|| (a <= 0.0 )) throw new CheckDataException("Invalid arguments in routine gammq" ); if (x < (a + 1.0) ) { gamser = gser(a , x); return (1.0 - gamser) ; } else { gammcf = gcf (a , x); ...
}catch (CheckDataException e){ return 0; }
public static double gammq (double a, double x) throws CheckDataException { double gamser, gammcf; //, gln; if ((x < 0.0 )|| (a <= 0.0 )) throw new CheckDataException("Invalid arguments in routine gammq" ); if (x < (a + 1.0) ) { gamser = gser(a , x); return (1.0 - gamser) ; } else { gammcf = gcf (a , x); ...
this.pval = "";
this.pval = new Double(0);
public HaplotypeAssociationNode(String name) { this.name = name; this.freq = ""; this.chisq = -1; this.pval = ""; }
if (c.isNullable()) {
if (c.isDefinitelyNullable()) {
public void writeTable(SQLTable t) throws SQLException, ArchitectException { Map colNameMap = new HashMap(); // for detecting duplicate column names String origTableName = t.getName(); if (topLevelNames.get(t.getName()) != null) { int i = 1; String newName = origTableName+"_"+i; while (topLevelNames.get(newN...
if ( ! ( parentObject instanceof Task ) && project.getTaskDefinitions().containsKey( tagName ) ) {
if (findParentTaskSource() == null && project.getTaskDefinitions().containsKey( tagName )) {
public void doTag(XMLOutput output) throws Exception { Project project = getAntProject(); String tagName = getTagName(); Object parentObject = findBeanAncestor(); // lets assume that Task instances are not nested inside other Task instances // for example <manifest> inside a <jar>...
hasIDAttribute = true;
public void doTag(XMLOutput output) throws Exception { Project project = getAntProject(); String tagName = getTagName(); Object parentObject = findBeanAncestor(); // lets assume that Task instances are not nested inside other Task instances // for example <manifest> inside a <jar>...
window.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command.equals(READ_GENOTYPES)){ ReadDataDialog readDialog = new ReadDataDialog("Open new data", this); readDialog.pack(); readDialog.setVisible(true); } else if (command.equ...
window.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
public void finished() { if(uc != null) { if(uc.isNewVersionAvailable()) { UpdateDisplayDialog udp = new UpdateDisplayDialog(window,"Update Check",uc); udp.pack(); udp.setVisible(tr...
dbcs = new DBConnectionSpec(); dbcsPanel.applyChanges(dbcs); historyBox.addItem(ASUtils.lvb(dbcs.getDisplayName(), dbcs));
dbcsPanel.applyChanges(); DBConnectionSpec dbcs = dbcsPanel.getDbcs(); connectionsBox.addItem(ASUtils.lvb(dbcs.getDisplayName(), dbcs)); ArchitectFrame.getMainInstance().getUserSettings().getConnections().add(dbcs);
public void actionPerformed(ActionEvent e) { final JDialog d = new JDialog(ArchitectFrame.getMainInstance(), "New PL Repository Connection"); JPanel plr = new JPanel(new BorderLayout(12,12)); plr.setBorder(BorderFactory.createEmptyBorder(12,12,12,12)); final DBCSPanel dbcsPanel = new DBCSPanel()...
dbcs = new DBConnectionSpec(); dbcsPanel.applyChanges(dbcs); historyBox.addItem(ASUtils.lvb(dbcs.getDisplayName(), dbcs));
dbcsPanel.applyChanges(); DBConnectionSpec dbcs = dbcsPanel.getDbcs(); connectionsBox.addItem(ASUtils.lvb(dbcs.getDisplayName(), dbcs)); ArchitectFrame.getMainInstance().getUserSettings().getConnections().add(dbcs);
public void actionPerformed(ActionEvent evt) { dbcs = new DBConnectionSpec(); dbcsPanel.applyChanges(dbcs); historyBox.addItem(ASUtils.lvb(dbcs.getDisplayName(), dbcs)); d.setVisible(false); }
public Tag getTag() {
public Tag getTag() throws Exception { Tag tag = (Tag) tagHolder.get(); if ( tag == null ) { tag = createTag(); if ( tag != null ) { configureTag(tag); tagHolder.set(tag); } }
public Tag getTag() { return tag; }
public static TagScript newInstance(Tag tag) { if (tag instanceof DynaTag) { return new DynaTagScript((DynaTag) tag);
public static TagScript newInstance(Class tagClass) { TagFactory factory = new DefaultTagFactory(tagClass); if ( DynaTag.class.isAssignableFrom(tagClass) ) { return new DynaTagScript(factory);
public static TagScript newInstance(Tag tag) { if (tag instanceof DynaTag) { return new DynaTagScript((DynaTag) tag); } return new BeanTagScript(tag); }
return new BeanTagScript(tag);
return new BeanTagScript(factory);
public static TagScript newInstance(Tag tag) { if (tag instanceof DynaTag) { return new DynaTagScript((DynaTag) tag); } return new BeanTagScript(tag); }
if ( ! (namespacesMap instanceof Hashtable) ) { namespacesMap = new Hashtable( namespacesMap ); }
public void setNamespacesMap(Map namespacesMap) { this.namespacesMap = namespacesMap; }
return super.toString() + "[tag=" + tag + "]";
return super.toString() + "[tag=" + elementName + ";at=" + lineNumber + ":" + columnNumber + "]";
public String toString() { return super.toString() + "[tag=" + tag + "]"; }
public BeanTagScript(Tag tag) { super(tag);
public BeanTagScript() {
public BeanTagScript(Tag tag) { super(tag); }
getBody().run( context, output);
invokeBody( output);
public void doTag(final XMLOutput output) throws Exception { getGoal(getName()).addPreGoalCallback( new PreGoalCallback() { public void firePreGoal(Goal goal) throws Exception { // lets run the body log.debug( "Running pre goal: " + getN...
getBody().run( context, output);
invokeBody( output);
public void firePreGoal(Goal goal) throws Exception { // lets run the body log.debug( "Running pre goal: " + getName() ); getBody().run( context, output); }
} Vector unsortedRes = pedFile.getResults(); Vector sortedRes = new Vector(); for (int i = 0; i < realPos.length; i++){ sortedRes.add(unsortedRes.elementAt(realPos[i])); } pedFile.setResults(sortedRes); Vector o = pedFile.getOrder(); for (int i = 0; i < o.size(); i++){ Individual ind = (Individual) o.get(i); Vecto...
void prepareMarkerInput(File infile, String[][] hapmapGoodies) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position. the maxdist ...
sample = new PairwiseLinkage[1];
public DPrimeTable(int numMarkers){ theTable = new PairwiseLinkage[numMarkers][]; sample = new PairwiseLinkage[1]; }
theTable[pos] = (PairwiseLinkage[]) marker.toArray(sample);
theTable[pos] = (PairwiseLinkage[]) marker.toArray(new PairwiseLinkage[0]);
public void addMarker(Vector marker, int pos){ theTable[pos] = (PairwiseLinkage[]) marker.toArray(sample); }
SNP(String n, long p, double m, byte a1, byte a2, String e){
SNP(String n, long p, double m, byte a1, byte a2){
SNP(String n, long p, double m, byte a1, byte a2, String e){ name = n; position = p; MAF = m; major = a1; minor = a2; extra = e; }
extra = e;
SNP(String n, long p, double m, byte a1, byte a2, String e){ name = n; position = p; MAF = m; major = a1; minor = a2; extra = e; }
df = new DecimalFormat("0.0000E0");
df = new DecimalFormat("0.0000E0", new DecimalFormatSymbols(Locale.US));
public String getPValue() { double pval = 0; pval= MathUtil.gammq(.5,.5*this.chiSqVal); DecimalFormat df; //java truly sucks for simply restricting the number of sigfigs but still //using scientific notation when appropriate if (pval < 0.0001){ df = new DecimalFo...
df = new DecimalFormat(); df.setMaximumFractionDigits(4);
df = new DecimalFormat("0.0000", new DecimalFormatSymbols(Locale.US));
public String getPValue() { double pval = 0; pval= MathUtil.gammq(.5,.5*this.chiSqVal); DecimalFormat df; //java truly sucks for simply restricting the number of sigfigs but still //using scientific notation when appropriate if (pval < 0.0001){ df = new DecimalFo...
Iterator readers = ImageIO.getImageReadersByFormatName( "jpg" );
File imageFile = original.getImageFile(); String fname = imageFile.getName(); int lastDotPos = fname.lastIndexOf( "." ); if ( lastDotPos <= 0 || lastDotPos >= fname.length()-1 ) { throw new IOException( "Cannot determine file type extension of " + imageFile.getAbsolutePath() ); } String suffix = fname.substring( lastDo...
protected void createThumbnail( VolumeBase volume ) { log.debug( "Creating thumbnail for " + uid ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Maximum size of the thumbnail int maxThumbWidth = 100; int maxThumbHeight = 1...
int minDim = Math.min( reader.getWidth( 0 ),reader.getHeight( 0 ) ); while ( 2 * minInstanceSide * subsampling < minDim ) { subsampling *= 2;
if ( suffix.toLowerCase().equals( "jpg" ) ) { int minDim = Math.min( reader.getWidth( 0 ),reader.getHeight( 0 ) ); while ( 2 * minInstanceSide * subsampling < minDim ) { subsampling *= 2; }
protected void createThumbnail( VolumeBase volume ) { log.debug( "Creating thumbnail for " + uid ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Maximum size of the thumbnail int maxThumbWidth = 100; int maxThumbHeight = 1...
} catch (IOException e) { log.error( "Error writing thumbnail: " + e.getMessage() );
} catch (Exception e) { log.error( "Error writing thumbnail for " + original.getImageFile().getAbsolutePath()+ ": " + e.getMessage() );
protected void createThumbnail( VolumeBase volume ) { log.debug( "Creating thumbnail for " + uid ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Maximum size of the thumbnail int maxThumbWidth = 100; int maxThumbHeight = 1...
StringBuffer cameraBuf = new StringBuffer( maker ); cameraBuf.append( " "). append( model );
StringBuffer cameraBuf = new StringBuffer( maker != null ? maker : "" ); if ( model != null ) { cameraBuf.append( " "). append( model ); }
void updateFromFileMetadata( File f ) { ExifDirectory exif = null; try { Metadata metadata = JpegMetadataReader.readMetadata(f); if ( metadata.containsDirectory( ExifDirectory.class ) ) { try { exif = (ExifDirectory) metadata.getDirectory( ExifD...
fkCol.addReference();
public synchronized TablePane importTableCopy(SQLTable source, Point preferredLocation) throws ArchitectException { SQLTable newTable = SQLTable.getDerivedInstance(source, db); // adds newTable to db String key = source.getName().toLowerCase(); // ensure tablename is unique if (logger.isDebugEnabled()) logger.de...
public void remove(PlayPenComponent c) { int j = children.indexOf(c); if ( j >= 0 ) remove(j);
public void remove(int j) { PlayPenComponent c = children.get(j); Rectangle r = c.getBounds(); c.removePlayPenComponentListener(playPenComponentEventPassthrough); c.removeSelectionListener(getOwner()); children.remove(j); getOwner().repaint(r);
public void remove(PlayPenComponent c) { int j = children.indexOf(c); if ( j >= 0 ) remove(j); }
List selection = pp.getSelectedItems(); if (selection.size() < 1) { JOptionPane.showMessageDialog(pp, "Select a relationship (by clicking on it) and try again."); } else if (selection.size() > 1) { JOptionPane.showMessageDialog(pp, "You have selected multiple items, but you can only edit one at a time."); } else if (se...
if (evt.getActionCommand().equals(ArchitectSwingConstants.ACTION_COMMAND_SRC_PLAYPEN)) { List selection = pp.getSelectedItems(); if (selection.size() < 1) { JOptionPane.showMessageDialog(pp, "Select a relationship (by clicking on it) and try again."); } else if (selection.size() > 1) { JOptionPane.showMessageDialog(pp,...
public void actionPerformed(ActionEvent evt) { List selection = pp.getSelectedItems(); if (selection.size() < 1) { JOptionPane.showMessageDialog(pp, "Select a relationship (by clicking on it) and try again."); } else if (selection.size() > 1) { JOptionPane.showMessageDialog(pp, "You have selected multiple items...
JOptionPane.showMessageDialog(pp, "The selected item type is not recognised"); }
}
public void actionPerformed(ActionEvent evt) { List selection = pp.getSelectedItems(); if (selection.size() < 1) { JOptionPane.showMessageDialog(pp, "Select a relationship (by clicking on it) and try again."); } else if (selection.size() > 1) { JOptionPane.showMessageDialog(pp, "You have selected multiple items...
Point ep = e.getPoint(); Point sp = owner.unzoomPoint(ep); PlayPenComponent c = getComponentAt(sp);
PlayPenComponent c = getComponentAt(e.getPoint());
public String getToolTipText(MouseEvent e) { String text = null; Point ep = e.getPoint(); // event's point in playpen in screen coords Point sp = owner.unzoomPoint(ep); PlayPenComponent c = getComponentAt(sp); if (c != null) { text = c.getToolTipText(); } logger.debug("Checking for tooltip component at "+e.ge...
put(PL_LOGICAL, argName);
putImpl(PL_LOGICAL, argName, "name");
public void setName(String argName){ put(PL_LOGICAL, argName); }
if (getPreferredSize().getWidth() < getVisibleRect().width){
if (getPreferredSize().getWidth() < getVisibleRect().width && theData.infoKnown){
public void mousePressed (MouseEvent e) { Rectangle blockselector = new Rectangle(clickXShift-boxRadius,clickYShift - boxRadius, (Chromosome.getFilteredSize()*boxSize), boxSize); //if users right clicks & holds, pop up the info if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == ...
ApplicationConfigManager.deleteApplication(appForm.getApplicationId());
ApplicationConfig config=ApplicationConfigManager.deleteApplication (appForm.getApplicationId());
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
"Deleted application with ID "+appForm.getApplicationId());
"Deleted application "+"\""+config.getName()+"\"");
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
roles.add(new Role(userForm.getRole()));
String[] rolesString = userForm.getRole(); for(int ctr=0; ctr < rolesString.length; ctr++){ roles.add(new Role(rolesString[ctr])); }
private User buildUser(ActionForm form){ UserForm userForm = (UserForm)form; List<Role> roles = new ArrayList<Role>(1); roles.add(new Role(userForm.getRole())); User user = new User(userForm.getUsername(), Crypto.hash(userForm.getPassword()), roles, userForm.getStatus(), 0...
String aclName)
String aclName, String targetName)
public static void checkAccess(ServiceContext context, String aclName) throws UnAuthorizedAccessException { checkAccess(context, aclName, null); }
checkAccess(context, aclName, null);
if(!canAccess(context, aclName, targetName)){ throw new UnAuthorizedAccessException("Insufficient Privileges"); }
public static void checkAccess(ServiceContext context, String aclName) throws UnAuthorizedAccessException { checkAccess(context, aclName, null); }
if(metaAppConfig.isDisplayPassword() && config.getPassword() != null)
if(metaAppConfig.isDisplayPassword() && config.getPassword() != null && config.getPassword().length()>0)
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { ApplicationConfig config =...
owner.addPropertyChangeListener("zoom", new ZoomFixer());
public PlayPenContentPane(PlayPen owner) { this.owner = owner; playPenComponentEventPassthrough = new PlayPenComponentEventPassthrough(); }
else { throw new JellyException( "The " + getTagName() + " tag must be nested within a tag which maps to a bean property" ); } return null;
throw new JellyException("The " + getTagName() + " tag must be nested within a tag which maps to a BeanSource implementor");
protected Object newInstance(Class theClass, Map attributes, XMLOutput output) throws Exception { Object parentObject = getParentObject(); if (parentObject != null) { // now lets try call the create method... Class parentClass = parentObject.getClass(); Method method =...
curDb.addVolume( extVol );
try { curDb.addVolume( extVol ); } catch (PhotovaultException ex) { ex.printStackTrace(); }
public void setUp() { try { volumeRoot = File.createTempFile( "photovaultVolumeTest", "" ); volumeRoot.delete(); volumeRoot.mkdir(); extvolRoot = File.createTempFile( "photovaultVolumeTestExt", "" ); extvolRoot.delete(); extvolRoot.mkdir(); ...
getBody().run(context, output);
invokeBody(output);
public void doTag(XMLOutput output) throws Exception { // evaluate body as it may contain a <destination> or message tag getBody().run(context, output); Message message = getMessage(); if ( message == null ) { throw new JellyException( "No message specified. Either spe...
return n.getRatios();
if(this.countsOrRatios == SHOW_COUNTS) { return n.getCounts(); } else if(this.countsOrRatios == SHOW_RATIOS) { return n.getRatios(); }
public Object getValueAt(Object node, int column) { HaplotypeAssociationNode n = (HaplotypeAssociationNode) node; switch (column){ case 0: return n.getName(); case 1: return n.getFreq(); case 2: r...
int mid = rare * (2 * diplotypes - rare) / (2 * diplotypes);
int mid = (int)((double)rare * (double)(2 * diplotypes - rare) / (double)(2 * diplotypes));
private double hwCalculate(int obsAA, int obsAB, int obsBB) throws PedFileException{ //Calculates exact two-sided hardy-weinberg p-value. Parameters //are number of genotypes, number of rare alleles observed and //number of heterozygotes observed. // // (c) 2003 Jan Wigginton, Gon...
return answer; } };
return answer; } public String toString() { return super.toString() + "[expression:" + text + "]"; } };
public Expression createExpression(final String text) throws Exception {/* org.apache.commons.jexl.Expression expr = org.apache.commons.jexl.ExpressionFactory.createExpression(text); if ( isSupportAntVariables() ) { expr.addPostResolver(new FlatResolv...
public static void fitColumnWidth(JTable table, int colIndex) { fitColumnWidth(table, colIndex, -1);
public static void fitColumnWidth(JTable table, int colIndex, int padding) { fitColumnWidth(table, colIndex, -1, padding);
public static void fitColumnWidth(JTable table, int colIndex) { fitColumnWidth(table, colIndex, -1); }
public static void fitColumnWidths(JTable table, int maxColumnWidth) {
public static void fitColumnWidths(JTable table, int maxColumnWidth, int padding) {
public static void fitColumnWidths(JTable table, int maxColumnWidth) { table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); for (int colIndex = 0; colIndex < table.getColumnCount(); colIndex++) { fitColumnWidth(table, colIndex, maxColumnWidth); } }
fitColumnWidth(table, colIndex, maxColumnWidth);
fitColumnWidth(table, colIndex, maxColumnWidth, padding);
public static void fitColumnWidths(JTable table, int maxColumnWidth) { table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); for (int colIndex = 0; colIndex < table.getColumnCount(); colIndex++) { fitColumnWidth(table, colIndex, maxColumnWidth); } }
tag.setContext(context);
try { tag.setContext(context); DynaTag dynaTag = (DynaTag) tag; for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); String name = (String) entry.getKey(); Expression expression = (Expression) entry.getValue(); Object value = expression.evaluate(contex...
public void run(JellyContext context, XMLOutput output) throws Exception { if ( firstRun ) { firstRun = false; // lets see if we have a dynamic tag tag = findDynamicTag(context, (StaticTag) tag); } tag.setContext(context); DynaTag dyna...
DynaTag dynaTag = (DynaTag) tag; for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); String name = (String) entry.getKey(); Expression expression = (Expression) entry.getValue(); Object value = expression.evaluate(context); dynaTag.setAttribute(name, v...
tag.doTag(output); } catch (JellyException e) { handleException(e);
public void run(JellyContext context, XMLOutput output) throws Exception { if ( firstRun ) { firstRun = false; // lets see if we have a dynamic tag tag = findDynamicTag(context, (StaticTag) tag); } tag.setContext(context); DynaTag dyna...
runTag(output);
catch (Exception e) { handleException(e); }
public void run(JellyContext context, XMLOutput output) throws Exception { if ( firstRun ) { firstRun = false; // lets see if we have a dynamic tag tag = findDynamicTag(context, (StaticTag) tag); } tag.setContext(context); DynaTag dyna...
else if ( value instanceof DynaTag ) { return (DynaTag) value;
else if ( value instanceof TagFactory ) { TagFactory factory = (TagFactory) value; return factory.createTag();
public Tag createTag(String name) throws Exception { Object value = templates.get(name); if ( value instanceof Script ) { Script template = (Script) value; return new DynamicTag(template); } else if ( value instanceof DynaTag ) { return...
finally { if ( ! context.isCacheTags() ) { clearTag(); } }
public void run(JellyContext context, XMLOutput output) throws Exception { try { Tag tag = getTag(); if ( tag == null ) { return; } tag.setContext(context); if ( tag instanceof DynaTag ) { DynaTag dynaTag = (Dyna...
TablePane tp = new TablePane((SQLTable) objects[i]); c.add(tp, dtde.getLocation()); tp.revalidate();
c.addTable((SQLTable) objects[i], dtde.getLocation()); } else if (objects[i] instanceof SQLSchema) { c.addSchema((SQLSchema) objects[i], dtde.getLocation()); } else { logger.warn("Unsupported object in multi-item drop: " +objects[i]);
public void drop(DropTargetDropEvent dtde) { Transferable t = dtde.getTransferable(); PlayPen c = (PlayPen) dtde.getDropTargetContext().getComponent(); DataFlavor importFlavor = bestImportFlavor(c, t.getTransferDataFlavors()); if (importFlavor == null) { dtde.rejectDrop(); } else { try { Object so...
public void setContext(JellyContext context) {
public void setContext(JellyContext context) throws Exception {
public void setContext(JellyContext context) { this.context = context; }
if (Options.getAssocTest() == 1){
if (Options.getAssocTest() == ASSOC_TRIO){
public TDTPanel(PedFile pf) throws PedFileException{ if (Options.getAssocTest() == 1){ result = TDT.calcTrioTDT(pf); }else{ result = TDT.calcCCTDT(pf); } tableColumnNames.add("#"); tableColumnNames.add("Name"); if (Options.getAssocTest() == 1){ ...
if (Options.getAssocTest() != 1){
if (Options.getAssocTest() != ASSOC_TRIO){
public void refreshTable(){ this.removeAll(); Vector tableData = new Vector(); int numRes = Chromosome.getSize(); for (int i = 0; i < numRes; i++){ Vector tempVect = new Vector(); TDTResult currentResult = (TDTResult)result.get(Chromosome.realIndex[i]); t...
if (subResults.size() < 1) {
if (subResults.size() <= 1) {
public Result analyze(Filter<S> filter, List<OrderedProperty<S>> orderings) { if (!filter.isBound()) { // Strictly speaking, this is not required, but it detects the // mistake of not properly calling initialFilterValues. throw new IllegalArgumentException("Filter must be bou...
if (decision == JOptionPane.NO_OPTION) {
if (decision != JOptionPane.YES_OPTION ) {
public void actionPerformed(ActionEvent evt) { logger.debug("delete action detected!"); logger.debug("ACTION COMMAND: " + evt.getActionCommand()); if (evt.getActionCommand().equals(ArchitectSwingConstants.ACTION_COMMAND_SRC_PLAYPEN)) { logger.debug("delete action came from playpen"); List items = pp.getSelected...
registerWidgetTag(name, widgetClass, SWT.DEFAULT);
registerWidgetTag(name, widgetClass, SWT.NULL);
protected void registerWidgetTag(String name, Class widgetClass) { registerWidgetTag(name, widgetClass, SWT.DEFAULT); }
final String userName = context.getUser().getName();
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
UserActivityLogger.getInstance().logActivity(userName, userName+" logged out successfully");
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
fileScanner.setProject(AntTagLibrary.getProject(context));
public void doTag(XMLOutput output) throws Exception { fileScanner.clear(); // run the body first to configure the task via nested invokeBody(output); // output the fileScanner if ( var == null ) { throw new MissingAttributeException( "var" ); } co...
}else if (!(populationArg.equalsIgnoreCase("CEU") || populationArg.equalsIgnoreCase("YRI") || populationArg.equalsIgnoreCase("HCB") || populationArg.equalsIgnoreCase("JPT"))){ die("-phasedhapmapdl requires a population specification of CEU, YRI, HCB, or JPT");
}else if (!(populationArg.equalsIgnoreCase("CEU") || populationArg.equalsIgnoreCase("YRI") || populationArg.equalsIgnoreCase("CHB+JPT"))){ die("-phasedhapmapdl requires a population specification of CEU, YRI, or CHB+JPT");
private void argHandler(String[] args){ argHandlerMessages = new Vector(); int maxDistance = -1; //this means that user didn't specify any output type if it doesn't get changed below blockOutputType = -1; double hapThresh = -1; double minimumMAF=-1; double spacingThr...
check = new JCheckBox();
check = new ThreeStateCheckBox();
public FolderNodeEditor( FolderTreePane treePane ) { super(); this.treePane = treePane; setLayout( new BoxLayout(this, BoxLayout.X_AXIS) ); check = new JCheckBox(); check.setBackground( Color.WHITE ); check.addActionListener( this ); name = new JLabel(); icon ...
setupFolder( treePane.getSelectedFolder() );
public void actionPerformed(ActionEvent actionEvent) { if ( actionEvent.getSource() == check ) { // Add or remove photos from current node depending on checkbox state if ( check.isSelected() ) { treePane.addAllToSelectedFolder(); } else { treePan...
boolean isSelected, boolean isExpanded, boolean isLeaf, int i) {
boolean isSelected, boolean isExpanded, boolean isLeaf, int row ) {
public Component getTreeCellEditorComponent(JTree jTree, Object object, boolean isSelected, boolean isExpanded, boolean isLeaf, int i) { node = (FolderNode) object; icon.setIcon( isExpanded ? expandedIcon : closedIcon ); PhotoFolder f = node.getFolder(); name.setText( f.getNa...
icon.setIcon( isExpanded ? expandedIcon : closedIcon ); PhotoFolder f = node.getFolder(); name.setText( f.getName() ); name.setBackground( isSelected ? selectedBkg : nonSelectedBkg ); check.setSelected( node.containsPhotos() );
setupComponent( jTree, node, isSelected, isExpanded, isLeaf, row, true );
public Component getTreeCellEditorComponent(JTree jTree, Object object, boolean isSelected, boolean isExpanded, boolean isLeaf, int i) { node = (FolderNode) object; icon.setIcon( isExpanded ? expandedIcon : closedIcon ); PhotoFolder f = node.getFolder(); name.setText( f.getNa...
icon.setIcon( isExpanded ? expandedIcon : closedIcon ); PhotoFolder f = node.getFolder(); name.setText( f.getName() ); name.setBackground( isSelected ? selectedBkg : nonSelectedBkg ); check.setSelected( node.containsPhotos() );
setupComponent( jTree, node, isSelected, isExpanded, isLeaf, row, hasFocus );
public Component getTreeCellRendererComponent(JTree jTree, Object object, boolean isSelected, boolean isExpanded, boolean isLeaf, int row, boolean hasFocus) { if (object instanceof FolderNode) { node = (FolderNode) object; icon.setIcon( isExpanded ? expandedIcon ...
log.debug( "createThumbnail for " + photo.getUid() );
synchronized public void createThumbnail( PhotoInfo photo ) { this.photo = photo; notify(); }
System.out.println( "Waiting..." );
log.debug( "Waiting..." );
public void run() { synchronized ( this ) { while ( true ) { try { System.out.println( "Waiting..." ); wait(); System.out.println( "Waited..." ); if ( photo != null ) { System.out.println( "Creating thumbnail..." ); Thumbnail thumb = photo.getThumbnail(); System.out.println( "Done!" )...
System.out.println( "Waited..." );
log.debug( "Waited..." );
public void run() { synchronized ( this ) { while ( true ) { try { System.out.println( "Waiting..." ); wait(); System.out.println( "Waited..." ); if ( photo != null ) { System.out.println( "Creating thumbnail..." ); Thumbnail thumb = photo.getThumbnail(); System.out.println( "Done!" )...
System.out.println( "Creating thumbnail..." );
log.debug( "Creating thumbnail for " + photo.getUid() );
public void run() { synchronized ( this ) { while ( true ) { try { System.out.println( "Waiting..." ); wait(); System.out.println( "Waited..." ); if ( photo != null ) { System.out.println( "Creating thumbnail..." ); Thumbnail thumb = photo.getThumbnail(); System.out.println( "Done!" )...
System.out.println( "Done!" );
log.debug( "Done!" );
public void run() { synchronized ( this ) { while ( true ) { try { System.out.println( "Waiting..." ); wait(); System.out.println( "Waited..." ); if ( photo != null ) { System.out.println( "Creating thumbnail..." ); Thumbnail thumb = photo.getThumbnail(); System.out.println( "Done!" )...
log.debug( "drawing new thumbnail for " + lastPhoto.getUid() );
public void run() { synchronized ( this ) { while ( true ) { try { System.out.println( "Waiting..." ); wait(); System.out.println( "Waited..." ); if ( photo != null ) { System.out.println( "Creating thumbnail..." ); Thumbnail thumb = photo.getThumbnail(); System.out.println( "Done!" )...
log.debug( "drawing new thumbnail for " + lastPhoto.getUid() );
public void run() { view.thumbnailCreated( lastPhoto ); }
setupContents();
setLayout(new BorderLayout()); dbDriverField = new JComboBox(getDriverClasses()); dbDriverField.insertItemAt("", 0); dbNameField = new JTextField(); JComponent[] fields = new JComponent[] {dbNameField, dbDriverField, dbUrlField = new JTextField(), dbUserField = new JTextField(), dbPassField = new JPasswordField()}; Str...
public DBCSPanel() { setupContents(); }
int i = dbNameField.getSelectedIndex(); if (!itemChanging && i >= 0) { logger.debug("Changing to index "+i+" of "+dbcsHistory); applyChanges(); setDbcs((DBConnectionSpec) dbcsHistory.get(i)); } else if (i == -1) { String newName = (String) dbNameField.getEditor().getItem(); i = dbcsHistory.indexOf(dbcs); dbNameHistory....
String t = getTemplateForDriver(dbDriverField.getSelectedItem().toString()); if (t == null) t = "jdbc:"; dbUrlField.setText(t);
public void actionPerformed(ActionEvent e) { int i = dbNameField.getSelectedIndex(); if (!itemChanging && i >= 0) { logger.debug("Changing to index "+i+" of "+dbcsHistory); applyChanges(); setDbcs((DBConnectionSpec) dbcsHistory.get(i)); } else if (i == -1) { String newName = (String)...
int oldIndex = dbcsHistory.indexOf(dbcs); String name = (String) dbNameField.getItemAt(oldIndex); logger.debug("Changing name of DBCS at index "+oldIndex+" to "+name);
String name = dbNameField.getText();
public void applyChanges() { int oldIndex = dbcsHistory.indexOf(dbcs); String name = (String) dbNameField.getItemAt(oldIndex); logger.debug("Changing name of DBCS at index "+oldIndex+" to "+name); dbcs.setName(name); dbcs.setDisplayName(name); dbcs.setDriverClass(dbDriverField.getSelectedItem().toString()); dbc...
try { itemChanging = true; int index = dbcsHistory.indexOf(dbcs); if (index < 0) { logger.debug("Adding NEW dbcs to history list: "+dbcs); dbcsHistory.add(dbcs); dbNameField.addItem(dbcs.getDisplayName()); index = dbcsHistory.size() - 1; } dbNameField.setSelectedIndex(index); dbDriverField.removeItemAt(0); if (dbcs.get...
dbNameField.setText(dbcs.getName()); dbDriverField.removeItemAt(0); if (dbcs.getDriverClass() != null) { dbDriverField.insertItemAt(dbcs.getDriverClass(), 0); } else { dbDriverField.insertItemAt("", 0);
public void setDbcs(DBConnectionSpec dbcs) { try { itemChanging = true; int index = dbcsHistory.indexOf(dbcs); if (index < 0) { logger.debug("Adding NEW dbcs to history list: "+dbcs); dbcsHistory.add(dbcs); dbNameField.addItem(dbcs.getDisplayName()); index = dbcsHistory.size() - 1; } dbNameField...
dbDriverField.setSelectedIndex(0); dbUrlField.setText(dbcs.getUrl()); dbUserField.setText(dbcs.getUser()); dbPassField.setText(dbcs.getPass()); this.dbcs = dbcs;
public void setDbcs(DBConnectionSpec dbcs) { try { itemChanging = true; int index = dbcsHistory.indexOf(dbcs); if (index < 0) { logger.debug("Adding NEW dbcs to history list: "+dbcs); dbcsHistory.add(dbcs); dbNameField.addItem(dbcs.getDisplayName()); index = dbcsHistory.size() - 1; } dbNameField...
public Vector<Transaction> getTransactions(Date startDate, Date endDate){ Vector<Transaction> transactions = getTransactions(); Vector<Transaction> v = new Vector<Transaction>(); for (Transaction t : transactions) { if (t.getDate().after(startDate) && t.getDate().before(endDate)){ v.add(t); } }
public Vector<Transaction> getTransactions(){ Vector<Transaction> v = new Vector<Transaction>(getDataModel().getAllTransactions().getTransactions()); Collections.sort(v);
public Vector<Transaction> getTransactions(Date startDate, Date endDate){ Vector<Transaction> transactions = getTransactions(); Vector<Transaction> v = new Vector<Transaction>(); for (Transaction t : transactions) { if (t.getDate().after(startDate) && t.getDate().before(endDate)){ v.add(t); } } re...
if(missingCutoff != -1) { Options.setMissingThreshold(missingCutoff); }
private void argHandler(String[] args){ int maxDistance = -1; //this means that user didn't specify any output type if it doesn't get changed below outputType = -1; double hapThresh = -1; double minimumMAF=-1; double spacingThresh = -1; double minimumGenoPercent = -1...
String encoding = "UTF-8";
public void save(ProgressMonitor pm) throws IOException, ArchitectException { // write to temp file and then rename (this preserves old project file // when there's problems) if (file.exists() && !file.canWrite()) { // write problems with architect file will muck up the save process throw new ArchitectExceptio...
out = new PrintWriter(new BufferedWriter(new FileWriter(tempFile)));
out = new PrintWriter(tempFile,encoding);
public void save(ProgressMonitor pm) throws IOException, ArchitectException { // write to temp file and then rename (this preserves old project file // when there's problems) if (file.exists() && !file.canWrite()) { // write problems with architect file will muck up the save process throw new ArchitectExceptio...
saveOk = save(out);
saveOk = save(out,encoding);
public void save(ProgressMonitor pm) throws IOException, ArchitectException { // write to temp file and then rename (this preserves old project file // when there's problems) if (file.exists() && !file.canWrite()) { // write problems with architect file will muck up the save process throw new ArchitectExceptio...
JOptionPane.showMessageDialog( this, "Database " + nameFld.getText() + " created succesfully",
JOptionPane.showMessageDialog( this, "Database " + nameFld.getText() + " created successfully",
private void createDatabase() { // Ask for the admin password PVDatabase db = new PVDatabase(); String user = ""; String passwd = ""; if ( dbServerBtn.isSelected() ) { AdminLoginDlg loginDlg = new AdminLoginDlg( this, true ); if ( loginDlg.showDialog() == Adm...
setTitle("Create Photovault database");
private void initComponents() { dirChooser = new javax.swing.JFileChooser(); instanceTypeBtnGroup = new javax.swing.ButtonGroup(); jLabel1 = new javax.swing.JLabel(); volumeDirFld = new javax.swing.JTextField(); okBtn = new javax.swing.JButton(); CancelBtn = new javax.swing...