rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
return new DrawingMethods().dPrimeGetPreferredSize(table.length); | return new DrawingMethods().dPrimeGetPreferredSize(table.length,info); | public Dimension getPreferredSize(){ return new DrawingMethods().dPrimeGetPreferredSize(table.length); } |
new DrawingMethods().dPrimeDraw(table, g); | new DrawingMethods().dPrimeDraw(table, info, vec, g); | public void paintComponent(Graphics g){ super.paintComponent(g); new DrawingMethods().dPrimeDraw(table, g); } |
public CheckDataPanel(HaploData hd) throws IOException, PedFileException{ | public CheckDataPanel(HaploData hd, boolean disp) throws IOException, PedFileException{ | public CheckDataPanel(HaploData hd) throws IOException, PedFileException{ STATUS_COL = 8; setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); pedfile = hd.getPedFile(); theData = hd; Vector result = pedfile.getResults(); int numResults = result.size(); Vector tableColum... |
final CheckDataTableModel tableModel = new CheckDataTableModel(tableColumnNames, tableData, markerRatings); | tableModel = new CheckDataTableModel(tableColumnNames, tableData, markerRatings); | public CheckDataPanel(HaploData hd) throws IOException, PedFileException{ STATUS_COL = 8; setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); pedfile = hd.getPedFile(); theData = hd; Vector result = pedfile.getResults(); int numResults = result.size(); Vector tableColum... |
table = new JTable(tableModel); final CheckDataCellRenderer renderer = new CheckDataCellRenderer(); try{ table.setDefaultRenderer(Class.forName("java.lang.Double"), renderer); table.setDefaultRenderer(Class.forName("java.lang.Integer"), renderer); table.setDefaultRenderer(Class.forName("java.lang.Long"), renderer); }ca... | if (disp){ table = new JTable(tableModel); final CheckDataCellRenderer renderer = new CheckDataCellRenderer(); try{ table.setDefaultRenderer(Class.forName("java.lang.Double"), renderer); table.setDefaultRenderer(Class.forName("java.lang.Integer"), renderer); table.setDefaultRenderer(Class.forName("java.lang.Long"), ren... | public CheckDataPanel(HaploData hd) throws IOException, PedFileException{ STATUS_COL = 8; setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); pedfile = hd.getPedFile(); theData = hd; Vector result = pedfile.getResults(); int numResults = result.size(); Vector tableColum... |
table.getColumnModel().getColumn(0).setPreferredWidth(30); if (theData.infoKnown){ table.getColumnModel().getColumn(1).setPreferredWidth(100); } JScrollPane tableScroller = new JScrollPane(table); add(tableScroller); } | } | public CheckDataPanel(HaploData hd) throws IOException, PedFileException{ STATUS_COL = 8; setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); pedfile = hd.getPedFile(); theData = hd; Vector result = pedfile.getResults(); int numResults = result.size(); Vector tableColum... |
int numCols = table.getColumnCount(); | int numCols = tableModel.getColumnCount(); | public void printTable(File outfile) throws IOException{ FileWriter checkWriter = null; if (outfile != null){ checkWriter = new FileWriter(outfile); } int numCols = table.getColumnCount(); StringBuffer header = new StringBuffer(); for (int i = 0; i < numCols; i++... |
header.append(table.getColumnName(i)).append("\t"); | header.append(tableModel.getColumnName(i)).append("\t"); | public void printTable(File outfile) throws IOException{ FileWriter checkWriter = null; if (outfile != null){ checkWriter = new FileWriter(outfile); } int numCols = table.getColumnCount(); StringBuffer header = new StringBuffer(); for (int i = 0; i < numCols; i++... |
for (int i = 0; i < table.getRowCount(); i++){ | for (int i = 0; i < tableModel.getRowCount(); i++){ | public void printTable(File outfile) throws IOException{ FileWriter checkWriter = null; if (outfile != null){ checkWriter = new FileWriter(outfile); } int numCols = table.getColumnCount(); StringBuffer header = new StringBuffer(); for (int i = 0; i < numCols; i++... |
sb.append(table.getValueAt(i,j)).append("\t"); | sb.append(tableModel.getValueAt(i,j)).append("\t"); | public void printTable(File outfile) throws IOException{ FileWriter checkWriter = null; if (outfile != null){ checkWriter = new FileWriter(outfile); } int numCols = table.getColumnCount(); StringBuffer header = new StringBuffer(); for (int i = 0; i < numCols; i++... |
if (((Boolean)table.getValueAt(i, numCols-1)).booleanValue()){ | if (((Boolean)tableModel.getValueAt(i, numCols-1)).booleanValue()){ | public void printTable(File outfile) throws IOException{ FileWriter checkWriter = null; if (outfile != null){ checkWriter = new FileWriter(outfile); } int numCols = table.getColumnCount(); StringBuffer header = new StringBuffer(); for (int i = 0; i < numCols; i++... |
if (idx < 0) idx = tp.getModel().getChildCount(); | if (idx < 0) idx = tp.getModel().getColumnsFolder().getChildCount(); | public void actionPerformed(ActionEvent evt) { Selectable invoker = pp.getSelection(); if (invoker instanceof TablePane) { TablePane tp = (TablePane) invoker; int idx = tp.getSelectedColumnIndex(); try { if (idx < 0) idx = tp.getModel().getChildCount(); } catch (ArchitectException e) { idx = 0; } t... |
tp.getModel().addChild(idx, new SQLColumn(tp.getModel(), "new column", Types.INTEGER, "Integer", 10, 0, DatabaseMetaData.columnNullable, null, null, null, false)); | tp.getModel().addColumn(idx, new SQLColumn(tp.getModel(), "new column", Types.INTEGER, "Integer", 10, 0, DatabaseMetaData.columnNullable, null, null, null, false)); | public void actionPerformed(ActionEvent evt) { Selectable invoker = pp.getSelection(); if (invoker instanceof TablePane) { TablePane tp = (TablePane) invoker; int idx = tp.getSelectedColumnIndex(); try { if (idx < 0) idx = tp.getModel().getChildCount(); } catch (ArchitectException e) { idx = 0; } t... |
public static PlayPenComponentUI createUI(JComponent c) { | public static PlayPenComponentUI createUI(PlayPenComponent c) { | public static PlayPenComponentUI createUI(JComponent c) { logger.debug("Creating new IERelationshipUI for "+c); return new IERelationshipUI(); } |
Map paramValues = config.getParamValues(); appForm.setJndiFactory((String)paramValues.get(ApplicationConfig.JNDI_FACTORY)); appForm.setJndiURL((String)paramValues.get(ApplicationConfig.JNDI_URL)); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception{ ... | |
if ( img.getWidth() > columnWidth || img.getHeight() > rowHeight ) { img = img.getSubimage( 0, 0, Math.min( img.getWidth(), columnWidth ), Math.min( img.getHeight(), rowHeight ) ); } | private void paintThumbnail( Graphics2D g2, PhotoInfo photo, int startx, int starty, boolean isSelected ) { log.debug( "paintThumbnail entry " + photo.getUid() ); long startTime = System.currentTimeMillis(); long thumbReadyTime = 0; long thumbDrawnTime = 0; long endTime = 0; ... | |
public void tallyCCInd(byte a1, byte a2, int cc){ | public void tallyCCInd(byte[] a, int cc){ if (cc == 2) cc = 0; byte a1 = a[0]; byte a2 = a[1]; | public void tallyCCInd(byte a1, byte a2, int cc){ //case = 0, control = 1 for int cc if (a1 >= 5 && a2 >= 5){ counts[cc][0]++; counts[cc][1]++; if (allele1 == 0){ allele1 = (byte)(a1 - 4); allele2 = (byte)(a2 - 4); } }els... |
logger.debug("NEW TABLE "+name+"@"+hashCode()); | public SQLTable(SQLDatabase parentDb, SQLObject parent, SQLCatalog catalog, SQLSchema schema, String name, String remarks, String objectType) { this.parentDatabase = parentDb; this.parent = parent; this.catalog = catalog; this.schema = schema; this.tableName = name; this.remarks = remarks; this.columnsPopulated... | |
new String[] {"SYSTEM TABLE", "TABLE", "VIEW"}); | new String[] {"TABLE", "VIEW"}); | protected static void addTablesToDatabase(SQLDatabase addTo) throws SQLException, ArchitectException { HashMap catalogs = new HashMap(); HashMap schemas = new HashMap(); synchronized (addTo) { Connection con = addTo.getConnection(); DatabaseMetaData dbmd = con.getMetaData(); ResultSet mdTables = null; try... |
if (jobSize == null) { bar.setIndeterminate(true); } else { bar.setIndeterminate(false); bar.setMaximum(jobSize.intValue()); | if (bar != null) { if (jobSize == null) { bar.setIndeterminate(true); } else { bar.setIndeterminate(false); bar.setMaximum(jobSize.intValue()); } bar.setVisible(true); bar.setValue(monitorable.getProgress()); bar.setIndeterminate(false); | public void actionPerformed(ActionEvent evt) { // update the progress bar logger.debug("updating progress bar..."); try { Integer jobSize = monitorable.getJobSize(); if (jobSize == null) { bar.setIndeterminate(true); } else { bar.setIndeterminate(false); bar.setMaximum(jobSize.intValue()); } if (... |
bar.setVisible(true); bar.setValue(monitorable.getProgress()); bar.setIndeterminate(false); | if (pm != null) { if (jobSize != null) { pm.setMaximum(jobSize.intValue()); } pm.setProgress(monitorable.getProgress()); logger.debug("progress: " + monitorable.getProgress()); pm.setNote(monitorable.getMessage()); } | public void actionPerformed(ActionEvent evt) { // update the progress bar logger.debug("updating progress bar..."); try { Integer jobSize = monitorable.getJobSize(); if (jobSize == null) { bar.setIndeterminate(true); } else { bar.setIndeterminate(false); bar.setMaximum(jobSize.intValue()); } if (... |
logger.debug("all done, terminating timer thread..."); | public void actionPerformed(ActionEvent evt) { // update the progress bar logger.debug("updating progress bar..."); try { Integer jobSize = monitorable.getJobSize(); if (jobSize == null) { bar.setIndeterminate(true); } else { bar.setIndeterminate(false); bar.setMaximum(jobSize.intValue()); } if (... | |
bar.setVisible(false); | if (bar != null) { bar.setVisible(false); } if (pm != null) { logger.debug("pm done, max was: " + pm.getMaximum()); } | public void actionPerformed(ActionEvent evt) { // update the progress bar logger.debug("updating progress bar..."); try { Integer jobSize = monitorable.getJobSize(); if (jobSize == null) { bar.setIndeterminate(true); } else { bar.setIndeterminate(false); bar.setMaximum(jobSize.intValue()); } if (... |
if (seq.equals(((TagSequence)o1).getSequence())){ return 1; }else if (seq.equals(((TagSequence)o2).getSequence())){ return -1; } | public int compare(Object o1, Object o2) { if(getPairwiseCompRsq(seq,((TagSequence)o1).getSequence()) == getPairwiseCompRsq(seq,((TagSequence)o2).getSequence())) { return 0; } else if (getPairwiseCompRsq(seq,((TagSequence)o1).getSequence()) > ... | |
this(s,include,exclude,ac,DEFAULT_RSQ_CUTOFF,AGGRESSIVE_TRIPLE, DEFAULT_MAXDIST, DEFAULT_MAXNUMTAGS); | this(s,include,exclude,ac,DEFAULT_RSQ_CUTOFF,AGGRESSIVE_TRIPLE, DEFAULT_MAXDIST, DEFAULT_MAXNUMTAGS,true); | public Tagger(Vector s, Vector include, Vector exclude, AlleleCorrelator ac){ this(s,include,exclude,ac,DEFAULT_RSQ_CUTOFF,AGGRESSIVE_TRIPLE, DEFAULT_MAXDIST, DEFAULT_MAXNUMTAGS); } |
pt.removeTagged(theTag.sequence); | private HashSet addTag(PotentialTag theTag,Hashtable potentialTagHash, Vector sitesToCapture) { Vector potentialTags = new Vector(potentialTagHash.values()); potentialTags.remove(theTag); potentialTagHash.remove(theTag.sequence); //newlyTagged contains alleles which were not tagged by an... | |
if(pt.taggedCount() == 0 && !sitesToCapture.contains(pt.sequence)) { | if(pt.taggedCount() == 0){ | private HashSet addTag(PotentialTag theTag,Hashtable potentialTagHash, Vector sitesToCapture) { Vector potentialTags = new Vector(potentialTagHash.values()); potentialTags.remove(theTag); potentialTagHash.remove(theTag.sequence); //newlyTagged contains alleles which were not tagged by an... |
return createTime; | return createTime != null ? (Date) createTime.clone() : null; | public Date getCreateTime() { return createTime; } |
public void run(Context context, XMLOutput output) throws Exception { | public void run(JellyContext context, XMLOutput output) throws Exception { | public void run(Context context, XMLOutput output) throws Exception { for ( int i = 0, size = scripts.length; i < size; i++ ) { Script script = scripts[i]; script.run( context, output ); } } |
Enumeration enum = props.propertyNames(); while (enum.hasMoreElements()) { String key = (String) enum.nextElement(); | Enumeration propsEnum = props.propertyNames(); while (propsEnum.hasMoreElements()) { String key = (String) propsEnum.nextElement(); | public void doTag(final XMLOutput output) throws JellyTagException { if (file == null && uri == null) { throw new JellyTagException("This tag must define a 'file' or 'uri' attribute"); } InputStream is = null; if (file != null) { File f = new File(file); ... |
} | public void doTag(final XMLOutput output) throws JellyTagException { if (file == null && uri == null) { throw new JellyTagException("This tag must define a 'file' or 'uri' attribute"); } InputStream is = null; if (file != null) { File f = new File(file); ... | |
Iterator ditr = dupCheck.iterator(); while (ditr.hasNext()){ String n = (String) ditr.next(); int numdups = 1; for (int i = 0; i < names.size(); i++){ if (names.get(i).equals(n)){ if (numdups > 1){ String newName = n + "." + numdups; while (names.contains(newName)){ numdups++; newName = n + "." + numdups; } names.setE... | void prepareMarkerInput(File infile, String[][] hapmapGoodies) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position. the maxdist ... | |
else if (infile != null){ int numLines = names.size(); class SortingHelper implements Comparable{ long pos; int orderInFile; public SortingHelper(long pos, int order){ this.pos = pos; this.orderInFile = order; } public int compareTo(Object o) { SortingHelper sh = (SortingHelper)o; if (sh.pos > pos){ return -1; }... | Iterator ditr = dupCheck.iterator(); while (ditr.hasNext()){ String n = (String) ditr.next(); int numdups = 1; for (int i = 0; i < names.size(); i++){ if (names.get(i).equals(n)){ if (numdups > 1){ String newName = n + "." + numdups; while (names.contains(newName)){ numdups++; newName = n + "." + numdups; } names.setE... | void prepareMarkerInput(File infile, String[][] hapmapGoodies) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position. the maxdist ... |
} } boolean needSort = false; Vector sortHelpers = new Vector(); for (int k = 0; k < (numLines); k++){ sortHelpers.add(new SortingHelper(Long.parseLong((String)positions.get(k)),k)); } for (int k = 1; k < (numLines); k++){ if(((SortingHelper)sortHelpers.get(k)).compareTo(sortHelpers.get(k-1)) < 0) { needSort = true... | numdups++; } } } int numLines = names.size(); class SortingHelper implements Comparable{ long pos; int orderInFile; public SortingHelper(long pos, int order){ this.pos = pos; this.orderInFile = order; } public int compareTo(Object o) { SortingHelper sh = (SortingHelper)o; if (sh.pos > pos){ return -1; }else if (sh... | void prepareMarkerInput(File infile, String[][] hapmapGoodies) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position. the maxdist ... |
SortingHelper sh = (SortingHelper)o; if (sh.pos > pos){ return -1; }else if (sh.pos < pos){ return 1; }else{ return 0; } | SortingHelper sh = (SortingHelper)o; if (sh.pos > pos){ return -1; }else if (sh.pos < pos){ return 1; }else{ return 0; | public int compareTo(Object o) { SortingHelper sh = (SortingHelper)o; if (sh.pos > pos){ return -1; }else if (sh.pos < pos){ return 1; }else{ ... |
} | public int compareTo(Object o) { SortingHelper sh = (SortingHelper)o; if (sh.pos > pos){ return -1; }else if (sh.pos < pos){ return 1; }else{ ... | |
ServerConnection serverConnection = context.getServerConnection(); | ServerConnection serverConnection = ServiceUtils.getServerConnectionEvenIfCluster( context.getApplicationConfig()); | public ObjectInfo getMBeanInfo(ServiceContext context) throws ServiceException { canAccessThisMBean(context); ServerConnection serverConnection = context.getServerConnection(); ObjectInfo objectInfo = serverConnection.getObjectInfo(context.getObjectName()); retu... |
exportedKeys.add(r); | exportedKeysFolder.addChild(r); | public void addExportedKey(SQLRelationship r) { exportedKeys.add(r); } |
importedKeys.add(r); | importedKeysFolder.addChild(r); | public void addImportedKey(SQLRelationship r) { importedKeys.add(r); } |
populate(); | public synchronized List getColumns() throws ArchitectException { return columnsFolder.getChildren(); } | |
r.getPkTable().removeExportedKey(r); logger.debug(r); } it = exportedKeys.iterator(); while (it.hasNext()) { SQLRelationship r = (SQLRelationship) it.next(); r.getFkTable().removeImportedKey(r); | public void removeDependencies() { Iterator it = importedKeys.iterator(); while (it.hasNext()) { SQLRelationship r = (SQLRelationship) it.next(); // FIXME: have to actually remove relationships logger.debug(r); } } | |
svnbranchLabel.setText( prop.getProperty( "svn.info.url", "unknown" ) ); | svnbranchLabel.setText( prop.getProperty( "svn.url", "unknown" ) ); | 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... |
String versionTag = prop.getProperty( "build.version_tag", "unknown" ); versionLabel.setText( version + " (" + versionTag + ")" ); | String versionTag = prop.getProperty( "build.version_tag", "" ); if ( versionTag.length() > 0 ) { version = version + " (" + versionTag + ")"; } versionLabel.setText( version ); | 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... |
lastSaveOpSuccessful = true; | lastSaveOpSuccessful = true; JOptionPane.showMessageDialog(ArchitectFrame.this, "Save successful"); | public boolean saveOrSaveAs(boolean showChooser, boolean separateThread) { if (project.getFile() == null || showChooser) { JFileChooser chooser = new JFileChooser(project.getFile()); chooser.addChoosableFileFilter(ASUtils.ARCHITECT_FILE_FILTER); int response = chooser.showSaveDialog(ArchitectFrame.this); if (... |
lastSaveOpSuccessful = true; | lastSaveOpSuccessful = true; JOptionPane.showMessageDialog(ArchitectFrame.this, "Save successful"); | public void run() { try { lastSaveOpSuccessful = false; project.setSaveInProgress(true); project.save(finalSeparateThread ? pm : null); lastSaveOpSuccessful = true; } catch (Exception ex) { lastSaveOpSuccessful = false; JOptionPane.showMessageDialog (ArchitectFrame.this, ... |
public void run(Context context, XMLOutput output) throws Exception { for ( int i = 0, size = expressions.length; i < size; i++ ) { Expression expression = expressions[i]; Method method = methods[i]; Class type = types[i]; Object value = null; if ( type.isAssignableFrom( Expression.class ) ) { value = expression;... | public void run(JellyContext context, XMLOutput output) throws Exception { for (int i = 0, size = expressions.length; i < size; i++) { Expression expression = expressions[i]; Method method = methods[i]; Class type = types[i]; Object value = null; if (type.isAssignableFrom(Expression.class) && !type.isAssignableFro... | public void run(Context context, XMLOutput output) throws Exception { // initialize all the properties of the tag before its used // if there is a problem abort this tag for ( int i = 0, size = expressions.length; i < size; i++ ) { Expression expression = expressions[i]; M... |
logger.debug("SQLObject children got inserted: "+e); SQLObject o = e.getSQLSource(); SQLObject[] c = e.getChildren(); for (int i = 0; i < c.length; i++) { if (c[i] instanceof SQLTable) { c[i].addSQLObjectListener(this); } } | public void dbChildrenInserted(SQLObjectEvent e) { firePropertyChange("model.children", null, null); revalidate(); } | |
logger.debug("SQLObject children got removed: "+e); SQLObject o = e.getSQLSource(); SQLObject[] c = e.getChildren(); for (int i = 0; i < c.length; i++) { if (c[i] instanceof SQLTable) { c[i].removeSQLObjectListener(this); for (int j = 0; j < getComponentCount(); j++) { TablePane tp = (TablePane) getComponent(j); if (tp... | public void dbChildrenRemoved(SQLObjectEvent e) { firePropertyChange("model.children", null, null); revalidate(); } | |
firePropertyChange("model.children", null, null); revalidate(); | throw new UnsupportedOperationException ("FIXME: we have to make sure we're listening to the right objects now!"); | public void dbStructureChanged(SQLObjectEvent e) { firePropertyChange("model.children", null, null); revalidate(); } |
tagScript = (TagScript) tagScriptStack.remove(tagScriptStack.size() - 1); if (tagScript != null) { if (textBuffer.length() > 0) { script.addScript(new TextScript(textBuffer.toString())); textBuffer.setLength(0); } script = (ScriptBlock) scriptStack.pop(); | try { tagScript = (TagScript) tagScriptStack.remove(tagScriptStack.size() - 1); if (tagScript != null) { if (textBuffer.length() > 0) { addTextScript(textBuffer.toString()); textBuffer.setLength(0); } script = (ScriptBlock) scriptStack.pop(); } else { textBuffer.append("</"); textBuffer.append(qName); textBuffer.append... | public void endElement(String namespaceURI, String localName, String qName) throws SAXException { tagScript = (TagScript) tagScriptStack.remove(tagScriptStack.size() - 1); if (tagScript != null) { if (textBuffer.length() > 0) { script.addScript(new TextScript(textBuffe... |
else { textBuffer.append("</"); textBuffer.append(qName); textBuffer.append(">"); | catch (SAXException e) { throw e; | public void endElement(String namespaceURI, String localName, String qName) throws SAXException { tagScript = (TagScript) tagScriptStack.remove(tagScriptStack.size() - 1); if (tagScript != null) { if (textBuffer.length() > 0) { script.addScript(new TextScript(textBuffe... |
int size = tagStack.size(); if ( size <= 0 ) { parentTag = null; } else { parentTag = (Tag) tagStack.remove( size - 1 ); | catch (Exception e) { log.error( "Caught exception: " + e, e ); throw new SAXException( "Runtime Exception: " + e, e ); | public void endElement(String namespaceURI, String localName, String qName) throws SAXException { tagScript = (TagScript) tagScriptStack.remove(tagScriptStack.size() - 1); if (tagScript != null) { if (textBuffer.length() > 0) { script.addScript(new TextScript(textBuffe... |
script.addScript(new TextScript(textBuffer.toString())); | addTextScript(textBuffer.toString()); | public void startElement( String namespaceURI, String localName, String qName, Attributes list) throws SAXException { try { // if this is a tag then create a script to run it // otherwise pass the text to the current body ... |
inputArray[3] = null; | public static void main(String[] args) { //this parses the command line arguments. if nogui mode is specified, //then haploText will execute whatever the user specified HaploText argParser = new HaploText(args); //if nogui is specified, then HaploText has already executed everything, and... | |
return context.getVariable( (String) key ); | return context.findVariable( (String) key ); | public Object get(Object key) { return context.getVariable( (String) key ); } |
*/ return new Dimension(lrh.left + lrh.right + i.left + i.right + hgap, lrh.height + i.top + i.bottom + (vgap*(rows))); | public Dimension minimumLayoutSize(Container parent) { LeftRightHeight lrh = calcSizes(parent); Insets i = parent.getInsets(); int rows = parent.getComponentCount() / 2; return new Dimension(lrh.left + lrh.right + i.left + i.right + hgap, lrh.height + i.top + i.bottom + (vgap*(rows-1))); } | |
formattedValue = value.toString(); | formattedValue = pctFormat.format(value); } } else if (column == 14 ) { if (value == null) { formattedValue = "null"; } else { formattedValue = aldf.format(value); | public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { String formattedValue = new String(); if ( column < 5) { if (value == null) { formattedValue = "null"; } else ... |
boolean newColumnsInPk = false; if (insertionPoint == COLUMN_INDEX_END_OF_PK) { insertionPoint = tp.getModel().getPkSize(); newColumnsInPk = true; } else if (insertionPoint == COLUMN_INDEX_START_OF_NON_PK) { insertionPoint = tp.getModel().getPkSize(); newColumnsInPk = false; } else if (insertionPoint < 0) { insertionPo... | ArrayList<int[]> paths = (ArrayList<int[]>) t.getTransferData(importFlavor); | public void drop(DropTargetDropEvent dtde) { PlayPen pp = tp.getPlayPen(); Point loc = pp.unzoomPoint(new Point(dtde.getLocation())); loc.x -= tp.getX(); loc.y -= tp.getY(); logger.debug("Drop target drop event on "+tp.getName()+": "+dtde); Transferable t = dtde.getTransferable(); DataFlavor importFlavo... |
Iterator removeIt = paths.iterator(); ArrayList removeList = new ArrayList(); while (removeIt.hasNext()) { removeList.add(dbtree.getNodeForDnDPath((int[]) removeIt.next())); } for(int ii = removeList.size()-1; ii > -1; ii--) { Object someData = removeList.get(ii); logger.debug("drop: got object of type "+someData.ge... | ArrayList<SQLObject> droppedItems = new ArrayList<SQLObject>(); for (int[] path : paths) { droppedItems.add(dbtree.getNodeForDnDPath(path)); | public void drop(DropTargetDropEvent dtde) { PlayPen pp = tp.getPlayPen(); Point loc = pp.unzoomPoint(new Point(dtde.getLocation())); loc.x -= tp.getX(); loc.y -= tp.getY(); logger.debug("Drop target drop event on "+tp.getName()+": "+dtde); Transferable t = dtde.getTransferable(); DataFlavor importFlavo... |
if (evt.getClickCount() == 2) { | if ((evt.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 && evt.getClickCount() == 2) { | public void mouseClicked(MouseEvent evt) { if (evt.getClickCount() == 2) { TablePane tp = (TablePane) evt.getSource(); if (tp.isSelected()) { ArchitectFrame af = ArchitectFrame.getMainInstance(); int selectedColIndex = tp.getSelectedColumnIndex(); if (selectedColIndex == COLUMN_INDEX_NONE) { af.editT... |
for (int i = 0; i < st.countTokens()-1; i++){ | int numPieces = st.countTokens()-1; for (int i = 0; i < numPieces; i++){ | void browse(int browseType){ String name; String markerInfoName = ""; HaploView h = (HaploView) this.getParent(); h.fc.setSelectedFile(new File("")); int returned = h.fc.showOpenDialog(this); if (returned != JFileChooser.APPROVE_OPTION) return; File file = h.fc.getSe... |
System.out.println(baseName); | void browse(int browseType){ String name; String markerInfoName = ""; HaploView h = (HaploView) this.getParent(); h.fc.setSelectedFile(new File("")); int returned = h.fc.showOpenDialog(this); if (returned != JFileChooser.APPROVE_OPTION) return; File file = h.fc.getSe... | |
if (currentInd.getZeroed(i)){ continue; } | private void buildCCSet(PedFile pf, Vector affectedStatus, TreeSet snpsToBeTested){ ArrayList results = new ArrayList(); int numMarkers = Chromosome.getUnfilteredSize(); Vector indList = pf.getUnrelatedIndividuals(); int numInds = indList.size(); if(affectedStatus == null || affec... | |
urlString.append(value); | try { urlString.append(URLEncoder.encode(value, "UTF-8")); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } | public static String appendURLParam(String url, String param, String value){ StringBuffer urlString = new StringBuffer(url); if (url.indexOf("?") == -1) { urlString.append("?"); }else if(url.endsWith("&") == false) { urlString.append("&"); } urlString.append(... |
public Tag createTag() { | public Tag createTag(String name, Attributes attributes) { | public void doTag(XMLOutput output) throws Exception { invokeBody(output); if (name == null) { throw new MissingAttributeException("name"); } if (dynaClass == null) { throw new MissingAttributeException("dynaClass"); } final DynaClass theDynaClass = dynaClass; final Map ... |
public Tag createTag() { | public Tag createTag(String name, Attributes attributes) { | public Tag createTag() { return new DynamicDynaBeanTag(theDynaClass, beanAttributes, varAttribute); } |
returnStr += dprime; | NumberFormat nf = NumberFormat.getInstance(); nf.setMinimumFractionDigits(2); nf.setMaximumFractionDigits(2); returnStr += nf.format(dprime); | public String computeDPrime(int a, int b, int c, int d, int e, double f){ int i,j,k,count,itmp; int low_i = 0; int high_i = 0; double[] nAA = new double[1]; double[] nBB = new double[1]; double[] nAB = new double[1]; double[] nBA = new double[1]; double[] pAA = new double[1]; double[] pBB = new double[1]; double[... |
returnStr += loglike1-loglike0; | returnStr += nf.format(loglike1-loglike0); | public String computeDPrime(int a, int b, int c, int d, int e, double f){ int i,j,k,count,itmp; int low_i = 0; int high_i = 0; double[] nAA = new double[1]; double[] nBB = new double[1]; double[] nAB = new double[1]; double[] nBA = new double[1]; double[] pAA = new double[1]; double[] pBB = new double[1]; double[... |
returnStr += r2; | returnStr += nf.format(r2); | public String computeDPrime(int a, int b, int c, int d, int e, double f){ int i,j,k,count,itmp; int low_i = 0; int high_i = 0; double[] nAA = new double[1]; double[] nBB = new double[1]; double[] nAB = new double[1]; double[] nBA = new double[1]; double[] pAA = new double[1]; double[] pBB = new double[1]; double[... |
System.err.println( "getNewFname " + date + " " + strExtension ); | log.debug( "getNewFname " + date + " " + strExtension ); | private File getNewFname( java.util.Date date, String strExtension ) { System.err.println( "getNewFname " + date + " " + strExtension ); SimpleDateFormat fmt = new SimpleDateFormat( "yyyy" ); String strYear = fmt.format( date ); fmt.applyPattern( "yyyyMM" ); String strMonth = fmt.format( date ); fmt.applyPat... |
System.err.println( "YearDir: " + yearDir ); | log.debug( "YearDir: " + yearDir ); | private File getNewFname( java.util.Date date, String strExtension ) { System.err.println( "getNewFname " + date + " " + strExtension ); SimpleDateFormat fmt = new SimpleDateFormat( "yyyy" ); String strYear = fmt.format( date ); fmt.applyPattern( "yyyyMM" ); String strMonth = fmt.format( date ); fmt.applyPat... |
System.err.println( "making yeardir" ); | log.debug( "making yeardir" ); | private File getNewFname( java.util.Date date, String strExtension ) { System.err.println( "getNewFname " + date + " " + strExtension ); SimpleDateFormat fmt = new SimpleDateFormat( "yyyy" ); String strYear = fmt.format( date ); fmt.applyPattern( "yyyyMM" ); String strMonth = fmt.format( date ); fmt.applyPat... |
System.err.println( "MontDir: " + monthDir ); | log.debug( "MontDir: " + monthDir ); | private File getNewFname( java.util.Date date, String strExtension ) { System.err.println( "getNewFname " + date + " " + strExtension ); SimpleDateFormat fmt = new SimpleDateFormat( "yyyy" ); String strYear = fmt.format( date ); fmt.applyPattern( "yyyyMM" ); String strMonth = fmt.format( date ); fmt.applyPat... |
if (counts == null){ return (""); | if(counts == null || counts.length == 1) { return ""; | public String getRatios() { //if the array is null this is a block-title node, not an actual hap if (counts == null){ return (""); } nf.setMinimumFractionDigits(1); nf.setMaximumFractionDigits(1); for(int i= 0;i<counts.length;i++) { for(int j= 0;j<coun... |
nf.setMinimumFractionDigits(1); nf.setMaximumFractionDigits(1); | return nf.format(this.counts[0][0] / this.counts[0][1]) + ", " + nf.format(this.counts[1][0] / this.counts[1][1]) ; | public String getRatios() { //if the array is null this is a block-title node, not an actual hap if (counts == null){ return (""); } nf.setMinimumFractionDigits(1); nf.setMaximumFractionDigits(1); for(int i= 0;i<counts.length;i++) { for(int j= 0;j<coun... |
for(int i= 0;i<counts.length;i++) { for(int j= 0;j<counts[i].length;j++) { counts[i][j] = (new Double(nf.format(counts[i][j]))).doubleValue(); } } if (counts.length == 1){ if (this.counts[0][0] > this.counts[0][1]){ return this.counts[0][0] + " : " + this.counts[0][1]; }else{ return this.counts[0][1] + " : " + this.c... | public String getRatios() { //if the array is null this is a block-title node, not an actual hap if (counts == null){ return (""); } nf.setMinimumFractionDigits(1); nf.setMaximumFractionDigits(1); for(int i= 0;i<counts.length;i++) { for(int j= 0;j<coun... | |
"DoubleClick")); | ArchitectSwingConstants.ACTION_COMMAND_SRC_PLAYPEN)); | public void mouseClicked(MouseEvent evt) { if (evt.getClickCount() == 2) { ArchitectFrame.getMainInstance().editRelationshipAction.actionPerformed (new ActionEvent(evt.getSource(), ActionEvent.ACTION_PERFORMED, "DoubleClick")); } } |
return photoCollection; | if ( photoCollection != null ) { return photoCollection.getOrigCollection(); } return null; | public PhotoCollection getCollection() { return photoCollection; } |
public Tag createTag ( ) throws Exception { | public Tag createTag(String name, Attributes attributes) throws Exception { | public Tag createTag ( ) throws Exception { return new ConstraintTag ( this ); } |
public Tag createTag ( ) { | public Tag createTag(String name, Attributes attributes) { | public Tag createTag ( ) { return new ConstraintTag ( this ); // still scratching my head about "this" usage... } |
assertEquals("target/testFileTag.tmp", "<html xmlns=\"http: | public void testSimpleFileTag() throws Exception { setUpScript("testFileTag.jelly"); Script script = getJelly().compileScript(); script.run(getJellyContext(), getXMLOutput()); FileInputStream fis = new FileInputStream("target/testFileTag.tmp"); String data = readInputStreamInto... | |
"Updated application with ID "+config.getApplicationId()); | "Updated application "+"\""+config.getName()+"\""); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... |
public String toIdentifier(String logicalName, String physicalName) { | private String toIdentifier(String logicalName, String physicalName) { | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_'); logger.debug("after replace of spaces: " + ident); // see if it's ... |
stylesheet.applyTemplates( source, select ); | stylesheet.applyTemplates( source, select, mode ); | public void doTag(XMLOutput output) throws JellyTagException { StylesheetTag tag = (StylesheetTag) findAncestorWithClass( StylesheetTag.class ); if (tag == null) { throw new JellyTagException( "<applyTemplates> tag must be inside a <stylesheet> tag" ); } ... |
stylesheet.applyTemplates( source ); | stylesheet.applyTemplates( source, mode ); | public void doTag(XMLOutput output) throws JellyTagException { StylesheetTag tag = (StylesheetTag) findAncestorWithClass( StylesheetTag.class ); if (tag == null) { throw new JellyTagException( "<applyTemplates> tag must be inside a <stylesheet> tag" ); } ... |
dataChrom = chrom.toLowerCase(); | if (chrom != null){ dataChrom = chrom.toLowerCase(); }else{ dataChrom = null; } | public static void setDataChrom(String chrom) { dataChrom = chrom.toLowerCase(); } |
public static Vector calcCCTDT(Vector chromosomes){ | public static Vector calcCCTDT(PedFile pf){ | public static Vector calcCCTDT(Vector chromosomes){ Vector results = new Vector(); int numMarkers = Chromosome.getUnfilteredSize(); for (int i = 0; i < numMarkers; i++){ TDTResult thisResult = new TDTResult(Chromosome.getUnfilteredMarker(i)); for (int j = 0; j < chromosome... |
for (int j = 0; j < chromosomes.size()-1; j++){ Chromosome theChrom = (Chromosome)chromosomes.get(j); j++; Chromosome nextChrom = (Chromosome)chromosomes.get(j); if (theChrom.getAffected()){ thisResult.tallyCCInd(theChrom.getUnfilteredGenotype(i), nextChrom.getUnfilteredGenotype(i), 0); }else{ thisResult.tallyCCInd(the... | Vector indList = pf.getOrder(); Individual currentInd; for (int j = 0; j < indList.size(); j++){ currentInd = (Individual)indList.elementAt(j); if (!currentInd.hasKids()){ thisResult.tallyCCInd(currentInd.getMarker(i), currentInd.getAffectedStatus()); | public static Vector calcCCTDT(Vector chromosomes){ Vector results = new Vector(); int numMarkers = Chromosome.getUnfilteredSize(); for (int i = 0; i < numMarkers; i++){ TDTResult thisResult = new TDTResult(Chromosome.getUnfilteredMarker(i)); for (int j = 0; j < chromosome... |
public static Vector calcTrioTDT(Vector chromosomes) { | public static Vector calcTrioTDT(PedFile pf) throws PedFileException{ | public static Vector calcTrioTDT(Vector chromosomes) { Vector results = new Vector(); int numMarkers = Chromosome.getUnfilteredSize(); for(int k=0;k<numMarkers;k++){ results.add(new TDTResult(Chromosome.getUnfilteredMarker(k))); } for(int i=0;i<chromosomes.size()-3;i++)... |
for(int k=0;k<numMarkers;k++){ results.add(new TDTResult(Chromosome.getUnfilteredMarker(k))); } for(int i=0;i<chromosomes.size()-3;i++){ Chromosome chrom1T = (Chromosome)chromosomes.get(i); i++; Chromosome chrom1U = (Chromosome)chromosomes.get(i); i++; Chromosome chrom2T = (Chromosome)chromosomes.get(i); i++; Chromoso... | if (mom1 == kid1) { momT = mom1; momU = mom2; } else { momT = mom2; momU = mom1; } } else { if (dad1 == dad2 && mom1 != mom2) { dadT = dad1; dadU = dad2; if (kid1 == dad1) { momT = kid2; momU = kid1; } else { momT = kid1; momU = kid2; } } else if (mom1 == mom2 && dad1 != dad2) { momT = mom1; momU = mom2; if (kid1 == ... | public static Vector calcTrioTDT(Vector chromosomes) { Vector results = new Vector(); int numMarkers = Chromosome.getUnfilteredSize(); for(int k=0;k<numMarkers;k++){ results.add(new TDTResult(Chromosome.getUnfilteredMarker(k))); } for(int i=0;i<chromosomes.size()-3;i++)... |
} | results.add(thisResult); } | public static Vector calcTrioTDT(Vector chromosomes) { Vector results = new Vector(); int numMarkers = Chromosome.getUnfilteredSize(); for(int k=0;k<numMarkers;k++){ results.add(new TDTResult(Chromosome.getUnfilteredMarker(k))); } for(int i=0;i<chromosomes.size()-3;i++)... |
return connection.createStatement(); } | Statement stmt = new StatementFacade(this, connection.createStatement()); return stmt; } | public Statement createStatement() throws SQLException { return connection.createStatement(); } |
int poss_full; | long poss_full; | private void full_em_breakup( byte[][] input_haplos, int[] block_size, Vector affStatus) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//, best, h1, h2; int num_indivs=0;... |
Iterator pitr = probMap.getKeySet().iterator(); | private void full_em_breakup( byte[][] input_haplos, int[] block_size, Vector affStatus) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//, best, h1, h2; int num_indivs=0;... | |
while(pitr.hasNext()) { Long next = (Long) pitr.next(); hint[next.intValue()]=-1; if (probMap.get(next) > .001) { | for(long j=0;j<num_poss; j++){ hint[(int)j]=-1; if (probMap.get(new Long(j)) > .001) { | private void full_em_breakup( byte[][] input_haplos, int[] block_size, Vector affStatus) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//, best, h1, h2; int num_indivs=0;... |
hlist[block][m]=next.intValue(); hprob[block][m]=probMap.get(next); hint[next.intValue()]=m; | hlist[block][m]=(int)j; hprob[block][m]=probMap.get(new Long(j)); hint[(int)j]=m; | private void full_em_breakup( byte[][] input_haplos, int[] block_size, Vector affStatus) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//, best, h1, h2; int num_indivs=0;... |
for (int j=0; j<poss_full; j++) { | for (long j=0; j<poss_full; j++) { | private void full_em_breakup( byte[][] input_haplos, int[] block_size, Vector affStatus) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//, best, h1, h2; int num_indivs=0;... |
thumbCreatorThread = new ThumbCreatorThread( this ); thumbCreatorThread.start(); | public PhotoCollectionThumbView() { super(); createUI(); } | |
if ( cmd == PHOTO_PROPS_CMD ) { showSelectionPropsDialog(); } else if ( cmd == PHOTO_SHOW_CMD ) { showSelectedPhoto(); } else if ( cmd == PHOTO_ROTATE_CW_CMD ) { rotateSelectedPhoto( 90 ); } else if ( cmd == PHOTO_ROTATE_CCW_CMD ) { rotateSelectedPhoto( -90 ); } else if ( cmd == PHOTO_ROTATE_180_CMD ) { rotateSelectedP... | if ( cmd == PHOTO_ADD_TO_FOLDER_CMD ) { | public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); if ( cmd == PHOTO_PROPS_CMD ) { showSelectionPropsDialog(); } else if ( cmd == PHOTO_SHOW_CMD ) { showSelectedPhoto(); } else if ( cmd == PHOTO_ROTATE_CW_CMD ) { rotateSelecte... |
setAutoscrolls( true ); | void createUI() { photoTransferHandler = new PhotoCollectionTransferHandler( this ); setTransferHandler( photoTransferHandler ); addMouseListener( this ); addMouseMotionListener( this ); // Create the popup menu popup = new JPopupMenu(); JMenuItem props... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.