bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
protected String getDisplayType(String type){ if(type.startsWith("[")){ /* convert to readable name. e.g. [Ljava.lang.String to java.lang.String[]*/ String arrayBraces = ""; while(type.startsWith("[")){ type = type.substring(1); arrayBraces += "[]"; } type = getArrayDisplayType(type) + arrayBraces; } return type; }
protected String getDisplayType(String type){ if(type != null && type.startsWith("[")){ /* convert to readable name. e.g. [Ljava.lang.String to java.lang.String[]*/ String arrayBraces = ""; while(type.startsWith("[")){ type = type.substring(1); arrayBraces += "[]"; } type = getArrayDisplayType(type) + arrayBraces; } return type; }
1,112,738
public void showSearchDialog(final PlayPen pp) { // XXX need to convert to an ArchitectPanel before switching // this to use ArchitectPanelBuilder. final JDialog d = new JDialog((Frame) SwingUtilities.getAncestorOfClass(JFrame.class, pp), "Find"); ButtonGroup matchType = new ButtonGroup(); matchType.add(substringMatch = new JRadioButton("Substring")); matchType.add(exactMatch = new JRadioButton("Exact Match")); matchType.add(regexMatch = new JRadioButton("Regex")); JPanel matchTypePanel = new JPanel(new GridLayout(1,3)); matchTypePanel.add(substringMatch); matchTypePanel.add(exactMatch); matchTypePanel.add(regexMatch); substringMatch.setSelected(true); ButtonGroup searchType = new ButtonGroup(); searchType.add(tableSearch = new JRadioButton("Tables")); searchType.add(relationshipSearch = new JRadioButton("Relationships")); searchType.add(columnSearch = new JRadioButton("Columns")); searchType.add(allSearch = new JRadioButton("Anything")); JPanel searchTypePanel = new JPanel(new GridLayout(4,1)); searchTypePanel.add(tableSearch); searchTypePanel.add(relationshipSearch); searchTypePanel.add(columnSearch); searchTypePanel.add(allSearch); allSearch.setSelected(true); caseInsensitive = new JCheckBox("Ignoring case"); caseInsensitive.setSelected(true); searchExpression = new JTextField(); JButton searchButton = new JButton("Search"); // searchButton.setDefaultCapable(true); searchButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { showResults(d, pp); } catch (ArchitectException ex) { ASUtils.showExceptionDialog("Encountered a problem during search", ex); } } }); Action cancelAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { d.setVisible(false); d.dispose(); } }; cancelAction.putValue(Action.NAME, ArchitectPanelBuilder.CANCEL_BUTTON_LABEL); JButton cancelButton = new JButton(cancelAction); ArchitectPanelBuilder.makeJDialogCancellable(d, cancelAction); JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); buttonPanel.add(searchButton); buttonPanel.add(cancelButton); JComponent cp = (JComponent) d.getContentPane(); cp.setLayout(new FormLayout(10, 10)); cp.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); cp.add(new JLabel("Look for")); cp.add(searchTypePanel); cp.add(new JLabel("Named")); cp.add(searchExpression); cp.add(new JLabel("Comparing by")); cp.add(matchTypePanel); cp.add(new JLabel("")); cp.add(caseInsensitive); cp.add(new JLabel("")); cp.add(buttonPanel); d.getRootPane().setDefaultButton(searchButton); d.pack(); d.setLocationRelativeTo(pp); d.setVisible(true); searchExpression.requestFocus(); }
public void showSearchDialog(final PlayPen pp) { // XXX need to convert to an ArchitectPanel before switching // this to use ArchitectPanelBuilder. final JDialog d = new JDialog((Frame) SwingUtilities.getAncestorOfClass(JFrame.class, pp), "Find"); ButtonGroup matchType = new ButtonGroup(); matchType.add(substringMatch = new JRadioButton("Substring")); matchType.add(exactMatch = new JRadioButton("Exact Match")); matchType.add(regexMatch = new JRadioButton("Regex")); JPanel matchTypePanel = new JPanel(new GridLayout(1,3)); matchTypePanel.add(substringMatch); matchTypePanel.add(exactMatch); matchTypePanel.add(regexMatch); substringMatch.setSelected(true); ButtonGroup searchType = new ButtonGroup(); searchType.add(tableSearch = new JRadioButton("Tables")); searchType.add(relationshipSearch = new JRadioButton("Relationships")); searchType.add(columnSearch = new JRadioButton("Columns")); searchType.add(allSearch = new JRadioButton("Anything")); JPanel searchTypePanel = new JPanel(new GridLayout(4,1)); searchTypePanel.add(tableSearch); searchTypePanel.add(relationshipSearch); searchTypePanel.add(columnSearch); searchTypePanel.add(allSearch); allSearch.setSelected(true); caseInsensitive = new JCheckBox("Ignoring case"); caseInsensitive.setSelected(true); searchExpression = new JTextField(); JDefaultButton searchButton = new JDefaultButton("Search"); // searchButton.setDefaultCapable(true); searchButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { showResults(d, pp); } catch (ArchitectException ex) { ASUtils.showExceptionDialog("Encountered a problem during search", ex); } } }); Action cancelAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { d.setVisible(false); d.dispose(); } }; cancelAction.putValue(Action.NAME, ArchitectPanelBuilder.CANCEL_BUTTON_LABEL); JButton cancelButton = new JButton(cancelAction); ArchitectPanelBuilder.makeJDialogCancellable(d, cancelAction); JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); buttonPanel.add(searchButton); buttonPanel.add(cancelButton); JComponent cp = (JComponent) d.getContentPane(); cp.setLayout(new FormLayout(10, 10)); cp.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); cp.add(new JLabel("Look for")); cp.add(searchTypePanel); cp.add(new JLabel("Named")); cp.add(searchExpression); cp.add(new JLabel("Comparing by")); cp.add(matchTypePanel); cp.add(new JLabel("")); cp.add(caseInsensitive); cp.add(new JLabel("")); cp.add(buttonPanel); d.getRootPane().setDefaultButton(searchButton); d.pack(); d.setLocationRelativeTo(pp); d.setVisible(true); searchExpression.requestFocus(); }
1,112,739
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blocksDone = 0; for (int k = 0; k < blocks.size(); k++){ this.blocksDone++; int[] preFiltBlock = (int[])blocks.elementAt(k); int[] theBlock; int[] selectedMarkers = new int[0]; int[] equivClass = new int[0]; if (preFiltBlock.length > 30){ equivClass = new int[preFiltBlock.length]; int classCounter = 0; for (int x = 0; x < preFiltBlock.length; x++){ int marker1 = preFiltBlock[x]; //already been lumped into an equivalency class if (equivClass[x] != 0){ continue; } //start a new equivalency class for this SNP classCounter ++; equivClass[x] = classCounter; for (int y = x+1; y < preFiltBlock.length; y++){ int marker2 = preFiltBlock[y]; if (marker1 > marker2){ int tmp = marker1; marker1 = marker2; marker2 = tmp; } if ( dpTable.getLDStats(marker1,marker2).getRSquared() == 1.0){ //these two SNPs are redundant equivClass[y] = classCounter; } } } //parse equivalency classes selectedMarkers = new int[classCounter]; for (int x = 0; x < selectedMarkers.length; x++){ selectedMarkers[x] = -1; } for (int x = 0; x < classCounter; x++){ double genoPC = 1.0; for (int y = 0; y < equivClass.length; y++){ if (equivClass[y] == x+1){ //int[]tossed = new int[3]; if (percentBadGenotypes[preFiltBlock[y]] < genoPC){ selectedMarkers[x] = preFiltBlock[y]; genoPC = percentBadGenotypes[preFiltBlock[y]]; } } } } theBlock = selectedMarkers; //System.out.println("Block " + k + " " + theBlock.length + "/" + preFiltBlock.length); }else{ theBlock = preFiltBlock; } //break up large blocks if needed int[] block_size; if (theBlock.length < 9){ block_size = new int[1]; block_size[0] = theBlock.length; } else { //some base-8 arithmetic int ones = theBlock.length%8; int eights = (theBlock.length - ones)/8; if (ones == 0){ block_size = new int[eights]; for (int i = 0; i < eights; i++){ block_size[i]=8; } } else { block_size = new int[eights+1]; for (int i = 0; i < eights-1; i++){ block_size[i]=8; } block_size[eights-1] = (8+ones)/2; block_size[eights] = 8+ones-block_size[eights-1]; } } byte[] thisHap; Vector inputHaploVector = new Vector(); Vector inputHaploTrios = new Vector(); //whichVector[i] stores a value which indicates which vector chromosome i's genotype should go in //1 indicates inputHaploVector (singletons), 2 indicates inputHaploTrios, //0 indicates none (too much missing data) int[] whichVector = new int[chromosomes.size()]; for(int i=0;i<numTrios*4; i+=4) { Chromosome parentAFirst = (Chromosome) chromosomes.elementAt(i); Chromosome parentASecond = (Chromosome) chromosomes.elementAt(i+1); Chromosome parentBFirst = (Chromosome) chromosomes.elementAt(i+2); Chromosome parentBSecond = (Chromosome) chromosomes.elementAt(i+3); boolean tooManyMissingInASegmentA = false; boolean tooManyMissingInASegmentB = false; int totalMissingA = 0; int totalMissingB = 0; int segmentShift = 0; for (int n = 0; n < block_size.length; n++){ int missingA = 0; int missingB = 0; for (int j = 0; j < block_size[n]; j++){ byte AFirstGeno = parentAFirst.getGenotype(theBlock[segmentShift+j]); byte ASecondGeno = parentASecond.getGenotype(theBlock[segmentShift+j]); byte BFirstGeno = parentBFirst.getGenotype(theBlock[segmentShift+j]); byte BSecondGeno = parentBSecond.getGenotype(theBlock[segmentShift+j]); if(AFirstGeno == 0 || ASecondGeno == 0) missingA++; if(BFirstGeno == 0 || BSecondGeno == 0) missingB++; } segmentShift += block_size[n]; if (missingA >= missingLimit){ tooManyMissingInASegmentA = true; } if (missingB >= missingLimit){ tooManyMissingInASegmentB = true; } totalMissingA += missingA; totalMissingB += missingB; } if(!tooManyMissingInASegmentA && totalMissingA <= 1+theBlock.length/3 && !tooManyMissingInASegmentB && totalMissingB <= 1+theBlock.length/3) { whichVector[i] = 2; whichVector[i+1] = 2; whichVector[i+2] = 2; whichVector[i+3] = 2; } else if(!tooManyMissingInASegmentA && totalMissingA <= 1+theBlock.length/3) { whichVector[i] = 1; whichVector[i+1] =1; whichVector[i+2] =0; whichVector[i+3]=0; } else if(!tooManyMissingInASegmentB && totalMissingB <= 1+theBlock.length/3) { whichVector[i] = 0; whichVector[i+1] =0; whichVector[i+2] =1; whichVector[i+3]=1; } else { whichVector[i] = 0; whichVector[i+1] =0; whichVector[i+2] =0; whichVector[i+3]=0; } } for (int i = numTrios*4; i < chromosomes.size(); i++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(i); Chromosome nextChrom = (Chromosome)chromosomes.elementAt(++i); boolean tooManyMissingInASegment = false; int totalMissing = 0; int segmentShift = 0; for (int n = 0; n < block_size.length; n++){ int missing = 0; for (int j = 0; j < block_size[n]; j++){ byte theGeno = thisChrom.getGenotype(theBlock[segmentShift+j]); byte nextGeno = nextChrom.getGenotype(theBlock[segmentShift+j]); if(theGeno == 0 || nextGeno == 0) missing++; } segmentShift += block_size[n]; if (missing >= missingLimit){ tooManyMissingInASegment = true; } totalMissing += missing; } //we want to use chromosomes without too many missing genotypes in a given //subsegment (first term) or without too many missing genotypes in the //whole block (second term) if (!tooManyMissingInASegment && totalMissing <= 1+theBlock.length/3){ whichVector[i-1] = 1; whichVector[i] = 1; } } for (int i = 0; i < chromosomes.size(); i++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(i); if(whichVector[i] == 1 || whichVector[i] == 2) { thisHap = new byte[theBlock.length]; for (int j = 0; j < theBlock.length; j++){ byte a1 = Chromosome.getMarker(theBlock[j]).getMajor(); byte a2 = Chromosome.getMarker(theBlock[j]).getMinor(); byte theGeno = thisChrom.getGenotype(theBlock[j]); if (theGeno >= 5){ thisHap[j] = 'h'; } else { if (theGeno == a1){ thisHap[j] = '1'; }else if (theGeno == a2){ thisHap[j] = '2'; }else{ thisHap[j] = '0'; } } } if(whichVector[i] == 1) { inputHaploVector.add(thisHap); } else if(whichVector[i] ==2) { inputHaploTrios.add(thisHap); } } } int trioCount = inputHaploTrios.size() / 4; inputHaploTrios.addAll(inputHaploVector); byte[][] input_haplos = (byte[][])inputHaploTrios.toArray(new byte[0][0]); //kirby patch EM theEM = new EM(); EMReturn EMresults = theEM.full_em_breakup(input_haplos, 4, block_size, 0,trioCount); int p = 0; Haplotype[] tempArray = new Haplotype[EMresults.numHaplos()]; int[][] returnedHaplos = EMresults.getHaplotypes(); double[] returnedFreqs = EMresults.getFrequencies(); for (int i = 0; i < EMresults.numHaplos(); i++){ int[] genos = new int[returnedHaplos[i].length]; for (int j = 0; j < genos.length; j++){ if (returnedHaplos[i][j] == 1){ genos[j] = Chromosome.getMarker(theBlock[j]).getMajor(); }else{ if (Chromosome.getMarker(theBlock[j]).getMinor() == 0){ genos[j] = 8; }else{ genos[j] = Chromosome.getMarker(theBlock[j]).getMinor(); } } } if (selectedMarkers.length > 0){ //we need to reassemble the haplotypes Hashtable hapsHash = new Hashtable(); //add to hash all the genotypes we phased for (int q = 0; q < genos.length; q++){ hapsHash.put(new Integer(theBlock[q]), new Integer(genos[q])); } //now add all the genotypes we didn't bother phasing, based on //which marker they are identical to for (int q = 0; q < equivClass.length; q++){ int currentClass = equivClass[q]-1; if (selectedMarkers[currentClass] == preFiltBlock[q]){ //we alredy added the phased genotypes above continue; } int indexIntoBlock=0; for (int x = 0; x < theBlock.length; x++){ if (theBlock[x] == selectedMarkers[currentClass]){ indexIntoBlock = x; break; } } //this (somewhat laboriously) reconstructs whether to add the minor or major allele //for markers with MAF close to 0.50 we can't use major/minor alleles to match //'em up 'cause these might change given missing data if (Chromosome.getMarker(selectedMarkers[currentClass]).getMAF() > 0.4){ for (int z = 0; z < chromosomes.size(); z++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(z); Chromosome nextChrom = (Chromosome)chromosomes.elementAt(++z); int theGeno = thisChrom.getGenotype(selectedMarkers[currentClass]); int nextGeno = nextChrom.getGenotype(selectedMarkers[currentClass]); if (theGeno == nextGeno && theGeno == genos[indexIntoBlock] && thisChrom.getGenotype(preFiltBlock[q]) != 0){ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(thisChrom.getGenotype(preFiltBlock[q]))); } } }else{ if (Chromosome.getMarker(selectedMarkers[currentClass]).getMajor() == genos[indexIntoBlock]){ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(Chromosome.getMarker(preFiltBlock[q]).getMajor())); }else{ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(Chromosome.getMarker(preFiltBlock[q]).getMinor())); } } } genos = new int[preFiltBlock.length]; for (int q = 0; q < preFiltBlock.length; q++){ genos[q] = ((Integer)hapsHash.get(new Integer(preFiltBlock[q]))).intValue(); } } double tempPerc = returnedFreqs[i]; if (tempPerc*100 > hapthresh){ tempArray[p] = new Haplotype(genos, tempPerc, preFiltBlock); p++; } } //make the results array only large enough to hold haps //which pass threshold above results[k] = new Haplotype[p]; for (int z = 0; z < p; z++){ results[k][z] = tempArray[z]; } } return results; }
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blocksDone = 0; for (int k = 0; k < blocks.size(); k++){ this.blocksDone++; int[] preFiltBlock = (int[])blocks.elementAt(k); int[] theBlock; int[] selectedMarkers = new int[0]; int[] equivClass = new int[0]; if (preFiltBlock.length > 30){ equivClass = new int[preFiltBlock.length]; int classCounter = 0; for (int x = 0; x < preFiltBlock.length; x++){ int marker1 = preFiltBlock[x]; //already been lumped into an equivalency class if (equivClass[x] != 0){ continue; } //start a new equivalency class for this SNP classCounter ++; equivClass[x] = classCounter; for (int y = x+1; y < preFiltBlock.length; y++){ int marker2 = preFiltBlock[y]; if (marker1 > marker2){ int tmp = marker1; marker1 = marker2; marker2 = tmp; } if ( dpTable.getLDStats(marker1,marker2).getRSquared() == 1.0){ //these two SNPs are redundant equivClass[y] = classCounter; } } } //parse equivalency classes selectedMarkers = new int[classCounter]; for (int x = 0; x < selectedMarkers.length; x++){ selectedMarkers[x] = -1; } for (int x = 0; x < classCounter; x++){ double genoPC = 1.0; for (int y = 0; y < equivClass.length; y++){ if (equivClass[y] == x+1){ //int[]tossed = new int[3]; if (percentBadGenotypes[preFiltBlock[y]] < genoPC){ selectedMarkers[x] = preFiltBlock[y]; genoPC = percentBadGenotypes[preFiltBlock[y]]; } } } } theBlock = selectedMarkers; //System.out.println("Block " + k + " " + theBlock.length + "/" + preFiltBlock.length); }else{ theBlock = preFiltBlock; } //break up large blocks if needed int[] block_size; if (theBlock.length < 9){ block_size = new int[1]; block_size[0] = theBlock.length; } else { //some base-8 arithmetic int ones = theBlock.length%8; int eights = (theBlock.length - ones)/8; if (ones == 0){ block_size = new int[eights]; for (int i = 0; i < eights; i++){ block_size[i]=8; } } else { block_size = new int[eights+1]; for (int i = 0; i < eights-1; i++){ block_size[i]=8; } block_size[eights-1] = (8+ones)/2; block_size[eights] = 8+ones-block_size[eights-1]; } } byte[] thisHap; Vector inputHaploVector = new Vector(); Vector inputHaploTrios = new Vector(); //whichVector[i] stores a value which indicates which vector chromosome i's genotype should go in //1 indicates inputHaploVector (singletons), 2 indicates inputHaploTrios, //0 indicates none (too much missing data) int[] whichVector = new int[chromosomes.size()]; for(int i=0;i<numTrios*4; i+=4) { Chromosome parentAFirst = (Chromosome) chromosomes.elementAt(i); Chromosome parentASecond = (Chromosome) chromosomes.elementAt(i+1); Chromosome parentBFirst = (Chromosome) chromosomes.elementAt(i+2); Chromosome parentBSecond = (Chromosome) chromosomes.elementAt(i+3); boolean tooManyMissingInASegmentA = false; boolean tooManyMissingInASegmentB = false; int totalMissingA = 0; int totalMissingB = 0; int segmentShift = 0; for (int n = 0; n < block_size.length; n++){ int missingA = 0; int missingB = 0; for (int j = 0; j < block_size[n]; j++){ byte AFirstGeno = parentAFirst.getGenotype(theBlock[segmentShift+j]); byte ASecondGeno = parentASecond.getGenotype(theBlock[segmentShift+j]); byte BFirstGeno = parentBFirst.getGenotype(theBlock[segmentShift+j]); byte BSecondGeno = parentBSecond.getGenotype(theBlock[segmentShift+j]); if(AFirstGeno == 0 || ASecondGeno == 0) missingA++; if(BFirstGeno == 0 || BSecondGeno == 0) missingB++; } segmentShift += block_size[n]; if (missingA >= missingLimit){ tooManyMissingInASegmentA = true; } if (missingB >= missingLimit){ tooManyMissingInASegmentB = true; } totalMissingA += missingA; totalMissingB += missingB; } if(!tooManyMissingInASegmentA && totalMissingA <= 1+theBlock.length/3 && !tooManyMissingInASegmentB && totalMissingB <= 1+theBlock.length/3) { whichVector[i] = 2; whichVector[i+1] = 2; whichVector[i+2] = 2; whichVector[i+3] = 2; } else if(!tooManyMissingInASegmentA && totalMissingA <= 1+theBlock.length/3) { whichVector[i] = 1; whichVector[i+1] =1; whichVector[i+2] =0; whichVector[i+3]=0; } else if(!tooManyMissingInASegmentB && totalMissingB <= 1+theBlock.length/3) { whichVector[i] = 0; whichVector[i+1] =0; whichVector[i+2] =1; whichVector[i+3]=1; } else { whichVector[i] = 0; whichVector[i+1] =0; whichVector[i+2] =0; whichVector[i+3]=0; } } for (int i = numTrios*4; i < chromosomes.size(); i++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(i); Chromosome nextChrom = (Chromosome)chromosomes.elementAt(++i); boolean tooManyMissingInASegment = false; int totalMissing = 0; int segmentShift = 0; for (int n = 0; n < block_size.length; n++){ int missing = 0; for (int j = 0; j < block_size[n]; j++){ byte theGeno = thisChrom.getGenotype(theBlock[segmentShift+j]); byte nextGeno = nextChrom.getGenotype(theBlock[segmentShift+j]); if(theGeno == 0 || nextGeno == 0) missing++; } segmentShift += block_size[n]; if (missing >= missingLimit){ tooManyMissingInASegment = true; } totalMissing += missing; } //we want to use chromosomes without too many missing genotypes in a given //subsegment (first term) or without too many missing genotypes in the //whole block (second term) if (!tooManyMissingInASegment && totalMissing <= 1+theBlock.length/3){ whichVector[i-1] = 1; whichVector[i] = 1; } } for (int i = 0; i < chromosomes.size(); i++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(i); if(whichVector[i] == 1 || whichVector[i] == 2) { thisHap = new byte[theBlock.length]; for (int j = 0; j < theBlock.length; j++){ byte a1 = Chromosome.getMarker(theBlock[j]).getMajor(); byte a2 = Chromosome.getMarker(theBlock[j]).getMinor(); byte theGeno = thisChrom.getGenotype(theBlock[j]); if (theGeno >= 5){ thisHap[j] = 'h'; } else { if (theGeno == a1){ thisHap[j] = '1'; }else if (theGeno == a2){ thisHap[j] = '2'; }else{ thisHap[j] = '0'; } } } if(whichVector[i] == 1) { inputHaploVector.add(thisHap); } else if(whichVector[i] ==2) { inputHaploTrios.add(thisHap); } } } int trioCount = inputHaploTrios.size() / 4; inputHaploTrios.addAll(inputHaploVector); byte[][] input_haplos = (byte[][])inputHaploTrios.toArray(new byte[0][0]); //kirby patch EM theEM = new EM(); EMReturn EMresults = theEM.full_em_breakup(input_haplos, 4, block_size, 0,trioCount); int p = 0; Haplotype[] tempArray = new Haplotype[EMresults.numHaplos()]; int[][] returnedHaplos = EMresults.getHaplotypes(); double[] returnedFreqs = EMresults.getFrequencies(); for (int i = 0; i < EMresults.numHaplos(); i++){ int[] genos = new int[returnedHaplos[i].length]; for (int j = 0; j < genos.length; j++){ if (returnedHaplos[i][j] == 1){ genos[j] = Chromosome.getMarker(theBlock[j]).getMajor(); }else{ if (Chromosome.getMarker(theBlock[j]).getMinor() == 0){ genos[j] = 8; }else{ genos[j] = Chromosome.getMarker(theBlock[j]).getMinor(); } } } if (selectedMarkers.length > 0){ //we need to reassemble the haplotypes Hashtable hapsHash = new Hashtable(); //add to hash all the genotypes we phased for (int q = 0; q < genos.length; q++){ hapsHash.put(new Integer(theBlock[q]), new Integer(genos[q])); } //now add all the genotypes we didn't bother phasing, based on //which marker they are identical to for (int q = 0; q < equivClass.length; q++){ int currentClass = equivClass[q]-1; if (selectedMarkers[currentClass] == preFiltBlock[q]){ //we alredy added the phased genotypes above continue; } int indexIntoBlock=0; for (int x = 0; x < theBlock.length; x++){ if (theBlock[x] == selectedMarkers[currentClass]){ indexIntoBlock = x; break; } } //this (somewhat laboriously) reconstructs whether to add the minor or major allele //for markers with MAF close to 0.50 we can't use major/minor alleles to match //'em up 'cause these might change given missing data if (Chromosome.getMarker(selectedMarkers[currentClass]).getMAF() > 0.4){ for (int z = 0; z < chromosomes.size(); z++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(z); Chromosome nextChrom = (Chromosome)chromosomes.elementAt(++z); int theGeno = thisChrom.getGenotype(selectedMarkers[currentClass]); int nextGeno = nextChrom.getGenotype(selectedMarkers[currentClass]); if (theGeno == nextGeno && theGeno == genos[indexIntoBlock] && thisChrom.getGenotype(preFiltBlock[q]) != 0){ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(thisChrom.getGenotype(preFiltBlock[q]))); } } }else{ if (Chromosome.getMarker(selectedMarkers[currentClass]).getMajor() == genos[indexIntoBlock]){ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(Chromosome.getMarker(preFiltBlock[q]).getMajor())); }else{ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(Chromosome.getMarker(preFiltBlock[q]).getMinor())); } } } genos = new int[preFiltBlock.length]; for (int q = 0; q < preFiltBlock.length; q++){ genos[q] = ((Integer)hapsHash.get(new Integer(preFiltBlock[q]))).intValue(); } } double tempPerc = returnedFreqs[i]; if (tempPerc*100 > hapthresh){ tempArray[p] = new Haplotype(genos, tempPerc, preFiltBlock); p++; } } //make the results array only large enough to hold haps //which pass threshold above results[k] = new Haplotype[p]; for (int z = 0; z < p; z++){ results[k][z] = tempArray[z]; } } return results; }
1,112,740
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blocksDone = 0; for (int k = 0; k < blocks.size(); k++){ this.blocksDone++; int[] preFiltBlock = (int[])blocks.elementAt(k); int[] theBlock; int[] selectedMarkers = new int[0]; int[] equivClass = new int[0]; if (preFiltBlock.length > 30){ equivClass = new int[preFiltBlock.length]; int classCounter = 0; for (int x = 0; x < preFiltBlock.length; x++){ int marker1 = preFiltBlock[x]; //already been lumped into an equivalency class if (equivClass[x] != 0){ continue; } //start a new equivalency class for this SNP classCounter ++; equivClass[x] = classCounter; for (int y = x+1; y < preFiltBlock.length; y++){ int marker2 = preFiltBlock[y]; if (marker1 > marker2){ int tmp = marker1; marker1 = marker2; marker2 = tmp; } if ( dpTable.getLDStats(marker1,marker2).getRSquared() == 1.0){ //these two SNPs are redundant equivClass[y] = classCounter; } } } //parse equivalency classes selectedMarkers = new int[classCounter]; for (int x = 0; x < selectedMarkers.length; x++){ selectedMarkers[x] = -1; } for (int x = 0; x < classCounter; x++){ double genoPC = 1.0; for (int y = 0; y < equivClass.length; y++){ if (equivClass[y] == x+1){ //int[]tossed = new int[3]; if (percentBadGenotypes[preFiltBlock[y]] < genoPC){ selectedMarkers[x] = preFiltBlock[y]; genoPC = percentBadGenotypes[preFiltBlock[y]]; } } } } theBlock = selectedMarkers; //System.out.println("Block " + k + " " + theBlock.length + "/" + preFiltBlock.length); }else{ theBlock = preFiltBlock; } //break up large blocks if needed int[] block_size; if (theBlock.length < 9){ block_size = new int[1]; block_size[0] = theBlock.length; } else { //some base-8 arithmetic int ones = theBlock.length%8; int eights = (theBlock.length - ones)/8; if (ones == 0){ block_size = new int[eights]; for (int i = 0; i < eights; i++){ block_size[i]=8; } } else { block_size = new int[eights+1]; for (int i = 0; i < eights-1; i++){ block_size[i]=8; } block_size[eights-1] = (8+ones)/2; block_size[eights] = 8+ones-block_size[eights-1]; } } byte[] thisHap; Vector inputHaploVector = new Vector(); Vector inputHaploTrios = new Vector(); //whichVector[i] stores a value which indicates which vector chromosome i's genotype should go in //1 indicates inputHaploVector (singletons), 2 indicates inputHaploTrios, //0 indicates none (too much missing data) int[] whichVector = new int[chromosomes.size()]; for(int i=0;i<numTrios*4; i+=4) { Chromosome parentAFirst = (Chromosome) chromosomes.elementAt(i); Chromosome parentASecond = (Chromosome) chromosomes.elementAt(i+1); Chromosome parentBFirst = (Chromosome) chromosomes.elementAt(i+2); Chromosome parentBSecond = (Chromosome) chromosomes.elementAt(i+3); boolean tooManyMissingInASegmentA = false; boolean tooManyMissingInASegmentB = false; int totalMissingA = 0; int totalMissingB = 0; int segmentShift = 0; for (int n = 0; n < block_size.length; n++){ int missingA = 0; int missingB = 0; for (int j = 0; j < block_size[n]; j++){ byte AFirstGeno = parentAFirst.getGenotype(theBlock[segmentShift+j]); byte ASecondGeno = parentASecond.getGenotype(theBlock[segmentShift+j]); byte BFirstGeno = parentBFirst.getGenotype(theBlock[segmentShift+j]); byte BSecondGeno = parentBSecond.getGenotype(theBlock[segmentShift+j]); if(AFirstGeno == 0 || ASecondGeno == 0) missingA++; if(BFirstGeno == 0 || BSecondGeno == 0) missingB++; } segmentShift += block_size[n]; if (missingA >= missingLimit){ tooManyMissingInASegmentA = true; } if (missingB >= missingLimit){ tooManyMissingInASegmentB = true; } totalMissingA += missingA; totalMissingB += missingB; } if(!tooManyMissingInASegmentA && totalMissingA <= 1+theBlock.length/3 && !tooManyMissingInASegmentB && totalMissingB <= 1+theBlock.length/3) { whichVector[i] = 2; whichVector[i+1] = 2; whichVector[i+2] = 2; whichVector[i+3] = 2; } else if(!tooManyMissingInASegmentA && totalMissingA <= 1+theBlock.length/3) { whichVector[i] = 1; whichVector[i+1] =1; whichVector[i+2] =0; whichVector[i+3]=0; } else if(!tooManyMissingInASegmentB && totalMissingB <= 1+theBlock.length/3) { whichVector[i] = 0; whichVector[i+1] =0; whichVector[i+2] =1; whichVector[i+3]=1; } else { whichVector[i] = 0; whichVector[i+1] =0; whichVector[i+2] =0; whichVector[i+3]=0; } } for (int i = numTrios*4; i < chromosomes.size(); i++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(i); Chromosome nextChrom = (Chromosome)chromosomes.elementAt(++i); boolean tooManyMissingInASegment = false; int totalMissing = 0; int segmentShift = 0; for (int n = 0; n < block_size.length; n++){ int missing = 0; for (int j = 0; j < block_size[n]; j++){ byte theGeno = thisChrom.getGenotype(theBlock[segmentShift+j]); byte nextGeno = nextChrom.getGenotype(theBlock[segmentShift+j]); if(theGeno == 0 || nextGeno == 0) missing++; } segmentShift += block_size[n]; if (missing >= missingLimit){ tooManyMissingInASegment = true; } totalMissing += missing; } //we want to use chromosomes without too many missing genotypes in a given //subsegment (first term) or without too many missing genotypes in the //whole block (second term) if (!tooManyMissingInASegment && totalMissing <= 1+theBlock.length/3){ whichVector[i-1] = 1; whichVector[i] = 1; } } for (int i = 0; i < chromosomes.size(); i++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(i); if(whichVector[i] == 1 || whichVector[i] == 2) { thisHap = new byte[theBlock.length]; for (int j = 0; j < theBlock.length; j++){ byte a1 = Chromosome.getMarker(theBlock[j]).getMajor(); byte a2 = Chromosome.getMarker(theBlock[j]).getMinor(); byte theGeno = thisChrom.getGenotype(theBlock[j]); if (theGeno >= 5){ thisHap[j] = 'h'; } else { if (theGeno == a1){ thisHap[j] = '1'; }else if (theGeno == a2){ thisHap[j] = '2'; }else{ thisHap[j] = '0'; } } } if(whichVector[i] == 1) { inputHaploVector.add(thisHap); } else if(whichVector[i] ==2) { inputHaploTrios.add(thisHap); } } } int trioCount = inputHaploTrios.size() / 4; inputHaploTrios.addAll(inputHaploVector); byte[][] input_haplos = (byte[][])inputHaploTrios.toArray(new byte[0][0]); //kirby patch EM theEM = new EM(); EMReturn EMresults = theEM.full_em_breakup(input_haplos, 4, block_size, 0,trioCount); int p = 0; Haplotype[] tempArray = new Haplotype[EMresults.numHaplos()]; int[][] returnedHaplos = EMresults.getHaplotypes(); double[] returnedFreqs = EMresults.getFrequencies(); for (int i = 0; i < EMresults.numHaplos(); i++){ int[] genos = new int[returnedHaplos[i].length]; for (int j = 0; j < genos.length; j++){ if (returnedHaplos[i][j] == 1){ genos[j] = Chromosome.getMarker(theBlock[j]).getMajor(); }else{ if (Chromosome.getMarker(theBlock[j]).getMinor() == 0){ genos[j] = 8; }else{ genos[j] = Chromosome.getMarker(theBlock[j]).getMinor(); } } } if (selectedMarkers.length > 0){ //we need to reassemble the haplotypes Hashtable hapsHash = new Hashtable(); //add to hash all the genotypes we phased for (int q = 0; q < genos.length; q++){ hapsHash.put(new Integer(theBlock[q]), new Integer(genos[q])); } //now add all the genotypes we didn't bother phasing, based on //which marker they are identical to for (int q = 0; q < equivClass.length; q++){ int currentClass = equivClass[q]-1; if (selectedMarkers[currentClass] == preFiltBlock[q]){ //we alredy added the phased genotypes above continue; } int indexIntoBlock=0; for (int x = 0; x < theBlock.length; x++){ if (theBlock[x] == selectedMarkers[currentClass]){ indexIntoBlock = x; break; } } //this (somewhat laboriously) reconstructs whether to add the minor or major allele //for markers with MAF close to 0.50 we can't use major/minor alleles to match //'em up 'cause these might change given missing data if (Chromosome.getMarker(selectedMarkers[currentClass]).getMAF() > 0.4){ for (int z = 0; z < chromosomes.size(); z++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(z); Chromosome nextChrom = (Chromosome)chromosomes.elementAt(++z); int theGeno = thisChrom.getGenotype(selectedMarkers[currentClass]); int nextGeno = nextChrom.getGenotype(selectedMarkers[currentClass]); if (theGeno == nextGeno && theGeno == genos[indexIntoBlock] && thisChrom.getGenotype(preFiltBlock[q]) != 0){ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(thisChrom.getGenotype(preFiltBlock[q]))); } } }else{ if (Chromosome.getMarker(selectedMarkers[currentClass]).getMajor() == genos[indexIntoBlock]){ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(Chromosome.getMarker(preFiltBlock[q]).getMajor())); }else{ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(Chromosome.getMarker(preFiltBlock[q]).getMinor())); } } } genos = new int[preFiltBlock.length]; for (int q = 0; q < preFiltBlock.length; q++){ genos[q] = ((Integer)hapsHash.get(new Integer(preFiltBlock[q]))).intValue(); } } double tempPerc = returnedFreqs[i]; if (tempPerc*100 > hapthresh){ tempArray[p] = new Haplotype(genos, tempPerc, preFiltBlock); p++; } } //make the results array only large enough to hold haps //which pass threshold above results[k] = new Haplotype[p]; for (int z = 0; z < p; z++){ results[k][z] = tempArray[z]; } } return results; }
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blocksDone = 0; for (int k = 0; k < blocks.size(); k++){ this.blocksDone++; int[] preFiltBlock = (int[])blocks.elementAt(k); int[] theBlock; int[] selectedMarkers = new int[0]; int[] equivClass = new int[0]; if (preFiltBlock.length > 30){ equivClass = new int[preFiltBlock.length]; int classCounter = 0; for (int x = 0; x < preFiltBlock.length; x++){ int marker1 = preFiltBlock[x]; //already been lumped into an equivalency class if (equivClass[x] != 0){ continue; } //start a new equivalency class for this SNP classCounter ++; equivClass[x] = classCounter; for (int y = x+1; y < preFiltBlock.length; y++){ int marker2 = preFiltBlock[y]; if (marker1 > marker2){ int tmp = marker1; marker1 = marker2; marker2 = tmp; } if ( dpTable.getLDStats(marker1,marker2).getRSquared() == 1.0){ //these two SNPs are redundant equivClass[y] = classCounter; } } } //parse equivalency classes selectedMarkers = new int[classCounter]; for (int x = 0; x < selectedMarkers.length; x++){ selectedMarkers[x] = -1; } for (int x = 0; x < classCounter; x++){ double genoPC = 1.0; for (int y = 0; y < equivClass.length; y++){ if (equivClass[y] == x+1){ //int[]tossed = new int[3]; if (percentBadGenotypes[preFiltBlock[y]] < genoPC){ selectedMarkers[x] = preFiltBlock[y]; genoPC = percentBadGenotypes[preFiltBlock[y]]; } } } } theBlock = selectedMarkers; //System.out.println("Block " + k + " " + theBlock.length + "/" + preFiltBlock.length); }else{ theBlock = preFiltBlock; } //break up large blocks if needed int[] block_size; if (theBlock.length < 9){ block_size = new int[1]; block_size[0] = theBlock.length; } else { //some base-8 arithmetic int ones = theBlock.length%8; int eights = (theBlock.length - ones)/8; if (ones == 0){ block_size = new int[eights]; for (int i = 0; i < eights; i++){ block_size[i]=8; } } else { block_size = new int[eights+1]; for (int i = 0; i < eights-1; i++){ block_size[i]=8; } block_size[eights-1] = (8+ones)/2; block_size[eights] = 8+ones-block_size[eights-1]; } } byte[] thisHap; Vector inputHaploVector = new Vector(); Vector inputHaploTrios = new Vector(); //whichVector[i] stores a value which indicates which vector chromosome i's genotype should go in //1 indicates inputHaploVector (singletons), 2 indicates inputHaploTrios, //0 indicates none (too much missing data) int[] whichVector = new int[chromosomes.size()]; for(int i=0;i<numTrios*4; i+=4) { Chromosome parentAFirst = (Chromosome) chromosomes.elementAt(i); Chromosome parentASecond = (Chromosome) chromosomes.elementAt(i+1); Chromosome parentBFirst = (Chromosome) chromosomes.elementAt(i+2); Chromosome parentBSecond = (Chromosome) chromosomes.elementAt(i+3); boolean tooManyMissingInASegmentA = false; boolean tooManyMissingInASegmentB = false; int totalMissingA = 0; int totalMissingB = 0; int segmentShift = 0; for (int n = 0; n < block_size.length; n++){ int missingA = 0; int missingB = 0; for (int j = 0; j < block_size[n]; j++){ byte AFirstGeno = parentAFirst.getGenotype(theBlock[segmentShift+j]); byte ASecondGeno = parentASecond.getGenotype(theBlock[segmentShift+j]); byte BFirstGeno = parentBFirst.getGenotype(theBlock[segmentShift+j]); byte BSecondGeno = parentBSecond.getGenotype(theBlock[segmentShift+j]); if(AFirstGeno == 0 || ASecondGeno == 0) missingA++; if(BFirstGeno == 0 || BSecondGeno == 0) missingB++; } segmentShift += block_size[n]; if (missingA >= missingLimit){ tooManyMissingInASegmentA = true; } if (missingB >= missingLimit){ tooManyMissingInASegmentB = true; } totalMissingA += missingA; totalMissingB += missingB; } if(!tooManyMissingInASegmentA && totalMissingA <= 1+theBlock.length/3 && !tooManyMissingInASegmentB && totalMissingB <= 1+theBlock.length/3) { whichVector[i] = 2; whichVector[i+1] = 2; whichVector[i+2] = 2; whichVector[i+3] = 2; } else if(!tooManyMissingInASegmentA && totalMissingA <= 1+theBlock.length/3) { whichVector[i] = 1; whichVector[i+1] =1; whichVector[i+2] =0; whichVector[i+3]=0; } else if(!tooManyMissingInASegmentB && totalMissingB <= 1+theBlock.length/3) { whichVector[i] = 0; whichVector[i+1] =0; whichVector[i+2] =1; whichVector[i+3]=1; } else { whichVector[i] = 0; whichVector[i+1] =0; whichVector[i+2] =0; whichVector[i+3]=0; } } for (int i = numTrios*4; i < chromosomes.size(); i++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(i); Chromosome nextChrom = (Chromosome)chromosomes.elementAt(++i); boolean tooManyMissingInASegment = false; int totalMissing = 0; int segmentShift = 0; for (int n = 0; n < block_size.length; n++){ int missing = 0; for (int j = 0; j < block_size[n]; j++){ byte theGeno = thisChrom.getGenotype(theBlock[segmentShift+j]); byte nextGeno = nextChrom.getGenotype(theBlock[segmentShift+j]); if(theGeno == 0 || nextGeno == 0) missing++; } segmentShift += block_size[n]; if (missing >= missingLimit){ tooManyMissingInASegment = true; } totalMissing += missing; } //we want to use chromosomes without too many missing genotypes in a given //subsegment (first term) or without too many missing genotypes in the //whole block (second term) if (!tooManyMissingInASegment && totalMissing <= 1+theBlock.length/3){ whichVector[i-1] = 1; whichVector[i] = 1; } } for (int i = 0; i < chromosomes.size(); i++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(i); if(whichVector[i] == 1 || whichVector[i] == 2) { thisHap = new byte[theBlock.length]; for (int j = 0; j < theBlock.length; j++){ byte a1 = Chromosome.getMarker(theBlock[j]).getMajor(); byte a2 = Chromosome.getMarker(theBlock[j]).getMinor(); byte theGeno = thisChrom.getGenotype(theBlock[j]); if (theGeno >= 5){ thisHap[j] = 'h'; } else { if (theGeno == a1){ thisHap[j] = '1'; }else if (theGeno == a2){ thisHap[j] = '2'; }else{ thisHap[j] = '0'; } } } if(whichVector[i] == 1) { inputHaploVector.add(thisHap); } else if(whichVector[i] ==2) { inputHaploTrios.add(thisHap); } } } int trioCount = inputHaploTrios.size() / 4; inputHaploTrios.addAll(inputHaploVector); byte[][] input_haplos = (byte[][])inputHaploTrios.toArray(new byte[0][0]); //kirby patch EM theEM = new EM(); EMReturn EMresults = theEM.full_em_breakup(input_haplos, 4, block_size, 0,trioCount); int p = 0; Haplotype[] tempArray = new Haplotype[EMresults.numHaplos()]; int[][] returnedHaplos = EMresults.getHaplotypes(); double[] returnedFreqs = EMresults.getFrequencies(); for (int i = 0; i < EMresults.numHaplos(); i++){ int[] genos = new int[returnedHaplos[i].length]; for (int j = 0; j < genos.length; j++){ if (returnedHaplos[i][j] == 1){ genos[j] = Chromosome.getMarker(theBlock[j]).getMajor(); }else{ if (Chromosome.getMarker(theBlock[j]).getMinor() == 0){ genos[j] = 8; }else{ genos[j] = Chromosome.getMarker(theBlock[j]).getMinor(); } } } if (selectedMarkers.length > 0){ //we need to reassemble the haplotypes Hashtable hapsHash = new Hashtable(); //add to hash all the genotypes we phased for (int q = 0; q < genos.length; q++){ hapsHash.put(new Integer(theBlock[q]), new Integer(genos[q])); } //now add all the genotypes we didn't bother phasing, based on //which marker they are identical to for (int q = 0; q < equivClass.length; q++){ int currentClass = equivClass[q]-1; if (selectedMarkers[currentClass] == preFiltBlock[q]){ //we alredy added the phased genotypes above continue; } int indexIntoBlock=0; for (int x = 0; x < theBlock.length; x++){ if (theBlock[x] == selectedMarkers[currentClass]){ indexIntoBlock = x; break; } } //this (somewhat laboriously) reconstructs whether to add the minor or major allele //for markers with MAF close to 0.50 we can't use major/minor alleles to match //'em up 'cause these might change given missing data if (Chromosome.getMarker(selectedMarkers[currentClass]).getMAF() > 0.4){ for (int z = 0; z < chromosomes.size(); z++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(z); Chromosome nextChrom = (Chromosome)chromosomes.elementAt(++z); int theGeno = thisChrom.getGenotype(selectedMarkers[currentClass]); int nextGeno = nextChrom.getGenotype(selectedMarkers[currentClass]); if (theGeno == nextGeno && theGeno == genos[indexIntoBlock] && thisChrom.getGenotype(preFiltBlock[q]) != 0){ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(thisChrom.getGenotype(preFiltBlock[q]))); } } }else{ if (Chromosome.getMarker(selectedMarkers[currentClass]).getMajor() == genos[indexIntoBlock]){ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(Chromosome.getMarker(preFiltBlock[q]).getMajor())); }else{ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(Chromosome.getMarker(preFiltBlock[q]).getMinor())); } } } genos = new int[preFiltBlock.length]; for (int q = 0; q < preFiltBlock.length; q++){ genos[q] = ((Integer)hapsHash.get(new Integer(preFiltBlock[q]))).intValue(); } } double tempPerc = returnedFreqs[i]; if (tempPerc*100 > hapthresh){ tempArray[p] = new Haplotype(genos, tempPerc, preFiltBlock); p++; } } //make the results array only large enough to hold haps //which pass threshold above results[k] = new Haplotype[p]; for (int z = 0; z < p; z++){ results[k][z] = tempArray[z]; } } return results; }
1,112,741
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blocksDone = 0; for (int k = 0; k < blocks.size(); k++){ this.blocksDone++; int[] preFiltBlock = (int[])blocks.elementAt(k); int[] theBlock; int[] selectedMarkers = new int[0]; int[] equivClass = new int[0]; if (preFiltBlock.length > 30){ equivClass = new int[preFiltBlock.length]; int classCounter = 0; for (int x = 0; x < preFiltBlock.length; x++){ int marker1 = preFiltBlock[x]; //already been lumped into an equivalency class if (equivClass[x] != 0){ continue; } //start a new equivalency class for this SNP classCounter ++; equivClass[x] = classCounter; for (int y = x+1; y < preFiltBlock.length; y++){ int marker2 = preFiltBlock[y]; if (marker1 > marker2){ int tmp = marker1; marker1 = marker2; marker2 = tmp; } if ( dpTable.getLDStats(marker1,marker2).getRSquared() == 1.0){ //these two SNPs are redundant equivClass[y] = classCounter; } } } //parse equivalency classes selectedMarkers = new int[classCounter]; for (int x = 0; x < selectedMarkers.length; x++){ selectedMarkers[x] = -1; } for (int x = 0; x < classCounter; x++){ double genoPC = 1.0; for (int y = 0; y < equivClass.length; y++){ if (equivClass[y] == x+1){ //int[]tossed = new int[3]; if (percentBadGenotypes[preFiltBlock[y]] < genoPC){ selectedMarkers[x] = preFiltBlock[y]; genoPC = percentBadGenotypes[preFiltBlock[y]]; } } } } theBlock = selectedMarkers; //System.out.println("Block " + k + " " + theBlock.length + "/" + preFiltBlock.length); }else{ theBlock = preFiltBlock; } //break up large blocks if needed int[] block_size; if (theBlock.length < 9){ block_size = new int[1]; block_size[0] = theBlock.length; } else { //some base-8 arithmetic int ones = theBlock.length%8; int eights = (theBlock.length - ones)/8; if (ones == 0){ block_size = new int[eights]; for (int i = 0; i < eights; i++){ block_size[i]=8; } } else { block_size = new int[eights+1]; for (int i = 0; i < eights-1; i++){ block_size[i]=8; } block_size[eights-1] = (8+ones)/2; block_size[eights] = 8+ones-block_size[eights-1]; } } byte[] thisHap; Vector inputHaploVector = new Vector(); Vector inputHaploTrios = new Vector(); //whichVector[i] stores a value which indicates which vector chromosome i's genotype should go in //1 indicates inputHaploVector (singletons), 2 indicates inputHaploTrios, //0 indicates none (too much missing data) int[] whichVector = new int[chromosomes.size()]; for(int i=0;i<numTrios*4; i+=4) { Chromosome parentAFirst = (Chromosome) chromosomes.elementAt(i); Chromosome parentASecond = (Chromosome) chromosomes.elementAt(i+1); Chromosome parentBFirst = (Chromosome) chromosomes.elementAt(i+2); Chromosome parentBSecond = (Chromosome) chromosomes.elementAt(i+3); boolean tooManyMissingInASegmentA = false; boolean tooManyMissingInASegmentB = false; int totalMissingA = 0; int totalMissingB = 0; int segmentShift = 0; for (int n = 0; n < block_size.length; n++){ int missingA = 0; int missingB = 0; for (int j = 0; j < block_size[n]; j++){ byte AFirstGeno = parentAFirst.getGenotype(theBlock[segmentShift+j]); byte ASecondGeno = parentASecond.getGenotype(theBlock[segmentShift+j]); byte BFirstGeno = parentBFirst.getGenotype(theBlock[segmentShift+j]); byte BSecondGeno = parentBSecond.getGenotype(theBlock[segmentShift+j]); if(AFirstGeno == 0 || ASecondGeno == 0) missingA++; if(BFirstGeno == 0 || BSecondGeno == 0) missingB++; } segmentShift += block_size[n]; if (missingA >= missingLimit){ tooManyMissingInASegmentA = true; } if (missingB >= missingLimit){ tooManyMissingInASegmentB = true; } totalMissingA += missingA; totalMissingB += missingB; } if(!tooManyMissingInASegmentA && totalMissingA <= 1+theBlock.length/3 && !tooManyMissingInASegmentB && totalMissingB <= 1+theBlock.length/3) { whichVector[i] = 2; whichVector[i+1] = 2; whichVector[i+2] = 2; whichVector[i+3] = 2; } else if(!tooManyMissingInASegmentA && totalMissingA <= 1+theBlock.length/3) { whichVector[i] = 1; whichVector[i+1] =1; whichVector[i+2] =0; whichVector[i+3]=0; } else if(!tooManyMissingInASegmentB && totalMissingB <= 1+theBlock.length/3) { whichVector[i] = 0; whichVector[i+1] =0; whichVector[i+2] =1; whichVector[i+3]=1; } else { whichVector[i] = 0; whichVector[i+1] =0; whichVector[i+2] =0; whichVector[i+3]=0; } } for (int i = numTrios*4; i < chromosomes.size(); i++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(i); Chromosome nextChrom = (Chromosome)chromosomes.elementAt(++i); boolean tooManyMissingInASegment = false; int totalMissing = 0; int segmentShift = 0; for (int n = 0; n < block_size.length; n++){ int missing = 0; for (int j = 0; j < block_size[n]; j++){ byte theGeno = thisChrom.getGenotype(theBlock[segmentShift+j]); byte nextGeno = nextChrom.getGenotype(theBlock[segmentShift+j]); if(theGeno == 0 || nextGeno == 0) missing++; } segmentShift += block_size[n]; if (missing >= missingLimit){ tooManyMissingInASegment = true; } totalMissing += missing; } //we want to use chromosomes without too many missing genotypes in a given //subsegment (first term) or without too many missing genotypes in the //whole block (second term) if (!tooManyMissingInASegment && totalMissing <= 1+theBlock.length/3){ whichVector[i-1] = 1; whichVector[i] = 1; } } for (int i = 0; i < chromosomes.size(); i++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(i); if(whichVector[i] == 1 || whichVector[i] == 2) { thisHap = new byte[theBlock.length]; for (int j = 0; j < theBlock.length; j++){ byte a1 = Chromosome.getMarker(theBlock[j]).getMajor(); byte a2 = Chromosome.getMarker(theBlock[j]).getMinor(); byte theGeno = thisChrom.getGenotype(theBlock[j]); if (theGeno >= 5){ thisHap[j] = 'h'; } else { if (theGeno == a1){ thisHap[j] = '1'; }else if (theGeno == a2){ thisHap[j] = '2'; }else{ thisHap[j] = '0'; } } } if(whichVector[i] == 1) { inputHaploVector.add(thisHap); } else if(whichVector[i] ==2) { inputHaploTrios.add(thisHap); } } } int trioCount = inputHaploTrios.size() / 4; inputHaploTrios.addAll(inputHaploVector); byte[][] input_haplos = (byte[][])inputHaploTrios.toArray(new byte[0][0]); //kirby patch EM theEM = new EM(); EMReturn EMresults = theEM.full_em_breakup(input_haplos, 4, block_size, 0,trioCount); int p = 0; Haplotype[] tempArray = new Haplotype[EMresults.numHaplos()]; int[][] returnedHaplos = EMresults.getHaplotypes(); double[] returnedFreqs = EMresults.getFrequencies(); for (int i = 0; i < EMresults.numHaplos(); i++){ int[] genos = new int[returnedHaplos[i].length]; for (int j = 0; j < genos.length; j++){ if (returnedHaplos[i][j] == 1){ genos[j] = Chromosome.getMarker(theBlock[j]).getMajor(); }else{ if (Chromosome.getMarker(theBlock[j]).getMinor() == 0){ genos[j] = 8; }else{ genos[j] = Chromosome.getMarker(theBlock[j]).getMinor(); } } } if (selectedMarkers.length > 0){ //we need to reassemble the haplotypes Hashtable hapsHash = new Hashtable(); //add to hash all the genotypes we phased for (int q = 0; q < genos.length; q++){ hapsHash.put(new Integer(theBlock[q]), new Integer(genos[q])); } //now add all the genotypes we didn't bother phasing, based on //which marker they are identical to for (int q = 0; q < equivClass.length; q++){ int currentClass = equivClass[q]-1; if (selectedMarkers[currentClass] == preFiltBlock[q]){ //we alredy added the phased genotypes above continue; } int indexIntoBlock=0; for (int x = 0; x < theBlock.length; x++){ if (theBlock[x] == selectedMarkers[currentClass]){ indexIntoBlock = x; break; } } //this (somewhat laboriously) reconstructs whether to add the minor or major allele //for markers with MAF close to 0.50 we can't use major/minor alleles to match //'em up 'cause these might change given missing data if (Chromosome.getMarker(selectedMarkers[currentClass]).getMAF() > 0.4){ for (int z = 0; z < chromosomes.size(); z++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(z); Chromosome nextChrom = (Chromosome)chromosomes.elementAt(++z); int theGeno = thisChrom.getGenotype(selectedMarkers[currentClass]); int nextGeno = nextChrom.getGenotype(selectedMarkers[currentClass]); if (theGeno == nextGeno && theGeno == genos[indexIntoBlock] && thisChrom.getGenotype(preFiltBlock[q]) != 0){ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(thisChrom.getGenotype(preFiltBlock[q]))); } } }else{ if (Chromosome.getMarker(selectedMarkers[currentClass]).getMajor() == genos[indexIntoBlock]){ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(Chromosome.getMarker(preFiltBlock[q]).getMajor())); }else{ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(Chromosome.getMarker(preFiltBlock[q]).getMinor())); } } } genos = new int[preFiltBlock.length]; for (int q = 0; q < preFiltBlock.length; q++){ genos[q] = ((Integer)hapsHash.get(new Integer(preFiltBlock[q]))).intValue(); } } double tempPerc = returnedFreqs[i]; if (tempPerc*100 > hapthresh){ tempArray[p] = new Haplotype(genos, tempPerc, preFiltBlock); p++; } } //make the results array only large enough to hold haps //which pass threshold above results[k] = new Haplotype[p]; for (int z = 0; z < p; z++){ results[k][z] = tempArray[z]; } } return results; }
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blocksDone = 0; for (int k = 0; k < blocks.size(); k++){ this.blocksDone++; int[] preFiltBlock = (int[])blocks.elementAt(k); int[] theBlock; int[] selectedMarkers = new int[0]; int[] equivClass = new int[0]; if (preFiltBlock.length > 30){ equivClass = new int[preFiltBlock.length]; int classCounter = 0; for (int x = 0; x < preFiltBlock.length; x++){ int marker1 = preFiltBlock[x]; //already been lumped into an equivalency class if (equivClass[x] != 0){ continue; } //start a new equivalency class for this SNP classCounter ++; equivClass[x] = classCounter; for (int y = x+1; y < preFiltBlock.length; y++){ int marker2 = preFiltBlock[y]; if (marker1 > marker2){ int tmp = marker1; marker1 = marker2; marker2 = tmp; } if ( dpTable.getLDStats(marker1,marker2).getRSquared() == 1.0){ //these two SNPs are redundant equivClass[y] = classCounter; } } } //parse equivalency classes selectedMarkers = new int[classCounter]; for (int x = 0; x < selectedMarkers.length; x++){ selectedMarkers[x] = -1; } for (int x = 0; x < classCounter; x++){ double genoPC = 1.0; for (int y = 0; y < equivClass.length; y++){ if (equivClass[y] == x+1){ //int[]tossed = new int[3]; if (percentBadGenotypes[preFiltBlock[y]] < genoPC){ selectedMarkers[x] = preFiltBlock[y]; genoPC = percentBadGenotypes[preFiltBlock[y]]; } } } } theBlock = selectedMarkers; //System.out.println("Block " + k + " " + theBlock.length + "/" + preFiltBlock.length); }else{ theBlock = preFiltBlock; } //break up large blocks if needed int[] block_size; if (theBlock.length < 9){ block_size = new int[1]; block_size[0] = theBlock.length; } else { //some base-8 arithmetic int ones = theBlock.length%8; int eights = (theBlock.length - ones)/8; if (ones == 0){ block_size = new int[eights]; for (int i = 0; i < eights; i++){ block_size[i]=8; } } else { block_size = new int[eights+1]; for (int i = 0; i < eights-1; i++){ block_size[i]=8; } block_size[eights-1] = (8+ones)/2; block_size[eights] = 8+ones-block_size[eights-1]; } } byte[] thisHap; Vector inputHaploVector = new Vector(); Vector inputHaploTrios = new Vector(); //whichVector[i] stores a value which indicates which vector chromosome i's genotype should go in //1 indicates inputHaploVector (singletons), 2 indicates inputHaploTrios, //0 indicates none (too much missing data) int[] whichVector = new int[chromosomes.size()]; for(int i=0;i<numTrios*4; i+=4) { Chromosome parentAFirst = (Chromosome) chromosomes.elementAt(i); Chromosome parentASecond = (Chromosome) chromosomes.elementAt(i+1); Chromosome parentBFirst = (Chromosome) chromosomes.elementAt(i+2); Chromosome parentBSecond = (Chromosome) chromosomes.elementAt(i+3); boolean tooManyMissingInASegmentA = false; boolean tooManyMissingInASegmentB = false; int totalMissingA = 0; int totalMissingB = 0; int segmentShift = 0; for (int n = 0; n < block_size.length; n++){ int missingA = 0; int missingB = 0; for (int j = 0; j < block_size[n]; j++){ byte AFirstGeno = parentAFirst.getGenotype(theBlock[segmentShift+j]); byte ASecondGeno = parentASecond.getGenotype(theBlock[segmentShift+j]); byte BFirstGeno = parentBFirst.getGenotype(theBlock[segmentShift+j]); byte BSecondGeno = parentBSecond.getGenotype(theBlock[segmentShift+j]); if(AFirstGeno == 0 || ASecondGeno == 0) missingA++; if(BFirstGeno == 0 || BSecondGeno == 0) missingB++; } segmentShift += block_size[n]; if (missingA >= missingLimit){ tooManyMissingInASegmentA = true; } if (missingB >= missingLimit){ tooManyMissingInASegmentB = true; } totalMissingA += missingA; totalMissingB += missingB; } if(!tooManyMissingInASegmentA && totalMissingA <= 1+theBlock.length/3 && !tooManyMissingInASegmentB && totalMissingB <= 1+theBlock.length/3) { whichVector[i] = 2; whichVector[i+1] = 2; whichVector[i+2] = 2; whichVector[i+3] = 2; } else if(!tooManyMissingInASegmentA && totalMissingA <= 1+theBlock.length/3) { whichVector[i] = 1; whichVector[i+1] =1; whichVector[i+2] =0; whichVector[i+3]=0; } else if(!tooManyMissingInASegmentB && totalMissingB <= 1+theBlock.length/3) { whichVector[i] = 0; whichVector[i+1] =0; whichVector[i+2] =1; whichVector[i+3]=1; } else { whichVector[i] = 0; whichVector[i+1] =0; whichVector[i+2] =0; whichVector[i+3]=0; } } for (int i = numTrios*4; i < chromosomes.size(); i++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(i); Chromosome nextChrom = (Chromosome)chromosomes.elementAt(++i); boolean tooManyMissingInASegment = false; int totalMissing = 0; int segmentShift = 0; for (int n = 0; n < block_size.length; n++){ int missing = 0; for (int j = 0; j < block_size[n]; j++){ byte theGeno = thisChrom.getGenotype(theBlock[segmentShift+j]); byte nextGeno = nextChrom.getGenotype(theBlock[segmentShift+j]); if(theGeno == 0 || nextGeno == 0) missing++; } segmentShift += block_size[n]; if (missing >= missingLimit){ tooManyMissingInASegment = true; } totalMissing += missing; } //we want to use chromosomes without too many missing genotypes in a given //subsegment (first term) or without too many missing genotypes in the //whole block (second term) if (!tooManyMissingInASegment && totalMissing <= 1+theBlock.length/3){ whichVector[i-1] = 1; whichVector[i] = 1; } } for (int i = 0; i < chromosomes.size(); i++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(i); if(whichVector[i] == 1 || whichVector[i] == 2) { thisHap = new byte[theBlock.length]; for (int j = 0; j < theBlock.length; j++){ byte a1 = Chromosome.getMarker(theBlock[j]).getMajor(); byte a2 = Chromosome.getMarker(theBlock[j]).getMinor(); byte theGeno = thisChrom.getGenotype(theBlock[j]); if (theGeno >= 5){ thisHap[j] = 'h'; } else { if (theGeno == a1){ thisHap[j] = '1'; }else if (theGeno == a2){ thisHap[j] = '2'; }else{ thisHap[j] = '0'; } } } if(whichVector[i] == 1) { inputHaploVector.add(thisHap); } else if(whichVector[i] ==2) { inputHaploTrios.add(thisHap); } } } int trioCount = inputHaploTrios.size() / 4; inputHaploTrios.addAll(inputHaploVector); byte[][] input_haplos = (byte[][])inputHaploTrios.toArray(new byte[0][0]); //kirby patch EM theEM = new EM(); EMReturn EMresults = theEM.full_em_breakup(input_haplos, 4, block_size, 0,trioCount); int p = 0; Haplotype[] tempArray = new Haplotype[EMresults.numHaplos()]; int[][] returnedHaplos = EMresults.getHaplotypes(); double[] returnedFreqs = EMresults.getFrequencies(); for (int i = 0; i < EMresults.numHaplos(); i++){ int[] genos = new int[returnedHaplos[i].length]; for (int j = 0; j < genos.length; j++){ if (returnedHaplos[i][j] == 1){ genos[j] = Chromosome.getMarker(theBlock[j]).getMajor(); }else{ if (Chromosome.getMarker(theBlock[j]).getMinor() == 0){ genos[j] = 8; }else{ genos[j] = Chromosome.getMarker(theBlock[j]).getMinor(); } } } if (selectedMarkers.length > 0){ //we need to reassemble the haplotypes Hashtable hapsHash = new Hashtable(); //add to hash all the genotypes we phased for (int q = 0; q < genos.length; q++){ hapsHash.put(new Integer(theBlock[q]), new Integer(genos[q])); } //now add all the genotypes we didn't bother phasing, based on //which marker they are identical to for (int q = 0; q < equivClass.length; q++){ int currentClass = equivClass[q]-1; if (selectedMarkers[currentClass] == preFiltBlock[q]){ //we alredy added the phased genotypes above continue; } int indexIntoBlock=0; for (int x = 0; x < theBlock.length; x++){ if (theBlock[x] == selectedMarkers[currentClass]){ indexIntoBlock = x; break; } } //this (somewhat laboriously) reconstructs whether to add the minor or major allele //for markers with MAF close to 0.50 we can't use major/minor alleles to match //'em up 'cause these might change given missing data if (Chromosome.getMarker(selectedMarkers[currentClass]).getMAF() > 0.4){ for (int z = 0; z < chromosomes.size(); z++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(z); Chromosome nextChrom = (Chromosome)chromosomes.elementAt(++z); int theGeno = thisChrom.getGenotype(selectedMarkers[currentClass]); int nextGeno = nextChrom.getGenotype(selectedMarkers[currentClass]); if (theGeno == nextGeno && theGeno == genos[indexIntoBlock] && thisChrom.getGenotype(preFiltBlock[q]) != 0){ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(thisChrom.getGenotype(preFiltBlock[q]))); } } }else{ if (Chromosome.getMarker(selectedMarkers[currentClass]).getMajor() == genos[indexIntoBlock]){ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(Chromosome.getMarker(preFiltBlock[q]).getMajor())); }else{ hapsHash.put(new Integer(preFiltBlock[q]), new Integer(Chromosome.getMarker(preFiltBlock[q]).getMinor())); } } } genos = new int[preFiltBlock.length]; for (int q = 0; q < preFiltBlock.length; q++){ genos[q] = ((Integer)hapsHash.get(new Integer(preFiltBlock[q]))).intValue(); } } double tempPerc = returnedFreqs[i]; if (tempPerc*100 > hapthresh){ tempArray[p] = new Haplotype(genos, tempPerc, preFiltBlock); p++; } } //make the results array only large enough to hold haps //which pass threshold above results[k] = new Haplotype[p]; for (int z = 0; z < p; z++){ results[k][z] = tempArray[z]; } } return results; }
1,112,742
void prepareHapsInput(File infile) throws IOException, HaploViewException{ //this method is called to suck in data from a file (its only argument) //of genotypes and sets up the Chromosome objects. String currentLine; Vector chroms = new Vector(); byte[] genos = new byte[0]; String ped, indiv; if(infile.length() < 1){ throw new HaploViewException("Genotype file is empty or does not exist: " + infile.getName()); } //read the file: BufferedReader in = new BufferedReader(new FileReader(infile)); int lineCount = 0; int numTokens = 0; boolean even = true; while ((currentLine = in.readLine()) != null){ lineCount++; //each line is expected to be of the format: //ped indiv geno geno geno geno... if (currentLine.length() == 0){ //skip blank lines continue; } even = !even; StringTokenizer st = new StringTokenizer(currentLine); //first two tokens are expected to be ped, indiv if (st.hasMoreTokens()){ ped = st.nextToken(); indiv = st.nextToken(); }else{ throw new HaploViewException("Genotype file error:\nLine " + lineCount + " appears to have fewer than 2 columns."); } //all other tokens are loaded into a vector (they should all be genotypes) genos = new byte[st.countTokens()]; int q = 0; if (numTokens == 0){ numTokens = st.countTokens(); } if (numTokens != st.countTokens()){ throw new HaploViewException("Genotype file error:\nLine " + lineCount + " appears to have an incorrect number of entries"); } while (st.hasMoreTokens()){ String thisGenotype = (String)st.nextElement(); if (thisGenotype.equals("h")) { genos[q] = 9; }else{ try{ genos[q] = Byte.parseByte(thisGenotype); }catch (NumberFormatException nfe){ throw new HaploViewException("Genotype file input error:\ngenotype value \"" + thisGenotype + "\" on line " + lineCount + " not allowed."); } } if (genos[q] < 0 || genos[q] > 9){ throw new HaploViewException("Genotype file input error:\ngenotype value \"" + genos[q] + "\" on line " + lineCount + " not allowed."); } q++; } //a Chromosome is created and added to a vector of chromosomes. //this is what is evetually returned. chroms.add(new Chromosome(ped, indiv, genos, infile.getName())); } if (!even){ //we're missing a line here throw new HaploViewException("Genotype file appears to have an odd number of lines.\n"+ "Each individual is required to have two chromosomes"); } chromosomes = chroms; //initialize realIndex Chromosome.doFilter(genos.length); //wipe clean any existing marker info so we know we're starting clean with a new file Chromosome.markers = null; }
void prepareHapsInput(File infile) throws IOException, HaploViewException{ //this method is called to suck in data from a file (its only argument) //of genotypes and sets up the Chromosome objects. String currentLine; Vector chroms = new Vector(); byte[] genos = new byte[0]; String ped, indiv; if(infile.length() < 1){ throw new HaploViewException("Genotype file is empty or does not exist: " + infile.getName()); } //read the file: BufferedReader in = new BufferedReader(new FileReader(infile)); int lineCount = 0; int numTokens = 0; boolean even = true; while ((currentLine = in.readLine()) != null){ lineCount++; //each line is expected to be of the format: //ped indiv geno geno geno geno... if (currentLine.length() == 0){ //skip blank lines continue; } even = !even; StringTokenizer st = new StringTokenizer(currentLine); //first two tokens are expected to be ped, indiv if (st.hasMoreTokens()){ ped = st.nextToken(); indiv = st.nextToken(); }else{ throw new HaploViewException("Genotype file error:\nLine " + lineCount + " appears to have fewer than 2 columns."); } //all other tokens are loaded into a vector (they should all be genotypes) genos = new byte[st.countTokens()]; int q = 0; if (numTokens == 0){ numTokens = st.countTokens(); } if (numTokens != st.countTokens()){ throw new HaploViewException("Genotype file error:\nLine " + lineCount + " appears to have an incorrect number of entries"); } while (st.hasMoreTokens()){ String thisGenotype = (String)st.nextElement(); if (thisGenotype.equals("h")) { genos[q] = 9; }else{ try{ genos[q] = Byte.parseByte(thisGenotype); }catch (NumberFormatException nfe){ throw new HaploViewException("Genotype file input error:\ngenotype value \"" + thisGenotype + "\" on line " + lineCount + " not allowed."); } } if (genos[q] < 0 || genos[q] > 9){ throw new HaploViewException("Genotype file input error:\ngenotype value \"" + genos[q] + "\" on line " + lineCount + " not allowed."); } q++; } //a Chromosome is created and added to a vector of chromosomes. //this is what is evetually returned. chroms.add(new Chromosome(ped, indiv, genos, infile.getName(), 0)); } if (!even){ //we're missing a line here throw new HaploViewException("Genotype file appears to have an odd number of lines.\n"+ "Each individual is required to have two chromosomes"); } chromosomes = chroms; //initialize realIndex Chromosome.doFilter(genos.length); //wipe clean any existing marker info so we know we're starting clean with a new file Chromosome.markers = null; }
1,112,743
public void doTag(final XMLOutput output) throws JellyTagException { try { if ( name != null ) { String encoding = (this.encoding != null) ? this.encoding : "UTF-8"; Writer writer = new OutputStreamWriter( new FileOutputStream( name ), encoding ); writeBody(writer); } else if (var != null) { StringWriter writer = new StringWriter(); writeBody(writer); context.setVariable(var, writer.toString()); } else { throw new JellyTagException( "This tag must have either the 'name' or the 'var' variables defined" ); } } catch (FileNotFoundException e) { throw new JellyTagException(e); } catch (UnsupportedEncodingException e) { throw new JellyTagException(e); } catch (SAXException e) { throw new JellyTagException("could not write file",e); } }
public void doTag(final XMLOutput output) throws JellyTagException { try { if ( name != null ) { String encoding = (this.encoding != null) ? this.encoding : "UTF-8"; Writer writer = new OutputStreamWriter( new FileOutputStream( name, doAppend ), encoding ); writeBody(writer); } else if (var != null) { StringWriter writer = new StringWriter(); writeBody(writer); context.setVariable(var, writer.toString()); } else { throw new JellyTagException( "This tag must have either the 'name' or the 'var' variables defined" ); } } catch (FileNotFoundException e) { throw new JellyTagException(e); } catch (UnsupportedEncodingException e) { throw new JellyTagException(e); } catch (SAXException e) { throw new JellyTagException("could not write file",e); } }
1,112,744
private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; if(!quietMode && fileName != null){ System.out.println("Using data file: " + fileName); } inputFile = new File(fileName); if(!inputFile.exists()){ System.out.println("input file: " + fileName + " does not exist"); System.exit(1); } textData = new HaploData(); //Vector result = null; if(fileType == HAPS){ //read in haps file textData.prepareHapsInput(inputFile); } else if (fileType == PED) { //read in ped file textData.linkageToChrom(inputFile, PED); if(textData.getPedFile().isBogusParents()) { System.out.println("Error: One or more individuals in the file reference non-existent parents.\nThese references have been ignored."); } }else{ //read in hapmapfile textData.linkageToChrom(inputFile,HMP); } File infoFile = null; if (infoFileName != null){ infoFile = new File(infoFileName); } if (fileType != HAPS){ textData.prepareMarkerInput(infoFile,textData.getPedFile().getHMInfo()); }else{ textData.prepareMarkerInput(infoFile,null); } boolean[] markerResults = new boolean[Chromosome.getUnfilteredSize()]; Vector result = null; if (fileType != HAPS){ result = textData.getPedFile().getResults(); //once check has been run we can filter the markers for (int i = 0; i < result.size(); i++){ if ((((MarkerResult)result.get(i)).getRating() > 0 || skipCheck) && Chromosome.getUnfilteredMarker(i).getDupStatus() != 2){ markerResults[i] = true; }else{ markerResults[i] = false; } } }else{ //we haven't done the check (HAPS files) Arrays.fill(markerResults, true); } for (int i = 0; i < excludedMarkers.size(); i++){ int cur = ((Integer)excludedMarkers.elementAt(i)).intValue(); if (cur < 1 || cur > markerResults.length){ System.out.println("Excluded marker out of bounds has been ignored: " + cur + "\nMarkers must be between 1 and N, where N is the total number of markers."); System.exit(1); }else{ markerResults[cur-1] = false; } } Chromosome.doFilter(markerResults); if(!quietMode && infoFile != null){ System.out.println("Using marker information file: " + infoFile.getName()); } if(outputCheck && result != null){ CheckDataPanel cp = new CheckDataPanel(textData); cp.printTable(validateOutputFile(fileName + ".CHECK")); } Vector cust = new Vector(); if(blockOutputType != -1){ textData.generateDPrimeTable(); Haplotype[][] haplos; Haplotype[][] filtHaplos; switch(blockOutputType){ case BLOX_GABRIEL: OutputFile = validateOutputFile(fileName + ".GABRIELblocks"); break; case BLOX_4GAM: OutputFile = validateOutputFile(fileName + ".4GAMblocks"); break; case BLOX_SPINE: OutputFile = validateOutputFile(fileName + ".SPINEblocks"); break; case BLOX_CUSTOM: OutputFile = validateOutputFile(fileName + ".CUSTblocks"); //read in the blocks file File blocksFile = new File(blockFileName); cust = textData.readBlocks(blocksFile); break; case BLOX_ALL: //handled below, so we don't do anything here OutputFile = null; break; default: OutputFile = validateOutputFile(fileName + ".GABRIELblocks"); break; } //this handles output type ALL if(blockOutputType == BLOX_ALL) { OutputFile = validateOutputFile(fileName + ".GABRIELblocks"); textData.guessBlocks(BLOX_GABRIEL); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile); OutputFile = validateOutputFile(fileName + ".4GAMblocks"); textData.guessBlocks(BLOX_4GAM); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile);; OutputFile = validateOutputFile(fileName + ".SPINEblocks"); textData.guessBlocks(BLOX_SPINE); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile); }else{ //guesses blocks based on output type determined above. textData.guessBlocks(blockOutputType, cust); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile); } if(Options.getAssocTest() == ASSOC_TRIO || Options.getAssocTest() == ASSOC_CC) { if (blockOutputType == BLOX_ALL){ System.out.println("Haplotype association results cannot be used with block output \"ALL\""); }else{ HaploData.saveHapAssocToText(haplos, validateOutputFile(fileName + ".HAPASSOC")); } } } if(outputDprime) { OutputFile = validateOutputFile(fileName + ".LD"); if (textData.dpTable != null){ textData.saveDprimeToText(OutputFile, TABLE_TYPE, 0, Chromosome.getSize()); }else{ textData.saveDprimeToText(OutputFile, LIVE_TYPE, 0, Chromosome.getSize()); } } if (outputPNG || outputCompressedPNG){ OutputFile = validateOutputFile(fileName + ".LD.PNG"); if (textData.dpTable == null){ textData.generateDPrimeTable(); textData.guessBlocks(BLOX_CUSTOM, new Vector()); } if (trackFileName != null){ textData.readAnalysisTrack(new File(trackFileName)); } DPrimeDisplay dpd = new DPrimeDisplay(textData); BufferedImage i = dpd.export(0,Chromosome.getSize(),outputCompressedPNG); try{ Jimi.putImage("image/png", i, OutputFile.getName()); }catch(JimiException je){ System.out.println(je.getMessage()); } } if(Options.getAssocTest() == ASSOC_TRIO){ Vector tdtResults = TDT.calcTrioTDT(textData.getPedFile()); HaploData.saveMarkerAssocToText(tdtResults, validateOutputFile(fileName + ".ASSOC")); } else if(Options.getAssocTest() == ASSOC_CC) { Vector ccResults = TDT.calcCCTDT(textData.getPedFile()); HaploData.saveMarkerAssocToText(ccResults, validateOutputFile(fileName + ".ASSOC")); } } catch(IOException e){ System.err.println("An error has occured. This probably has to do with file input or output"); } catch(HaploViewException e){ System.err.println(e.getMessage()); } catch(PedFileException pfe) { System.err.println(pfe.getMessage()); } }
private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; if(!quietMode && fileName != null){ System.out.println("Using data file: " + fileName); } inputFile = new File(fileName); if(!inputFile.exists()){ System.out.println("input file: " + fileName + " does not exist"); System.exit(1); } textData = new HaploData(); //Vector result = null; if(fileType == HAPS){ //read in haps file textData.prepareHapsInput(inputFile); } else if (fileType == PED) { //read in ped file textData.linkageToChrom(inputFile, PED); if(textData.getPedFile().isBogusParents()) { System.out.println("Error: One or more individuals in the file reference non-existent parents.\nThese references have been ignored."); } }else{ //read in hapmapfile textData.linkageToChrom(inputFile,HMP); } File infoFile = null; if (infoFileName != null){ infoFile = new File(infoFileName); } if (fileType != HAPS){ textData.prepareMarkerInput(infoFile,textData.getPedFile().getHMInfo()); }else{ textData.prepareMarkerInput(infoFile,null); } boolean[] markerResults = new boolean[Chromosome.getUnfilteredSize()]; Vector result = null; if (fileType != HAPS){ result = textData.getPedFile().getResults(); //once check has been run we can filter the markers for (int i = 0; i < result.size(); i++){ if ((((MarkerResult)result.get(i)).getRating() > 0 || skipCheck) && Chromosome.getUnfilteredMarker(i).getDupStatus() != 2){ markerResults[i] = true; }else{ markerResults[i] = false; } } }else{ //we haven't done the check (HAPS files) Arrays.fill(markerResults, true); } for (int i = 0; i < excludedMarkers.size(); i++){ int cur = ((Integer)excludedMarkers.elementAt(i)).intValue(); if (cur < 1 || cur > markerResults.length){ System.out.println("Excluded marker out of bounds has been ignored: " + cur + "\nMarkers must be between 1 and N, where N is the total number of markers."); System.exit(1); }else{ markerResults[cur-1] = false; } } Chromosome.doFilter(markerResults); if(!quietMode && infoFile != null){ System.out.println("Using marker information file: " + infoFile.getName()); } if(outputCheck && result != null){ CheckDataPanel cp = new CheckDataPanel(textData); cp.printTable(validateOutputFile(fileName + ".CHECK")); } Vector cust = new Vector(); if(blockOutputType != -1){ textData.generateDPrimeTable(); Haplotype[][] haplos; Haplotype[][] filtHaplos; switch(blockOutputType){ case BLOX_GABRIEL: OutputFile = validateOutputFile(fileName + ".GABRIELblocks"); break; case BLOX_4GAM: OutputFile = validateOutputFile(fileName + ".4GAMblocks"); break; case BLOX_SPINE: OutputFile = validateOutputFile(fileName + ".SPINEblocks"); break; case BLOX_CUSTOM: OutputFile = validateOutputFile(fileName + ".CUSTblocks"); //read in the blocks file File blocksFile = new File(blockFileName); cust = textData.readBlocks(blocksFile); break; case BLOX_ALL: //handled below, so we don't do anything here OutputFile = null; break; default: OutputFile = validateOutputFile(fileName + ".GABRIELblocks"); break; } //this handles output type ALL if(blockOutputType == BLOX_ALL) { OutputFile = validateOutputFile(fileName + ".GABRIELblocks"); textData.guessBlocks(BLOX_GABRIEL); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile); OutputFile = validateOutputFile(fileName + ".4GAMblocks"); textData.guessBlocks(BLOX_4GAM); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile);; OutputFile = validateOutputFile(fileName + ".SPINEblocks"); textData.guessBlocks(BLOX_SPINE); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile); }else{ //guesses blocks based on output type determined above. textData.guessBlocks(blockOutputType, cust); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile); } if(Options.getAssocTest() == ASSOC_TRIO || Options.getAssocTest() == ASSOC_CC) { if (blockOutputType == BLOX_ALL){ System.out.println("Haplotype association results cannot be used with block output \"ALL\""); }else{ HaploData.saveHapAssocToText(haplos, validateOutputFile(fileName + ".HAPASSOC")); } } } if(outputDprime) { OutputFile = validateOutputFile(fileName + ".LD"); if (textData.dpTable != null){ textData.saveDprimeToText(OutputFile, TABLE_TYPE, 0, Chromosome.getSize()); }else{ textData.saveDprimeToText(OutputFile, LIVE_TYPE, 0, Chromosome.getSize()); } } if (outputPNG || outputCompressedPNG){ OutputFile = validateOutputFile(fileName + ".LD.PNG"); if (textData.dpTable == null){ textData.generateDPrimeTable(); textData.guessBlocks(BLOX_CUSTOM, new Vector()); } if (trackFileName != null){ textData.readAnalysisTrack(new File(trackFileName)); } DPrimeDisplay dpd = new DPrimeDisplay(textData); BufferedImage i = dpd.export(0,Chromosome.getSize(),outputCompressedPNG); try{ Jimi.putImage("image/png", i, OutputFile.getName()); }catch(JimiException je){ System.out.println(je.getMessage()); } } if(Options.getAssocTest() == ASSOC_TRIO){ Vector tdtResults = TDT.calcTrioTDT(textData.getPedFile()); HaploData.saveMarkerAssocToText(tdtResults, validateOutputFile(fileName + ".ASSOC")); } else if(Options.getAssocTest() == ASSOC_CC) { Vector ccResults = TDT.calcCCTDT(textData.getPedFile()); HaploData.saveMarkerAssocToText(ccResults, validateOutputFile(fileName + ".ASSOC")); } } catch(IOException e){ System.err.println("An error has occured. This probably has to do with file input or output"); } catch(HaploViewException e){ System.err.println(e.getMessage()); } catch(PedFileException pfe) { System.err.println(pfe.getMessage()); } }
1,112,746
private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; if(!quietMode && fileName != null){ System.out.println("Using data file: " + fileName); } inputFile = new File(fileName); if(!inputFile.exists()){ System.out.println("input file: " + fileName + " does not exist"); System.exit(1); } textData = new HaploData(); //Vector result = null; if(fileType == HAPS){ //read in haps file textData.prepareHapsInput(inputFile); } else if (fileType == PED) { //read in ped file textData.linkageToChrom(inputFile, PED); if(textData.getPedFile().isBogusParents()) { System.out.println("Error: One or more individuals in the file reference non-existent parents.\nThese references have been ignored."); } }else{ //read in hapmapfile textData.linkageToChrom(inputFile,HMP); } File infoFile = null; if (infoFileName != null){ infoFile = new File(infoFileName); } if (fileType != HAPS){ textData.prepareMarkerInput(infoFile,textData.getPedFile().getHMInfo()); }else{ textData.prepareMarkerInput(infoFile,null); } boolean[] markerResults = new boolean[Chromosome.getUnfilteredSize()]; Vector result = null; if (fileType != HAPS){ result = textData.getPedFile().getResults(); //once check has been run we can filter the markers for (int i = 0; i < result.size(); i++){ if ((((MarkerResult)result.get(i)).getRating() > 0 || skipCheck) && Chromosome.getUnfilteredMarker(i).getDupStatus() != 2){ markerResults[i] = true; }else{ markerResults[i] = false; } } }else{ //we haven't done the check (HAPS files) Arrays.fill(markerResults, true); } for (int i = 0; i < excludedMarkers.size(); i++){ int cur = ((Integer)excludedMarkers.elementAt(i)).intValue(); if (cur < 1 || cur > markerResults.length){ System.out.println("Excluded marker out of bounds has been ignored: " + cur + "\nMarkers must be between 1 and N, where N is the total number of markers."); System.exit(1); }else{ markerResults[cur-1] = false; } } Chromosome.doFilter(markerResults); if(!quietMode && infoFile != null){ System.out.println("Using marker information file: " + infoFile.getName()); } if(outputCheck && result != null){ CheckDataPanel cp = new CheckDataPanel(textData); cp.printTable(validateOutputFile(fileName + ".CHECK")); } Vector cust = new Vector(); if(blockOutputType != -1){ textData.generateDPrimeTable(); Haplotype[][] haplos; Haplotype[][] filtHaplos; switch(blockOutputType){ case BLOX_GABRIEL: OutputFile = validateOutputFile(fileName + ".GABRIELblocks"); break; case BLOX_4GAM: OutputFile = validateOutputFile(fileName + ".4GAMblocks"); break; case BLOX_SPINE: OutputFile = validateOutputFile(fileName + ".SPINEblocks"); break; case BLOX_CUSTOM: OutputFile = validateOutputFile(fileName + ".CUSTblocks"); //read in the blocks file File blocksFile = new File(blockFileName); cust = textData.readBlocks(blocksFile); break; case BLOX_ALL: //handled below, so we don't do anything here OutputFile = null; break; default: OutputFile = validateOutputFile(fileName + ".GABRIELblocks"); break; } //this handles output type ALL if(blockOutputType == BLOX_ALL) { OutputFile = validateOutputFile(fileName + ".GABRIELblocks"); textData.guessBlocks(BLOX_GABRIEL); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile); OutputFile = validateOutputFile(fileName + ".4GAMblocks"); textData.guessBlocks(BLOX_4GAM); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile);; OutputFile = validateOutputFile(fileName + ".SPINEblocks"); textData.guessBlocks(BLOX_SPINE); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile); }else{ //guesses blocks based on output type determined above. textData.guessBlocks(blockOutputType, cust); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile); } if(Options.getAssocTest() == ASSOC_TRIO || Options.getAssocTest() == ASSOC_CC) { if (blockOutputType == BLOX_ALL){ System.out.println("Haplotype association results cannot be used with block output \"ALL\""); }else{ HaploData.saveHapAssocToText(haplos, validateOutputFile(fileName + ".HAPASSOC")); } } } if(outputDprime) { OutputFile = validateOutputFile(fileName + ".LD"); if (textData.dpTable != null){ textData.saveDprimeToText(OutputFile, TABLE_TYPE, 0, Chromosome.getSize()); }else{ textData.saveDprimeToText(OutputFile, LIVE_TYPE, 0, Chromosome.getSize()); } } if (outputPNG || outputCompressedPNG){ OutputFile = validateOutputFile(fileName + ".LD.PNG"); if (textData.dpTable == null){ textData.generateDPrimeTable(); textData.guessBlocks(BLOX_CUSTOM, new Vector()); } if (trackFileName != null){ textData.readAnalysisTrack(new File(trackFileName)); } DPrimeDisplay dpd = new DPrimeDisplay(textData); BufferedImage i = dpd.export(0,Chromosome.getSize(),outputCompressedPNG); try{ Jimi.putImage("image/png", i, OutputFile.getName()); }catch(JimiException je){ System.out.println(je.getMessage()); } } if(Options.getAssocTest() == ASSOC_TRIO){ Vector tdtResults = TDT.calcTrioTDT(textData.getPedFile()); HaploData.saveMarkerAssocToText(tdtResults, validateOutputFile(fileName + ".ASSOC")); } else if(Options.getAssocTest() == ASSOC_CC) { Vector ccResults = TDT.calcCCTDT(textData.getPedFile()); HaploData.saveMarkerAssocToText(ccResults, validateOutputFile(fileName + ".ASSOC")); } } catch(IOException e){ System.err.println("An error has occured. This probably has to do with file input or output"); } catch(HaploViewException e){ System.err.println(e.getMessage()); } catch(PedFileException pfe) { System.err.println(pfe.getMessage()); } }
private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; if(!quietMode && fileName != null){ System.out.println("Using data file: " + fileName); } inputFile = new File(fileName); if(!inputFile.exists()){ System.out.println("input file: " + fileName + " does not exist"); System.exit(1); } textData = new HaploData(); //Vector result = null; if(fileType == HAPS){ //read in haps file textData.prepareHapsInput(inputFile); } else if (fileType == PED) { //read in ped file textData.linkageToChrom(inputFile, PED); if(textData.getPedFile().isBogusParents()) { System.out.println("Error: One or more individuals in the file reference non-existent parents.\nThese references have been ignored."); } }else{ //read in hapmapfile textData.linkageToChrom(inputFile,HMP); } File infoFile = null; if (infoFileName != null){ infoFile = new File(infoFileName); } if (fileType != HAPS){ textData.prepareMarkerInput(infoFile,textData.getPedFile().getHMInfo()); }else{ textData.prepareMarkerInput(infoFile,null); } boolean[] markerResults = new boolean[Chromosome.getUnfilteredSize()]; Vector result = null; if (fileType != HAPS){ result = textData.getPedFile().getResults(); //once check has been run we can filter the markers for (int i = 0; i < result.size(); i++){ if ((((MarkerResult)result.get(i)).getRating() > 0 || skipCheck) && Chromosome.getUnfilteredMarker(i).getDupStatus() != 2){ markerResults[i] = true; }else{ markerResults[i] = false; } } }else{ //we haven't done the check (HAPS files) Arrays.fill(markerResults, true); } for (int i = 0; i < excludedMarkers.size(); i++){ int cur = ((Integer)excludedMarkers.elementAt(i)).intValue(); if (cur < 1 || cur > markerResults.length){ System.out.println("Excluded marker out of bounds has been ignored: " + cur + "\nMarkers must be between 1 and N, where N is the total number of markers."); System.exit(1); }else{ markerResults[cur-1] = false; } } Chromosome.doFilter(markerResults); if(!quietMode && infoFile != null){ System.out.println("Using marker information file: " + infoFile.getName()); } if(outputCheck && result != null){ CheckDataPanel cp = new CheckDataPanel(textData); cp.printTable(validateOutputFile(fileName + ".CHECK")); } Vector cust = new Vector(); if(blockOutputType != -1){ textData.generateDPrimeTable(); Haplotype[][] haplos; Haplotype[][] filtHaplos; switch(blockOutputType){ case BLOX_GABRIEL: OutputFile = validateOutputFile(fileName + ".GABRIELblocks"); break; case BLOX_4GAM: OutputFile = validateOutputFile(fileName + ".4GAMblocks"); break; case BLOX_SPINE: OutputFile = validateOutputFile(fileName + ".SPINEblocks"); break; case BLOX_CUSTOM: OutputFile = validateOutputFile(fileName + ".CUSTblocks"); //read in the blocks file File blocksFile = new File(blockFileName); cust = textData.readBlocks(blocksFile); break; case BLOX_ALL: //handled below, so we don't do anything here OutputFile = null; break; default: OutputFile = validateOutputFile(fileName + ".GABRIELblocks"); break; } //this handles output type ALL if(blockOutputType == BLOX_ALL) { OutputFile = validateOutputFile(fileName + ".GABRIELblocks"); textData.guessBlocks(BLOX_GABRIEL); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile); OutputFile = validateOutputFile(fileName + ".4GAMblocks"); textData.guessBlocks(BLOX_4GAM); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile);; OutputFile = validateOutputFile(fileName + ".SPINEblocks"); textData.guessBlocks(BLOX_SPINE); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile); }else{ //guesses blocks based on output type determined above. textData.guessBlocks(blockOutputType, cust); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile); } if(Options.getAssocTest() == ASSOC_TRIO || Options.getAssocTest() == ASSOC_CC) { if (blockOutputType == BLOX_ALL){ System.out.println("Haplotype association results cannot be used with block output \"ALL\""); }else{ HaploData.saveHapAssocToText(haplos, validateOutputFile(fileName + ".HAPASSOC")); } } } if(outputDprime) { OutputFile = validateOutputFile(fileName + ".LD"); if (textData.dpTable != null){ textData.saveDprimeToText(OutputFile, TABLE_TYPE, 0, Chromosome.getSize()); }else{ textData.saveDprimeToText(OutputFile, LIVE_TYPE, 0, Chromosome.getSize()); } } if (outputPNG || outputCompressedPNG){ OutputFile = validateOutputFile(fileName + ".LD.PNG"); if (textData.dpTable == null){ textData.generateDPrimeTable(); textData.guessBlocks(BLOX_CUSTOM, new Vector()); } if (trackFileName != null){ textData.readAnalysisTrack(new File(trackFileName)); } DPrimeDisplay dpd = new DPrimeDisplay(textData); BufferedImage i = dpd.export(0,Chromosome.getUnfilteredSize(),outputCompressedPNG); try{ Jimi.putImage("image/png", i, OutputFile.getName()); }catch(JimiException je){ System.out.println(je.getMessage()); } } if(Options.getAssocTest() == ASSOC_TRIO){ Vector tdtResults = TDT.calcTrioTDT(textData.getPedFile()); HaploData.saveMarkerAssocToText(tdtResults, validateOutputFile(fileName + ".ASSOC")); } else if(Options.getAssocTest() == ASSOC_CC) { Vector ccResults = TDT.calcCCTDT(textData.getPedFile()); HaploData.saveMarkerAssocToText(ccResults, validateOutputFile(fileName + ".ASSOC")); } } catch(IOException e){ System.err.println("An error has occured. This probably has to do with file input or output"); } catch(HaploViewException e){ System.err.println(e.getMessage()); } catch(PedFileException pfe) { System.err.println(pfe.getMessage()); } }
1,112,747
public void doTag(XMLOutput output) throws Exception { String message = getBodyText(); Object expectedValue = expected.evaluate(context); Object actualValue = actual.evaluate(context); if (expectedValue == null && expectedValue == null) { return; } if (actualValue != null && expectedValue.equals(actualValue)) { return; } String expressions = "\nExpected expression: " + expected + "\nActual expression: " + actual; failNotEquals(message, expectedValue, actualValue, expressions); }
public void doTag(XMLOutput output) throws Exception { String message = getBodyText(); Object expectedValue = expected.evaluate(context); Object actualValue = actual.evaluate(context); if (expectedValue == null && actualValue == null) { return; } if (actualValue != null && expectedValue.equals(actualValue)) { return; } String expressions = "\nExpected expression: " + expected + "\nActual expression: " + actual; failNotEquals(message, expectedValue, actualValue, expressions); }
1,112,748
public void doTag(XMLOutput output) throws JellyTagException { String message = getBodyText(); if (message == null || message.length() == 0) { message = "File does not exist." } if (file == null) { fail(message, "file given is null"); } else { if (!file.exists()) { fail(message); } } } /** * The file to be tested. If this file exists, the test will pass. * @param aFile the file to test. */ public void setFile(File aFile) { file = aFile; }
public void doTag(XMLOutput output) throws JellyTagException { String message = getBodyText(); if (message == null || message.length() == 0) { message = "File does not exist."; } if (file == null) { fail(message, "file given is null"); } else { if (!file.exists()) { fail(message); } } } /** * The file to be tested. If this file exists, the test will pass. * @param aFile the file to test. */ public void setFile(File aFile) { file = aFile; }
1,112,749
public void doTag(XMLOutput output) throws JellyTagException { String message = getBodyText(); if (message == null || message.length() == 0) { message = "File does not exist." } if (file == null) { fail(message, "file given is null"); } else { if (!file.exists()) { fail(message); } } } /** * The file to be tested. If this file exists, the test will pass. * @param aFile the file to test. */ public void setFile(File aFile) { file = aFile; }
public void doTag(XMLOutput output) throws JellyTagException { String message = getBodyText(); if (message == null || message.length() == 0) { message = "File does not exist." } if (file == null) { fail(message, "file given is null"); } else { if (!file.exists()) { fail(message); } } } /** * The file to be tested. If this file exists, the test will pass. * @param aFile the file to test. */ public void setFile(File aFile) { file = aFile; }
1,112,750
public FuzzyDate parse(String strDate) { DateFormat df = new SimpleDateFormat( dateFormatStr ); FuzzyDate fd = null; try { Date d = df.parse( strDate ); if ( d != null ) { Date midpoint = new Date( d.getTime() + getFuzzyPeriodLength(d) / 2 ); fd = new FuzzyDate( midpoint, ((float)(getFuzzyPeriodLength(d))) / (2*FuzzyDate.MILLIS_IN_DAY) ); } } catch ( ParseException e ) { log.warn( "ParseException: " + e.getMessage() ); } return fd; }
public FuzzyDate parse(String strDate) { DateFormat df = getDateFormat(); FuzzyDate fd = null; try { Date d = df.parse( strDate ); if ( d != null ) { Date midpoint = new Date( d.getTime() + getFuzzyPeriodLength(d) / 2 ); fd = new FuzzyDate( midpoint, ((float)(getFuzzyPeriodLength(d))) / (2*FuzzyDate.MILLIS_IN_DAY) ); } } catch ( ParseException e ) { log.warn( "ParseException: " + e.getMessage() ); } return fd; }
1,112,751
public FuzzyDate parse(String strDate) { DateFormat df = new SimpleDateFormat( dateFormatStr ); FuzzyDate fd = null; try { Date d = df.parse( strDate ); if ( d != null ) { Date midpoint = new Date( d.getTime() + getFuzzyPeriodLength(d) / 2 ); fd = new FuzzyDate( midpoint, ((float)(getFuzzyPeriodLength(d))) / (2*FuzzyDate.MILLIS_IN_DAY) ); } } catch ( ParseException e ) { log.warn( "ParseException: " + e.getMessage() ); } return fd; }
public FuzzyDate parse(String strDate) { DateFormat df = new SimpleDateFormat( dateFormatStr ); FuzzyDate fd = null; try { Date d = df.parse( strDate ); if ( d != null ) { Date midpoint = new Date( d.getTime() + getFuzzyPeriodLength(d) / 2 ); fd = new FuzzyDate( midpoint, 0.5 * getFloatFuzzyPeriodLength( d ) ); } } catch ( ParseException e ) { log.warn( "ParseException: " + e.getMessage() ); } return fd; }
1,112,752
public ServerConnection getServerConnection(ApplicationConfig config) throws ConnectionFailedException { try { /* Create an RMI connector client */ HashMap env = new HashMap(); String[] credentials = new String[] {config.getUsername(), config.getPassword()}; env.put("jmx.remote.credentials", credentials); JMXServiceURL url = new JMXServiceURL(config.getURL()); JMXConnector jmxc = JMXConnectorFactory.connect(url, env); return new JSR160ServerConnection(jmxc); } catch (Throwable e) { throw new ConnectionFailedException(e); } }
public ServerConnection getServerConnection(ApplicationConfig config) throws ConnectionFailedException { try { /* Create an RMI connector client */ HashMap env = new HashMap(); String[] credentials = new String[] {config.getUsername(), config.getPassword()}; env.put("jmx.remote.credentials", credentials); JMXServiceURL url = new JMXServiceURL(config.getURL()); JMXConnector jmxc = JMXConnectorFactory.connect(url, env); return new JSR160ServerConnection(jmxc, jmxc.getMBeanServerConnection()); } catch (Throwable e) { throw new ConnectionFailedException(e); } }
1,112,755
public UpdateDisplayDialog(HaploView h, String title, UpdateChecker uc) { super(h, title); JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); Font bigguns = new Font("Default", Font.BOLD, 14); JLabel announceLabel = new JLabel("A newer version of Haploview is available: " + uc.getNewVersion()); announceLabel.setAlignmentX(Component.CENTER_ALIGNMENT); announceLabel.setFont(bigguns); JLabel urlLabel = new JLabel("http://www.broad.mit.edu/mpg/haploview/"); urlLabel.setFont(bigguns); urlLabel.setAlignmentX(Component.CENTER_ALIGNMENT); JScrollPane changeScroller = null; try { JEditorPane changePane = new JEditorPane(); changePane.setEditable(false); changePane.setPage(new URL("http://18.157.34.100:8080/hapchanges.html")); changeScroller = new JScrollPane(changePane); changeScroller.setPreferredSize(new Dimension(150,150)); } catch(IOException ioe) { //if were here then we were able to check for an update, so well just show them a dialog //without listing the changes } contents.add(announceLabel); contents.add(urlLabel); if(changeScroller != null) { changeScroller.setAlignmentX(Component.CENTER_ALIGNMENT); contents.add(changeScroller); } JButton okButton = new JButton("OK"); okButton.addActionListener(this); okButton.setAlignmentX(Component.CENTER_ALIGNMENT); contents.add(okButton); this.setContentPane(contents); this.setLocation(this.getParent().getX() + 100, this.getParent().getY() + 100); this.setModal(true); this.setResizable(false); }
public UpdateDisplayDialog(HaploView h, String title, UpdateChecker uc) { super(h, title); JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); Font bigguns = new Font("Default", Font.PLAIN, 14); JLabel announceLabel = new JLabel("A newer version of Haploview is available: " + uc.getNewVersion()); announceLabel.setAlignmentX(Component.CENTER_ALIGNMENT); announceLabel.setFont(bigguns); JLabel urlLabel = new JLabel("http://www.broad.mit.edu/mpg/haploview/"); urlLabel.setFont(bigguns); urlLabel.setAlignmentX(Component.CENTER_ALIGNMENT); JScrollPane changeScroller = null; try { JEditorPane changePane = new JEditorPane(); changePane.setEditable(false); changePane.setPage(new URL("http://18.157.34.100:8080/hapchanges.html")); changeScroller = new JScrollPane(changePane); changeScroller.setPreferredSize(new Dimension(150,150)); } catch(IOException ioe) { //if were here then we were able to check for an update, so well just show them a dialog //without listing the changes } contents.add(announceLabel); contents.add(urlLabel); if(changeScroller != null) { changeScroller.setAlignmentX(Component.CENTER_ALIGNMENT); contents.add(changeScroller); } JButton okButton = new JButton("OK"); okButton.addActionListener(this); okButton.setAlignmentX(Component.CENTER_ALIGNMENT); contents.add(okButton); this.setContentPane(contents); this.setLocation(this.getParent().getX() + 100, this.getParent().getY() + 100); this.setModal(true); this.setResizable(false); }
1,112,756
public UpdateDisplayDialog(HaploView h, String title, UpdateChecker uc) { super(h, title); JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); Font bigguns = new Font("Default", Font.BOLD, 14); JLabel announceLabel = new JLabel("A newer version of Haploview is available: " + uc.getNewVersion()); announceLabel.setAlignmentX(Component.CENTER_ALIGNMENT); announceLabel.setFont(bigguns); JLabel urlLabel = new JLabel("http://www.broad.mit.edu/mpg/haploview/"); urlLabel.setFont(bigguns); urlLabel.setAlignmentX(Component.CENTER_ALIGNMENT); JScrollPane changeScroller = null; try { JEditorPane changePane = new JEditorPane(); changePane.setEditable(false); changePane.setPage(new URL("http://18.157.34.100:8080/hapchanges.html")); changeScroller = new JScrollPane(changePane); changeScroller.setPreferredSize(new Dimension(150,150)); } catch(IOException ioe) { //if were here then we were able to check for an update, so well just show them a dialog //without listing the changes } contents.add(announceLabel); contents.add(urlLabel); if(changeScroller != null) { changeScroller.setAlignmentX(Component.CENTER_ALIGNMENT); contents.add(changeScroller); } JButton okButton = new JButton("OK"); okButton.addActionListener(this); okButton.setAlignmentX(Component.CENTER_ALIGNMENT); contents.add(okButton); this.setContentPane(contents); this.setLocation(this.getParent().getX() + 100, this.getParent().getY() + 100); this.setModal(true); this.setResizable(false); }
public UpdateDisplayDialog(HaploView h, String title, UpdateChecker uc) { super(h, title); JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); Font bigguns = new Font("Default", Font.BOLD, 14); JLabel announceLabel = new JLabel("A newer version of Haploview is available: " + uc.getNewVersion()); announceLabel.setAlignmentX(Component.CENTER_ALIGNMENT); announceLabel.setFont(bigguns); JLabel urlLabel = new JLabel("http://www.broad.mit.edu/mpg/haploview/"); urlLabel.setFont(bigguns); urlLabel.setAlignmentX(Component.CENTER_ALIGNMENT); JScrollPane changeScroller = null; try { JEditorPane changePane = new JEditorPane(); changePane.setEditable(false); changePane.setPage(new URL("http://18.157.34.100:8080/hapchanges.html")); changeScroller = new JScrollPane(changePane); changeScroller.setPreferredSize(new Dimension(250,150)); } catch(IOException ioe) { //if were here then we were able to check for an update, so well just show them a dialog //without listing the changes } contents.add(announceLabel); contents.add(urlLabel); if(changeScroller != null) { changeScroller.setAlignmentX(Component.CENTER_ALIGNMENT); contents.add(changeScroller); } JButton okButton = new JButton("OK"); okButton.addActionListener(this); okButton.setAlignmentX(Component.CENTER_ALIGNMENT); contents.add(okButton); this.setContentPane(contents); this.setLocation(this.getParent().getX() + 100, this.getParent().getY() + 100); this.setModal(true); this.setResizable(false); }
1,112,757
public UpdateDisplayDialog(HaploView h, String title, UpdateChecker uc) { super(h, title); JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); Font bigguns = new Font("Default", Font.BOLD, 14); JLabel announceLabel = new JLabel("A newer version of Haploview is available: " + uc.getNewVersion()); announceLabel.setAlignmentX(Component.CENTER_ALIGNMENT); announceLabel.setFont(bigguns); JLabel urlLabel = new JLabel("http://www.broad.mit.edu/mpg/haploview/"); urlLabel.setFont(bigguns); urlLabel.setAlignmentX(Component.CENTER_ALIGNMENT); JScrollPane changeScroller = null; try { JEditorPane changePane = new JEditorPane(); changePane.setEditable(false); changePane.setPage(new URL("http://18.157.34.100:8080/hapchanges.html")); changeScroller = new JScrollPane(changePane); changeScroller.setPreferredSize(new Dimension(150,150)); } catch(IOException ioe) { //if were here then we were able to check for an update, so well just show them a dialog //without listing the changes } contents.add(announceLabel); contents.add(urlLabel); if(changeScroller != null) { changeScroller.setAlignmentX(Component.CENTER_ALIGNMENT); contents.add(changeScroller); } JButton okButton = new JButton("OK"); okButton.addActionListener(this); okButton.setAlignmentX(Component.CENTER_ALIGNMENT); contents.add(okButton); this.setContentPane(contents); this.setLocation(this.getParent().getX() + 100, this.getParent().getY() + 100); this.setModal(true); this.setResizable(false); }
public UpdateDisplayDialog(HaploView h, String title, UpdateChecker uc) { super(h, title); JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); Font bigguns = new Font("Default", Font.BOLD, 14); JLabel announceLabel = new JLabel("A newer version of Haploview is available: " + uc.getNewVersion()); announceLabel.setAlignmentX(Component.CENTER_ALIGNMENT); announceLabel.setFont(bigguns); JLabel urlLabel = new JLabel("http://www.broad.mit.edu/mpg/haploview/"); urlLabel.setFont(bigguns); urlLabel.setAlignmentX(Component.CENTER_ALIGNMENT); JScrollPane changeScroller = null; try { JEditorPane changePane = new JEditorPane(); changePane.setEditable(false); changePane.setPage(new URL("http://18.157.34.100:8080/hapchanges.html")); changeScroller = new JScrollPane(changePane); changeScroller.setPreferredSize(new Dimension(150,150)); } catch(IOException ioe) { //if were here then we were able to check for an update, so well just show them a dialog //without listing the changes } contents.add(announceLabel); contents.add(urlLabel); if(changeScroller != null) { changeScroller.setAlignmentX(Component.CENTER_ALIGNMENT); JPanel scrollHolder = new JPanel(); scrollHolder.add(changeScroller); contents.add(scrollHolder); } JButton okButton = new JButton("OK"); okButton.addActionListener(this); okButton.setAlignmentX(Component.CENTER_ALIGNMENT); contents.add(okButton); this.setContentPane(contents); this.setLocation(this.getParent().getX() + 100, this.getParent().getY() + 100); this.setModal(true); this.setResizable(false); }
1,112,758
public void run(Context context, XMLOutput output) throws Exception { output.startElement( uri, localName, qname, attributes ); getBody().run(context, output); output.endElement( uri, localName, qname ); }
public void run(Context context, XMLOutput output) throws Exception { output.startElement( uri, localName, qname, attributes ); getBody().run(context, output); output.endElement( uri, localName, qname ); }
1,112,759
public void setAttribute(String name, Object value) { // ### we'll assume that all attributes are in no namespace! // ### this is severely limiting! // ### - Tag attributes should allow for namespace aware int index = attributes.getIndex( "", name ); if ( index > 0 ) { attributes.removeAttribute( index ); } // treat null values as no attribute if ( value != null ) { attributes.addAttribute( "", name, name, "CDATA", value.toString() ); } }
public void setAttribute(String name, Object value) { // ### we'll assume that all attributes are in no namespace! // ### this is severely limiting! // ### - Tag attributes should allow for namespace aware int index = attributes.getIndex( "", name ); if ( index > 0 ) { attributes.removeAttribute( index ); } // treat null values as no attribute if ( value != null ) { attributes.addAttribute( "", name, name, "CDATA", value.toString() ); } }
1,112,760
public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command==RAW_DATA){ load(PED); }else if (command == PHASED_DATA){ load(HAPS); }else if (command == HAPMAP_DATA){ load(DCC); }else if (command == BROWSE_GENO){ browse(GENO); }else if (command == BROWSE_INFO){ browse(INFO); }else if (command == "OK"){ HaploView caller = (HaploView)this.getParent(); if (doTDT.isSelected()){ if (trioButton.isSelected()){ caller.assocTest = 1; } else { caller.assocTest = 2; } }else{ caller.assocTest = 0; } String[] returnStrings = {genoFileField.getText(), infoFileField.getText(), maxComparisonDistField.getText()}; if (fileType == HAPS){ caller.readPhasedGenotypes(returnStrings); }else if (fileType == PED){ caller.readPedGenotypes(returnStrings, PED); }else if (fileType == DCC){ caller.readPedGenotypes(returnStrings, DCC); } if (caller.dPrimeDisplay != null){ caller.dPrimeDisplay.setVisible(false); } this.dispose(); }else if (command == "Cancel"){ this.dispose(); }else if (command == "tdt"){ if(this.doTDT.isSelected()){ trioButton.setEnabled(true); ccButton.setEnabled(true); }else{ trioButton.setEnabled(false); ccButton.setEnabled(false); } } }
public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command==RAW_DATA){ load(PED); }else if (command == PHASED_DATA){ load(HAPS); }else if (command == HAPMAP_DATA){ load(DCC); }else if (command == BROWSE_GENO){ browse(GENO); }else if (command == BROWSE_INFO){ browse(INFO); }else if (command == "OK"){ HaploView caller = (HaploView)this.getParent(); if (doTDT.isSelected()){ if (trioButton.isSelected()){ caller.assocTest = 1; } else { caller.assocTest = 2; } }else{ caller.assocTest = 0; } String[] returnStrings = {genoFileField.getText(), infoFileField.getText(), maxComparisonDistField.getText()}; if (fileType == HAPS){ caller.readPhasedGenotypes(returnStrings); }else if (fileType == PED){ caller.readPedGenotypes(returnStrings, PED); }else if (fileType == DCC){ caller.readPedGenotypes(returnStrings, DCC); } if (caller.dPrimeDisplay != null){ caller.dPrimeDisplay.setVisible(false); } this.dispose(); }else if (command == "Cancel"){ this.dispose(); }else if (command == "tdt"){ if(this.doTDT.isSelected()){ trioButton.setEnabled(true); ccButton.setEnabled(true); }else{ trioButton.setEnabled(false); ccButton.setEnabled(false); } } }
1,112,761
void checkStringProperty( String propertyName, String value, int maxLength ) throws IllegalArgumentException { if ( value.length() > maxLength ) { throw new IllegalArgumentException( propertyName + " cannot be longer than " + maxLength + " characters" ); } }
void checkStringProperty( String propertyName, String value, int maxLength ) throws IllegalArgumentException { if ( value != null && value.length() > maxLength ) { throw new IllegalArgumentException( propertyName + " cannot be longer than " + maxLength + " characters" ); } }
1,112,762
public void cleanup() throws ArchitectException { setCleanupExceptionMessage("Could not populate catalog dropdown!"); catalogDropdown.removeAllItems(); catalogDropdown.setEnabled(false); // This is either a database, a catalog, or null depending on how db is structured SQLObject schemaParent; if (db.isCatalogContainer()) { for (SQLObject item : (List<SQLObject>) db.getChildren()) { catalogDropdown.addItem(item); } // check if we need to do schemas SQLCatalog cat = (SQLCatalog) catalogDropdown.getSelectedItem(); if (cat == null) { // there are no catalogs (database is completely empty) schemaParent = null; catalogDropdown.setEnabled(false); } else if (cat.isSchemaContainer()) { // there are schemas in this catalog schemaParent = cat; catalogDropdown.setEnabled(true); } else { // there are catalogs, but they don't contain schemas schemaParent = null; catalogDropdown.setEnabled(true); } } else if (db.isSchemaContainer()) { schemaParent = db; catalogDropdown.setEnabled(false); } else { // database contains tables directly schemaParent = null; catalogDropdown.setEnabled(false); } schemaDropdown.removeAllItems(); schemaDropdown.setEnabled(false); if (schemaParent == null) { startCompareAction.setEnabled(isStartable()); } else { // need a final reference to this so we can use it in the inner class final SQLObject finalSchemaParent = schemaParent; new Thread(new Populator() { @Override public void doStuff() throws Exception { ListerProgressBarUpdater progressBarUpdater = new ListerProgressBarUpdater(progressBar, this); new javax.swing.Timer(100, progressBarUpdater).start(); // this populates the schema parent (populate is not visible here) finalSchemaParent.getChildren(); } /** * Populates the schema dropdown box from the schema * parent that doStuff() populated. * @throws ArchitectException */ @Override public void cleanup() throws ArchitectException { setCleanupExceptionMessage("Could not populate schema dropdown!"); for (SQLObject item : (List<SQLObject>) finalSchemaParent.getChildren()) { schemaDropdown.addItem(item); } if (schemaDropdown.getItemCount() > 0) { schemaDropdown.setEnabled(true); } startCompareAction.setEnabled(isStartable()); } }).start(); } }
public void cleanup() throws ArchitectException { setCleanupExceptionMessage("Could not populate catalog dropdown!"); catalogDropdown.removeAllItems(); catalogDropdown.setEnabled(false); // This is either a database, a catalog, or null depending on how db is structured SQLObject schemaParent; if (db.isCatalogContainer()) { for (SQLObject item : (List<SQLObject>) db.getChildren()) { catalogDropdown.addItem(item); } // check if we need to do schemas SQLCatalog cat = (SQLCatalog) catalogDropdown.getSelectedItem(); if (cat == null) { // there are no catalogs (database is completely empty) schemaParent = null; catalogDropdown.setEnabled(false); } else if (cat.isSchemaContainer()) { // there are schemas in this catalog schemaParent = cat; catalogDropdown.setEnabled(true); } else { // there are catalogs, but they don't contain schemas schemaParent = null; catalogDropdown.setEnabled(true); } } else if (db.isSchemaContainer()) { schemaParent = db; catalogDropdown.setEnabled(false); } else { // database contains tables directly schemaParent = null; catalogDropdown.setEnabled(false); } schemaDropdown.removeAllItems(); schemaDropdown.setEnabled(false); if (schemaParent == null) { startCompareAction.setEnabled(isStartable()); } else { // need a final reference to this so we can use it in the inner class final SQLObject finalSchemaParent = schemaParent; new Thread(new Populator() { @Override public void doStuff() throws Exception { ListerProgressBarUpdater progressBarUpdater = new ListerProgressBarUpdater(progressBar, this); new javax.swing.Timer(100, progressBarUpdater).start(); // this populates the schema parent (populate is not visible here) finalSchemaParent.getChildren(); } /** * Populates the schema dropdown box from the schema * parent that doStuff() populated. * @throws ArchitectException */ @Override public void cleanup() throws ArchitectException { setCleanupExceptionMessage("Could not populate schema dropdown!"); for (SQLObject item : (List<SQLObject>) finalSchemaParent.getChildren()) { schemaDropdown.addItem(item); } if (schemaDropdown.getItemCount() > 0) { schemaDropdown.setEnabled(true); } startCompareAction.setEnabled(isStartable()); } }).start(); } }
1,112,763
public void actionPerformed(ActionEvent e) { startCompareAction.setEnabled(false); CompareDMFrame cf = null; try { SQLObject left = source.getObjectToCompare(); if (left.getChildType() == SQLTable.class) { sourceTables = left.getChildren(); } else { sourceTables = new ArrayList(); } SQLObject right = target.getObjectToCompare(); if (right.getChildType() == SQLTable.class) { targetTables = right.getChildren(); } else { targetTables = new ArrayList(); } // XXX: should do most or all of this work in a worker thread Map<DiffType, AttributeSet> styles = new HashMap<DiffType, AttributeSet>(); { SimpleAttributeSet att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.green); styles.put(DiffType.LEFTONLY, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.red); styles.put(DiffType.RIGHTONLY, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.black); styles.put(DiffType.SAME, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.orange); styles.put(DiffType.MODIFIED, att); } CompareSQL sourceComp = new CompareSQL(sourceTables, targetTables); List<DiffChunk<SQLObject>> diff = sourceComp.generateTableDiffs(); CompareSQL targetComp = new CompareSQL(targetTables, sourceTables); List<DiffChunk<SQLObject>> diff1 = targetComp.generateTableDiffs(); DefaultStyledDocument sourceDoc = new DefaultStyledDocument(); DefaultStyledDocument targetDoc = new DefaultStyledDocument(); if (sqlButton.isSelected()) { throw new UnsupportedOperationException( "We don't support DDL generation yet"); } else if (englishButton.isSelected()) { for (DiffChunk<SQLObject> chunk : diff) { sourceDoc.insertString( sourceDoc.getLength(), chunk.getData().toString()+"\n", styles.get(chunk.getType())); } for (DiffChunk<SQLObject> chunk1 : diff1) { targetDoc.insertString( targetDoc.getLength(), chunk1.getData().toString()+"\n", styles.get(chunk1.getType())); } } else { throw new IllegalStateException( "Don't know what type of output to make"); } // get the title string for the compareDMFrame String compMethod = null; if (sqlButton.isSelected()) { compMethod = "SQL"; } else { compMethod = OUTPUT_ENGLISH; } String titleString = "Comparing " +left.getName() + " to " + right.getName() + " using " + compMethod; cf = new CompareDMFrame( sourceDoc, targetDoc, titleString, source.getDatabase()); cf.pack(); cf.setVisible(true); } catch (ArchitectDiffException ex) { JOptionPane.showMessageDialog( CompareDMPanel.this, "Could not perform the diff:\n"+ex.getMessage(), "Diff Error", JOptionPane.ERROR_MESSAGE); logger.error("Couldn't do diff", ex); } catch (ArchitectException exp) { ASUtils.showExceptionDialog( "StartCompareAction failed", exp); logger.error("StartCompareAction failed", exp); } catch (FileNotFoundException ex) { ASUtils.showExceptionDialog("Your file could not be found.", ex); logger.error("File could not be found.", ex); } catch (IOException ex) { ASUtils.showExceptionDialog("Could not read file", ex); logger.error("Could not read file", ex); } catch (BadLocationException ex) { ASUtils.showExceptionDialog("Could not create document for results", ex); logger.error("Could not create document for results", ex); } catch (Exception ex) { ASUtils.showExceptionDialog("Unxepected Exception!", ex); logger.error("Unxepected Exception!", ex); } finally { this.setEnabled(isStartable()); } }
public void actionPerformed(ActionEvent e) { startCompareAction.setEnabled(false); CompareDMFrame cf = null; try { SQLObject left = source.getObjectToCompare(); if (left.getChildType() == SQLTable.class) { sourceTables = left.getChildren(); } else { sourceTables = new ArrayList(); } SQLObject right = target.getObjectToCompare(); if (right.getChildType() == SQLTable.class) { targetTables = right.getChildren(); } else { targetTables = new ArrayList(); } // XXX: should do most or all of this work in a worker thread Map<DiffType, AttributeSet> styles = new HashMap<DiffType, AttributeSet>(); { SimpleAttributeSet att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.green); styles.put(DiffType.LEFTONLY, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.red); styles.put(DiffType.RIGHTONLY, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.black); styles.put(DiffType.SAME, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.orange); styles.put(DiffType.MODIFIED, att); } CompareSQL sourceComp = new CompareSQL(sourceTables, targetTables); List<DiffChunk<SQLObject>> diff = sourceComp.generateTableDiffs(); CompareSQL targetComp = new CompareSQL(targetTables, sourceTables); List<DiffChunk<SQLObject>> diff1 = targetComp.generateTableDiffs(); DefaultStyledDocument sourceDoc = new DefaultStyledDocument(); DefaultStyledDocument targetDoc = new DefaultStyledDocument(); if (sqlButton.isSelected()) { throw new UnsupportedOperationException( "We don't support DDL generation yet"); } else if (englishButton.isSelected()) { int objectCount = 0; for (DiffChunk<SQLObject> chunk : diff) { sourceDoc.insertString( sourceDoc.getLength(), chunk.getData().toString()+"\n", styles.get(chunk.getType())); } for (DiffChunk<SQLObject> chunk1 : diff1) { targetDoc.insertString( targetDoc.getLength(), chunk1.getData().toString()+"\n", styles.get(chunk1.getType())); } } else { throw new IllegalStateException( "Don't know what type of output to make"); } // get the title string for the compareDMFrame String compMethod = null; if (sqlButton.isSelected()) { compMethod = "SQL"; } else { compMethod = OUTPUT_ENGLISH; } String titleString = "Comparing " +left.getName() + " to " + right.getName() + " using " + compMethod; cf = new CompareDMFrame( sourceDoc, targetDoc, titleString, source.getDatabase()); cf.pack(); cf.setVisible(true); } catch (ArchitectDiffException ex) { JOptionPane.showMessageDialog( CompareDMPanel.this, "Could not perform the diff:\n"+ex.getMessage(), "Diff Error", JOptionPane.ERROR_MESSAGE); logger.error("Couldn't do diff", ex); } catch (ArchitectException exp) { ASUtils.showExceptionDialog( "StartCompareAction failed", exp); logger.error("StartCompareAction failed", exp); } catch (FileNotFoundException ex) { ASUtils.showExceptionDialog("Your file could not be found.", ex); logger.error("File could not be found.", ex); } catch (IOException ex) { ASUtils.showExceptionDialog("Could not read file", ex); logger.error("Could not read file", ex); } catch (BadLocationException ex) { ASUtils.showExceptionDialog("Could not create document for results", ex); logger.error("Could not create document for results", ex); } catch (Exception ex) { ASUtils.showExceptionDialog("Unxepected Exception!", ex); logger.error("Unxepected Exception!", ex); } finally { this.setEnabled(isStartable()); } }
1,112,764
public void actionPerformed(ActionEvent e) { startCompareAction.setEnabled(false); CompareDMFrame cf = null; try { SQLObject left = source.getObjectToCompare(); if (left.getChildType() == SQLTable.class) { sourceTables = left.getChildren(); } else { sourceTables = new ArrayList(); } SQLObject right = target.getObjectToCompare(); if (right.getChildType() == SQLTable.class) { targetTables = right.getChildren(); } else { targetTables = new ArrayList(); } // XXX: should do most or all of this work in a worker thread Map<DiffType, AttributeSet> styles = new HashMap<DiffType, AttributeSet>(); { SimpleAttributeSet att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.green); styles.put(DiffType.LEFTONLY, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.red); styles.put(DiffType.RIGHTONLY, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.black); styles.put(DiffType.SAME, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.orange); styles.put(DiffType.MODIFIED, att); } CompareSQL sourceComp = new CompareSQL(sourceTables, targetTables); List<DiffChunk<SQLObject>> diff = sourceComp.generateTableDiffs(); CompareSQL targetComp = new CompareSQL(targetTables, sourceTables); List<DiffChunk<SQLObject>> diff1 = targetComp.generateTableDiffs(); DefaultStyledDocument sourceDoc = new DefaultStyledDocument(); DefaultStyledDocument targetDoc = new DefaultStyledDocument(); if (sqlButton.isSelected()) { throw new UnsupportedOperationException( "We don't support DDL generation yet"); } else if (englishButton.isSelected()) { for (DiffChunk<SQLObject> chunk : diff) { sourceDoc.insertString( sourceDoc.getLength(), chunk.getData().toString()+"\n", styles.get(chunk.getType())); } for (DiffChunk<SQLObject> chunk1 : diff1) { targetDoc.insertString( targetDoc.getLength(), chunk1.getData().toString()+"\n", styles.get(chunk1.getType())); } } else { throw new IllegalStateException( "Don't know what type of output to make"); } // get the title string for the compareDMFrame String compMethod = null; if (sqlButton.isSelected()) { compMethod = "SQL"; } else { compMethod = OUTPUT_ENGLISH; } String titleString = "Comparing " +left.getName() + " to " + right.getName() + " using " + compMethod; cf = new CompareDMFrame( sourceDoc, targetDoc, titleString, source.getDatabase()); cf.pack(); cf.setVisible(true); } catch (ArchitectDiffException ex) { JOptionPane.showMessageDialog( CompareDMPanel.this, "Could not perform the diff:\n"+ex.getMessage(), "Diff Error", JOptionPane.ERROR_MESSAGE); logger.error("Couldn't do diff", ex); } catch (ArchitectException exp) { ASUtils.showExceptionDialog( "StartCompareAction failed", exp); logger.error("StartCompareAction failed", exp); } catch (FileNotFoundException ex) { ASUtils.showExceptionDialog("Your file could not be found.", ex); logger.error("File could not be found.", ex); } catch (IOException ex) { ASUtils.showExceptionDialog("Could not read file", ex); logger.error("Could not read file", ex); } catch (BadLocationException ex) { ASUtils.showExceptionDialog("Could not create document for results", ex); logger.error("Could not create document for results", ex); } catch (Exception ex) { ASUtils.showExceptionDialog("Unxepected Exception!", ex); logger.error("Unxepected Exception!", ex); } finally { this.setEnabled(isStartable()); } }
public void actionPerformed(ActionEvent e) { startCompareAction.setEnabled(false); CompareDMFrame cf = null; try { SQLObject left = source.getObjectToCompare(); if (left.getChildType() == SQLTable.class) { sourceTables = left.getChildren(); } else { sourceTables = new ArrayList(); } SQLObject right = target.getObjectToCompare(); if (right.getChildType() == SQLTable.class) { targetTables = right.getChildren(); } else { targetTables = new ArrayList(); } // XXX: should do most or all of this work in a worker thread Map<DiffType, AttributeSet> styles = new HashMap<DiffType, AttributeSet>(); { SimpleAttributeSet att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.green); styles.put(DiffType.LEFTONLY, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.red); styles.put(DiffType.RIGHTONLY, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.black); styles.put(DiffType.SAME, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.orange); styles.put(DiffType.MODIFIED, att); } CompareSQL sourceComp = new CompareSQL(sourceTables, targetTables); List<DiffChunk<SQLObject>> diff = sourceComp.generateTableDiffs(); CompareSQL targetComp = new CompareSQL(targetTables, sourceTables); List<DiffChunk<SQLObject>> diff1 = targetComp.generateTableDiffs(); DefaultStyledDocument sourceDoc = new DefaultStyledDocument(); DefaultStyledDocument targetDoc = new DefaultStyledDocument(); if (sqlButton.isSelected()) { throw new UnsupportedOperationException( "We don't support DDL generation yet"); } else if (englishButton.isSelected()) { for (DiffChunk<SQLObject> chunk : diff) { sourceDoc.insertString( sourceDoc.getLength(), chunk.getData().toString()+"\n", styles.get(chunk.getType())); } for (DiffChunk<SQLObject> chunk1 : diff1) { targetDoc.insertString( targetDoc.getLength(), chunk1.getData().toString()+"\n", styles.get(chunk1.getType())); } } else { throw new IllegalStateException( "Don't know what type of output to make"); } // get the title string for the compareDMFrame String compMethod = null; if (sqlButton.isSelected()) { compMethod = "SQL"; } else { compMethod = OUTPUT_ENGLISH; } String titleString = "Comparing " +left.getName() + " to " + right.getName() + " using " + compMethod; cf = new CompareDMFrame( sourceDoc, targetDoc, titleString, source.getDatabase()); cf.pack(); cf.setVisible(true); } catch (ArchitectDiffException ex) { JOptionPane.showMessageDialog( CompareDMPanel.this, "Could not perform the diff:\n"+ex.getMessage(), "Diff Error", JOptionPane.ERROR_MESSAGE); logger.error("Couldn't do diff", ex); } catch (ArchitectException exp) { ASUtils.showExceptionDialog( "StartCompareAction failed", exp); logger.error("StartCompareAction failed", exp); } catch (FileNotFoundException ex) { ASUtils.showExceptionDialog("Your file could not be found.", ex); logger.error("File could not be found.", ex); } catch (IOException ex) { ASUtils.showExceptionDialog("Could not read file", ex); logger.error("Could not read file", ex); } catch (BadLocationException ex) { ASUtils.showExceptionDialog("Could not create document for results", ex); logger.error("Could not create document for results", ex); } catch (Exception ex) { ASUtils.showExceptionDialog("Unxepected Exception!", ex); logger.error("Unxepected Exception!", ex); } finally { this.setEnabled(isStartable()); } }
1,112,765
public void actionPerformed(ActionEvent e) { startCompareAction.setEnabled(false); CompareDMFrame cf = null; try { SQLObject left = source.getObjectToCompare(); if (left.getChildType() == SQLTable.class) { sourceTables = left.getChildren(); } else { sourceTables = new ArrayList(); } SQLObject right = target.getObjectToCompare(); if (right.getChildType() == SQLTable.class) { targetTables = right.getChildren(); } else { targetTables = new ArrayList(); } // XXX: should do most or all of this work in a worker thread Map<DiffType, AttributeSet> styles = new HashMap<DiffType, AttributeSet>(); { SimpleAttributeSet att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.green); styles.put(DiffType.LEFTONLY, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.red); styles.put(DiffType.RIGHTONLY, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.black); styles.put(DiffType.SAME, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.orange); styles.put(DiffType.MODIFIED, att); } CompareSQL sourceComp = new CompareSQL(sourceTables, targetTables); List<DiffChunk<SQLObject>> diff = sourceComp.generateTableDiffs(); CompareSQL targetComp = new CompareSQL(targetTables, sourceTables); List<DiffChunk<SQLObject>> diff1 = targetComp.generateTableDiffs(); DefaultStyledDocument sourceDoc = new DefaultStyledDocument(); DefaultStyledDocument targetDoc = new DefaultStyledDocument(); if (sqlButton.isSelected()) { throw new UnsupportedOperationException( "We don't support DDL generation yet"); } else if (englishButton.isSelected()) { for (DiffChunk<SQLObject> chunk : diff) { sourceDoc.insertString( sourceDoc.getLength(), chunk.getData().toString()+"\n", styles.get(chunk.getType())); } for (DiffChunk<SQLObject> chunk1 : diff1) { targetDoc.insertString( targetDoc.getLength(), chunk1.getData().toString()+"\n", styles.get(chunk1.getType())); } } else { throw new IllegalStateException( "Don't know what type of output to make"); } // get the title string for the compareDMFrame String compMethod = null; if (sqlButton.isSelected()) { compMethod = "SQL"; } else { compMethod = OUTPUT_ENGLISH; } String titleString = "Comparing " +left.getName() + " to " + right.getName() + " using " + compMethod; cf = new CompareDMFrame( sourceDoc, targetDoc, titleString, source.getDatabase()); cf.pack(); cf.setVisible(true); } catch (ArchitectDiffException ex) { JOptionPane.showMessageDialog( CompareDMPanel.this, "Could not perform the diff:\n"+ex.getMessage(), "Diff Error", JOptionPane.ERROR_MESSAGE); logger.error("Couldn't do diff", ex); } catch (ArchitectException exp) { ASUtils.showExceptionDialog( "StartCompareAction failed", exp); logger.error("StartCompareAction failed", exp); } catch (FileNotFoundException ex) { ASUtils.showExceptionDialog("Your file could not be found.", ex); logger.error("File could not be found.", ex); } catch (IOException ex) { ASUtils.showExceptionDialog("Could not read file", ex); logger.error("Could not read file", ex); } catch (BadLocationException ex) { ASUtils.showExceptionDialog("Could not create document for results", ex); logger.error("Could not create document for results", ex); } catch (Exception ex) { ASUtils.showExceptionDialog("Unxepected Exception!", ex); logger.error("Unxepected Exception!", ex); } finally { this.setEnabled(isStartable()); } }
public void actionPerformed(ActionEvent e) { startCompareAction.setEnabled(false); CompareDMFrame cf = null; try { SQLObject left = source.getObjectToCompare(); if (left.getChildType() == SQLTable.class) { sourceTables = left.getChildren(); } else { sourceTables = new ArrayList(); } SQLObject right = target.getObjectToCompare(); if (right.getChildType() == SQLTable.class) { targetTables = right.getChildren(); } else { targetTables = new ArrayList(); } // XXX: should do most or all of this work in a worker thread Map<DiffType, AttributeSet> styles = new HashMap<DiffType, AttributeSet>(); { SimpleAttributeSet att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.green); styles.put(DiffType.LEFTONLY, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.red); styles.put(DiffType.RIGHTONLY, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.black); styles.put(DiffType.SAME, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.orange); styles.put(DiffType.MODIFIED, att); } CompareSQL sourceComp = new CompareSQL(sourceTables, targetTables); List<DiffChunk<SQLObject>> diff = sourceComp.generateTableDiffs(); CompareSQL targetComp = new CompareSQL(targetTables, sourceTables); List<DiffChunk<SQLObject>> diff1 = targetComp.generateTableDiffs(); DefaultStyledDocument sourceDoc = new DefaultStyledDocument(); DefaultStyledDocument targetDoc = new DefaultStyledDocument(); if (sqlButton.isSelected()) { throw new UnsupportedOperationException( "We don't support DDL generation yet"); } else if (englishButton.isSelected()) { for (DiffChunk<SQLObject> chunk : diff) { sourceDoc.insertString( sourceDoc.getLength(), chunk.getData().toString()+"\n", styles.get(chunk.getType())); } for (DiffChunk<SQLObject> chunk1 : diff1) { targetDoc.insertString( targetDoc.getLength(), chunk1.getData().toString()+"\n", styles.get(chunk1.getType())); } } else { throw new IllegalStateException( "Don't know what type of output to make"); } // get the title string for the compareDMFrame String compMethod = null; if (sqlButton.isSelected()) { compMethod = "SQL"; } else { compMethod = OUTPUT_ENGLISH; } String titleString = "Comparing " +left.getName() + " to " + right.getName() + " using " + compMethod; cf = new CompareDMFrame( sourceDoc, targetDoc, titleString, source.getDatabase()); cf.pack(); cf.setVisible(true); } catch (ArchitectDiffException ex) { JOptionPane.showMessageDialog( CompareDMPanel.this, "Could not perform the diff:\n"+ex.getMessage(), "Diff Error", JOptionPane.ERROR_MESSAGE); logger.error("Couldn't do diff", ex); } catch (ArchitectException exp) { ASUtils.showExceptionDialog( "StartCompareAction failed", exp); logger.error("StartCompareAction failed", exp); } catch (FileNotFoundException ex) { ASUtils.showExceptionDialog("Your file could not be found.", ex); logger.error("File could not be found.", ex); } catch (IOException ex) { ASUtils.showExceptionDialog("Could not read file", ex); logger.error("Could not read file", ex); } catch (BadLocationException ex) { ASUtils.showExceptionDialog("Could not create document for results", ex); logger.error("Could not create document for results", ex); } catch (Exception ex) { ASUtils.showExceptionDialog("Unxepected Exception!", ex); logger.error("Unxepected Exception!", ex); } finally { this.setEnabled(isStartable()); } }
1,112,766
public void doTag(XMLOutput output) throws Exception { if (log.isDebugEnabled()) { log.debug("running with items: " + items); } if (items != null) { Iterator iter = items.evaluateAsIterator(context); if (log.isDebugEnabled()) { log.debug("Iterating through: " + iter); } // ignore the first items of the iterator for (index = 0; index < begin && iter.hasNext(); index++ ) { iter.next(); } while (iter.hasNext() && index < end) { Object value = iter.next(); if (var != null) { context.setVariable(var, value); } if (indexVar != null) { context.setVariable(indexVar, new Integer(index)); } getBody().run(context, output); // now we need to move to next index index++; for ( int i = 1; i < step; i++, index++ ) { if ( ! iter.hasNext() ) { return; } iter.next(); } } } else { if ( end == Integer.MAX_VALUE && begin == 0 ) { throw new MissingAttributeException( "items" ); } } }
public void doTag(XMLOutput output) throws Exception { if (log.isDebugEnabled()) { log.debug("running with items: " + items); } if (items != null) { Iterator iter = items.evaluateAsIterator(context); if (log.isDebugEnabled()) { log.debug("Iterating through: " + iter); } // ignore the first items of the iterator for (index = 0; index < begin && iter.hasNext(); index++ ) { iter.next(); } while (iter.hasNext() && index < end) { Object value = iter.next(); if (var != null) { context.setVariable(var, value); } if (indexVar != null) { context.setVariable(indexVar, new Integer(index)); } invokeBody(output); // now we need to move to next index index++; for ( int i = 1; i < step; i++, index++ ) { if ( ! iter.hasNext() ) { return; } iter.next(); } } } else { if ( end == Integer.MAX_VALUE && begin == 0 ) { throw new MissingAttributeException( "items" ); } } }
1,112,768
Vector doSFS(){ double cutHighCI = 0.98; double cutLowCI = 0.70; double recHighCI = 0.90; int numStrong = 0; int numRec = 0; int numInGroup = 0; Vector blocks = new Vector(); Vector strongPairs = new Vector(); //first make a list of marker pairs in "strong LD", sorted by distance apart for (int x = 0; x < dPrime.length-1; x++){ for (int y = x+1; y < dPrime.length; y++){ PairwiseLinkage thisPair = dPrime[x][y]; //get the right bits double lod = thisPair.getLOD(); double lowCI = thisPair.getConfidenceLow(); double highCI = thisPair.getConfidenceHigh(); if (lod < -90) continue; //missing data if (highCI < cutHighCI || lowCI < cutLowCI) continue; //must pass "strong LD" test Vector addMe = new Vector(); //a vector of x, y, separation int sep = y - x - 1; //compute separation of two markers addMe.add(String.valueOf(x)); addMe.add(String.valueOf(y)); addMe.add(String.valueOf(sep)); if (strongPairs.size() == 0){ //put first pair first strongPairs.add(addMe); }else{ //sort by descending separation of markers in each pair for (int v = 0; v < strongPairs.size(); v ++){ if (sep >= Integer.parseInt((String)((Vector)strongPairs.elementAt(v)).elementAt(2))){ strongPairs.insertElementAt(addMe, v); break; } } } } } //now take this list of pairs with "strong LD" and construct blocks boolean[] usedInBlock = new boolean[dPrime.length + 1]; for (int v = 0; v < strongPairs.size(); v++){ int first = Integer.parseInt((String)((Vector)strongPairs.elementAt(v)).elementAt(0)); int last = Integer.parseInt((String)((Vector)strongPairs.elementAt(v)).elementAt(1)); //first see if this block overlaps with another: if (usedInBlock[first] || usedInBlock[last]) continue; //test this block. requires 95% of informative markers to be "strong" for (int y = first+1; y <= last; y++){ //loop over columns in row y for (int x = first; x < y; x++){ PairwiseLinkage thisPair = dPrime[x][y]; //get the right bits double lod = thisPair.getLOD(); double lowCI = thisPair.getConfidenceLow(); double highCI = thisPair.getConfidenceHigh(); if (lod < -90) continue; //monomorphic marker error if (lod == 0 && lowCI == 0 && highCI == 0) continue; //skip bad markers if (lowCI > cutLowCI && highCI > cutHighCI) { //System.out.println(first + "\t" + last + "\t" + x + "\t" + y); numStrong++; //strong LD } if (highCI < recHighCI) numRec++; //recombination numInGroup ++; } } //change the definition somewhat for small blocks if (numInGroup > 3){ if (numStrong + numRec < 6) continue; }else if (numInGroup > 2){ if (numStrong + numRec < 3) continue; }else{ if (numStrong + numRec < 1) continue; } if (numStrong/(numStrong + numRec) > 0.95){ //this qualifies as a block //add to the block list, but in order by first marker number: if (blocks.size() == 0){ //put first block first blocks.add(first + " " + last); }else{ //sort by ascending separation of markers in each pair boolean placed = false; for (int b = 0; b < blocks.size(); b ++){ StringTokenizer st = new StringTokenizer((String)blocks.elementAt(b)); if (first < Integer.parseInt(st.nextToken())){ blocks.insertElementAt(first + " " + last, b); placed = true; break; } } //make sure to put in blocks which fall on the tail end if (!placed) blocks.add(first + " " + last); } for (int used = first; used <= last; used++){ usedInBlock[used] = true; } } numStrong = 0; numRec = 0; numInGroup = 0; } return stringVec2intVec(blocks); }
Vector doSFS(){ double cutHighCI = 0.98; double cutLowCI = 0.70; double recHighCI = 0.90; int numStrong = 0; int numRec = 0; int numInGroup = 0; Vector blocks = new Vector(); Vector strongPairs = new Vector(); //first make a list of marker pairs in "strong LD", sorted by distance apart for (int x = 0; x < dPrime.length-1; x++){ for (int y = x+1; y < dPrime.length; y++){ PairwiseLinkage thisPair = dPrime[x][y]; //get the right bits double lod = thisPair.getLOD(); double lowCI = thisPair.getConfidenceLow(); double highCI = thisPair.getConfidenceHigh(); if (lod < -90) continue; //missing data if (highCI < cutHighCI || lowCI < cutLowCI) continue; //must pass "strong LD" test Vector addMe = new Vector(); //a vector of x, y, separation int sep = y - x - 1; //compute separation of two markers addMe.add(String.valueOf(x)); addMe.add(String.valueOf(y)); addMe.add(String.valueOf(sep)); if (strongPairs.size() == 0){ //put first pair first strongPairs.add(addMe); }else{ //sort by descending separation of markers in each pair for (int v = 0; v < strongPairs.size(); v ++){ if (sep >= Integer.parseInt((String)((Vector)strongPairs.elementAt(v)).elementAt(2))){ strongPairs.insertElementAt(addMe, v); break; } } } } } //now take this list of pairs with "strong LD" and construct blocks boolean[] usedInBlock = new boolean[dPrime.length + 1]; for (int v = 0; v < strongPairs.size(); v++){ int first = Integer.parseInt((String)((Vector)strongPairs.elementAt(v)).elementAt(0)); int last = Integer.parseInt((String)((Vector)strongPairs.elementAt(v)).elementAt(1)); //first see if this block overlaps with another: if (usedInBlock[first] || usedInBlock[last]) continue; //test this block. requires 95% of informative markers to be "strong" for (int y = first+1; y <= last; y++){ //loop over columns in row y for (int x = first; x < y; x++){ PairwiseLinkage thisPair = dPrime[x][y]; //get the right bits double lod = thisPair.getLOD(); double lowCI = thisPair.getConfidenceLow(); double highCI = thisPair.getConfidenceHigh(); if (lod < -90) continue; //monomorphic marker error if (lod == 0 && lowCI == 0 && highCI == 0) continue; //skip bad markers if (lowCI > cutLowCI && highCI > cutHighCI) { //System.out.println(first + "\t" + last + "\t" + x + "\t" + y); numStrong++; //strong LD } if (highCI < recHighCI) numRec++; //recombination numInGroup ++; } } //change the definition somewhat for small blocks if (numInGroup > 3){ if (numStrong + numRec < 6) continue; }else if (numInGroup > 2){ if (numStrong + numRec < 3) continue; }else{ if (numStrong + numRec < 1) continue; } if (numStrong/(numStrong + numRec) > 0.95){ //this qualifies as a block //add to the block list, but in order by first marker number: if (blocks.size() == 0){ //put first block first blocks.add(first + " " + last); }else{ //sort by ascending separation of markers in each pair boolean placed = false; for (int b = 0; b < blocks.size(); b ++){ StringTokenizer st = new StringTokenizer((String)blocks.elementAt(b)); if (first < Integer.parseInt(st.nextToken())){ blocks.insertElementAt(first + " " + last, b); placed = true; break; } } //make sure to put in blocks which fall on the tail end if (!placed) blocks.add(first + " " + last); } for (int used = first; used <= last; used++){ usedInBlock[used] = true; } } } return stringVec2intVec(blocks); }
1,112,771
public void testCreateDB() { File confFile = null; File dbDir = null; // Create an empty configuration file & volume directory try { confFile = File.createTempFile( "photovault_settings_", ".xml" ); confFile.delete(); dbDir = File.createTempFile( "photovault_test_volume", "" ); dbDir.delete(); dbDir.mkdir(); } catch (IOException ex) { ex.printStackTrace(); fail( ex.getMessage() ); } System.setProperty( "photovault.configfile", confFile.getAbsolutePath() ); PhotovaultSettings settings = PhotovaultSettings.getSettings(); PVDatabase db = new PVDatabase(); db.setInstanceType( PVDatabase.TYPE_EMBEDDED ); db.setEmbeddedDirectory( dbDir );// Volume vol = new Volume( "testvolume", dbDir.getAbsolutePath() );// db.addVolume( vol ); settings.addDatabase( db ); settings.saveConfig(); db.createDatabase( "harri", "" ); // Verify that the database can be used by importing a file ODMG.initODMG( "harri", "", db ); File photoFile = new File( "testfiles/test1.jpg" ); PhotoInfo photo = null; try { photo = PhotoInfo.addToDB(photoFile); } catch (PhotoNotFoundException ex) { ex.printStackTrace(); fail( ex.getMessage() ); } photo.setPhotographer( "test" ); try { PhotoInfo photo2 = PhotoInfo.retrievePhotoInfo( photo.getUid() ); Thumbnail thumb = photo2.getThumbnail(); this.assertFalse( "Default thumbnail returned", thumb == Thumbnail.getDefaultThumbnail() ); } catch (PhotoNotFoundException ex) { fail( "Photo not found in database" ); } }
public void testCreateDB() { File confFile = null; File dbDir = null; // Create an empty configuration file & volume directory try { confFile = File.createTempFile( "photovault_settings_", ".xml" ); confFile.delete(); dbDir = File.createTempFile( "photovault_test_volume", "" ); dbDir.delete(); dbDir.mkdir(); } catch (IOException ex) { ex.printStackTrace(); fail( ex.getMessage() ); } System.setProperty( "photovault.configfile", confFile.getAbsolutePath() ); PhotovaultSettings settings = PhotovaultSettings.getSettings(); PVDatabase db = new PVDatabase(); db.setInstanceType( PVDatabase.TYPE_EMBEDDED ); db.setEmbeddedDirectory( dbDir );// Volume vol = new Volume( "testvolume", dbDir.getAbsolutePath() );// db.addVolume( vol ); settings.addDatabase( db ); settings.saveConfig(); db.createDatabase( "harri", "" ); // Verify that the database can be used by importing a file try { ODMG.initODMG( "harri", "", db ); } catch (PhotovaultException ex) { fail( ex.getMessage() ); } File photoFile = new File( "testfiles/test1.jpg" ); PhotoInfo photo = null; try { photo = PhotoInfo.addToDB(photoFile); } catch (PhotoNotFoundException ex) { ex.printStackTrace(); fail( ex.getMessage() ); } photo.setPhotographer( "test" ); try { PhotoInfo photo2 = PhotoInfo.retrievePhotoInfo( photo.getUid() ); Thumbnail thumb = photo2.getThumbnail(); this.assertFalse( "Default thumbnail returned", thumb == Thumbnail.getDefaultThumbnail() ); } catch (PhotoNotFoundException ex) { fail( "Photo not found in database" ); } }
1,112,772
private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); versionLabel = new javax.swing.JLabel(); svnrevLabel = new javax.swing.JLabel(); svnbranchLabel = new javax.swing.JLabel(); buildTimeLabel = new javax.swing.JLabel(); builderLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); copyrightTextPane = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Photovault"); setResizable(false); addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); copyrightPane.setOpaque(true); copyrightPane.addAncestorListener(new javax.swing.event.AncestorListener() { public void ancestorMoved(javax.swing.event.AncestorEvent evt) { } public void ancestorAdded(javax.swing.event.AncestorEvent evt) { copyrightPaneAncestorAdded(evt); } public void ancestorRemoved(javax.swing.event.AncestorEvent evt) { } }); splashLabel.setText("jLabel1"); splashLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Photovault", jPanel1); jLabel1.setText("Version:"); jLabel2.setText("SVN revision:"); jLabel3.setText("SVN branch:"); jLabel4.setText("Build time:"); jLabel5.setText("Built by:"); versionLabel.setText("jLabel6"); svnrevLabel.setText("jLabel6"); svnbranchLabel.setText("jLabel6"); buildTimeLabel.setText("jLabel6"); builderLabel.setText("jLabel6"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(37, 37, 37) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel5) .add(jLabel4) .add(jLabel3) .add(jLabel2) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(svnrevLabel) .add(svnbranchLabel) .add(buildTimeLabel) .add(builderLabel)) .addContainerGap(260, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(versionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(svnrevLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(svnbranchLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(buildTimeLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(builderLabel)) .addContainerGap(162, Short.MAX_VALUE)) ); copyrightPane.addTab("Version info", jPanel2); copyrightTextPane.setEditable(false); jScrollPane1.setViewportView(copyrightTextPane); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Copyright", jPanel3); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); splashPane = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); versionLabel = new javax.swing.JLabel(); svnrevLabel = new javax.swing.JLabel(); svnbranchLabel = new javax.swing.JLabel(); buildTimeLabel = new javax.swing.JLabel(); builderLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); copyrightTextPane = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Photovault"); setResizable(false); addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); copyrightPane.setOpaque(true); copyrightPane.addAncestorListener(new javax.swing.event.AncestorListener() { public void ancestorMoved(javax.swing.event.AncestorEvent evt) { } public void ancestorAdded(javax.swing.event.AncestorEvent evt) { copyrightPaneAncestorAdded(evt); } public void ancestorRemoved(javax.swing.event.AncestorEvent evt) { } }); splashLabel.setText("jLabel1"); splashLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Photovault", jPanel1); jLabel1.setText("Version:"); jLabel2.setText("SVN revision:"); jLabel3.setText("SVN branch:"); jLabel4.setText("Build time:"); jLabel5.setText("Built by:"); versionLabel.setText("jLabel6"); svnrevLabel.setText("jLabel6"); svnbranchLabel.setText("jLabel6"); buildTimeLabel.setText("jLabel6"); builderLabel.setText("jLabel6"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(37, 37, 37) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel5) .add(jLabel4) .add(jLabel3) .add(jLabel2) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(svnrevLabel) .add(svnbranchLabel) .add(buildTimeLabel) .add(builderLabel)) .addContainerGap(260, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(versionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(svnrevLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(svnbranchLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(buildTimeLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(builderLabel)) .addContainerGap(162, Short.MAX_VALUE)) ); copyrightPane.addTab("Version info", jPanel2); copyrightTextPane.setEditable(false); jScrollPane1.setViewportView(copyrightTextPane); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Copyright", jPanel3); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents
1,112,773
private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); versionLabel = new javax.swing.JLabel(); svnrevLabel = new javax.swing.JLabel(); svnbranchLabel = new javax.swing.JLabel(); buildTimeLabel = new javax.swing.JLabel(); builderLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); copyrightTextPane = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Photovault"); setResizable(false); addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); copyrightPane.setOpaque(true); copyrightPane.addAncestorListener(new javax.swing.event.AncestorListener() { public void ancestorMoved(javax.swing.event.AncestorEvent evt) { } public void ancestorAdded(javax.swing.event.AncestorEvent evt) { copyrightPaneAncestorAdded(evt); } public void ancestorRemoved(javax.swing.event.AncestorEvent evt) { } }); splashLabel.setText("jLabel1"); splashLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Photovault", jPanel1); jLabel1.setText("Version:"); jLabel2.setText("SVN revision:"); jLabel3.setText("SVN branch:"); jLabel4.setText("Build time:"); jLabel5.setText("Built by:"); versionLabel.setText("jLabel6"); svnrevLabel.setText("jLabel6"); svnbranchLabel.setText("jLabel6"); buildTimeLabel.setText("jLabel6"); builderLabel.setText("jLabel6"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(37, 37, 37) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel5) .add(jLabel4) .add(jLabel3) .add(jLabel2) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(svnrevLabel) .add(svnbranchLabel) .add(buildTimeLabel) .add(builderLabel)) .addContainerGap(260, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(versionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(svnrevLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(svnbranchLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(buildTimeLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(builderLabel)) .addContainerGap(162, Short.MAX_VALUE)) ); copyrightPane.addTab("Version info", jPanel2); copyrightTextPane.setEditable(false); jScrollPane1.setViewportView(copyrightTextPane); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Copyright", jPanel3); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); versionLabel = new javax.swing.JLabel(); svnrevLabel = new javax.swing.JLabel(); svnbranchLabel = new javax.swing.JLabel(); buildTimeLabel = new javax.swing.JLabel(); builderLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); copyrightTextPane = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Photovault"); setResizable(false); addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); copyrightPane.setOpaque(true); copyrightPane.addAncestorListener(new javax.swing.event.AncestorListener() { public void ancestorMoved(javax.swing.event.AncestorEvent evt) { } public void ancestorAdded(javax.swing.event.AncestorEvent evt) { copyrightPaneAncestorAdded(evt); } public void ancestorRemoved(javax.swing.event.AncestorEvent evt) { } }); splashLabel.setText("jLabel1"); splashLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Photovault", jPanel1); jLabel1.setText("Version:"); jLabel2.setText("SVN revision:"); jLabel3.setText("SVN branch:"); jLabel4.setText("Build time:"); jLabel5.setText("Built by:"); versionLabel.setText("jLabel6"); svnrevLabel.setText("jLabel6"); svnbranchLabel.setText("jLabel6"); buildTimeLabel.setText("jLabel6"); builderLabel.setText("jLabel6"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(37, 37, 37) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel5) .add(jLabel4) .add(jLabel3) .add(jLabel2) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(svnrevLabel) .add(svnbranchLabel) .add(buildTimeLabel) .add(builderLabel)) .addContainerGap(260, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(versionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(svnrevLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(svnbranchLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(buildTimeLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(builderLabel)) .addContainerGap(162, Short.MAX_VALUE)) ); copyrightPane.addTab("Version info", jPanel2); copyrightTextPane.setEditable(false); jScrollPane1.setViewportView(copyrightTextPane); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Copyright", jPanel3); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents
1,112,774
private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); versionLabel = new javax.swing.JLabel(); svnrevLabel = new javax.swing.JLabel(); svnbranchLabel = new javax.swing.JLabel(); buildTimeLabel = new javax.swing.JLabel(); builderLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); copyrightTextPane = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Photovault"); setResizable(false); addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); copyrightPane.setOpaque(true); copyrightPane.addAncestorListener(new javax.swing.event.AncestorListener() { public void ancestorMoved(javax.swing.event.AncestorEvent evt) { } public void ancestorAdded(javax.swing.event.AncestorEvent evt) { copyrightPaneAncestorAdded(evt); } public void ancestorRemoved(javax.swing.event.AncestorEvent evt) { } }); splashLabel.setText("jLabel1"); splashLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Photovault", jPanel1); jLabel1.setText("Version:"); jLabel2.setText("SVN revision:"); jLabel3.setText("SVN branch:"); jLabel4.setText("Build time:"); jLabel5.setText("Built by:"); versionLabel.setText("jLabel6"); svnrevLabel.setText("jLabel6"); svnbranchLabel.setText("jLabel6"); buildTimeLabel.setText("jLabel6"); builderLabel.setText("jLabel6"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(37, 37, 37) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel5) .add(jLabel4) .add(jLabel3) .add(jLabel2) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(svnrevLabel) .add(svnbranchLabel) .add(buildTimeLabel) .add(builderLabel)) .addContainerGap(260, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(versionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(svnrevLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(svnbranchLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(buildTimeLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(builderLabel)) .addContainerGap(162, Short.MAX_VALUE)) ); copyrightPane.addTab("Version info", jPanel2); copyrightTextPane.setEditable(false); jScrollPane1.setViewportView(copyrightTextPane); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Copyright", jPanel3); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); versionLabel = new javax.swing.JLabel(); svnrevLabel = new javax.swing.JLabel(); svnbranchLabel = new javax.swing.JLabel(); buildTimeLabel = new javax.swing.JLabel(); builderLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); copyrightTextPane = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Photovault"); setResizable(false); addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); copyrightPane.setOpaque(true); copyrightPane.addAncestorListener(new javax.swing.event.AncestorListener() { public void ancestorMoved(javax.swing.event.AncestorEvent evt) { } public void ancestorAdded(javax.swing.event.AncestorEvent evt) { copyrightPaneAncestorAdded(evt); } public void ancestorRemoved(javax.swing.event.AncestorEvent evt) { } }); splashLabel.setText("jLabel1"); splashLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Photovault", jPanel1); jLabel1.setText("Version:"); jLabel2.setText("SVN revision:"); jLabel3.setText("SVN branch:"); jLabel4.setText("Build time:"); jLabel5.setText("Built by:"); versionLabel.setText("jLabel6"); svnrevLabel.setText("jLabel6"); svnbranchLabel.setText("jLabel6"); buildTimeLabel.setText("jLabel6"); builderLabel.setText("jLabel6"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(37, 37, 37) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel5) .add(jLabel4) .add(jLabel3) .add(jLabel2) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(svnrevLabel) .add(svnbranchLabel) .add(buildTimeLabel) .add(builderLabel)) .addContainerGap(260, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(versionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(svnrevLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(svnbranchLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(buildTimeLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(builderLabel)) .addContainerGap(162, Short.MAX_VALUE)) ); copyrightPane.addTab("Version info", jPanel2); copyrightTextPane.setEditable(false); jScrollPane1.setViewportView(copyrightTextPane); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Copyright", jPanel3); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents
1,112,775
private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); versionLabel = new javax.swing.JLabel(); svnrevLabel = new javax.swing.JLabel(); svnbranchLabel = new javax.swing.JLabel(); buildTimeLabel = new javax.swing.JLabel(); builderLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); copyrightTextPane = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Photovault"); setResizable(false); addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); copyrightPane.setOpaque(true); copyrightPane.addAncestorListener(new javax.swing.event.AncestorListener() { public void ancestorMoved(javax.swing.event.AncestorEvent evt) { } public void ancestorAdded(javax.swing.event.AncestorEvent evt) { copyrightPaneAncestorAdded(evt); } public void ancestorRemoved(javax.swing.event.AncestorEvent evt) { } }); splashLabel.setText("jLabel1"); splashLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Photovault", jPanel1); jLabel1.setText("Version:"); jLabel2.setText("SVN revision:"); jLabel3.setText("SVN branch:"); jLabel4.setText("Build time:"); jLabel5.setText("Built by:"); versionLabel.setText("jLabel6"); svnrevLabel.setText("jLabel6"); svnbranchLabel.setText("jLabel6"); buildTimeLabel.setText("jLabel6"); builderLabel.setText("jLabel6"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(37, 37, 37) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel5) .add(jLabel4) .add(jLabel3) .add(jLabel2) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(svnrevLabel) .add(svnbranchLabel) .add(buildTimeLabel) .add(builderLabel)) .addContainerGap(260, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(versionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(svnrevLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(svnbranchLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(buildTimeLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(builderLabel)) .addContainerGap(162, Short.MAX_VALUE)) ); copyrightPane.addTab("Version info", jPanel2); copyrightTextPane.setEditable(false); jScrollPane1.setViewportView(copyrightTextPane); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Copyright", jPanel3); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); versionLabel = new javax.swing.JLabel(); svnrevLabel = new javax.swing.JLabel(); svnbranchLabel = new javax.swing.JLabel(); buildTimeLabel = new javax.swing.JLabel(); builderLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); copyrightTextPane = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Photovault"); setResizable(false); addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); copyrightPane.setOpaque(true); copyrightPane.addAncestorListener(new javax.swing.event.AncestorListener() { public void ancestorMoved(javax.swing.event.AncestorEvent evt) { } public void ancestorAdded(javax.swing.event.AncestorEvent evt) { copyrightPaneAncestorAdded(evt); } public void ancestorRemoved(javax.swing.event.AncestorEvent evt) { } }); splashLabel.setText("jLabel1"); splashLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Photovault", splashPane); jLabel1.setText("Version:"); jLabel2.setText("SVN revision:"); jLabel3.setText("SVN branch:"); jLabel4.setText("Build time:"); jLabel5.setText("Built by:"); versionLabel.setText("jLabel6"); svnrevLabel.setText("jLabel6"); svnbranchLabel.setText("jLabel6"); buildTimeLabel.setText("jLabel6"); builderLabel.setText("jLabel6"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(37, 37, 37) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel5) .add(jLabel4) .add(jLabel3) .add(jLabel2) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(svnrevLabel) .add(svnbranchLabel) .add(buildTimeLabel) .add(builderLabel)) .addContainerGap(260, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(versionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(svnrevLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(svnbranchLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(buildTimeLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(builderLabel)) .addContainerGap(162, Short.MAX_VALUE)) ); copyrightPane.addTab("Version info", jPanel2); copyrightTextPane.setEditable(false); jScrollPane1.setViewportView(copyrightTextPane); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Copyright", jPanel3); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents
1,112,776
private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); versionLabel = new javax.swing.JLabel(); svnrevLabel = new javax.swing.JLabel(); svnbranchLabel = new javax.swing.JLabel(); buildTimeLabel = new javax.swing.JLabel(); builderLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); copyrightTextPane = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Photovault"); setResizable(false); addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); copyrightPane.setOpaque(true); copyrightPane.addAncestorListener(new javax.swing.event.AncestorListener() { public void ancestorMoved(javax.swing.event.AncestorEvent evt) { } public void ancestorAdded(javax.swing.event.AncestorEvent evt) { copyrightPaneAncestorAdded(evt); } public void ancestorRemoved(javax.swing.event.AncestorEvent evt) { } }); splashLabel.setText("jLabel1"); splashLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Photovault", jPanel1); jLabel1.setText("Version:"); jLabel2.setText("SVN revision:"); jLabel3.setText("SVN branch:"); jLabel4.setText("Build time:"); jLabel5.setText("Built by:"); versionLabel.setText("jLabel6"); svnrevLabel.setText("jLabel6"); svnbranchLabel.setText("jLabel6"); buildTimeLabel.setText("jLabel6"); builderLabel.setText("jLabel6"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(37, 37, 37) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel5) .add(jLabel4) .add(jLabel3) .add(jLabel2) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(svnrevLabel) .add(svnbranchLabel) .add(buildTimeLabel) .add(builderLabel)) .addContainerGap(260, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(versionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(svnrevLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(svnbranchLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(buildTimeLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(builderLabel)) .addContainerGap(162, Short.MAX_VALUE)) ); copyrightPane.addTab("Version info", jPanel2); copyrightTextPane.setEditable(false); jScrollPane1.setViewportView(copyrightTextPane); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Copyright", jPanel3); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); versionLabel = new javax.swing.JLabel(); svnrevLabel = new javax.swing.JLabel(); svnbranchLabel = new javax.swing.JLabel(); buildTimeLabel = new javax.swing.JLabel(); builderLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); copyrightTextPane = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Photovault"); setResizable(false); addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); copyrightPane.setOpaque(true); copyrightPane.addAncestorListener(new javax.swing.event.AncestorListener() { public void ancestorMoved(javax.swing.event.AncestorEvent evt) { } public void ancestorAdded(javax.swing.event.AncestorEvent evt) { copyrightPaneAncestorAdded(evt); } public void ancestorRemoved(javax.swing.event.AncestorEvent evt) { } }); splashLabel.setText("jLabel1"); splashLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Photovault", jPanel1); jLabel1.setText("Version:"); jLabel2.setText("SVN revision:"); jLabel3.setText("SVN branch:"); jLabel4.setText("Build time:"); jLabel5.setText("Built by:"); versionLabel.setText("jLabel6"); svnrevLabel.setText("jLabel6"); svnbranchLabel.setText("jLabel6"); buildTimeLabel.setText("jLabel6"); builderLabel.setText("jLabel6"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(37, 37, 37) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel5) .add(jLabel4) .add(jLabel3) .add(jLabel2) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(svnrevLabel) .add(svnbranchLabel) .add(buildTimeLabel) .add(builderLabel)) .addContainerGap(231, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(versionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(svnrevLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(svnbranchLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(buildTimeLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(builderLabel)) .addContainerGap(162, Short.MAX_VALUE)) ); copyrightPane.addTab("Version info", jPanel2); copyrightTextPane.setEditable(false); jScrollPane1.setViewportView(copyrightTextPane); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Copyright", jPanel3); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents
1,112,777
private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); versionLabel = new javax.swing.JLabel(); svnrevLabel = new javax.swing.JLabel(); svnbranchLabel = new javax.swing.JLabel(); buildTimeLabel = new javax.swing.JLabel(); builderLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); copyrightTextPane = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Photovault"); setResizable(false); addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); copyrightPane.setOpaque(true); copyrightPane.addAncestorListener(new javax.swing.event.AncestorListener() { public void ancestorMoved(javax.swing.event.AncestorEvent evt) { } public void ancestorAdded(javax.swing.event.AncestorEvent evt) { copyrightPaneAncestorAdded(evt); } public void ancestorRemoved(javax.swing.event.AncestorEvent evt) { } }); splashLabel.setText("jLabel1"); splashLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Photovault", jPanel1); jLabel1.setText("Version:"); jLabel2.setText("SVN revision:"); jLabel3.setText("SVN branch:"); jLabel4.setText("Build time:"); jLabel5.setText("Built by:"); versionLabel.setText("jLabel6"); svnrevLabel.setText("jLabel6"); svnbranchLabel.setText("jLabel6"); buildTimeLabel.setText("jLabel6"); builderLabel.setText("jLabel6"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(37, 37, 37) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel5) .add(jLabel4) .add(jLabel3) .add(jLabel2) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(svnrevLabel) .add(svnbranchLabel) .add(buildTimeLabel) .add(builderLabel)) .addContainerGap(260, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(versionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(svnrevLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(svnbranchLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(buildTimeLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(builderLabel)) .addContainerGap(162, Short.MAX_VALUE)) ); copyrightPane.addTab("Version info", jPanel2); copyrightTextPane.setEditable(false); jScrollPane1.setViewportView(copyrightTextPane); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Copyright", jPanel3); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); versionLabel = new javax.swing.JLabel(); svnrevLabel = new javax.swing.JLabel(); svnbranchLabel = new javax.swing.JLabel(); buildTimeLabel = new javax.swing.JLabel(); builderLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); copyrightTextPane = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Photovault"); setResizable(false); addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); copyrightPane.setOpaque(true); copyrightPane.addAncestorListener(new javax.swing.event.AncestorListener() { public void ancestorMoved(javax.swing.event.AncestorEvent evt) { } public void ancestorAdded(javax.swing.event.AncestorEvent evt) { copyrightPaneAncestorAdded(evt); } public void ancestorRemoved(javax.swing.event.AncestorEvent evt) { } }); splashLabel.setText("jLabel1"); splashLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Photovault", jPanel1); jLabel1.setText("Version:"); jLabel2.setText("SVN revision:"); jLabel3.setText("SVN branch:"); jLabel4.setText("Build time:"); jLabel5.setText("Built by:"); versionLabel.setText("jLabel6"); svnrevLabel.setText("jLabel6"); svnbranchLabel.setText("jLabel6"); buildTimeLabel.setText("jLabel6"); builderLabel.setText("jLabel6"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(37, 37, 37) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel5) .add(jLabel4) .add(jLabel3) .add(jLabel2) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(svnrevLabel) .add(svnbranchLabel) .add(buildTimeLabel) .add(builderLabel)) .addContainerGap(260, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(versionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(svnrevLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(svnbranchLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(buildTimeLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(builderLabel)) .addContainerGap(157, Short.MAX_VALUE)) ); copyrightPane.addTab("Version info", jPanel2); copyrightTextPane.setEditable(false); jScrollPane1.setViewportView(copyrightTextPane); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Copyright", jPanel3); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents
1,112,778
private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); versionLabel = new javax.swing.JLabel(); svnrevLabel = new javax.swing.JLabel(); svnbranchLabel = new javax.swing.JLabel(); buildTimeLabel = new javax.swing.JLabel(); builderLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); copyrightTextPane = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Photovault"); setResizable(false); addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); copyrightPane.setOpaque(true); copyrightPane.addAncestorListener(new javax.swing.event.AncestorListener() { public void ancestorMoved(javax.swing.event.AncestorEvent evt) { } public void ancestorAdded(javax.swing.event.AncestorEvent evt) { copyrightPaneAncestorAdded(evt); } public void ancestorRemoved(javax.swing.event.AncestorEvent evt) { } }); splashLabel.setText("jLabel1"); splashLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Photovault", jPanel1); jLabel1.setText("Version:"); jLabel2.setText("SVN revision:"); jLabel3.setText("SVN branch:"); jLabel4.setText("Build time:"); jLabel5.setText("Built by:"); versionLabel.setText("jLabel6"); svnrevLabel.setText("jLabel6"); svnbranchLabel.setText("jLabel6"); buildTimeLabel.setText("jLabel6"); builderLabel.setText("jLabel6"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(37, 37, 37) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel5) .add(jLabel4) .add(jLabel3) .add(jLabel2) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(svnrevLabel) .add(svnbranchLabel) .add(buildTimeLabel) .add(builderLabel)) .addContainerGap(260, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(versionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(svnrevLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(svnbranchLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(buildTimeLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(builderLabel)) .addContainerGap(162, Short.MAX_VALUE)) ); copyrightPane.addTab("Version info", jPanel2); copyrightTextPane.setEditable(false); jScrollPane1.setViewportView(copyrightTextPane); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Copyright", jPanel3); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); versionLabel = new javax.swing.JLabel(); svnrevLabel = new javax.swing.JLabel(); svnbranchLabel = new javax.swing.JLabel(); buildTimeLabel = new javax.swing.JLabel(); builderLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); copyrightTextPane = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Photovault"); setResizable(false); addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); copyrightPane.setOpaque(true); copyrightPane.addAncestorListener(new javax.swing.event.AncestorListener() { public void ancestorMoved(javax.swing.event.AncestorEvent evt) { } public void ancestorAdded(javax.swing.event.AncestorEvent evt) { copyrightPaneAncestorAdded(evt); } public void ancestorRemoved(javax.swing.event.AncestorEvent evt) { } }); splashLabel.setText("jLabel1"); splashLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) ); copyrightPane.addTab("Photovault", jPanel1); jLabel1.setText("Version:"); jLabel2.setText("SVN revision:"); jLabel3.setText("SVN branch:"); jLabel4.setText("Build time:"); jLabel5.setText("Built by:"); versionLabel.setText("jLabel6"); svnrevLabel.setText("jLabel6"); svnbranchLabel.setText("jLabel6"); buildTimeLabel.setText("jLabel6"); builderLabel.setText("jLabel6"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(37, 37, 37) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel5) .add(jLabel4) .add(jLabel3) .add(jLabel2) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(svnrevLabel) .add(svnbranchLabel) .add(buildTimeLabel) .add(builderLabel)) .addContainerGap(260, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(versionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(svnrevLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(svnbranchLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(buildTimeLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel5) .add(builderLabel)) .addContainerGap(162, Short.MAX_VALUE)) ); copyrightPane.addTab("Version info", jPanel2); copyrightTextPane.setEditable(false); jScrollPane1.setViewportView(copyrightTextPane); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE) ); copyrightPane.addTab("Copyright", jPanel3); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(copyrightPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents
1,112,779
void setupInfo() { URL buildPropertyURL = AboutDlg.class.getClassLoader().getResource( "buildinfo.properties"); Properties prop = new Properties(); try { InputStream is = buildPropertyURL.openStream(); prop.load( is ); } catch (IOException e ) { // Cannot read the properties for some reason. // Do nothing, use the default values instead. } svnrevLabel.setText( prop.getProperty( "svn.revision", "unknown" ) ); svnbranchLabel.setText( prop.getProperty( "svn.info.url", "unknown" ) ); buildTimeLabel.setText( prop.getProperty( "build.time", "unknown" ) ); builderLabel.setText( prop.getProperty( "build.user", "unknown" ) ); versionLabel.setText( prop.getProperty( "build.version", "unknown" ) ); builderLabel.setText( prop.getProperty( "build.user", "unknown" ) ); // Set up the splash screen image URL splashImageURL = AboutDlg.class.getClassLoader().getResource( "splash.jpg" ); Icon splash = new ImageIcon( splashImageURL ); splashLabel.setIcon( splash ); splashLabel.setText( null ); // Set the copyright text URL copyrightTextURL = AboutDlg.class.getClassLoader().getResource( "copyright.html" ); try { copyrightTextPane.setPage( copyrightTextURL ); } catch ( IOException e ) {} }
void setupInfo() { URL buildPropertyURL = AboutDlg.class.getClassLoader().getResource( "buildinfo.properties"); Properties prop = new Properties(); try { InputStream is = buildPropertyURL.openStream(); prop.load( is ); } catch (IOException e ) { // Cannot read the properties for some reason. // Do nothing, use the default values instead. } svnrevLabel.setText( prop.getProperty( "svn.revision", "unknown" ) ); svnbranchLabel.setText( prop.getProperty( "svn.info.url", "unknown" ) ); buildTimeLabel.setText( prop.getProperty( "build.time", "unknown" ) ); builderLabel.setText( prop.getProperty( "build.user", "unknown" ) ); String version = prop.getProperty( "build.version", "unknown" ); String versionTag = prop.getProperty( "build.version_tag", "unknown" ); versionLabel.setText( version + " (" + versionTag + ")" ); builderLabel.setText( prop.getProperty( "build.user", "unknown" ) ); // Set up the splash screen image URL splashImageURL = AboutDlg.class.getClassLoader().getResource( "splash.jpg" ); Icon splash = new ImageIcon( splashImageURL ); splashLabel.setIcon( splash ); splashLabel.setText( null ); // Set the copyright text URL copyrightTextURL = AboutDlg.class.getClassLoader().getResource( "copyright.html" ); try { copyrightTextPane.setPage( copyrightTextURL ); } catch ( IOException e ) {} }
1,112,780
public void testFireDbChildrenInserted() throws Exception { SQLTable table1 = db.getTableByName("REGRESSION_TEST1"); SQLColumn c1 = table1.getColumn(0); Folder folder = table1.getColumnsFolder(); TestSQLObjectListener test1 = new TestSQLObjectListener(); folder.addSQLObjectListener(test1); TestSQLObjectListener test2 = new TestSQLObjectListener(); folder.addSQLObjectListener(test2); assertEquals(test1.getInsertedCount(), 0); assertEquals(test1.getRemovedCount(), 0); assertEquals(test1.getChangedCount(), 0); assertEquals(test1.getStructureChangedCount(), 0); assertEquals(test2.getInsertedCount(), 0); assertEquals(test2.getRemovedCount(), 0); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); SQLColumn tmpCol = new SQLColumn(); table1.addColumn(tmpCol); table1.changeColumnIndex(table1.getColumnIndex(c1), 2); assertEquals(test1.getInsertedCount(), 2); assertEquals(test1.getRemovedCount(), 1); assertEquals(test1.getChangedCount(), 0); assertEquals(test1.getStructureChangedCount(), 0); assertEquals(test2.getInsertedCount(), 2); assertEquals(test2.getRemovedCount(), 1); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); folder.removeSQLObjectListener(test1); table1.changeColumnIndex(table1.getColumnIndex(c1), 1); assertEquals(test1.getInsertedCount(), 2); assertEquals(test1.getRemovedCount(), 1); assertEquals(test1.getChangedCount(), 0); assertEquals(test1.getStructureChangedCount(), 0); assertEquals(test2.getInsertedCount(), 3); assertEquals(test2.getRemovedCount(), 2); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); table1.removeColumn(tmpCol); assertEquals(test2.getInsertedCount(), 3); assertEquals(test2.getRemovedCount(), 3); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); }
public void testFireDbChildrenInserted() throws Exception { SQLTable table1 = db.getTableByName("REGRESSION_TEST1"); SQLColumn c1 = table1.getColumn(0); Folder folder = table1.getColumnsFolder(); TestSQLObjectListener test1 = new TestSQLObjectListener(); folder.addSQLObjectListener(test1); TestSQLObjectListener test2 = new TestSQLObjectListener(); folder.addSQLObjectListener(test2); assertEquals(test1.getInsertedCount(), 0); assertEquals(test1.getRemovedCount(), 0); assertEquals(test1.getChangedCount(), 0); assertEquals(test1.getStructureChangedCount(), 0); assertEquals(test2.getInsertedCount(), 0); assertEquals(test2.getRemovedCount(), 0); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); SQLColumn tmpCol = new SQLColumn(); table1.addColumn(tmpCol); table1.changeColumnIndex(table1.getColumnIndex(c1), 2, false); assertEquals(test1.getInsertedCount(), 2); assertEquals(test1.getRemovedCount(), 1); assertEquals(test1.getChangedCount(), 0); assertEquals(test1.getStructureChangedCount(), 0); assertEquals(test2.getInsertedCount(), 2); assertEquals(test2.getRemovedCount(), 1); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); folder.removeSQLObjectListener(test1); table1.changeColumnIndex(table1.getColumnIndex(c1), 1); assertEquals(test1.getInsertedCount(), 2); assertEquals(test1.getRemovedCount(), 1); assertEquals(test1.getChangedCount(), 0); assertEquals(test1.getStructureChangedCount(), 0); assertEquals(test2.getInsertedCount(), 3); assertEquals(test2.getRemovedCount(), 2); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); table1.removeColumn(tmpCol); assertEquals(test2.getInsertedCount(), 3); assertEquals(test2.getRemovedCount(), 3); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); }
1,112,781
public void testFireDbChildrenInserted() throws Exception { SQLTable table1 = db.getTableByName("REGRESSION_TEST1"); SQLColumn c1 = table1.getColumn(0); Folder folder = table1.getColumnsFolder(); TestSQLObjectListener test1 = new TestSQLObjectListener(); folder.addSQLObjectListener(test1); TestSQLObjectListener test2 = new TestSQLObjectListener(); folder.addSQLObjectListener(test2); assertEquals(test1.getInsertedCount(), 0); assertEquals(test1.getRemovedCount(), 0); assertEquals(test1.getChangedCount(), 0); assertEquals(test1.getStructureChangedCount(), 0); assertEquals(test2.getInsertedCount(), 0); assertEquals(test2.getRemovedCount(), 0); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); SQLColumn tmpCol = new SQLColumn(); table1.addColumn(tmpCol); table1.changeColumnIndex(table1.getColumnIndex(c1), 2); assertEquals(test1.getInsertedCount(), 2); assertEquals(test1.getRemovedCount(), 1); assertEquals(test1.getChangedCount(), 0); assertEquals(test1.getStructureChangedCount(), 0); assertEquals(test2.getInsertedCount(), 2); assertEquals(test2.getRemovedCount(), 1); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); folder.removeSQLObjectListener(test1); table1.changeColumnIndex(table1.getColumnIndex(c1), 1); assertEquals(test1.getInsertedCount(), 2); assertEquals(test1.getRemovedCount(), 1); assertEquals(test1.getChangedCount(), 0); assertEquals(test1.getStructureChangedCount(), 0); assertEquals(test2.getInsertedCount(), 3); assertEquals(test2.getRemovedCount(), 2); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); table1.removeColumn(tmpCol); assertEquals(test2.getInsertedCount(), 3); assertEquals(test2.getRemovedCount(), 3); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); }
public void testFireDbChildrenInserted() throws Exception { SQLTable table1 = db.getTableByName("REGRESSION_TEST1"); SQLColumn c1 = table1.getColumn(0); Folder folder = table1.getColumnsFolder(); TestSQLObjectListener test1 = new TestSQLObjectListener(); folder.addSQLObjectListener(test1); TestSQLObjectListener test2 = new TestSQLObjectListener(); folder.addSQLObjectListener(test2); assertEquals(test1.getInsertedCount(), 0); assertEquals(test1.getRemovedCount(), 0); assertEquals(test1.getChangedCount(), 0); assertEquals(test1.getStructureChangedCount(), 0); assertEquals(test2.getInsertedCount(), 0); assertEquals(test2.getRemovedCount(), 0); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); SQLColumn tmpCol = new SQLColumn(); table1.addColumn(tmpCol); table1.changeColumnIndex(table1.getColumnIndex(c1), 2); assertEquals(test1.getInsertedCount(), 2); assertEquals(test1.getRemovedCount(), 1); assertEquals(test1.getChangedCount(), 0); assertEquals(test1.getStructureChangedCount(), 0); assertEquals(test2.getInsertedCount(), 2); assertEquals(test2.getRemovedCount(), 1); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); folder.removeSQLObjectListener(test1); table1.changeColumnIndex(table1.getColumnIndex(c1), 1, false); assertEquals(test1.getInsertedCount(), 2); assertEquals(test1.getRemovedCount(), 1); assertEquals(test1.getChangedCount(), 0); assertEquals(test1.getStructureChangedCount(), 0); assertEquals(test2.getInsertedCount(), 3); assertEquals(test2.getRemovedCount(), 2); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); table1.removeColumn(tmpCol); assertEquals(test2.getInsertedCount(), 3); assertEquals(test2.getRemovedCount(), 3); assertEquals(test2.getChangedCount(), 0); assertEquals(test2.getStructureChangedCount(), 0); }
1,112,782
protected void cleanup() { try { for (int i = 0; i < model.getChildCount(); i++) { model.getChild(i).removeSQLObjectListener(tableListModel); } } catch (ArchitectException e) { logger.error("Caught exception removing treemodel from column listener list"); } model.removeSQLObjectListener(tableListModel); }
protected void cleanup() { try { for (int i = 0; i < model.getChildCount(); i++) { model.getChild(i).removeSQLObjectListener(tableListModel); } } catch (ArchitectException e) { logger.error("Caught exception removing treemodel from column listener list"); } model.removeSQLObjectListener(tableListModel); }
1,112,783
protected void cleanup() { try { for (int i = 0; i < model.getChildCount(); i++) { model.getChild(i).removeSQLObjectListener(tableListModel); } } catch (ArchitectException e) { logger.error("Caught exception removing treemodel from column listener list"); } model.removeSQLObjectListener(tableListModel); }
protected void cleanup() { try { for (int i = 0; i < model.getChildCount(); i++) { model.getChild(i).removeSQLObjectListener(tableListModel); } } catch (ArchitectException e) { logger.error("Caught exception removing treemodel from column listener list"); } model.getColumnsFolder().removeSQLObjectListener(tableListModel); }
1,112,784
private void addColumnImpl(int pos, SQLColumn col) throws ArchitectException { if (getColumnIndex(col) != -1) { col.addReference(); return; } boolean addToPK = false; int pkSize = getPkSize(); if (getColumns().size() > 0 && pos < pkSize) { addToPK = true; normalizePrimaryKey(); for (int i = pos; i < pkSize; i++) { ((SQLColumn) getColumns().get(i)).primaryKeySeq = new Integer(i + 1); } } col.setParent(null); if (addToPK) { col.nullable = DatabaseMetaData.columnNoNulls; col.primaryKeySeq = new Integer(pos); } else { col.primaryKeySeq = null; } columnsFolder.addChild(pos, col); }
private void addColumnImpl(int pos, SQLColumn col) throws ArchitectException { if (getColumnIndex(col) != -1) { col.addReference(); return; } boolean addToPK = false; int pkSize = getPkSize(); if (getColumns().size() > 0 && pos < pkSize) { addToPK = true; normalizePrimaryKey(); for (int i = pos; i < pkSize; i++) { ((SQLColumn) getColumns().get(i)).primaryKeySeq = new Integer(i + 1); } } col.setParent(null); if (addToPK) { col.nullable = DatabaseMetaData.columnNoNulls; col.primaryKeySeq = new Integer(pos); } else { col.primaryKeySeq = null; } columnsFolder.addChild(pos, col); }
1,112,785
public void changeColumnIndex(int oldIdx, int newIdx, boolean putInPK) throws ArchitectException { // remove and add the column directly, then manually fire the event. // This is necessary because the relationships prevent deletion of locked keys. SQLColumn col = (SQLColumn) columnsFolder.children.remove(oldIdx); columnsFolder.fireDbChildRemoved(oldIdx, col); columnsFolder.children.add(newIdx, col); if (putInPK) { col.primaryKeySeq = new Integer(1); // will get sane value when normalized } else { col.primaryKeySeq = null; } normalizePrimaryKey(); columnsFolder.fireDbChildInserted(newIdx, col); }
public void changeColumnIndex(int oldIdx, int newIdx, boolean putInPK) throws ArchitectException { // remove and add the column directly, then manually fire the event. // This is necessary because the relationships prevent deletion of locked keys. SQLColumn col = (SQLColumn) columnsFolder.children.remove(oldIdx); columnsFolder.fireDbChildRemoved(oldIdx, col); columnsFolder.children.add(newIdx, col); if (putInPK) { col.primaryKeySeq = new Integer(1); // will get sane value when normalized } else { col.primaryKeySeq = null; } normalizePrimaryKey(); columnsFolder.fireDbChildInserted(newIdx, col); }
1,112,786
public void setName(String argName) { String oldName = getName(); try { startCompoundEdit("Table Name Change"); super.setName(argName); if (primaryKeyName == null || primaryKeyName.equals("") || primaryKeyName.equals(oldName+"_pk")) { setPrimaryKeyName( getName()+"_pk"); } } finally { endCompoundEdit("Ending table name compound edit"); } }
public void setName(String argName) { String oldName = getName(); try { startCompoundEdit("Table Name Change"); super.setName(argName); if (primaryKeyName == null || primaryKeyName.equals("") || primaryKeyName.equals(oldName+"_pk")) { setPrimaryKeyName( getName()+"_pk"); } } finally { endCompoundEdit("Ending table name compound edit"); } }
1,112,787
private ActionForward handleDebugMode(HttpServletRequest request, HttpServletResponse response, ActionForward resultForward) throws IOException { if("true".equals(request.getParameter("debug.xml"))){ response.setContentType("text/xml"); XMLEncoder encoder = new XMLEncoder(response.getOutputStream()); for(Enumeration enum=request.getAttributeNames(); enum.hasMoreElements();){ String attribute = (String)enum.nextElement(); Object attrValue = request.getAttribute(attribute); encoder.writeObject(attribute); encoder.writeObject(attrValue); } encoder.writeObject(request); encoder.close(); resultForward = null; }
private ActionForward handleDebugMode(HttpServletRequest request, HttpServletResponse response, ActionForward resultForward) throws IOException { if("true".equals(request.getParameter("debug.xml"))){ response.setContentType("text/xml"); XMLEncoder encoder = new XMLEncoder(response.getOutputStream()); for(Enumeration enum=request.getAttributeNames(); enum.hasMoreElements();){ String attribute = (String)enum.nextElement(); Object attrValue = request.getAttribute(attribute); encoder.writeObject(attribute); encoder.writeObject(attrValue); } encoder.writeObject(request); encoder.close(); resultForward = null; }
1,112,789
public void actionPerformed( ActionEvent ev ) { Frame parentFrame = null; Container c = view.getTopLevelAncestor(); if ( c instanceof Frame ) { parentFrame = (Frame) c; } try { Collection selectedPhotos = view.getSelection(); if ( selectedPhotos.size() > 1 ) { // If user wants to open many photos at once ask for confirmation // Try to find the frame in which this component is in int n = JOptionPane.showConfirmDialog( parentFrame, "You have selected " + selectedPhotos.size() + " photos\n" + "Are you sure that you want to\ndisplay all of them at once?", "Open multiple photos", JOptionPane.YES_NO_OPTION ); if ( n != JOptionPane.YES_OPTION ) { return; } } Cursor oldCursor = c.getCursor(); c.setCursor( new Cursor( Cursor.WAIT_CURSOR ) ); Iterator iter = selectedPhotos.iterator(); while ( iter.hasNext() ) { PhotoInfo photo = (PhotoInfo) iter.next(); JFrame frame = new JFrame( "Photo" ); final JAIPhotoViewer viewer = new JAIPhotoViewer(); frame.getContentPane().add( viewer, BorderLayout.CENTER ); frame.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE ); // This is a WAR for a memory management problem. For // some reason the frame and objects owned by it seem // not to be garbage collected. So we free the large // image buffers to avoid massive memory leak. frame.addWindowListener( new WindowAdapter() { public void windowClosing( WindowEvent e ) { viewer.setPhoto( null ); } } ); viewer.setPhoto( photo ); frame.pack(); frame.setVisible( true ); } c.setCursor( oldCursor ); } catch ( Throwable e ) { System.err.println( "Out of memory error" ); log.warn( e ); e.printStackTrace(); } }
public void actionPerformed( ActionEvent ev ) { Frame parentFrame = null; Container c = view.getTopLevelAncestor(); if ( c instanceof Frame ) { parentFrame = (Frame) c; } try { Collection selectedPhotos = view.getSelection(); if ( selectedPhotos.size() > 1 ) { // If user wants to open many photos at once ask for confirmation // Try to find the frame in which this component is in int n = JOptionPane.showConfirmDialog( parentFrame, "You have selected " + selectedPhotos.size() + " photos\n" + "Are you sure that you want to\ndisplay all of them at once?", "Open multiple photos", JOptionPane.YES_NO_OPTION ); if ( n != JOptionPane.YES_OPTION ) { return; } } Cursor oldCursor = c.getCursor(); c.setCursor( new Cursor( Cursor.WAIT_CURSOR ) ); Iterator iter = selectedPhotos.iterator(); while ( iter.hasNext() ) { PhotoInfo photo = (PhotoInfo) iter.next(); JFrame frame = new JFrame( "Photo" ); final JAIPhotoViewer viewer = new JAIPhotoViewer(); frame.getContentPane().add( viewer, BorderLayout.CENTER ); frame.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE ); // This is a WAR for a memory management problem. For // some reason the frame and objects owned by it seem // not to be garbage collected. So we free the large // image buffers to avoid massive memory leak. frame.addWindowListener( new WindowAdapter() { public void windowClosing( WindowEvent e ) { viewer.setPhoto( null ); } } ); viewer.setPhoto( photo ); frame.pack(); frame.setVisible( true ); } c.setCursor( oldCursor ); } catch ( Throwable e ) { System.err.println( "Out of memory error" ); log.warn( e ); e.printStackTrace(); } }
1,112,791
public void actionPerformed( ActionEvent ev ) { Frame parentFrame = null; Container c = view.getTopLevelAncestor(); if ( c instanceof Frame ) { parentFrame = (Frame) c; } try { Collection selectedPhotos = view.getSelection(); if ( selectedPhotos.size() > 1 ) { // If user wants to open many photos at once ask for confirmation // Try to find the frame in which this component is in int n = JOptionPane.showConfirmDialog( parentFrame, "You have selected " + selectedPhotos.size() + " photos\n" + "Are you sure that you want to\ndisplay all of them at once?", "Open multiple photos", JOptionPane.YES_NO_OPTION ); if ( n != JOptionPane.YES_OPTION ) { return; } } Cursor oldCursor = c.getCursor(); c.setCursor( new Cursor( Cursor.WAIT_CURSOR ) ); Iterator iter = selectedPhotos.iterator(); while ( iter.hasNext() ) { PhotoInfo photo = (PhotoInfo) iter.next(); JFrame frame = new JFrame( "Photo" ); final JAIPhotoViewer viewer = new JAIPhotoViewer(); frame.getContentPane().add( viewer, BorderLayout.CENTER ); frame.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE ); // This is a WAR for a memory management problem. For // some reason the frame and objects owned by it seem // not to be garbage collected. So we free the large // image buffers to avoid massive memory leak. frame.addWindowListener( new WindowAdapter() { public void windowClosing( WindowEvent e ) { viewer.setPhoto( null ); } } ); viewer.setPhoto( photo ); frame.pack(); frame.setVisible( true ); } c.setCursor( oldCursor ); } catch ( Throwable e ) { System.err.println( "Out of memory error" ); log.warn( e ); e.printStackTrace(); } }
public void actionPerformed( ActionEvent ev ) { Frame parentFrame = null; Container c = view.getTopLevelAncestor(); if ( c instanceof Frame ) { parentFrame = (Frame) c; } try { Collection selectedPhotos = view.getSelection(); if ( selectedPhotos.size() > 1 ) { // If user wants to open many photos at once ask for confirmation // Try to find the frame in which this component is in int n = JOptionPane.showConfirmDialog( parentFrame, "You have selected " + selectedPhotos.size() + " photos\n" + "Are you sure that you want to\ndisplay all of them at once?", "Open multiple photos", JOptionPane.YES_NO_OPTION ); if ( n != JOptionPane.YES_OPTION ) { return; } } Cursor oldCursor = c.getCursor(); c.setCursor( new Cursor( Cursor.WAIT_CURSOR ) ); Iterator iter = selectedPhotos.iterator(); while ( iter.hasNext() ) { PhotoInfo photo = (PhotoInfo) iter.next(); JFrame frame = new JFrame( "Photo" ); final JAIPhotoViewer viewer = new JAIPhotoViewer(); frame.getContentPane().add( viewer, BorderLayout.CENTER ); frame.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE ); // This is a WAR for a memory management problem. For // some reason the frame and objects owned by it seem // not to be garbage collected. So we free the large // image buffers to avoid massive memory leak. frame.addWindowListener( new WindowAdapter() { public void windowClosing( WindowEvent e ) { viewer.setPhoto( null ); } } ); viewer.setPhoto( photo ); frame.pack(); frame.setVisible( true ); } c.setCursor( oldCursor ); } catch ( Throwable e ) { System.err.println( "Out of memory error" ); log.warn( e ); e.printStackTrace(); } }
1,112,792
public void windowClosing( WindowEvent e ) { viewer.setPhoto( null ); }
public void windowClosing( WindowEvent e ) { viewer.setPhoto( null ); }
1,112,793
void addHeading(final String headingText) { if(null == headingJLabel) { headingJLabel = LabelFactory.create(headingText, UIConstants.DefaultFontBold); headingJLabel.setBackground(new Color(117, 138, 155)); headingJLabel.setForeground(Color.WHITE); headingJLabel.setIcon(getHeadingIcon()); headingJLabel.setOpaque(true); } // h: 24 px // x indent: 29 px final GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.WEST; c.gridx = 0; c.weightx = 1.0; c.fill = GridBagConstraints.HORIZONTAL; avatar.add(headingJLabel, c.clone()); }
void addHeading(final String headingText) { if(null == headingJLabel) { headingJLabel = LabelFactory.create(headingText, UIConstants.DefaultFontBold); headingJLabel.setBackground(new Color(117, 138, 155, 255)); headingJLabel.setForeground(Color.WHITE); headingJLabel.setIcon(getHeadingIcon()); headingJLabel.setOpaque(true); } // h: 24 px // x indent: 29 px final GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.WEST; c.gridx = 0; c.weightx = 1.0; c.fill = GridBagConstraints.HORIZONTAL; avatar.add(headingJLabel, c.clone()); }
1,112,794
private Fixture(final ArtifactModel aModel, final JabberId closedBy, final Calendar closedOn, final InternalContainerModel cInternalModel, final Long containerId, final Integer eTeamSize) { this.aModel = aModel; this.closedBy = closedBy; this.closedOn = closedOn; this.cInternalModel = cInternalModel; this.containerId = containerId; this.eTeamSize = eTeamSize; }
private Fixture(final ContainerModel cModel, final JabberId closedBy, final Calendar closedOn, final InternalContainerModel cInternalModel, final Long containerId, final Integer eTeamSize) { this.aModel = aModel; this.closedBy = closedBy; this.closedOn = closedOn; this.cInternalModel = cInternalModel; this.containerId = containerId; this.eTeamSize = eTeamSize; }
1,112,795
private Fixture(final ArtifactModel aModel, final JabberId closedBy, final Calendar closedOn, final InternalContainerModel cInternalModel, final Long containerId, final Integer eTeamSize) { this.aModel = aModel; this.closedBy = closedBy; this.closedOn = closedOn; this.cInternalModel = cInternalModel; this.containerId = containerId; this.eTeamSize = eTeamSize; }
private Fixture(final ArtifactModel aModel, final JabberId closedBy, final Calendar closedOn, final InternalContainerModel cInternalModel, final Long containerId, final Integer eTeamSize) { this.cModel = cModel; this.closedBy = closedBy; this.closedOn = closedOn; this.cInternalModel = cInternalModel; this.containerId = containerId; this.eTeamSize = eTeamSize; }
1,112,796
protected void setUp() throws Exception { super.setUp(); login(); final ContainerModel cModel = getContainerModel(); final ArtifactModel aModel = getArtifactModel(); final ModelTestUser jUnitX = ModelTestUser.getX(); final Container container = createContainer(NAME); final Document document = addDocument(container, getInputFiles()[0]); addTeam(container); modifyDocument(document); cModel.publish(container.getId()); aModel.sendKey(container.getId(), jUnitX.getJabberId()); datum = new Fixture(aModel, jUnitX.getJabberId(), currentDateTime(), getInternalContainerModel(), container.getId(), aModel.readTeam(container.getId()).size()); }
protected void setUp() throws Exception { super.setUp(); login(); final ContainerModel cModel = getContainerModel(); final ArtifactModel aModel = getArtifactModel(); final ModelTestUser jUnitX = ModelTestUser.getX(); final Container container = createContainer(NAME); final Document document = addDocument(container, getInputFiles()[0]); addTeam(container); modifyDocument(document); cModel.publish(container.getId()); aModel.sendKey(container.getId(), jUnitX.getJabberId()); datum = new Fixture(cModel, jUnitX.getJabberId(), currentDateTime(), getInternalContainerModel(), container.getId(), aModel.readTeam(container.getId()).size()); }
1,112,797
protected void setUp() throws Exception { super.setUp(); login(); final ContainerModel cModel = getContainerModel(); final ArtifactModel aModel = getArtifactModel(); final ModelTestUser jUnitX = ModelTestUser.getX(); final Container container = createContainer(NAME); final Document document = addDocument(container, getInputFiles()[0]); addTeam(container); modifyDocument(document); cModel.publish(container.getId()); aModel.sendKey(container.getId(), jUnitX.getJabberId()); datum = new Fixture(aModel, jUnitX.getJabberId(), currentDateTime(), getInternalContainerModel(), container.getId(), aModel.readTeam(container.getId()).size()); }
protected void setUp() throws Exception { super.setUp(); login(); final ContainerModel cModel = getContainerModel(); final ArtifactModel aModel = getArtifactModel(); final ModelTestUser jUnitX = ModelTestUser.getX(); final Container container = createContainer(NAME); final Document document = addDocument(container, getInputFiles()[0]); addTeam(container); modifyDocument(document); cModel.publish(container.getId()); aModel.sendKey(container.getId(), jUnitX.getJabberId()); datum = new Fixture(aModel, jUnitX.getJabberId(), currentDateTime(), getInternalContainerModel(), container.getId(), cModel.readTeam(container.getId()).size()); }
1,112,798
public void testHandleClose() { Set<User> team; try { datum.cInternalModel.handleClose(datum.containerId, datum.closedBy, datum.closedOn); } catch(final ParityException px) { fail(createFailMessage(px)); } final Container container = datum.cInternalModel.read(datum.containerId); assertNotNull(NAME, container); assertEquals(NAME + " [CONTAINER STATE DOES NOT MATCH EXPECTATION]", container.getState(), ArtifactState.CLOSED); team = datum.aModel.readTeam(datum.containerId); assertNotNull(NAME, team); assertEquals(NAME + " [TEAM SIZE DOES NOT MATCH EXPECTATION]", datum.eTeamSize.intValue(), team.size()); }
public void testHandleClose() { List<User> team; try { datum.cInternalModel.handleClose(datum.containerId, datum.closedBy, datum.closedOn); } catch(final ParityException px) { fail(createFailMessage(px)); } final Container container = datum.cInternalModel.read(datum.containerId); assertNotNull(NAME, container); assertEquals(NAME + " [CONTAINER STATE DOES NOT MATCH EXPECTATION]", container.getState(), ArtifactState.CLOSED); team = datum.aModel.readTeam(datum.containerId); assertNotNull(NAME, team); assertEquals(NAME + " [TEAM SIZE DOES NOT MATCH EXPECTATION]", datum.eTeamSize.intValue(), team.size()); }
1,112,799
public void testHandleClose() { Set<User> team; try { datum.cInternalModel.handleClose(datum.containerId, datum.closedBy, datum.closedOn); } catch(final ParityException px) { fail(createFailMessage(px)); } final Container container = datum.cInternalModel.read(datum.containerId); assertNotNull(NAME, container); assertEquals(NAME + " [CONTAINER STATE DOES NOT MATCH EXPECTATION]", container.getState(), ArtifactState.CLOSED); team = datum.aModel.readTeam(datum.containerId); assertNotNull(NAME, team); assertEquals(NAME + " [TEAM SIZE DOES NOT MATCH EXPECTATION]", datum.eTeamSize.intValue(), team.size()); }
public void testHandleClose() { Set<User> team; try { datum.cInternalModel.handleClose(datum.containerId, datum.closedBy, datum.closedOn); } catch(final ParityException px) { fail(createFailMessage(px)); } final Container container = datum.cInternalModel.read(datum.containerId); assertNotNull(NAME, container); assertEquals(NAME + " [CONTAINER STATE DOES NOT MATCH EXPECTATION]", container.getState(), ArtifactState.CLOSED); team = datum.cModel.readTeam(datum.containerId); assertNotNull(NAME, team); assertEquals(NAME + " [TEAM SIZE DOES NOT MATCH EXPECTATION]", datum.eTeamSize.intValue(), team.size()); }
1,112,800
protected void setUp() throws Exception { super.setUp(); }
protected void setUp() throws Exception {}
1,112,801
protected void tearDown() throws Exception { super.tearDown(); }
protected void tearDown() throws Exception {}
1,112,802
public Container read(final Long containerId) { synchronized(implLock) { return impl.read(containerId); } }
public Container read(final Long containerId) { synchronized(implLock) { return impl.read(containerId); } }
1,112,803
protected static void assertNotNull(final String assertion, final List<Container> containers) { assertNotNull(assertion + " [CONTAINERS IS NULL]", (Object) containers); for(final Container container : containers) { assertNotNull(assertion, container); } }
protected static void assertNotNull(final String assertion, final List<Container> containers) { assertNotNull(assertion + " [CONTAINERS IS NULL]", (Object) containers); for(final Container container : containers) { assertNotNull(assertion, container); } }
1,112,804
void addTeamMember(final UUID uniqueId, final JabberId teamMemberId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("teamMemberId", teamMemberId); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long artifactId = artifactModel.readId(uniqueId); final List<JabberId> team = artifactModel.readTeamIds(artifactId); final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { xmppSession.addTeamMember(localUserId(), team, uniqueId, teamMemberId); } } catch (final Throwable t) { throw translateError(t); } }
void addTeamMember(final UUID uniqueId, final List<JabberId> team, final JabberId teamMemberId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("teamMemberId", teamMemberId); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long artifactId = artifactModel.readId(uniqueId); final List<JabberId> team = artifactModel.readTeamIds(artifactId); final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { xmppSession.addTeamMember(localUserId(), team, uniqueId, teamMemberId); } } catch (final Throwable t) { throw translateError(t); } }
1,112,805
void addTeamMember(final UUID uniqueId, final JabberId teamMemberId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("teamMemberId", teamMemberId); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long artifactId = artifactModel.readId(uniqueId); final List<JabberId> team = artifactModel.readTeamIds(artifactId); final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { xmppSession.addTeamMember(localUserId(), team, uniqueId, teamMemberId); } } catch (final Throwable t) { throw translateError(t); } }
void addTeamMember(final UUID uniqueId, final JabberId teamMemberId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("teamMemberId", teamMemberId); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long artifactId = artifactModel.readId(uniqueId); final List<JabberId> team = artifactModel.readTeamIds(artifactId); final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { xmppSession.addTeamMember(localUserId(), team, uniqueId, teamMemberId); } } catch (final Throwable t) { throw translateError(t); } }
1,112,806
void confirmArtifactReceipt(final JabberId userId, final UUID uniqueId, final Long versionId, final JabberId receivedBy, final Calendar receivedOn) { logger.logApiId(); logger.logVariable("userId", userId); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("receivedBy", receivedBy); logger.logVariable("receivedOn", receivedOn); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long artifactId = artifactModel.readId(uniqueId); final List<JabberId> team = artifactModel.readTeamIds(artifactId); final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized(xmppSession) { xmppSession.confirmArtifactReceipt(localUserId(), team, uniqueId, versionId, receivedBy, receivedOn); } } catch (final Throwable t) { throw translateError(t); } }
void confirmArtifactReceipt(final JabberId userId, final UUID uniqueId, final Long versionId, final JabberId receivedBy, final Calendar receivedOn) { logger.logApiId(); logger.logVariable("userId", userId); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("receivedBy", receivedBy); logger.logVariable("receivedOn", receivedOn); try { final InternalArtifactModel artifactModel = getArtifactModel(); final Long artifactId = artifactModel.readId(uniqueId); final List<JabberId> team = artifactModel.readTeamIds(artifactId); final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized(xmppSession) { xmppSession.confirmArtifactReceipt(localUserId(), team, uniqueId, versionId, receivedBy, receivedOn); } } catch (final Throwable t) { throw translateError(t); } }
1,112,807
void deleteDraft(final UUID uniqueId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long artifactId = artifactModel.readId(uniqueId); final List<JabberId> team = artifactModel.readTeamIds(artifactId); final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { xmppSession.deleteDraft(localUserId(), team, uniqueId); } } catch (final Throwable t) { throw translateError(t); } }
void deleteDraft(final UUID uniqueId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); try { final InternalArtifactModel artifactModel = getArtifactModel(); final Long artifactId = artifactModel.readId(uniqueId); final List<JabberId> team = artifactModel.readTeamIds(artifactId); final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { xmppSession.deleteDraft(localUserId(), team, uniqueId); } } catch (final Throwable t) { throw translateError(t); } }
1,112,808
List<DocumentVersion> readArchiveDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logger.logApiId(); logger.logVariable("userId", userId); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("documentUniqueId", documentUniqueId); try { final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { return xmppSession.readArchiveDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } } catch (final Throwable t) { throw translateError(t); } }
List<DocumentVersion> readArchiveDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logger.logApiId(); logger.logVariable("userId", userId); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("documentUniqueId", documentUniqueId); try { final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { return xmppSession.readArchiveDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } } catch (final Throwable t) { throw translateError(t); } }
1,112,809
List<DocumentVersion> readArchiveDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logger.logApiId(); logger.logVariable("userId", userId); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("documentUniqueId", documentUniqueId); try { final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { return xmppSession.readArchiveDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } } catch (final Throwable t) { throw translateError(t); } }
List<DocumentVersion> readArchiveDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logger.logApiId(); logger.logVariable("userId", userId); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); try { final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { return xmppSession.readArchiveDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } } catch (final Throwable t) { throw translateError(t); } }
1,112,810
List<DocumentVersion> readArchiveDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logger.logApiId(); logger.logVariable("userId", userId); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("documentUniqueId", documentUniqueId); try { final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { return xmppSession.readArchiveDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } } catch (final Throwable t) { throw translateError(t); } }
List<DocumentVersion> readArchiveDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logger.logApiId(); logger.logVariable("userId", userId); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("documentUniqueId", documentUniqueId); try { final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { return xmppSession.readArchiveDocumentVersions(userId, uniqueId, versionId); } } catch (final Throwable t) { throw translateError(t); } }
1,112,811
List<DocumentVersion> readBackupDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logger.logApiId(); logger.logVariable("userId", userId); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("documentUniqueId", documentUniqueId); try { final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { return xmppSession.readBackupDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } } catch (final Throwable t) { throw translateError(t); } }
List<DocumentVersion> readBackupDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logger.logApiId(); logger.logVariable("userId", userId); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("documentUniqueId", documentUniqueId); try { final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { return xmppSession.readBackupDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } } catch (final Throwable t) { throw translateError(t); } }
1,112,812
List<DocumentVersion> readBackupDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logger.logApiId(); logger.logVariable("userId", userId); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("documentUniqueId", documentUniqueId); try { final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { return xmppSession.readBackupDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } } catch (final Throwable t) { throw translateError(t); } }
List<DocumentVersion> readBackupDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logger.logApiId(); logger.logVariable("userId", userId); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); try { final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { return xmppSession.readBackupDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } } catch (final Throwable t) { throw translateError(t); } }
1,112,813
List<DocumentVersion> readBackupDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logger.logApiId(); logger.logVariable("userId", userId); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("documentUniqueId", documentUniqueId); try { final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { return xmppSession.readBackupDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } } catch (final Throwable t) { throw translateError(t); } }
List<DocumentVersion> readBackupDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logger.logApiId(); logger.logVariable("userId", userId); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("documentUniqueId", documentUniqueId); try { final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { return xmppSession.readBackupDocumentVersions(userId, uniqueId, versionId); } } catch (final Throwable t) { throw translateError(t); } }
1,112,814
void removeTeamMember(final UUID uniqueId, final JabberId teamMemberId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("teamMemberId", teamMemberId); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long artifactId = artifactModel.readId(uniqueId); final List<JabberId> team = artifactModel.readTeamIds(artifactId); final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { xmppSession.removeTeamMember(localUserId(), team, uniqueId, teamMemberId); } } catch (final Throwable t) { throw translateError(t); } }
void removeTeamMember(final UUID uniqueId, final List<JabberId> team, final JabberId teamMemberId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("teamMemberId", teamMemberId); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long artifactId = artifactModel.readId(uniqueId); final List<JabberId> team = artifactModel.readTeamIds(artifactId); final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { xmppSession.removeTeamMember(localUserId(), team, uniqueId, teamMemberId); } } catch (final Throwable t) { throw translateError(t); } }
1,112,815
void removeTeamMember(final UUID uniqueId, final JabberId teamMemberId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("teamMemberId", teamMemberId); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long artifactId = artifactModel.readId(uniqueId); final List<JabberId> team = artifactModel.readTeamIds(artifactId); final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { xmppSession.removeTeamMember(localUserId(), team, uniqueId, teamMemberId); } } catch (final Throwable t) { throw translateError(t); } }
void removeTeamMember(final UUID uniqueId, final JabberId teamMemberId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("teamMemberId", teamMemberId); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long artifactId = artifactModel.readId(uniqueId); final List<JabberId> team = artifactModel.readTeamIds(artifactId); final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { xmppSession.removeTeamMember(localUserId(), team, uniqueId, teamMemberId); } } catch (final Throwable t) { throw translateError(t); } }
1,112,816
SessionModelEventDispatcher(final Workspace workspace, final InternalModelFactory modelFactory, final XMPPSession xmppSession) { super(); this.logger = new Log4JWrapper(); this.modelFactory = modelFactory; logger.logApiId(); xmppSession.clearListeners(); xmppSession.addListener(new ArtifactListener() { public void handleDraftCreated(final UUID uniqueId, final JabberId createdBy, final Calendar createdOn) { getArtifactModel().handleDraftCreated(uniqueId, createdBy, createdOn); } public void handleDraftDeleted(final UUID uniqueId, final JabberId deletedBy, final Calendar deletedOn) { getArtifactModel().handleDraftDeleted(uniqueId, deletedBy, deletedOn); } public void handleReceived(final UUID uniqueId, final Long versionId, final JabberId receivedBy, final Calendar receivedOn) { logger.logApiId(); getArtifactModel().handleReceived(uniqueId, versionId, receivedBy, receivedOn); } public void teamMemberAdded(final UUID uniqueId, final JabberId jabberId) { getArtifactModel().handleTeamMemberAdded(uniqueId, jabberId); } public void teamMemberRemoved(final UUID artifactUniqueId, final JabberId jabberId) { getArtifactModel().handleTeamMemberRemoved(artifactUniqueId, jabberId); } }); xmppSession.addListener(new ContainerListener() { public void handleArtifactPublished(final JabberId publishedBy, final Calendar publishedOn, final UUID containerUniqueId, final Long containerVersionId, final String containerName, final Integer containerArtifactCount, final Integer containerArtifactIndex, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final String artifactStreamId) { getContainerModel().handleArtifactPublished(containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactStreamId, publishedBy, publishedOn); } public void handlePublished(final UUID uniqueId, final Long versionId, final String name, final Integer artifactCount, final JabberId publishedBy, final List<JabberId> publishedTo, final Calendar publishedOn) { getContainerModel().handlePublished(uniqueId, versionId, name, artifactCount, publishedBy, publishedTo, publishedOn); } }); xmppSession.addListener(new ContactListener() { public void handleContactDeleted(final JabberId deletedBy, final Calendar deletedOn) { getContactModel().handleContactDeleted(deletedBy, deletedOn); } public void handleContactUpdated(final JabberId contactId, final Calendar updatedOn) { getContactModel().handleContactUpdated(contactId, updatedOn); } public void handleInvitationAccepted(final JabberId acceptedBy, final Calendar acceptedOn) { getContactModel().handleInvitationAccepted(acceptedBy, acceptedOn); } public void handleInvitationDeclined(final EMail invitedAs, final JabberId declinedBy, final Calendar declinedOn) { getContactModel().handleInvitationDeclined(invitedAs, declinedBy, declinedOn); } public void handleInvitationDeleted(final EMail invitedAs, final JabberId deletedBy, final Calendar deletedOn) { getContactModel().handleInvitationDeleted(invitedAs, deletedBy, deletedOn); } public void handleInvitationExtended(final EMail invitedAs, final JabberId invitedBy, final Calendar invitedOn) { getContactModel().handleInvitationExtended(invitedAs, invitedBy, invitedOn); } }); xmppSession.addListener(new SessionListener() { public void sessionEstablished() { getSessionModel().handleSessionEstablished(); } public void sessionTerminated() { getSessionModel().handleSessionTerminated(); } public void sessionTerminated(final Exception x) { getSessionModel().handleSessionTerminated(x); } }); }
SessionModelEventDispatcher(final Workspace workspace, final InternalModelFactory modelFactory, final XMPPSession xmppSession) { super(); this.logger = new Log4JWrapper(); this.modelFactory = modelFactory; xmppSession.clearListeners(); xmppSession.addListener(new ArtifactListener() { public void handleDraftCreated(final UUID uniqueId, final JabberId createdBy, final Calendar createdOn) { getArtifactModel().handleDraftCreated(uniqueId, createdBy, createdOn); } public void handleDraftDeleted(final UUID uniqueId, final JabberId deletedBy, final Calendar deletedOn) { getArtifactModel().handleDraftDeleted(uniqueId, deletedBy, deletedOn); } public void handleReceived(final UUID uniqueId, final Long versionId, final JabberId receivedBy, final Calendar receivedOn) { getArtifactModel().handleReceived(uniqueId, versionId, receivedBy, receivedOn); } public void teamMemberAdded(final UUID uniqueId, final JabberId jabberId) { getArtifactModel().handleTeamMemberAdded(uniqueId, jabberId); } public void teamMemberRemoved(final UUID artifactUniqueId, final JabberId jabberId) { getArtifactModel().handleTeamMemberRemoved(artifactUniqueId, jabberId); } }); xmppSession.addListener(new ContainerListener() { public void handleArtifactPublished(final JabberId publishedBy, final Calendar publishedOn, final UUID containerUniqueId, final Long containerVersionId, final String containerName, final Integer containerArtifactCount, final Integer containerArtifactIndex, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final String artifactStreamId) { getContainerModel().handleArtifactPublished(containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactStreamId, publishedBy, publishedOn); } public void handlePublished(final UUID uniqueId, final Long versionId, final String name, final Integer artifactCount, final JabberId publishedBy, final List<JabberId> publishedTo, final Calendar publishedOn) { getContainerModel().handlePublished(uniqueId, versionId, name, artifactCount, publishedBy, publishedTo, publishedOn); } }); xmppSession.addListener(new ContactListener() { public void handleContactDeleted(final JabberId deletedBy, final Calendar deletedOn) { getContactModel().handleContactDeleted(deletedBy, deletedOn); } public void handleContactUpdated(final JabberId contactId, final Calendar updatedOn) { getContactModel().handleContactUpdated(contactId, updatedOn); } public void handleInvitationAccepted(final JabberId acceptedBy, final Calendar acceptedOn) { getContactModel().handleInvitationAccepted(acceptedBy, acceptedOn); } public void handleInvitationDeclined(final EMail invitedAs, final JabberId declinedBy, final Calendar declinedOn) { getContactModel().handleInvitationDeclined(invitedAs, declinedBy, declinedOn); } public void handleInvitationDeleted(final EMail invitedAs, final JabberId deletedBy, final Calendar deletedOn) { getContactModel().handleInvitationDeleted(invitedAs, deletedBy, deletedOn); } public void handleInvitationExtended(final EMail invitedAs, final JabberId invitedBy, final Calendar invitedOn) { getContactModel().handleInvitationExtended(invitedAs, invitedBy, invitedOn); } }); xmppSession.addListener(new SessionListener() { public void sessionEstablished() { getSessionModel().handleSessionEstablished(); } public void sessionTerminated() { getSessionModel().handleSessionTerminated(); } public void sessionTerminated(final Exception x) { getSessionModel().handleSessionTerminated(x); } }); }
1,112,817
private void initComponents() { final GridBagConstraints gbc = new GridBagConstraints(); setLayout(new GridBagLayout()); gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.gridy = 0; gbc.ipady = 28; gbc.weightx = 1.0; add(DisplayFactory.create(DisplayId.TITLE), gbc.clone()); gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.gridy++; gbc.ipady = 0; gbc.weighty = 1.0; add(DisplayFactory.create(DisplayId.CONTENT), gbc.clone()); gbc.anchor = GridBagConstraints.SOUTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.gridy++; gbc.ipady = 0; gbc.weighty = 0.0; add(DisplayFactory.create(DisplayId.STATUS), gbc.clone()); }
private void initComponents() { final GridBagConstraints gbc = new GridBagConstraints(); setLayout(new GridBagLayout()); gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.gridy = 0; gbc.ipady = 28; gbc.weightx = 1.0; add(createDisplay(DisplayId.TITLE, BrowserWindow.Display.TITLE_HEIGHT), gbc.clone()); gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.gridy++; gbc.ipady = 0; gbc.weighty = 1.0; add(DisplayFactory.create(DisplayId.CONTENT), gbc.clone()); gbc.anchor = GridBagConstraints.SOUTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.gridy++; gbc.ipady = 0; gbc.weighty = 0.0; add(DisplayFactory.create(DisplayId.STATUS), gbc.clone()); }
1,112,819
private void initComponents() { final GridBagConstraints gbc = new GridBagConstraints(); setLayout(new GridBagLayout()); gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.gridy = 0; gbc.ipady = 28; gbc.weightx = 1.0; add(DisplayFactory.create(DisplayId.TITLE), gbc.clone()); gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.gridy++; gbc.ipady = 0; gbc.weighty = 1.0; add(DisplayFactory.create(DisplayId.CONTENT), gbc.clone()); gbc.anchor = GridBagConstraints.SOUTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.gridy++; gbc.ipady = 0; gbc.weighty = 0.0; add(DisplayFactory.create(DisplayId.STATUS), gbc.clone()); }
private void initComponents() { final GridBagConstraints gbc = new GridBagConstraints(); setLayout(new GridBagLayout()); gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.gridy = 0; gbc.ipady = 28; gbc.weightx = 1.0; add(DisplayFactory.create(DisplayId.TITLE), gbc.clone()); gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.gridy++; gbc.ipady = 0; gbc.weighty = 1.0; add(DisplayFactory.create(DisplayId.CONTENT), gbc.clone()); gbc.anchor = GridBagConstraints.SOUTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.gridy++; gbc.ipady = 0; gbc.weighty = 0.0; add(createDisplay(DisplayId.STATUS, BrowserWindow.Display.STATUS_HEIGHT), gbc.clone()); }
1,112,820
public void addListener(final XMPPContactListener xmppPresenceListener);
public void addListener(final XMPPArtifactListener xmppArtifactListener);
1,112,821
public void removeListener(final XMPPContactListener xmppPresenceListener);
public void removeListener(final XMPPArtifactListener xmppArtifactListener);
1,112,822
public static boolean sendToTarget(Message message, String senderCompID, String targetCompID) throws SessionNotFound { return sendToTarget(message, senderCompID, targetCompID, ""); }
public static boolean sendToTarget(Message message, String senderCompID, String targetCompID) throws SessionNotFound { return sendToTarget(message, senderCompID, targetCompID, ""); }
1,112,823
public static JCheckBoxMenuItem createCheckBox(final String text, final Integer mnemonic) { synchronized(singletonLock) { return singleton.doCreateCheckBox(text, mnemonic); } }
public static JCheckBoxMenuItem createCheckBox(final String text, final Integer mnemonic) { synchronized(singletonLock) { return singleton.doCreateCheckBox(text, mnemonic); } }
1,112,825
public void setString(String key, String value) { setString(DEFAULT_SESSION_ID, key, value); }
public void setString(String key, String value) { setString(DEFAULT_SESSION_ID, key, value); }
1,112,826
public ScreenLogFactory(boolean incoming, boolean outgoing, boolean events) { this(incoming, outgoing, events, true); }
public ScreenLogFactory(boolean incoming, boolean outgoing, boolean events) { this(incoming, outgoing, events, true); }
1,112,827
protected AbstractModelImpl(final Session session) { super(); this.configurationSql = new ConfigurationSql(); this.logger = new Log4JWrapper(); this.session = session; }
protected AbstractModelImpl(final Session session) { super(); this.configurationSql = new ConfigurationSql(); this.logger = new Log4JWrapper(getClass()); this.session = session; }
1,112,828
public double getBranchLength(int node);
public double getBranchLength(int node, boolean[] deleted);
1,112,829
private void orderByJLabelMouseClicked(java.awt.event.MouseEvent e) {//GEN-FIRST:event_orderByJLabelMouseClicked final javax.swing.JLabel jLabel = (javax.swing.JLabel) e.getSource(); popupDelegate.initialize(this, jLabel.getX(), jLabel.getY() + jLabel.getHeight(), jLabel.getWidth(), jLabel.getHeight()); popupDelegate.showForSort(); }//GEN-LAST:event_orderByJLabelMouseClicked
private void orderByJLabelMouseClicked(java.awt.event.MouseEvent e) {//GEN-FIRST:event_orderByJLabelMouseClicked final javax.swing.JLabel jLabel = (javax.swing.JLabel) e.getSource(); popupDelegate.initialize(this, jLabel.getX(), jLabel.getY() + jLabel.getHeight(), jLabel.getWidth(), jLabel.getHeight()); popupDelegate.showForSort(); }//GEN-LAST:event_orderByJLabelMouseClicked
1,112,830
public String getString(SessionID sessionID, String key) throws ConfigError, FieldConvertError { String value = getSessionProperties(sessionID).getProperty(key); if (value == null) { throw new ConfigError(key + " not defined"); } return value; }
public String getString(SessionID sessionID, String key) throws ConfigError, FieldConvertError { String value = getSessionProperties(sessionID).getProperty(key); if (value == null) { throw new ConfigError(key + " not defined"); } return value; }
1,112,831
public boolean getBool(SessionID sessionID, String key) throws ConfigError, FieldConvertError { try { return BooleanConverter.convert(getString(sessionID, key)); } catch (FieldConvertError e) { throw new ConfigError(e); } }
public boolean getBool(SessionID sessionID, String key) throws ConfigError, FieldConvertError { try { return BooleanConverter.convert(getString(sessionID, key)); } catch (FieldConvertError e) { throw new ConfigError(e); } }
1,112,832
SessionSchedule(int startDay, Calendar startTime, int endDay, Calendar endTime) { initialize(startDay, startTime, endDay, endTime); }
SessionSchedule(int startDay, Calendar startTime, int endDay, Calendar endTime) { initialize(startDay, startTime, endDay, endTime); }
1,112,833
ModelTestCaseHelper(final ModelTestCase modelTestCase) { super(); this.modelTestCase = modelTestCase; }
ModelTestCaseHelper(final ModelTestCase modelTestCase) { super(); }
1,112,834
public static ModelTestUser getJUnit() { return new ModelTestUser( "parity", "thinkparity.dyndns.org", 5223, "junit"); }
public static ModelTestUser getJUnit() { return new ModelTestUser( "parity", "parity", "thinkparity.dyndns.org", 5223, "junit"); }
1,112,835
public String getUsername() { return username; }
public String getUsername() { return username + "@" + serverHost; }
1,112,836
public void reloadDocument(final Long documentId, final Boolean remoteReload) { final DisplayDocument displayDocument = getDisplayDocument(documentId); // if the display document is null; we can assume the document has been // deleted (it's not longer being created by the provider); so we find // the document and remove it if(null == displayDocument) { ListItem listItem; for(int i = 0; i < jListModel.size(); i++) { listItem = (ListItem) jListModel.get(i); if(listItem instanceof DocumentListItem) { if(((DocumentListItem) listItem).getDocumentId().equals(documentId)) { jListModel.remove(i); break; } } } } else { final ListItem listItem = DocumentListItem.create(displayDocument); // if the document list item is in the list; we need to remove it; // and re-add it. // // if the reload is not the result of a remote event; put it back // where it was; otherwise move it to the top if(jListModel.contains(listItem)) { final int selectedIndex = jList.getSelectedIndex(); final int index = jListModel.indexOf(listItem); jListModel.remove(index); if(remoteReload) { jListModel.add(0, listItem); } else { jListModel.add(index, listItem); } jList.setSelectedIndex(selectedIndex); } // if it's not in the list; just add it to the top else { jListModel.add(0, listItem); } } }
public void reloadDocument(final Long documentId, final Boolean remoteReload) { final DisplayDocument displayDocument = getDisplayDocument(documentId); // if the display document is null; we can assume the document has been // deleted (it's not longer being created by the provider); so we find // the document and remove it if(null == displayDocument) { ListItem listItem; for(int i = 0; i < jListModel.size(); i++) { listItem = (ListItem) jListModel.get(i); if(listItem instanceof DocumentListItem) { if(((DocumentListItem) listItem).getDocumentId().equals(documentId)) { jListModel.remove(i); break; } } } } else { final ListItem listItem = DocumentListItem.create(displayDocument); // if the document list item is in the list; we need to remove it; // and re-add it. // // if the reload is not the result of a remote event; put it back // where it was; otherwise move it to the top if(jListModel.contains(listItem)) { final int index = jListModel.indexOf(listItem); jListModel.remove(index); if(remoteReload) { jListModel.add(0, listItem); } else { jListModel.add(index, listItem); } jList.setSelectedIndex(selectedIndex); } // if it's not in the list; just add it to the top else { jListModel.add(0, listItem); } } }
1,112,837
public void reloadDocument(final Long documentId, final Boolean remoteReload) { final DisplayDocument displayDocument = getDisplayDocument(documentId); // if the display document is null; we can assume the document has been // deleted (it's not longer being created by the provider); so we find // the document and remove it if(null == displayDocument) { ListItem listItem; for(int i = 0; i < jListModel.size(); i++) { listItem = (ListItem) jListModel.get(i); if(listItem instanceof DocumentListItem) { if(((DocumentListItem) listItem).getDocumentId().equals(documentId)) { jListModel.remove(i); break; } } } } else { final ListItem listItem = DocumentListItem.create(displayDocument); // if the document list item is in the list; we need to remove it; // and re-add it. // // if the reload is not the result of a remote event; put it back // where it was; otherwise move it to the top if(jListModel.contains(listItem)) { final int selectedIndex = jList.getSelectedIndex(); final int index = jListModel.indexOf(listItem); jListModel.remove(index); if(remoteReload) { jListModel.add(0, listItem); } else { jListModel.add(index, listItem); } jList.setSelectedIndex(selectedIndex); } // if it's not in the list; just add it to the top else { jListModel.add(0, listItem); } } }
public void reloadDocument(final Long documentId, final Boolean remoteReload) { final DisplayDocument displayDocument = getDisplayDocument(documentId); // if the display document is null; we can assume the document has been // deleted (it's not longer being created by the provider); so we find // the document and remove it if(null == displayDocument) { ListItem listItem; for(int i = 0; i < jListModel.size(); i++) { listItem = (ListItem) jListModel.get(i); if(listItem instanceof DocumentListItem) { if(((DocumentListItem) listItem).getDocumentId().equals(documentId)) { jListModel.remove(i); break; } } } } else { final ListItem listItem = DocumentListItem.create(displayDocument); // if the document list item is in the list; we need to remove it; // and re-add it. // // if the reload is not the result of a remote event; put it back // where it was; otherwise move it to the top if(jListModel.contains(listItem)) { final int selectedIndex = jList.getSelectedIndex(); final int index = jListModel.indexOf(listItem); jListModel.remove(index); if(remoteReload) { jListModel.add(0, listItem); } else { jListModel.add(index, listItem); } } // if it's not in the list; just add it to the top else { jListModel.add(0, listItem); } } }
1,112,838
protected Avatar(final String l18nContext, final ScrollPolicy scrollPolicy, final Color background) { super(l18nContext, background); this.errors = new LinkedList<Throwable>(); this.scrollPolicy = scrollPolicy; }
protected Avatar(final String l18nContext, final ScrollPolicy scrollPolicy, final Color background) { super(l18nContext, background); this.errors = new LinkedList<Throwable>(); this.scrollPolicy = scrollPolicy; }
1,112,840
public FilterChain(final Filter<T> filter) { this.chain = new LinkedList<Filter<T>>(); addFilter(filter); }
public FilterChain(final Filter<T> filter) { this.chain = new LinkedList<Filter<T>>(); addFilter(filter); }
1,112,841
public static ListItem create(final Message message) { return new SystemMessageListItem(message); }
public static ListItem create(final Message message) { return new SystemMessageListItem(message); }
1,112,842
private Boolean isExpanded(final TabPanel tabPanel) { return expanded.get(tabPanel); }
private Boolean isExpanded(final TabPanel tabPanel) { return expanded.containsKey(tabPanel) ? expanded.get(tabPanel) : Boolean.FALSE; }
1,112,843
void syncContainer(final Long containerId, final Boolean remote) { debug(); final Container container = read(containerId); // remove the container from the panel list if (null == container) { removeContainerPanel(container); } else { if (containsContainerPanel(container)) { final TabPanel containerPanel = getContainerPanel(container); containerPanel.setMouseOver(isExpanded(containerPanel)); // if the reload is the result of a remote event add the container // at the top of the list; otherwise add it in the same location // it previously existed final Integer indexOfContainerPanel = indexOfContainerPanel(container); removeContainerPanel(container); if (remote) { addContainerPanel(0, container); } else { addContainerPanel(indexOfContainerPanel, container); } } else { addContainerPanel(0, container); } } synchronize(); debug(); }
void syncContainer(final Long containerId, final Boolean remote) { debug(); final Container container = read(containerId); // remove the container from the panel list if (null == container) { removeContainerPanel(container); } else { if (containsContainerPanel(container)) { final TabPanel containerPanel = getContainerPanel(container); containerPanel.setMouseOver(isExpanded(containerPanel)); // if the reload is the result of a remote event add the container // at the top of the list; otherwise add it in the same location // it previously existed final Integer indexOfContainerPanel = indexOfContainerPanel(container); removeContainerPanel(container); if (remote) { addContainerPanel(0, container); } else { addContainerPanel(indexOfContainerPanel, container); } } else { addContainerPanel(0, container); } } synchronize(); debug(); }
1,112,844
void syncContainer(final Long containerId, final Boolean remote) { debug(); final Container container = read(containerId); // remove the container from the panel list if (null == container) { removeContainerPanel(container); } else { if (containsContainerPanel(container)) { final TabPanel containerPanel = getContainerPanel(container); containerPanel.setMouseOver(isExpanded(containerPanel)); // if the reload is the result of a remote event add the container // at the top of the list; otherwise add it in the same location // it previously existed final Integer indexOfContainerPanel = indexOfContainerPanel(container); removeContainerPanel(container); if (remote) { addContainerPanel(0, container); } else { addContainerPanel(indexOfContainerPanel, container); } } else { addContainerPanel(0, container); } } synchronize(); debug(); }
void syncContainer(final Long containerId, final Boolean remote) { debug(); final Container container = read(containerId); // remove the container from the panel list if (null == container) { removeContainerPanel(container); } else { if (containsContainerPanel(container)) { final TabPanel containerPanel = getContainerPanel(container); containerPanel.setMouseOver(isExpanded(containerPanel)); // if the reload is the result of a remote event add the container // at the top of the list; otherwise add it in the same location // it previously existed final Integer indexOfContainerPanel = indexOfContainerPanel(container); removeContainerPanel(container); if (remote) { addContainerPanel(0, expanded, container); } else { addContainerPanel(indexOfContainerPanel, container); } } else { addContainerPanel(0, expanded, container); } } synchronize(); debug(); }
1,112,845
void syncContainer(final Long containerId, final Boolean remote) { debug(); final Container container = read(containerId); // remove the container from the panel list if (null == container) { removeContainerPanel(container); } else { if (containsContainerPanel(container)) { final TabPanel containerPanel = getContainerPanel(container); containerPanel.setMouseOver(isExpanded(containerPanel)); // if the reload is the result of a remote event add the container // at the top of the list; otherwise add it in the same location // it previously existed final Integer indexOfContainerPanel = indexOfContainerPanel(container); removeContainerPanel(container); if (remote) { addContainerPanel(0, container); } else { addContainerPanel(indexOfContainerPanel, container); } } else { addContainerPanel(0, container); } } synchronize(); debug(); }
void syncContainer(final Long containerId, final Boolean remote) { debug(); final Container container = read(containerId); // remove the container from the panel list if (null == container) { removeContainerPanel(container); } else { if (containsContainerPanel(container)) { final TabPanel containerPanel = getContainerPanel(container); containerPanel.setMouseOver(isExpanded(containerPanel)); // if the reload is the result of a remote event add the container // at the top of the list; otherwise add it in the same location // it previously existed final Integer indexOfContainerPanel = indexOfContainerPanel(container); removeContainerPanel(container); if (remote) { addContainerPanel(0, container); } else { addContainerPanel(indexOfContainerPanel, expanded, container); } } else { addContainerPanel(0, container); } } synchronize(); debug(); }
1,112,846
public void synchronize() { debug(); visiblePanels.clear(); for (final TabPanel containerPanel : containerPanels) { visiblePanels.add(containerPanel); if (isExpanded(containerPanel)) { visiblePanels.add(versionsPanels.get(containerPanel)); } } // add visible cells not in the model for (final TabPanel visiblePanel : visiblePanels) { if (!listModel.contains(visiblePanel)) { listModel.add(visiblePanels.indexOf(visiblePanel), visiblePanel); } } // prune cells in the model no longer visible final TabPanel[] obsolutePanels = new TabPanel[listModel.size()]; listModel.copyInto(obsolutePanels); for (final TabPanel obsoletePanel : obsolutePanels) { if (!visiblePanels.contains(obsoletePanel)) { listModel.removeElement(obsoletePanel); } } debug(); }
public void synchronize() { debug(); visiblePanels.clear(); for (final TabPanel containerPanel : containerPanels) { visiblePanels.add(containerPanel); if (isExpanded(containerPanel)) { visiblePanels.add(versionsPanels.get(containerPanel)); } } // add visible cells not in the model for (final TabPanel visiblePanel : visiblePanels) { if (!listModel.contains(visiblePanel)) { listModel.add(visiblePanels.indexOf(visiblePanel), visiblePanel); } } // prune cells in the model no longer visible final TabPanel[] obsolutePanels = new TabPanel[listModel.size()]; listModel.copyInto(obsolutePanels); for (final TabPanel obsoletePanel : obsolutePanels) { if (!visiblePanels.contains(obsoletePanel)) { listModel.removeElement(obsoletePanel); } } debug(); }
1,112,847
public void synchronize() { debug(); visiblePanels.clear(); for (final TabPanel containerPanel : containerPanels) { visiblePanels.add(containerPanel); if (isExpanded(containerPanel)) { visiblePanels.add(versionsPanels.get(containerPanel)); } } // add visible cells not in the model for (final TabPanel visiblePanel : visiblePanels) { if (!listModel.contains(visiblePanel)) { listModel.add(visiblePanels.indexOf(visiblePanel), visiblePanel); } } // prune cells in the model no longer visible final TabPanel[] obsolutePanels = new TabPanel[listModel.size()]; listModel.copyInto(obsolutePanels); for (final TabPanel obsoletePanel : obsolutePanels) { if (!visiblePanels.contains(obsoletePanel)) { listModel.removeElement(obsoletePanel); } } debug(); }
public void synchronize() { debug(); visiblePanels.clear(); for (final TabPanel containerPanel : containerPanels) { visiblePanels.add(containerPanel); if (isExpanded(containerPanel)) { visiblePanels.add(versionsPanels.get(containerPanel)); } } // add visible cells not in the model for (final TabPanel visiblePanel : visiblePanels) { if (!listModel.contains(visiblePanel)) { listModel.add(visiblePanels.indexOf(visiblePanel), visiblePanel); } } // prune cells in the model no longer visible final TabPanel[] obsolutePanels = new TabPanel[listModel.size()]; listModel.copyInto(obsolutePanels); for (final TabPanel obsoletePanel : obsolutePanels) { if (!visiblePanels.contains(obsoletePanel)) { listModel.removeElement(obsoletePanel); } } debug(); }
1,112,848