rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
System.out.println("Added "+column.getColumnName()+" to playpen (temporary, only for testing)"); | logger.debug("Added "+column.getColumnName()+" to playpen (temporary, only for testing)"); | public void drop(DropTargetDropEvent dtde) { Transferable t = dtde.getTransferable(); JComponent c = (JComponent) dtde.getDropTargetContext().getComponent(); DataFlavor importFlavor = bestImportFlavor(c, t.getTransferDataFlavors()); if (importFlavor == null) { dtde.rejectDrop(); } else { try { Obj... |
} catch (ArchitectException ex) { ex.printStackTrace(); dtde.rejectDrop(); | public void drop(DropTargetDropEvent dtde) { Transferable t = dtde.getTransferable(); JComponent c = (JComponent) dtde.getDropTargetContext().getComponent(); DataFlavor importFlavor = bestImportFlavor(c, t.getTransferDataFlavors()); if (importFlavor == null) { dtde.rejectDrop(); } else { try { Obj... | |
System.out.println("blockOut "+block+": before "+blocks); | public void blockOut(int start, int length) { Block block = new Block(start, length); System.out.println("blockOut "+block+": before "+blocks); ListIterator it = blocks.listIterator(); while (it.hasNext()) { Block nextBlock = (Block) it.next(); if (nextBlock.start > start) { it.previous(); ... | |
System.out.println("blockOut "+block+": after "+blocks); | public void blockOut(int start, int length) { Block block = new Block(start, length); System.out.println("blockOut "+block+": before "+blocks); ListIterator it = blocks.listIterator(); while (it.hasNext()) { Block nextBlock = (Block) it.next(); if (nextBlock.start > start) { it.previous(); ... | |
System.out.println("Updating leftGap = "+closestLeftGap); | public int findGapToLeft(int start, int length) { int closestLeftGap = Integer.MIN_VALUE; int prevBlockEnd = Integer.MIN_VALUE; Iterator it = blocks.iterator(); while (it.hasNext()) { Block block = (Block) it.next(); if ( (prevBlockEnd < block.start - length) && (block.start - length <= sta... | |
start = block.start + block.length; | start = Math.max(block.start + block.length, start); | public int findGapToRight(int start, int length) { Iterator it = blocks.iterator(); while (it.hasNext()) { Block block = (Block) it.next(); if ( (start + length) < block.start ) { // current gap fits at right-hand side.. done! return start; } else { start = block.start + block.length... |
System.out.println("PlayPenLayout.layoutContainer"); | logger.debug("PlayPenLayout.layoutContainer"); | public void layoutContainer(Container parent) { System.out.println("PlayPenLayout.layoutContainer"); } |
System.out.println("PlayPenLayout.removeLayoutComponent"); | logger.debug("PlayPenLayout.removeLayoutComponent"); | public void removeLayoutComponent(Component comp) { System.out.println("PlayPenLayout.removeLayoutComponent"); } |
Rectangle visibleArea = parent.getVisibleRect(); Point p = new Point(); for (int i = 0, n = parent.getComponentCount(); i < n; i++) { JComponent c = (JComponent) parent.getComponent(i); p = c.getLocation(p); p.x += xdist; p.y += ydist; c.setLocation(p); | synchronized (parent) { Rectangle visibleArea = parent.getVisibleRect(); Point p = new Point(); for (int i = 0, n = parent.getComponentCount(); i < n; i++) { JComponent c = (JComponent) parent.getComponent(i); p = c.getLocation(p); p.x += xdist; p.y += ydist; c.setLocation(p); } visibleArea.x += xdist; visibleArea.y ... | protected void translateAllComponents(int xdist, int ydist) { Rectangle visibleArea = parent.getVisibleRect(); Point p = new Point(); for (int i = 0, n = parent.getComponentCount(); i < n; i++) { JComponent c = (JComponent) parent.getComponent(i); p = c.getLocation(p); p.x += xdist; p.y += ydist; ... |
visibleArea.x += xdist; visibleArea.y += ydist; parent.scrollRectToVisible(visibleArea); | protected void translateAllComponents(int xdist, int ydist) { Rectangle visibleArea = parent.getVisibleRect(); Point p = new Point(); for (int i = 0, n = parent.getComponentCount(); i < n; i++) { JComponent c = (JComponent) parent.getComponent(i); p = c.getLocation(p); p.x += xdist; p.y += ydist; ... | |
public PlayPen() { | public PlayPen(SQLDatabase db) { | public PlayPen() { super(); setLayout(new PlayPenLayout(this)); setName("Play Pen"); setMinimumSize(new Dimension(200,200)); setOpaque(true); dt = new DropTarget(this, new PlayPenDropListener()); } |
tableNames = new HashMap(); | public PlayPen() { super(); setLayout(new PlayPenLayout(this)); setName("Play Pen"); setMinimumSize(new Dimension(200,200)); setOpaque(true); dt = new DropTarget(this, new PlayPenDropListener()); } | |
ActionErrors errors = new ActionErrors(); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... | |
try{ authService.login(Utils.getServiceContext(context), loginForm.getUsername(), loginForm.getPassword()); }catch(ServiceException se){ errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(ErrorCodes.WEB_UI_ERROR_KEY, se.getMessage())); request.setAttribute(Globals.ERROR_KEY, errors); return mapping.getInputForward()... | authService.login(Utils.getServiceContext(context), loginForm.getUsername(), loginForm.getPassword()); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... |
loadInfoMenuItem.setEnabled(false); | public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command == "Open"){ int returnVal = fc.showOpenDialog(this); if (returnVal == JFileChooser.APPROVE_OPTION) { try{ theData = new HaploData(fc.getSelectedFile()); infileName = fc.getSelectedFile().getName(); ... | |
dm.dPrimeDraw(theData.dPrimeTable, image.getGraphics()); | dm.dPrimeDraw(theData.dPrimeTable, infoKnown, theData.markerInfo, image.getGraphics()); | void doExportDPrime(){ int returnVal = fc.showSaveDialog(this); if (returnVal == JFileChooser.APPROVE_OPTION){ try { int scaleSize = theData.dPrimeTable.length*30; DrawingMethods dm = new DrawingMethods(); BufferedImage image = new BufferedImage(scaleSize, scaleSize, BufferedImage.TYPE_3BYTE_BGR); dm.dPrime... |
theDPrime = new DPrimePanel(theData.dPrimeTable); | theDPrime = new DPrimePanel(theData.dPrimeTable, infoKnown, theData.markerInfo); | void drawPicture(HaploData theData){ contents = getContentPane(); contents.removeAll(); //first, draw the D' picture contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); theDPrime = new DPrimePanel(theData.dPrimeTable); JPanel holderPanel = new JPanel(); holderPanel.add(theDPrime); holderPanel.setBackgrou... |
StringBuffer output = new StringBuffer(component.draw(context)); | StringBuffer output = new StringBuffer(); output.append("<div id=\"" + getId() + "\">"); output.append(component.draw(context)); output.append("</div>"); | public String draw(DashboardContext context) { StringBuffer output = new StringBuffer(component.draw(context)); String appId = context.getWebContext().getApplicationConfig().getApplicationId(); output.append("\n<script>"); output.append("self.setTimeout(\"refreshDBComponent("); ou... |
if ( match ) newRowMap.add(row); | if ( match ) { newRowMap.add(tableTextConverter.modelIndex(row)); } | private void search(String searchText) { rowMapping = null; fireTableDataChanged(); List<Integer> newRowMap = new ArrayList<Integer>(); CharSequence searchSubSequence = searchText == null ? null : searchText.toLowerCase().subSequence(0,searchText.length()); for ( int row =... |
hash3 = ImageInstance.calcHash( testfile3); PhotoInfo photos3[] = PhotoInfo.retrieveByOrigHash( hash3 ); if ( photos3 != null ) { for ( int n = 0; n < photos3.length; n++ ) { photos3[n].delete(); } } | public void setUp() { File testfile1 = null; File testfile2 = null; try { // Create the directories extVolDir = File.createTempFile( "pv_indexer_test_", "" ); extVolDir.delete(); extVolDir.mkdir(); File extVolSubdir = new File( extVolDir, "... | |
PhotoInfo photos1[] = PhotoInfo.retrieveByOrigHash( hash1 ); if ( photos1 != null ) { for ( int n = 0; n < photos1.length; n++ ) { photos1[n].delete(); } } PhotoInfo photos2[] = PhotoInfo.retrieveByOrigHash( hash2 ); if ( photos2 != null ) { for ( int n = 0; n < photos2.length; n++ ) { photos2[n].delete(); } } PhotoInf... | public void tearDown() { FileUtils.deleteTree( extVolDir ); topFolder.delete(); } | |
ImageInstance i1 = p1.getInstance( 0 ); assertEquals( i1.getImageFile(), photo1 ); | public void testIndexing() { int n; ExternalVolume v = new ExternalVolume( "extVol", extVolDir.getAbsolutePath() ); ExtVolIndexer indexer = new ExtVolIndexer( v ); indexer.setTopFolder( topFolder ); TestListener l = new TestListener(); indexer.addIndexerListener( l ); ... | |
try { File testfile3 = new File( "testfiles", "test3.jpg" ); File f3 = new File( extVolDir, "test3.jpg"); FileUtils.copyFile( testfile3, f3 ); File f1 = new File ( extVolDir, "test1.jpg" ); FileUtils.copyFile( testfile3, f1 ); File f2 = new File( extVolDir, "test2.jpg" ); f2.delete(); } catch (IOException ex) { fa... | public void testIndexing() { int n; ExternalVolume v = new ExternalVolume( "extVol", extVolDir.getAbsolutePath() ); ExtVolIndexer indexer = new ExtVolIndexer( v ); indexer.setTopFolder( topFolder ); TestListener l = new TestListener(); indexer.addIndexerListener( l ); ... | |
isConsistent = (dbHash.equals( realHash ) ); | isConsistent = Arrays.equals( dbHash, realHash ); | public boolean doConsistencyCheck() { boolean isConsistent = true; boolean needsHashCheck = false; ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); File f = this.getImageFile(); if ( f.exists() ) { long size = f.length(); if ( size != th... |
Filter<?> filter = Filter.getOpenFilter((Class<? extends Storable>) property.getType()); | Filter<?> filter = Filter.getOpenFilter(property.getEnclosingType()); | private boolean isProperJoin(StorableProperty<?> property) throws SupportException, RepositoryException { if (!property.isJoin() || property.isQuery()) { return false; } // Make up a filter over the join's internal properties and then search // for an index that filt... |
filter = filter.and(property.getExternalJoinElement(i).getName(), RelOp.EQ); | filter = filter.and(property.getInternalJoinElement(i).getName(), RelOp.EQ); | private boolean isProperJoin(StorableProperty<?> property) throws SupportException, RepositoryException { if (!property.isJoin() || property.isQuery()) { return false; } // Make up a filter over the join's internal properties and then search // for an index that filt... |
BufferedImage bi = null; | public void testRotationChange() { ThumbnailView view = new ThumbnailView(); view.setPhoto( photo ); pane.add( view ); showFrame(); Iterator writers = ImageIO.getImageWritersByFormatName("png"); ImageWriter writer = (ImageWriter)writers.next(); tester.waitForIdle(); // TODO: FIX for build errors // BufferedImag... | |
bi = tester.capture( view ); | public void testRotationChange() { ThumbnailView view = new ThumbnailView(); view.setPhoto( photo ); pane.add( view ); showFrame(); Iterator writers = ImageIO.getImageWritersByFormatName("png"); ImageWriter writer = (ImageWriter)writers.next(); tester.waitForIdle(); // TODO: FIX for build errors // BufferedImag... | |
BufferedImage bi = null; | BufferedImage bi = tester.capture( view ); | public void testThumbnailShow() { ThumbnailView view = new ThumbnailView(); view.setPhoto( photo ); pane.add( view ); showFrame(); view.repaint(); tester.waitForIdle();// Iterator writers = ImageIO.getImageWritersByFormatName("png");// ImageWriter writer = (ImageWriter)writers.next();// BufferedImage bi = abbot.t... |
bi = tester.capture( view ); | public void testThumbnailShow() { ThumbnailView view = new ThumbnailView(); view.setPhoto( photo ); pane.add( view ); showFrame(); view.repaint(); tester.waitForIdle();// Iterator writers = ImageIO.getImageWritersByFormatName("png");// ImageWriter writer = (ImageWriter)writers.next();// BufferedImage bi = abbot.t... | |
permSet.cat(tdtPanel.getTestSet()); permSet.cat(hapAssocPanel.getTestSet()); | if (tdtPanel != null){ permSet.cat(tdtPanel.getTestSet()); } if (hapAssocPanel != null){ permSet.cat(hapAssocPanel.getTestSet()); } | public void stateChanged(ChangeEvent e) { if (tabs.getSelectedIndex() != -1){ window.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); String title = tabs.getTitleAt(tabs.getSelectedIndex()); if (title.equals(VIEW_DPRIME) || title.equals(VIEW_HAPL... |
StringTokenizer enum = new StringTokenizer( text, "," ); | StringTokenizer dimensionEnum = new StringTokenizer( text, "," ); | public Object convert(Class type, Object value) { if ( value != null ) { String text = value.toString(); StringTokenizer enum = new StringTokenizer( text, "," ); int width = 0; int height = 0; if ( enum.hasMoreTokens() ) { width = parseNum... |
if ( enum.hasMoreTokens() ) { width = parseNumber( enum.nextToken() ); | if ( dimensionEnum.hasMoreTokens() ) { width = parseNumber( dimensionEnum.nextToken() ); | public Object convert(Class type, Object value) { if ( value != null ) { String text = value.toString(); StringTokenizer enum = new StringTokenizer( text, "," ); int width = 0; int height = 0; if ( enum.hasMoreTokens() ) { width = parseNum... |
if ( enum.hasMoreTokens() ) { height = parseNumber( enum.nextToken() ); | if ( dimensionEnum.hasMoreTokens() ) { height = parseNumber( dimensionEnum.nextToken() ); | public Object convert(Class type, Object value) { if ( value != null ) { String text = value.toString(); StringTokenizer enum = new StringTokenizer( text, "," ); int width = 0; int height = 0; if ( enum.hasMoreTokens() ) { width = parseNum... |
return new Dimension( width, height ); } return null; } | public Object convert(Class type, Object value) { if ( value != null ) { String text = value.toString(); StringTokenizer enum = new StringTokenizer( text, "," ); int width = 0; int height = 0; if ( enum.hasMoreTokens() ) { width = parseNum... | |
if (freqs[i] > fourGameteCutoff) numGam++; | if (freqs[i] > fourGameteCutoff + 1E-8) numGam++; | static Vector do4Gamete(PairwiseLinkage[][] dPrime){ Vector blocks = new Vector(); Vector strongPairs = new Vector(); //first make a list of marker pairs with < 4 gametes, sorted by distance apart for (int x = 0; x < dPrime.length-1; x++){ for (int y = x+1; y < dPrime.length; ... |
else { | else if(var == null) { | protected void processBean(String var, Object bean) throws Exception { if (var != null) { context.setVariable(var, bean); } // now lets try set the parent property via calling the adder or the setter method if (bean != null) { Object parentObject = getParent... |
"If you are reporting a problem please include the contents of this log.\njcbarret@broad.mit.edu\n"+ | "If you are reporting a problem please include the contents of this log.\n"+ Constants.EMAIL_STRING+"\n"+ | private static void createAndShowGUI() { contentFrame = new JFrame("Haploview Error Log"); contentFrame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); JComponent newContentPane = new JPanel(); newContentPane.setOpaque(true); //content panes must be opaque errorTextArea = new JTex... |
public String getURL(String action) { return doc.getURL(action, context); | public String getURL() { return doc.getURL("view", context); | public String getURL(String action) { return doc.getURL(action, context); } |
SQLObject so = (SQLObject) p.getLastPathComponent(); if (so instanceof SQLDatabase) { DBConnectionSpec dbcs = ((SQLDatabase) so).getConnectionSpec(); | Object [] pathArray = p.getPath(); int ii = 0; SQLDatabase sd = null; while (ii < pathArray.length && sd == null) { if (pathArray[ii] instanceof SQLDatabase) { sd = (SQLDatabase) pathArray[ii]; } ii++; } if (sd != null) { DBConnectionSpec dbcs = sd.getConnectionSpec(); | public void actionPerformed(ActionEvent e) { TreePath p = getSelectionPath(); if (p == null) { return; } SQLObject so = (SQLObject) p.getLastPathComponent(); if (so instanceof SQLDatabase) { DBConnectionSpec dbcs = ((SQLDatabase) so).getConnectionSpec(); logger.debug("Setting existing DBCS on panel... |
edittingDB = (SQLDatabase) so; | edittingDB = sd; | public void actionPerformed(ActionEvent e) { TreePath p = getSelectionPath(); if (p == null) { return; } SQLObject so = (SQLObject) p.getLastPathComponent(); if (so instanceof SQLDatabase) { DBConnectionSpec dbcs = ((SQLDatabase) so).getConnectionSpec(); logger.debug("Setting existing DBCS on panel... |
} else if (so instanceof SQLCatalog) { } else if (so instanceof SQLSchema) { } else if (so instanceof SQLTable) { } else if (so instanceof SQLColumn) { | public void actionPerformed(ActionEvent e) { TreePath p = getSelectionPath(); if (p == null) { return; } SQLObject so = (SQLObject) p.getLastPathComponent(); if (so instanceof SQLDatabase) { DBConnectionSpec dbcs = ((SQLDatabase) so).getConnectionSpec(); logger.debug("Setting existing DBCS on panel... | |
System.out.println ("Schema enabled"); | logger.info("Schema enabled"); | public void cleanup() throws ArchitectException { setCleanupExceptionMessage("Could not populate catalog dropdown!"); catalogComboBox.removeAllItems(); catalogComboBox.setEnabled(false); schemaComboBox.removeAllItems(); schemaComboBox.setEnabled(false); try { if (database.isCatalogContainer()) { for (SQLOb... |
String testImgDir = "c:\\java\\photovault\\testfiles"; | public void testPhotoAddition() { String testImgDir = "c:\\java\\photovault\\testfiles"; String fname = "test1.jpg"; File f = new File( testImgDir, fname ); PhotoInfo photo = null; try { photo = PhotoInfo.addToDB( f ); } catch ( PhotoNotFoundException e ) { fail( "Could not find photo: " + e.getMessage() );... | |
try { | logger.debug("all done, terminating timer thread..."); try { logger.debug("monitorable.isFinished():" + monitorable.isFinished()); | public void actionPerformed(ActionEvent evt) { // update the progress bar try { Integer jobSize = monitorable.getJobSize(); if (jobSize == null) { bar.setIndeterminate(true); } else { bar.setIndeterminate(false); bar.setMaximum(jobSize.intValue()); } if (label != null) { label.setVisible(true);... |
logger.debug("did the timer thread stop???"); | public void actionPerformed(ActionEvent evt) { // update the progress bar try { Integer jobSize = monitorable.getJobSize(); if (jobSize == null) { bar.setIndeterminate(true); } else { bar.setIndeterminate(false); bar.setMaximum(jobSize.intValue()); } if (label != null) { label.setVisible(true);... | |
logger.debug("in constructor, setting finished to false..."); | public LoadJDBCDrivers (List driverJarList) throws ArchitectException { this.driverJarList = driverJarList; finished = false; } | |
logger.debug("done loading (error condition), setting finished to true."); | public void execute() { try { Iterator it = driverJarList.iterator(); while (it.hasNext()) { // initialize counters jarCount++; logger.debug("**************** processin file #" + jarCount + " of " + driverJarList.size()); String path = (String) it.next(); addJarFile(new File(path)... | |
new javax.swing.Timer(50, watcher).start(); | protected void revertToUserSettings() throws ArchitectException { dtm.setRoot(new DefaultMutableTreeNode()); LoadJDBCDrivers ljd = new LoadJDBCDrivers(session.getDriverJarList()); LoadJDBCDriversWorker worker = new LoadJDBCDriversWorker(ljd); ProgressWatcher watcher = new ProgressWatcher(progressBar,ljd,pr... | |
logWriter = new LogWriter(ArchitectSession.getInstance().getUserSettings().getDDLUserSettings().getString(DDLUserSettings.PROP_DDL_LOG_PATH,"")); | logWriter = new LogWriter(ArchitectSessionImpl.getInstance().getUserSettings().getDDLUserSettings().getString(DDLUserSettings.PROP_DDL_LOG_PATH,"")); | public void doStuff() { finished = false; hasStarted = true; if (isCanceled() || finished) return; SQLDatabase target = new SQLDatabase(targetDataSource); statusLabel.setText("Creating objects in target database " + target.getDataSource() ); // XXX This is not being used but possibly should be?? //Progr... |
int i; for (i = 0; i <= 99; i++) { String jarName = prefs.get(jarFilePrefName(i), null); logger.debug("read Jar File entry: " + jarName); if (jarName == null) { break; } | Preferences jarNode = prefs.node(JAR_FILE_NODE_NAME); logger.debug("PreferencesManager.load(): jarNode " + jarNode); session.removeAllDriverJars(); for (int i = 0; i <= MAX_DRIVER_JAR_FILE_NAMES; i++) { String jarName = jarNode.get(jarFilePrefName(i), null); logger.debug("read Jar File entry: " + jarName); if (jarName ... | public CoreUserSettings read(ArchitectSession session) throws IOException { logger.debug("loading UserSettings from java.util.prefs."); if ( prefs == null ) { prefs = ArchitectFrame.getMainInstance().getPrefs(); } logger.debug("Preferences class = " + prefs.getClass()); CoreUserSettings use... |
logger.debug("Adding JarName: " + jarName); session.addDriverJar(jarName); } for (; i <= 99; i++) { if (prefs.get(jarFilePrefName(i), null) != null) { prefs.remove(jarFilePrefName(i)); } } | logger.debug("Adding JarName: " + jarName); session.addDriverJar(jarName); } | public CoreUserSettings read(ArchitectSession session) throws IOException { logger.debug("loading UserSettings from java.util.prefs."); if ( prefs == null ) { prefs = ArchitectFrame.getMainInstance().getPrefs(); } logger.debug("Preferences class = " + prefs.getClass()); CoreUserSettings use... |
if ( prefs == null ) { prefs = ArchitectFrame.getMainInstance().getPrefs(); } | public void write(ArchitectSession session) throws ArchitectException { logger.debug("Saving prefs to java.util.prefs"); if ( prefs == null ) { prefs = ArchitectFrame.getMainInstance().getPrefs(); } CoreUserSettings userSettings = session.getUserSettings(); List<String> driverJarList = sess... | |
List<String> driverJarList = session.getDriverJarList(); Iterator<String> it = driverJarList.iterator(); for (int i = 0 ; i <= 99; i++) { if (it.hasNext()) { String name = it.next(); logger.debug("Putting JAR " + i + " " + name); prefs.put(jarFilePrefName(i), name); } else { prefs.remove(jarFilePrefName(i)); } } | try { prefs.node(JAR_FILE_NODE_NAME).removeNode(); prefs.flush(); if (prefs.nodeExists(JAR_FILE_NODE_NAME)) { System.err.println("Warning: Jar Node Still Exists!!"); } } catch (BackingStoreException e) { logger.warn("Error: BackingStoreException while removing or testing previous Jar Node!!"); } | public void write(ArchitectSession session) throws ArchitectException { logger.debug("Saving prefs to java.util.prefs"); if ( prefs == null ) { prefs = ArchitectFrame.getMainInstance().getPrefs(); } CoreUserSettings userSettings = session.getUserSettings(); List<String> driverJarList = sess... |
Preferences jarNode = prefs.node(JAR_FILE_NODE_NAME); List<String> driverJarList = session.getDriverJarList(); Iterator<String> it = driverJarList.iterator(); for (int i = 0 ; i <= MAX_DRIVER_JAR_FILE_NAMES; i++) { if (it.hasNext()) { String name = it.next(); logger.debug("Putting JAR " + i + " " + name); jarNode.put(j... | public void write(ArchitectSession session) throws ArchitectException { logger.debug("Saving prefs to java.util.prefs"); if ( prefs == null ) { prefs = ArchitectFrame.getMainInstance().getPrefs(); } CoreUserSettings userSettings = session.getUserSettings(); List<String> driverJarList = sess... | |
public void removeAllDriverJars() { driverJarList.clear(); } | public void removeAllDriverJars(); | public void removeAllDriverJars() { driverJarList.clear(); } |
dPrimeDisplay.dPrimeTable = theData.dPrimeTable; | void readMarkers(File inputFile){ try { theData.prepareMarkerInput(inputFile,maxCompDist); }catch (HaploViewException e){ JOptionPane.showMessageDialog(this, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); }catc... | |
List connections = new ArrayList(); | List<ArchitectDataSource> connections = new ArrayList<ArchitectDataSource>(); | public List getConnections() { List connections = new ArrayList(); Iterator it = fileSections.iterator(); while (it.hasNext()) { Object next = it.next(); if (next instanceof ArchitectDataSource) { connections.add(next); } } Collections.sort(connecti... |
connections.add(next); | connections.add((ArchitectDataSource) next); | public List getConnections() { List connections = new ArrayList(); Iterator it = fileSections.iterator(); while (it.hasNext()) { Object next = it.next(); if (next instanceof ArchitectDataSource) { connections.add(next); } } Collections.sort(connecti... |
} Collections.sort(connections); | } Collections.sort(connections, new ArchitectDataSource.DefaultComparator()); | public List getConnections() { List connections = new ArrayList(); Iterator it = fileSections.iterator(); while (it.hasNext()) { Object next = it.next(); if (next instanceof ArchitectDataSource) { connections.add(next); } } Collections.sort(connecti... |
File volumeDir = new File( volumeRoot ); if ( !volumeDir.exists() ) { volumeDir.mkdirs(); } | public void setUp() { try { photo = PhotoInfo.retrievePhotoInfo( 1 ); } catch ( Exception e ) { fail( "Unable to retrieve PhotoInfo object" ); } volume = new Volume( "imageInstanceTest", volumeRoot ); } | |
SQLTable t = new SQLTable(); | SQLTable t = null; | public void actionPerformed(ActionEvent evt) { pp.fireCancel(); SQLTable t = new SQLTable(); try { t.initFolders(true); } catch (ArchitectException e) { logger.error("Couldn't add folder to table \""+t.getName()+"\"", e); JOptionPane.showMessageDialog(null, "Failed to add folder to table:\n"+e.getMessage());... |
t = new SQLTable(); | public void actionPerformed(ActionEvent evt) { pp.fireCancel(); SQLTable t = new SQLTable(); try { t.initFolders(true); } catch (ArchitectException e) { logger.error("Couldn't add folder to table \""+t.getName()+"\"", e); JOptionPane.showMessageDialog(null, "Failed to add folder to table:\n"+e.getMessage());... | |
AntTagSupport parent = (AntTagSupport) getParent(); | AntTagSupport parent = (AntTagSupport) findAncestorWithClass(AntTagSupport.class); | public void doTag(XMLOutput output) throws Exception { Object obj = getObject(); if ( this.task != null ) { Method method = MethodUtils.getAccessibleMethod( this.task.getClass(), "addText", ... |
ArchitectSession session = ArchitectSession.getInstance(); | ArchitectSession session = ArchitectSessionImpl.getInstance(); | public Connection createConnection() throws SQLException { try { if (dataSource.getDriverClass() == null || dataSource.getDriverClass().trim().length() == 0) { throw new SQLException("Connection \""+dataSource.getName()+"\" has no JDBC Driver class specified."); } if (dataSource.getUrl() == null ... |
String jarfile = System.getProperty("java.class.path"); | String jarfile; if (System.getProperty("java.class.path").indexOf(" ") > 0 ){ jarfile = ("\""); jarfile += System.getProperty("java.class.path"); jarfile += "\""; }else{ jarfile = System.getProperty("java.class.path"); } | public static void main(String[] args) { int exitValue = 0; String dir = System.getProperty("user.dir"); String sep = System.getProperty("file.separator"); String ver = System.getProperty("java.version"); //TODO:do some version checking and bitch at people with old JVMs /*S... |
String runString = "java -Xmx1024m -classpath \"" + jarfile + "\""; | String runString = "java -Xmx1024m -classpath " + jarfile; | public static void main(String[] args) { int exitValue = 0; String dir = System.getProperty("user.dir"); String sep = System.getProperty("file.separator"); String ver = System.getProperty("java.version"); //TODO:do some version checking and bitch at people with old JVMs /*S... |
String fname = "test1.jpg"; File f = new File( testImgDir, fname ); PhotoInfo photo = null; try { photo = PhotoInfo.addToDB( f ); } catch ( PhotoNotFoundException e ) { fail( "Could not find photo: " + e.getMessage() ); } l1.modified = false; folder.addPhoto( photo ); assertTrue( "l1 not called when adding photo", l1.m... | public void testListener() { PhotoFolder folder = PhotoFolder.create( "testListener", null ); TestListener l1 = new TestListener(); TestListener l2 = new TestListener(); TestCollectionListener l3 = new TestCollectionListener(); folder.addPhotoCollectionChangeListener( l1 ); folder.addPhotoCollectionChangeListener( ... | |
photo.delete(); | public void testPhotoAddition() { String fname = "test1.jpg"; File f = new File( testImgDir, fname ); PhotoInfo photo = null; try { photo = PhotoInfo.addToDB( f ); } catch ( PhotoNotFoundException e ) { fail( "Could not find photo: " + e.getMessage() ); } PhotoFolder folder = null; // Create a folder for th... | |
saveHapsWriter.write("Multiallelic Dprime: " + multidprime[i] + "\n"); }else{ saveHapsWriter.write("\n"); | saveHapsWriter.write("Multiallelic Dprime: " + nf.format(multidprime[i]) + "\n"); | public void saveHapsToText(Haplotype[][] finishedHaplos, double[] multidprime, File saveHapsFile) throws IOException{ if (finishedHaplos == null) return; NumberFormat nf = NumberFormat.getInstance(Locale.US); nf.setMinimumFractionDigits(3); nf.setMaximumFrac... |
return new ScriptTag( expressionFactory.getBSFEngine() ); | return new ScriptTag( expressionFactory.getBSFEngine(), expressionFactory.getBSFManager()); | protected Tag createScriptTag(String name, Attributes attributes) throws JellyException { try { return new ScriptTag( expressionFactory.getBSFEngine() ); } catch (BSFException e) { throw new JellyException("Failed to create BSFEngine: " + e, e); } } |
hasIDAttribute = false; | public void doTag(XMLOutput output) throws Exception { hasIDAttribute = false; Project project = getAntProject(); String tagName = getTagName(); Object parentObject = findBeanAncestor(); // lets assume that Task instances are not nested inside other Task instances // for ex... | |
Object parentTask = findParentTaskObject(); | public void doTag(XMLOutput output) throws Exception { hasIDAttribute = false; Project project = getAntProject(); String tagName = getTagName(); Object parentObject = findBeanAncestor(); // lets assume that Task instances are not nested inside other Task instances // for ex... | |
if (findParentTaskSource() == null && | if ( (parentTask == null || parentTask instanceof TaskContainer) && | public void doTag(XMLOutput output) throws Exception { hasIDAttribute = false; Project project = getAntProject(); String tagName = getTagName(); Object parentObject = findBeanAncestor(); // lets assume that Task instances are not nested inside other Task instances // for ex... |
hasIDAttribute = true; | public void doTag(XMLOutput output) throws Exception { hasIDAttribute = false; Project project = getAntProject(); String tagName = getTagName(); Object parentObject = findBeanAncestor(); // lets assume that Task instances are not nested inside other Task instances // for ex... | |
col.setNullable(DatabaseMetaData.columnNoNulls); | 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. try { startCompoundEdit("Changing column index")... | |
assertEquals(makeIndex(Shipment.class, "shipmentID"), res_0.getLocalIndex()); | assertEquals(makeIndex(Shipment.class, "orderID"), res_0.getLocalIndex()); | public void testFullScanExempt() throws Exception { // Although not all sub-results use an index, one that does has a join // so it is exempt from folding into the full scan. UnionQueryAnalyzer uqa = new UnionQueryAnalyzer(Shipment.class, TestIndexedQueryAnalyzer.RepoAccess.INSTANCE)... |
assertEquals(0, res_0.getRemainderOrdering().size()); assertEquals(Filter.filterFor(Shipment.class, "shipmentNotes = ?").bind(), | assertEquals(1, res_0.getRemainderOrdering().size()); assertEquals("+shipmentID", res_0.getRemainderOrdering().get(0).toString()); assertEquals(Filter.filterFor(Shipment.class, "order.orderTotal > ?").bind(), | public void testFullScanExempt() throws Exception { // Although not all sub-results use an index, one that does has a join // so it is exempt from folding into the full scan. UnionQueryAnalyzer uqa = new UnionQueryAnalyzer(Shipment.class, TestIndexedQueryAnalyzer.RepoAccess.INSTANCE)... |
assertEquals(makeIndex(Shipment.class, "orderID"), res_1.getLocalIndex()); | assertEquals(makeIndex(Shipment.class, "shipmentID"), res_1.getLocalIndex()); | public void testFullScanExempt() throws Exception { // Although not all sub-results use an index, one that does has a join // so it is exempt from folding into the full scan. UnionQueryAnalyzer uqa = new UnionQueryAnalyzer(Shipment.class, TestIndexedQueryAnalyzer.RepoAccess.INSTANCE)... |
assertEquals(1, res_1.getRemainderOrdering().size()); assertEquals("+shipmentID", res_1.getRemainderOrdering().get(0).toString()); assertEquals(Filter.filterFor(Shipment.class, "order.orderTotal > ?").bind(), | assertEquals(0, res_1.getRemainderOrdering().size()); assertEquals(Filter.filterFor(Shipment.class, "shipmentNotes = ?").bind(), | public void testFullScanExempt() throws Exception { // Although not all sub-results use an index, one that does has a join // so it is exempt from folding into the full scan. UnionQueryAnalyzer uqa = new UnionQueryAnalyzer(Shipment.class, TestIndexedQueryAnalyzer.RepoAccess.INSTANCE)... |
assertEquals(OrderingList.get(Shipment.class, "+shipmentID"), result.getTotalOrdering()); | public void testSimpleUnion() throws Exception { UnionQueryAnalyzer uqa = new UnionQueryAnalyzer(Shipment.class, TestIndexedQueryAnalyzer.RepoAccess.INSTANCE); Filter<Shipment> filter = Filter.filterFor(Shipment.class, "shipmentID = ? | orde... | |
assertFalse(res_1.getCompositeScore().getFilteringScore().hasRangeStart()); | assertTrue(res_1.getCompositeScore().getFilteringScore().hasRangeStart()); | public void testSimpleUnion2() throws Exception { UnionQueryAnalyzer uqa = new UnionQueryAnalyzer(Shipment.class, TestIndexedQueryAnalyzer.RepoAccess.INSTANCE); Filter<Shipment> filter = Filter.filterFor(Shipment.class, "shipmentID = ? | ord... |
assertEquals(makeIndex(Shipment.class, "shipmentID"), res_1.getLocalIndex()); | assertEquals(makeIndex(Shipment.class, "orderID"), res_1.getLocalIndex()); | public void testSimpleUnion2() throws Exception { UnionQueryAnalyzer uqa = new UnionQueryAnalyzer(Shipment.class, TestIndexedQueryAnalyzer.RepoAccess.INSTANCE); Filter<Shipment> filter = Filter.filterFor(Shipment.class, "shipmentID = ? | ord... |
assertEquals(0, res_0.getRemainderOrdering().size()); assertEquals(Filter.filterFor(Shipment.class, "orderID > ?").bind(), res_1.getRemainderFilter()); | assertEquals(1, res_1.getRemainderOrdering().size()); assertEquals("+shipmentID", res_1.getRemainderOrdering().get(0).toString()); | public void testSimpleUnion2() throws Exception { UnionQueryAnalyzer uqa = new UnionQueryAnalyzer(Shipment.class, TestIndexedQueryAnalyzer.RepoAccess.INSTANCE); Filter<Shipment> filter = Filter.filterFor(Shipment.class, "shipmentID = ? | ord... |
assertEquals(OrderingList.get(Shipment.class, "+shipmentID"), result.getTotalOrdering()); | public void testSimpleUnion3() throws Exception { UnionQueryAnalyzer uqa = new UnionQueryAnalyzer(Shipment.class, TestIndexedQueryAnalyzer.RepoAccess.INSTANCE); Filter<Shipment> filter = Filter.filterFor(Shipment.class, "shipmentID = ? | ord... | |
assertEquals(OrderingList.get(Shipment.class, "+shipmentID", "+orderID"), result.getTotalOrdering()); | public void testSimpleUnionUnspecifiedDirection() throws Exception { UnionQueryAnalyzer uqa = new UnionQueryAnalyzer(Shipment.class, TestIndexedQueryAnalyzer.RepoAccess.INSTANCE); Filter<Shipment> filter = Filter.filterFor(Shipment.class, "s... | |
getBody().run(context, output); | invokeBody(output); | public void doTag(XMLOutput output) throws Exception { // force project to be lazily constructed getProject().setDefaultGoalName( this.defaultGoalName ); org.apache.tools.ant.Project antProject = AntTagLibrary.getProject( context ); // allow access to Ant methods via the p... |
gbrowseItem = new JMenuItem(DOWNLOAD_GBROWSE); gbrowseItem.addActionListener(this); gbrowseItem.setEnabled(false); fileMenu.add(gbrowseItem); | public HaploView(){ try{ fc = new JFileChooser(System.getProperty("user.dir")); }catch(NullPointerException n){ try{ UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); fc = new JFileChooser(System.getProperty("user.dir")); ... | |
}else if (command.equals(DOWNLOAD_GBROWSE)){ GBrowseDialog gbd = new GBrowseDialog(this, "Connect to HapMap Info Server"); gbd.pack(); gbd.setVisible(true); | public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command.equals(READ_GENOTYPES)){ ReadDataDialog readDialog = new ReadDataDialog("Open new data", this); readDialog.pack(); readDialog.setVisible(true); } else if (command.equ... | |
gbrowseItem.setEnabled(false); | void readMarkers(File inputFile, String[][] hminfo){ try { theData.prepareMarkerInput(inputFile, hminfo); if (theData.infoKnown){ analysisItem.setEnabled(true); }else{ analysisItem.setEnabled(false); } if (checkPanel != null... | |
JFileChooser chooser = new JFileChooser(); chooser.addChoosableFileFilter(ASUtils.architectFileFilter); int returnVal = chooser.showSaveDialog(ArchitectFrame.this); if (returnVal == JFileChooser.APPROVE_OPTION) { project.setFile(chooser.getSelectedFile()); project.setName(project.getFile().getName()); final ProgressMon... | saveOrSaveAs(false); | public void actionPerformed(ActionEvent e) { JFileChooser chooser = new JFileChooser(); chooser.addChoosableFileFilter(ASUtils.architectFileFilter); int returnVal = chooser.showSaveDialog(ArchitectFrame.this); if (returnVal == JFileChooser.APPROVE_OPTION) { project.setFile(chooser.getSelectedFile());... |
System.exit(0); | saveOrSaveAs(true); | public void actionPerformed(ActionEvent e) { System.exit(0); } |
if (configFile == null) configFile = ConfigFile.getDefaultInstance(); try { sprefs.setInt(SwingUserSettings.DIVIDER_LOCATION, splitPane.getDividerLocation()); sprefs.setInt(SwingUserSettings.MAIN_FRAME_X, getLocation().x); sprefs.setInt(SwingUserSettings.MAIN_FRAME_Y, getLocation().y); sprefs.setInt(SwingUserSettings.M... | System.exit(0); | public void actionPerformed(ActionEvent e) { if (configFile == null) configFile = ConfigFile.getDefaultInstance(); try { sprefs.setInt(SwingUserSettings.DIVIDER_LOCATION, splitPane.getDividerLocation()); sprefs.setInt(SwingUserSettings.MAIN_FRAME_X, getLocation().x); sprefs.setInt(SwingUserSettings... |
fileMenu.add(new JMenuItem(saveProjectAsAction)); | public ArchitectFrame() throws ArchitectException { mainInstance = this; try { ConfigFile cf = ConfigFile.getDefaultInstance(); prefs = cf.read(); sprefs = prefs.getSwingSettings(); } catch (IOException e) { throw new ArchitectException("prefs.read", e); } Container cp = getContentPane(); cp.setLayout(ne... | |
l = new java.util.ArrayList(0) | l = new ArrayList(0); | public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { if (var == null) { throw new MissingAttributeException( "var" ); } if (select == null) { throw new MissingAttributeException( "select" ); } Object xpathContext = getXPat... |
List l = new java.util.ArrayList(1); | List l = new ArrayList(1); | public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { if (var == null) { throw new MissingAttributeException( "var" ); } if (select == null) { throw new MissingAttributeException( "select" ); } Object xpathContext = getXPat... |
compressCheckBox = new JCheckBox("Compress image (smaller file)"); formatPanel.add(compressCheckBox); compressCheckBox.setEnabled(false); | public ExportDialog(HaploView h){ super(h, "Export Data"); hv = h; JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); JPanel tabPanel = new JPanel(); int currTab = hv.tabs.getSelectedIndex(); tabPanel.setBorder(new TitledBo... | |
format = PNG_MODE; | if (compressCheckBox.isSelected()){ format = COMPRESSED_PNG_MODE; }else{ format = PNG_MODE; } | public void actionPerformed (ActionEvent e){ String command = e.getActionCommand(); if (dpButton.isSelected()){ if(txtButton.isSelected()){ adjButton.setEnabled(true); }else{ adjButton.setEnabled(false); if (adjButton.isSelected()){ ... |
hv.export(tab,format,Integer.parseInt(lowRange.getText())-1, Integer.parseInt(upperRange.getText())); | try{ hv.export(tab,format,Integer.parseInt(lowRange.getText())-1, Integer.parseInt(upperRange.getText())); }catch (NumberFormatException nfe){ JOptionPane.showMessageDialog(hv, "Invalid marker range: " + lowRange.getText() + " - " + upperRange.getText(), "Export Error", JOptionPane.ERROR_MESSAGE); } | public void actionPerformed (ActionEvent e){ String command = e.getActionCommand(); if (dpButton.isSelected()){ if(txtButton.isSelected()){ adjButton.setEnabled(true); }else{ adjButton.setEnabled(false); if (adjButton.isSelected()){ ... |
this.pp = pp; | this.pp = new PlayPen(pp); | public PrintPanel(PlayPen pp) { super(); setOpaque(true); setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); this.pp = pp; add(new PrintPreviewPanel()); job = PrinterJob.getPrinterJob(); jobAttributes = new HashPrintRequestAttributeSet(); pageFormat = job.defaultPage(); JPanel formPanel = new JPanel(new Fo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.