rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
boolean success = tp.insertObjects(droppedItems, insertionPoint);
boolean success = false; try { success = tp.insertObjects(droppedItems, insertionPoint); } catch (LockedColumnException ex ) { JOptionPane.showConfirmDialog(pp, "Could not delete the column " + ex.getCol().getName() + " because it is part of\n" + "the relationship \""+ex.getLockingRelationship()+"\".\n\n", "Column is L...
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...
return (byte[]) origInstanceHash.clone();
return (origInstanceHash != null) ? ((byte[])origInstanceHash.clone()) : null;
public byte[] getOrigInstanceHash() { return (byte[]) origInstanceHash.clone(); }
};
}
private void setupMapping(SQLTable newTable, SQLTable otherTable, SQLRelationship newRel, SQLRelationship.ColumnMapping m, boolean newTableIsPk) throws ArchitectException { SQLColumn pkCol = null; SQLColumn fkCol = null; if (newTableIsPk) { pkCol=newTable.getColumnByName(m.getPkColum...
printPanel.showPreviewDialog();
public void actionPerformed(ActionEvent evt) { final JDialog d = new JDialog(ArchitectFrame.getMainInstance(), "Print"); JPanel cp = new JPanel(new BorderLayout(12,12)); cp.setBorder(BorderFactory.createMatteBorder(12,12,12,12, cp.getBackground())); final PrintPanel printPanel = new PrintPanel(pp); cp.a...
printerBox.setSelectedItem(getPreferredPrinter());
public PrintPanel(PlayPen pp) { super(); setOpaque(true); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.pp = pp; job = PrinterJob.getPrinterJob(); jobAttributes = new HashPrintRequestAttributeSet(); pageFormat = job.defaultPage(); JPanel formPanel = new JPanel(new FormLayout()); formPanel.add(new JLa...
if (printerBox.getItemCount() > 0 && printerBox.getSelectedItem() instanceof PrintService) { ArchitectFrame.getMainInstance().getUserSettings().getPrintUserSettings().setDefaultPrinterName( ((PrintService)printerBox.getSelectedItem()).getName() ); }
public void applyChanges() { try { validateLayout(); job.setPrintService((PrintService) printerBox.getSelectedItem()); job.setPageable(this); job.print(jobAttributes); } catch (PrinterException ex) { logger.error("Printing failure", ex); JOptionPane.showMessageDialog(this, "Printing failed: "+ex.getMessa...
request.setAttribute(RequestAttributes.NAV_CURRENT_PAGE, "Add Application");
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
public DashboardConfig(String dashboardId, String name, String template, Map<String, DashboardComponent> components, List<DashboardQualifier> qualifiers) {
public DashboardConfig(String dashboardId){
public DashboardConfig(String dashboardId, String name, String template, Map<String, DashboardComponent> components, List<DashboardQualifier> qualifiers) { this.dashboardId = dashboardId; this.name = name; this.template = template; this...
this.name = name; this.template = template; this.components = components; this.qualifiers = qualifiers;
public DashboardConfig(String dashboardId, String name, String template, Map<String, DashboardComponent> components, List<DashboardQualifier> qualifiers) { this.dashboardId = dashboardId; this.name = name; this.template = template; this...
return null;
return defaultClass;
protected Class getDefaultClass() { return null; }
try { Iterator it = getModel().getChildren().iterator(); while (it.hasNext()) { SQLRelationship.ColumnMapping m = (ColumnMapping) it.next(); int pkColIdx = pkTable.getModel().getColumnIndex(m.getPkColumn()); int fkColIdx = fkTable.getModel().getColumnIndex(m.getFkColumn()); pkTable.setColumnHighlight(pkColIdx, isSelect...
public void setSelected(boolean isSelected) { if (selected != isSelected) { selected = isSelected; fireSelectionEvent(new SelectionEvent(this, selected ? SelectionEvent.SELECTION_EVENT : SelectionEvent.DESELECTION_EVENT)); repaint(); } }
Object dataType = null;
DataType dataType = null;
public TagScript createTagScript(String name, Attributes attributes) throws Exception { Project project = getProject(); // custom Ant tags if ( name.equals("fileScanner") ) { Tag tag = new FileScannerTag(new FileScanner(project)); return TagScript.newIn...
dataType = type.newInstance(); } else { dataType = project.createDataType(name);
try { java.lang.reflect.Constructor ctor = null; boolean noArg = false; try { ctor = type.getConstructor(new Class[0]); noArg = true; } catch (NoSuchMethodException nse) { ctor = type.getConstructor(new Class[] { Project.class }); noArg = false; } if (noArg) { dataType = (DataType) ctor.newInstance(new Object[0]); }...
public TagScript createTagScript(String name, Attributes attributes) throws Exception { Project project = getProject(); // custom Ant tags if ( name.equals("fileScanner") ) { Tag tag = new FileScannerTag(new FileScanner(project)); return TagScript.newIn...
Tag tag = new TaskPropertyTag( name ); return TagScript.newInstance(tag);
Tag tag = new OtherAntTag( project, name ); return TagScript.newInstance( tag );
public TagScript createTagScript(String name, Attributes attributes) throws Exception { Project project = getProject(); // custom Ant tags if ( name.equals("fileScanner") ) { Tag tag = new FileScannerTag(new FileScanner(project)); return TagScript.newIn...
public FieldController( Object[] model ) { setModel( model, false );
public FieldController( Object model ) { this.model = new Object[1]; this.model[0] = model; if ( model != null ) { value = getModelValue( model ); }
public FieldController( Object[] model ) { setModel( model, false ); }
dbNameField.setName("dbNameField");
public DBCSPanel() { setLayout(new BorderLayout()); dbDriverField = new JComboBox(getDriverClasses()); dbDriverField.insertItemAt("", 0); dbNameField = new JTextField(); platformSpecificOptions = new JPanel(); platformSpecificOptions.setLayout(new PlatformOptionsLayout()); platformSpecificOptions.setBorder(Bo...
pp.setIgnoreReset(true);
pp.setPlayPenDatabase(true);
public void testGetDerivedInstance() throws Exception { SQLTable derivedTable; SQLTable table1; // Check to make sure it can be added to a playpen like database SQLDatabase pp = new SQLDatabase(); pp.setIgnoreReset(true); assertNotNull(table1 = db.getTableByName("REGRESSION_TEST1")); derivedTable = SQLTable.get...
UserActivityLogger.getInstance().logActivity( context.getUser().getUsername(), "Added application cluster "+ "\""+clusterConfig.getName()+"\"");
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
printDPrimeValues = false; printMarkerNames = false;
return;
public void paintComponent(Graphics g){ DPrimeTable dPrimeTable = theData.dpTable; if (Chromosome.getSize() == 0){ //if there are no valid markers, but info is known we don't want //to paint any of that stuff. printDPrimeValues = false; printMarkerNames = fa...
if (custAssocButton != null){
if (hv.custAssocPanel != null){
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...
throw new JellyException( "This tag must have a 'test' attribute defined" );
throw new MissingAttributeException( "test" );
public void doTag(XMLOutput output) throws Exception { if (test != null) { if (test.evaluateAsBoolean(context)) { getBody().run(context, output); } } else { throw new JellyException( "This tag must have a 'test' attribute defined" ); } }
String appType = config.getType(); if (appType.equals("connector")) { ConnectorRegistry.remove(config); }
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
keys.add(key);
public void addContent(PedFileEntry entry){ String key = entry.getFamilyID() + " " + entry.getIndivID(); this._contents.put(key, entry); }
final String hashedPassword = Crypto.hash(userForm.getPassword()); if(!hashedPassword.equals(user.getPassword())){
if(!userForm.getPassword().equals(UserForm.FORM_PASSWORD)){ String hashedPassword = Crypto.hash(userForm.getPassword());
private User buildUser(ActionForm form){ UserForm userForm = (UserForm)form; User user = UserManager.getInstance().getUser(userForm.getUsername()); assert user != null; List roles = new ArrayList(1); roles.add(new Role(userForm.getRole())); user.setRoles(roles); // T...
registerTag("style", StyleTag.class);
public JSLTagLibrary() { registerTag("stylesheet", StylesheetTag.class); registerTag("template", TemplateTag.class); registerTag("applyTemplates", ApplyTemplatesTag.class); registerTag("valueOf", ExprTag.class); }
Connection conn = null; if (userName != null) { log.info("Creating connection from url: " + jdbcURL + " userName: " + userName); conn = DriverManager.getConnection(jdbcURL, userName, password); } else { log.info("Creating connection from url: " + jdbcURL); conn = DriverManager.getConnection(jdbcURL); } return conn; }
Connection conn = null; if (userName != null) { if (log.isDebugEnabled()) { log.debug( "Creating connection from url: " + jdbcURL + " userName: " + userName); } conn = DriverManager.getConnection(jdbcURL, userName, password); } else { if (log.isDebugEnabled()) { log.debug("Creating connection from url: " + jdbcURL); }...
public Connection getConnection() throws SQLException { Connection conn = null; if (userName != null) { log.info("Creating connection from url: " + jdbcURL + " userName: " + userName); conn = DriverManager.getConnection(jdbcURL, userName, password); } else { log.info("Creating connection from url: " + jdbcUR...
for ( int i = 0; i < accuracyFormatLimits.length; i++ ) { log.warn( "Trying format " + accuracyFormatStrings[i] ); DateFormat df = new SimpleDateFormat( accuracyFormatStrings[i] ); try { Date d = df.parse( str ); if ( d != null ) { log.warn( "Success with " + accuracyFormatStrings[i] ); d = new Date( d.getTime() + (lo...
for ( int i = 0; i < fdParsers.length; i++ ) { fd = fdParsers[i].parse( str ); if ( fd != null ) { break; }
static public FuzzyDate parse( String str ) { log.warn( "Parsing " + str ); FuzzyDate fd = null; // First check whether the string contains a range with start and end dates String rangeSeparator = " - "; int separatorIdx = str.indexOf( rangeSeparator ); if ( separatorIdx > 0 ) { // Yes, it is. Parse both sides ...
List<Integer> newRowMap = new ArrayList<Integer>(); CharSequence searchSubSequence = searchText.toLowerCase().subSequence(0,searchText.length());
List<Integer> newRowMap = new ArrayList<Integer>(); CharSequence searchSubSequence = searchText == null ? null : searchText.subSequence(0,searchText.length());
private void search(String searchText) { rowMapping = null; fireTableDataChanged(); List<Integer> newRowMap = new ArrayList<Integer>(); CharSequence searchSubSequence = searchText.toLowerCase().subSequence(0,searchText.length()); for ( int row = 0; row < tableModel...
for ( int column = 0; column < tableModel.getColumnCount(); column++ ) { String value = tableTextConverter.getTextForCell(row, column); if (value.toLowerCase().contains(searchSubSequence)) { if (logger.isDebugEnabled()) { logger.debug("Match: "+value.toLowerCase()+" contains "+searchSubSequence);
if ( searchSubSequence == null ) { match = true; } else { for ( int column = 0; column < tableModel.getColumnCount(); column++ ) { String value = tableTextConverter.getTextForCell(row, column); if (value.toLowerCase().contains(searchSubSequence)) { if (logger.isDebugEnabled()) { logger.debug("Match: "+value.toLowerCase...
private void search(String searchText) { rowMapping = null; fireTableDataChanged(); List<Integer> newRowMap = new ArrayList<Integer>(); CharSequence searchSubSequence = searchText.toLowerCase().subSequence(0,searchText.length()); for ( int row = 0; row < tableModel...
match = true; break;
private void search(String searchText) { rowMapping = null; fireTableDataChanged(); List<Integer> newRowMap = new ArrayList<Integer>(); CharSequence searchSubSequence = searchText.toLowerCase().subSequence(0,searchText.length()); for ( int row = 0; row < tableModel...
fkTable.getColumnsFolder().setSecondaryChangeMode(false); fkTable.getImportedKeysFolder().setSecondaryChangeMode(false);
if ( fkTable != null ) { fkTable.getColumnsFolder().setSecondaryChangeMode(false); fkTable.getImportedKeysFolder().setSecondaryChangeMode(false); }
public void attachRelationship(SQLTable pkTable, SQLTable fkTable, boolean autoGenerateMapping) throws ArchitectException { SQLTable oldPkt = this.pkTable; SQLTable oldFkt = this.fkTable; if (this.pkTable != null || this.fkTable != null) { this.detachListeners(); } this.pkTable = pkTable; this.fkTable = fkTa...
registerBean( "customer", Customer.class );
public MyTagLibrary() { registerBean( "customer", Customer.class ); }
ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_END,"Ending multi-select"));
public void doStuff () { if ( !isCancelled()){ hasStarted = true; logger.info("AddObjectsTask starting on thread "+Thread.currentThread().getName()); try { int pmMax = 0; Iterator soIt = sqlObjects.iterator(); // first pass: figure out how much work we need to do... while ...
PlayPen c = (PlayPen) dtde.getDropTargetContext().getComponent(); DataFlavor importFlavor = bestImportFlavor(c, t.getTransferDataFlavors());
PlayPen playpen = (PlayPen) dtde.getDropTargetContext().getComponent(); DataFlavor importFlavor = bestImportFlavor(playpen, t.getTransferDataFlavors());
public void drop(DropTargetDropEvent dtde) { logger.info("Drop: I am over dtde="+dtde); if (tpTarget != null) { tpTarget.getDropTargetListener().drop(dtde); return; } Transferable t = dtde.getTransferable(); PlayPen c = (PlayPen) dtde.getDropTargetContext().getComponent(); DataFlavor importFlavor = ...
Point dropLoc = c.unzoomPoint(new Point(dtde.getLocation()));
Point dropLoc = playpen.unzoomPoint(new Point(dtde.getLocation()));
public void drop(DropTargetDropEvent dtde) { logger.info("Drop: I am over dtde="+dtde); if (tpTarget != null) { tpTarget.getDropTargetListener().drop(dtde); return; } Transferable t = dtde.getTransferable(); PlayPen c = (PlayPen) dtde.getDropTargetContext().getComponent(); DataFlavor importFlavor = ...
c.addObjects(sqlObjects, dropLoc, null);
playpen.addObjects(sqlObjects, dropLoc, null);
public void drop(DropTargetDropEvent dtde) { logger.info("Drop: I am over dtde="+dtde); if (tpTarget != null) { tpTarget.getDropTargetListener().drop(dtde); return; } Transferable t = dtde.getTransferable(); PlayPen c = (PlayPen) dtde.getDropTargetContext().getComponent(); DataFlavor importFlavor = ...
Map<String,Object> description = new HashMap<String,Object>();
private static Map<String,Object> setAllInterestingProperties(SQLObject target, Set<String> propertiesToIgnore) throws Exception { Map<String,Object> description = new HashMap<String,Object>(); PropertyDescriptor props[] = PropertyUtils.getPropertyDescriptors(target); for (int i = 0; i < props.length; i++) { ...
PrintWriter out = new PrintWriter(tmp);
PrintWriter out = new PrintWriter(tmp,ENCODING);
public void testSaveCoversAllCatalogProperties() throws Exception { ArchitectDataSource ds = new ArchitectDataSource(); ds.setDisplayName("Schemaless Database"); ds.setDriverClass("regress.ca.sqlpower.architect.MockJDBCDriver"); ds.setUser("fake"); ds.setPass("fake"); //this creates a mock jdbc database with o...
project.save(out);
project.save(out,ENCODING);
public void testSaveCoversAllCatalogProperties() throws Exception { ArchitectDataSource ds = new ArchitectDataSource(); ds.setDisplayName("Schemaless Database"); ds.setDriverClass("regress.ca.sqlpower.architect.MockJDBCDriver"); ds.setUser("fake"); ds.setPass("fake"); //this creates a mock jdbc database with o...
PrintWriter out = new PrintWriter(tmp);
PrintWriter out = new PrintWriter(tmp,ENCODING);
public void testSaveCoversAllColumnProperties() throws Exception { final String tableName = "harry"; testLoad(); SQLDatabase ppdb = project.getPlayPen().getDatabase(); SQLTable table = new SQLTable(ppdb, true); table.setName(tableName); SQLColumn target = new SQLColumn(table, "my cool test column", Types.INTEG...
project.save(out);
project.save(out,ENCODING);
public void testSaveCoversAllColumnProperties() throws Exception { final String tableName = "harry"; testLoad(); SQLDatabase ppdb = project.getPlayPen().getDatabase(); SQLTable table = new SQLTable(ppdb, true); table.setName(tableName); SQLColumn target = new SQLColumn(table, "my cool test column", Types.INTEG...
PrintWriter out = new PrintWriter(tmp);
PrintWriter out = new PrintWriter(tmp,ENCODING);
public void testSaveCoversAllDatabaseProperties() throws Exception { testLoad(); DBTree dbTree = project.getSourceDatabases(); DBTreeModel dbTreeModel = (DBTreeModel) dbTree.getModel(); ArchitectDataSource fakeDataSource = new ArchitectDataSource(); SQLDatabase db = new SQLDatabase() { @Override public Conn...
project.save(out);
project.save(out,ENCODING);
public void testSaveCoversAllDatabaseProperties() throws Exception { testLoad(); DBTree dbTree = project.getSourceDatabases(); DBTreeModel dbTreeModel = (DBTreeModel) dbTree.getModel(); ArchitectDataSource fakeDataSource = new ArchitectDataSource(); SQLDatabase db = new SQLDatabase() { @Override public Conn...
PrintWriter out = new PrintWriter(tmp);
PrintWriter out = new PrintWriter(tmp,ENCODING);
public void testSaveCoversAllSchemaProperties() throws Exception { testLoad(); DBTree dbTree = project.getSourceDatabases(); DBTreeModel dbTreeModel = (DBTreeModel) dbTree.getModel(); ArchitectDataSource fakeDataSource = new ArchitectDataSource(); SQLDatabase db = new SQLDatabase(); db.setDataSource(fakeDataSo...
project.save(out);
project.save(out,ENCODING);
public void testSaveCoversAllSchemaProperties() throws Exception { testLoad(); DBTree dbTree = project.getSourceDatabases(); DBTreeModel dbTreeModel = (DBTreeModel) dbTree.getModel(); ArchitectDataSource fakeDataSource = new ArchitectDataSource(); SQLDatabase db = new SQLDatabase(); db.setDataSource(fakeDataSo...
PrintWriter out = new PrintWriter(tmp);
PrintWriter out = new PrintWriter(tmp,ENCODING);
public void testSaveCoversAllTableProperties() throws Exception { testLoad(); DBTree dbTree = project.getSourceDatabases(); DBTreeModel dbTreeModel = (DBTreeModel) dbTree.getModel(); ArchitectDataSource fakeDataSource = new ArchitectDataSource(); SQLDatabase db = new SQLDatabase(); db.setDataSource(fakeDataSou...
project.save(out);
project.save(out,ENCODING);
public void testSaveCoversAllTableProperties() throws Exception { testLoad(); DBTree dbTree = project.getSourceDatabases(); DBTreeModel dbTreeModel = (DBTreeModel) dbTree.getModel(); ArchitectDataSource fakeDataSource = new ArchitectDataSource(); SQLDatabase db = new SQLDatabase(); db.setDataSource(fakeDataSou...
PrintWriter out = new PrintWriter(tmp);
PrintWriter out = new PrintWriter(tmp,ENCODING);
public void testSaveCoversCompareDMSettings() throws Exception { testLoad(); CompareDMSettings cds = project.getCompareDMSettings(); File tmp = File.createTempFile("test", ".architect"); assertFalse (cds.getSaveFlag()); if (deleteOnExit) { tmp.deleteOnExit(); } PrintWriter out = new PrintWriter(tmp); asser...
project.save(out);
project.save(out,ENCODING);
public void testSaveCoversCompareDMSettings() throws Exception { testLoad(); CompareDMSettings cds = project.getCompareDMSettings(); File tmp = File.createTempFile("test", ".architect"); assertFalse (cds.getSaveFlag()); if (deleteOnExit) { tmp.deleteOnExit(); } PrintWriter out = new PrintWriter(tmp); asser...
PrintWriter out = new PrintWriter(tmp);
PrintWriter out = new PrintWriter(tmp,ENCODING);
public void testSaveIsWellFormed() throws Exception { boolean validate = false; testLoad(); File tmp = File.createTempFile("test", ".architect"); if (deleteOnExit) { tmp.deleteOnExit(); } PrintWriter out = new PrintWriter(tmp); assertNotNull(out); project.setName("FOO<BAR"); // Implicitly testing sanitize...
project.save(out);
project.save(out,ENCODING);
public void testSaveIsWellFormed() throws Exception { boolean validate = false; testLoad(); File tmp = File.createTempFile("test", ".architect"); if (deleteOnExit) { tmp.deleteOnExit(); } PrintWriter out = new PrintWriter(tmp); assertNotNull(out); project.setName("FOO<BAR"); // Implicitly testing sanitize...
PrintWriter out = new PrintWriter(tmp);
PrintWriter out = new PrintWriter(tmp,ENCODING);
public void testSavePrintWriter() throws Exception { testLoad(); File tmp = File.createTempFile("test", ".architect"); if (deleteOnExit) { tmp.deleteOnExit(); } PrintWriter out = new PrintWriter(tmp); assertNotNull(out); project.save(out); SwingUIProject p2 = new SwingUIProject("test2"); p2.load(new FileI...
project.save(out);
project.save(out,ENCODING);
public void testSavePrintWriter() throws Exception { testLoad(); File tmp = File.createTempFile("test", ".architect"); if (deleteOnExit) { tmp.deleteOnExit(); } PrintWriter out = new PrintWriter(tmp); assertNotNull(out); project.save(out); SwingUIProject p2 = new SwingUIProject("test2"); p2.load(new FileI...
p2.save(new PrintWriter(tmp2));
p2.save(new PrintWriter(tmp2,ENCODING),ENCODING);
public void testSavePrintWriter() throws Exception { testLoad(); File tmp = File.createTempFile("test", ".architect"); if (deleteOnExit) { tmp.deleteOnExit(); } PrintWriter out = new PrintWriter(tmp); assertNotNull(out); project.save(out); SwingUIProject p2 = new SwingUIProject("test2"); p2.load(new FileI...
p2.save(new PrintWriter(tmp2));
p2.save(new PrintWriter(tmp2,ENCODING),ENCODING);
public void testSaveProgressMonitor() throws Exception { System.out.println("TestSwingUIProject.testSaveProgressMonitor()"); MockProgressMonitor mockProgressMonitor = new MockProgressMonitor(null, "Hello", "Hello again", 0, 100); File file = File.createTempFile("test", "architect"); project.setFile(file); project...
int tabNum = tabs.getSelectedIndex(); if (tabNum == VIEW_D_NUM || tabNum == VIEW_HAP_NUM){ exportMenuItems[0].setEnabled(true); exportMenuItems[1].setEnabled(true); }else if (tabNum == VIEW_TDT_NUM || tabNum == VIEW_CHECK_NUM){ exportMenuItems[0].setEnabled(true); exportMenuItems[1].setEnabled(false); }else{ exportMenu...
if (tabs.getSelectedIndex() != -1){ int tabNum = tabs.getSelectedIndex(); if (tabNum == VIEW_D_NUM || tabNum == VIEW_HAP_NUM){ exportMenuItems[0].setEnabled(true); exportMenuItems[1].setEnabled(true); }else if (tabNum == VIEW_TDT_NUM || tabNum == VIEW_CHECK_NUM){ exportMenuItems[0].setEnabled(true); exportMenuItems[1]....
public void stateChanged(ChangeEvent e) { int tabNum = tabs.getSelectedIndex(); if (tabNum == VIEW_D_NUM || tabNum == VIEW_HAP_NUM){ exportMenuItems[0].setEnabled(true); exportMenuItems[1].setEnabled(true); }else if (tabNum == VIEW_TDT_NUM || tabNum...
if (tabNum == VIEW_TDT_NUM){ JTabbedPane metaAssoc= (JTabbedPane)tabs.getComponentAt(tabNum); HaploAssocPanel htp = (HaploAssocPanel) metaAssoc.getComponent(1); if (htp.initialHaplotypeDisplayThreshold != Options.getHaplotypeDisplayThreshold()){ htp.makeTable(theData.getHaplotypes());
if (tabNum == VIEW_TDT_NUM){ JTabbedPane metaAssoc= (JTabbedPane)tabs.getComponentAt(tabNum); HaploAssocPanel htp = (HaploAssocPanel) metaAssoc.getComponent(1); if (htp.initialHaplotypeDisplayThreshold != Options.getHaplotypeDisplayThreshold()){ htp.makeTable(theData.getHaplotypes()); } } if (tabNum == VIEW_D_NUM){ k...
public void stateChanged(ChangeEvent e) { int tabNum = tabs.getSelectedIndex(); if (tabNum == VIEW_D_NUM || tabNum == VIEW_HAP_NUM){ exportMenuItems[0].setEnabled(true); exportMenuItems[1].setEnabled(true); }else if (tabNum == VIEW_TDT_NUM || tabNum...
if (tabNum == VIEW_D_NUM){ keyMenu.setEnabled(true); }else{ keyMenu.setEnabled(false); } viewMenuItems[tabs.getSelectedIndex()].setSelected(true); if (checkPanel != null && checkPanel.changed){ Vector currentBlocks = new Vector(); for (int blocks = 0; blocks < theData.blocks.size(); blocks++){ int thisBlock[] = (int...
public void stateChanged(ChangeEvent e) { int tabNum = tabs.getSelectedIndex(); if (tabNum == VIEW_D_NUM || tabNum == VIEW_HAP_NUM){ exportMenuItems[0].setEnabled(true); exportMenuItems[1].setEnabled(true); }else if (tabNum == VIEW_TDT_NUM || tabNum...
Options.setLDColorScheme(Integer.valueOf(command.substring(5)).intValue()+1);
Options.setLDColorScheme(Integer.valueOf(command.substring(5)).intValue());
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...
if (dPrimeDisplay != null){ dPrimeDisplay.setVisible(false); dPrimeDisplay = null; } if (hapDisplay != null){ hapDisplay.setVisible(false); hapDisplay = null; } if (tdtPanel != null){ tdtPanel.setVisible(false); tdtPanel = null;
if (tabs != null){ tabs.removeAll();
public void clearDisplays() { if (dPrimeDisplay != null){ dPrimeDisplay.setVisible(false); dPrimeDisplay = null; } if (hapDisplay != null){ hapDisplay.setVisible(false); hapDisplay = null; } if (tdtPanel != null){ tdtPanel.set...
Options.setShowGBrowse(false);
public static void main(String[] args) { //set defaults Options.setMissingThreshold(1.0); Options.setSpacingThreshold(0.0); Options.setAssocTest(ASSOC_NONE); Options.setHaplotypeDisplayThreshold(1); Options.setMaxDistance(500); Options.setLDColorScheme(STD_SCHEME); ...
getBody().run(context, output);
invokeBody(output);
public void doTag(final XMLOutput output) throws Exception { log.debug("doTag(..):" + name); Goal goal = getProject().getGoal( getName(), true ); goal.setDescription( this.description ); addPrereqs( goal ); Action action = new Defau...
getBody().run(context, output);
invokeBody(output);
public void performAction() throws Exception { log.debug("Running action of target: " + getName() ); getBody().run(context, output); }
getBody().run(context, output);
invokeBody(output);
public void doTag(XMLOutput output) throws Exception { // run the body first to configure the task via nested getBody().run(context, output); // output the fileScanner if ( var == null ) { throw new MissingAttributeException( "var" ); } context.setVariable( var, ...
columnHighlight.add(ci[i], null);
public void dbChildrenInserted(SQLObjectEvent e) { int ci[] = e.getChangedIndices(); for (int i = 0; i < ci.length; i++) { columnSelection.add(ci[i], Boolean.FALSE); } try { ArchitectUtils.listenToHierarchy(this, e.getChildren()); } catch (ArchitectException ex) { logger.error("Caught exception while listen...
columnSelection.remove(ci[i]);
columnSelection.remove(ci[i]); columnHighlight.remove(ci[i]);
public void dbChildrenRemoved(SQLObjectEvent e) { if (e.getSource() == this.model.getColumnsFolder()) { int ci[] = e.getChangedIndices(); for (int i = 0; i < ci.length; i++) { columnSelection.remove(ci[i]); } if (columnSelection.size() > 0) { selectNone(); columnSelection.set(Math.min(ci[0], columnSe...
logger.error("Selection list and children are out of sync: selection="+columnSelection+"; children="+this.model.getColumns());
logger.error("Repairing out-of-sync selection list: selection="+columnSelection+"; children="+this.model.getColumns()); columnSelection = new ArrayList(); for (int j = 0; j < model.getColumns().size(); j++) { columnSelection.add(Boolean.FALSE); } } if (columnHighlight.size() != this.model.getColumns().size()) { logger....
public void dbChildrenRemoved(SQLObjectEvent e) { if (e.getSource() == this.model.getColumnsFolder()) { int ci[] = e.getChangedIndices(); for (int i = 0; i < ci.length; i++) { columnSelection.remove(ci[i]); } if (columnSelection.size() > 0) { selectNone(); columnSelection.set(Math.min(ci[0], columnSe...
columnHighlight = new ArrayList(numCols); for (int i = 0; i < numCols; i++) { columnHighlight.add(null); }
public void dbStructureChanged(SQLObjectEvent e) { if (e.getSource() == model.getColumnsFolder()) { int numCols = e.getChildren().length; columnSelection = new ArrayList(numCols); for (int i = 0; i < numCols; i++) { columnSelection.add(Boolean.FALSE); } firePropertyChange("model.children", null, null); ...
TablePane t3 = (TablePane)it.next(); logger.debug("(" + tp.getModel().getTableName() + ") zoomed selected table point: " + tp.getLocationOnScreen()); logger.debug("(" + t3.getModel().getTableName() + ") zoomed iterator table point: " + t3.getLocationOnScreen());
TablePane t3 = (TablePane) it.next(); if (logger.isDebugEnabled()) { logger.debug("(" + tp.getModel().getTableName() + ") zoomed selected table point: " + tp.getLocationOnScreen()); logger.debug("(" + t3.getModel().getTableName() + ") zoomed iterator table point: " + t3.getLocationOnScreen()); }
private void deSelectEverythingElse (MouseEvent evt) { TablePane tp = (TablePane) evt.getSource(); Iterator it = getPlayPen().getSelectedTables().iterator(); while (it.hasNext()) { TablePane t3 = (TablePane)it.next(); logger.debug("(" + tp.getModel().getTableName() + ") zoomed selected table point: " + tp.getLo...
columnHighlight = new ArrayList(m.getColumns().size()); for (int i = 0; i < m.getColumns().size(); i++) { columnHighlight.add(null); }
public void setModel(SQLTable m) { SQLTable old = model; if (old != null) { try { ArchitectUtils.listenToHierarchy(this, old); } catch (ArchitectException e) { logger.error("Caught exception while unlistening to old model", e); } } if (m == null) { throw new IllegalArgumentException("mode...
invokeBody(output);
XMLOutput actualOutput = tag.getStylesheetOutput(); if (actualOutput == null) { actualOutput = output; } invokeBody(actualOutput);
protected Action createAction(final StylesheetTag tag, final XMLOutput output) { return new Action() { public void run(Node node) throws Exception { // store the context for use by applyTemplates tag tag.setXPathSource( node ); ...
invokeBody(output);
XMLOutput actualOutput = tag.getStylesheetOutput(); if (actualOutput == null) { actualOutput = output; } invokeBody(actualOutput);
public void run(Node node) throws Exception { // store the context for use by applyTemplates tag tag.setXPathSource( node ); xpathSource = node; if (log.isDebugEnabled()) { log.debug( "Firing t...
"-b <batchfile> batch mode. batchfile should contain a list of haps files\n" +
"-b <batchfile> batch mode. batchfile should contain a list of files either all genotype or alternating genotype/info\n" +
private void argHandler(String[] args){ //TODO: -specify values from HaplotypeDisplayController (min hap percentage etc) // -want to be able to output haps file from pedfile boolean nogui = false; String batchMode = ""; String hapsFileName = ""; String pedFileName = ""...
PedFile ped; Vector pedFileStrings; BufferedReader reader; String line; boolean[] markerResultArray; ped = new PedFile(); pedFileStrings = new Vector(); reader = new BufferedReader(new FileReader(inputFile)); result = new Vector(); while((line = reader.readLine())!=null){ pedFileStrings.add(line); } ped.parseLinkage...
private void processFile(String fileName,boolean fileType,String infoFileName){ try { int outputType; long maxDistance; long negMaxDistance; HaploData textData; File OutputFile; File inputFile; inputFile = new File(fileName); ...
textData.linkageToChrom(markerResultArray,ped,null);
textData.linkageToChrom(inputFile, 3, arg_skipCheck);
private void processFile(String fileName,boolean fileType,String infoFileName){ try { int outputType; long maxDistance; long negMaxDistance; HaploData textData; File OutputFile; File inputFile; inputFile = new File(fileName); ...
derivedTable = SQLTable.getDerivedInstance(table1, table1.getParentDatabase());
derivedTable = SQLTable.getDerivedInstance(table1, pp);
public void testGetDerivedInstance() throws Exception { SQLTable derivedTable; SQLTable table1; assertNotNull(table1 = db.getTableByName("REGRESSION_TEST1")); derivedTable = SQLTable.getDerivedInstance(table1, table1.getParentDatabase()); TreeMap derivedPropertyMap = new TreeMap(BeanUtils.describe(derivedTable));...
table1PropertyMap.remove("parentDatabase");
public void testGetDerivedInstance() throws Exception { SQLTable derivedTable; SQLTable table1; assertNotNull(table1 = db.getTableByName("REGRESSION_TEST1")); derivedTable = SQLTable.getDerivedInstance(table1, table1.getParentDatabase()); TreeMap derivedPropertyMap = new TreeMap(BeanUtils.describe(derivedTable));...
Haplotype[][] orderedHaplos; Haplotype[][] crossedHaplos;
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); } in...
orderedHaplos = orderHaps(haplos); crossedHaplos = textData.generateCrossovers(orderedHaplos); textData.saveHapsToText(crossedHaplos, textData.getMultiDprime(), OutputFile);
textData.pickTags(haplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(haplos), OutputFile);
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); } in...
HaploData.saveHapAssocToText(orderedHaplos, fileName + ".HAPASSOC");
HaploData.saveHapAssocToText(haplos, fileName + ".HAPASSOC");
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); } in...
ppBar.setToolTipText("PlayPen Toolbar"); ppBar.setName("PlayPen ToolBar");
protected void init() throws ArchitectException { int accelMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); UserSettings us; // must be done right away, because a static // initializer in this class effects BeanUtils // behaviour which the XML Digester relies // upon heavily //Ty...
log.debug( "Creating thumbnail" );
log.debug( "Creating thumbnail for " + uid );
protected void createThumbnail( Volume volume ) { log.debug( "Creating thumbnail" ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Find the original image to use as a staring point ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance ins...
log.warn( "Found original, reading it..." );
log.debug( "Found original, reading it..." );
protected void createThumbnail( Volume volume ) { log.debug( "Creating thumbnail" ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Find the original image to use as a staring point ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance ins...
origImage = ImageIO.read( original.getImageFile() );
Iterator readers = ImageIO.getImageReadersByFormatName( "jpg" ); if ( readers.hasNext() ) { ImageReader reader = (ImageReader)readers.next(); log.debug( "Creating stream" ); ImageInputStream iis = ImageIO.createImageInputStream( original.getImageFile() ); reader.setInput( iis, true ); if ( reader.getNumThumbnails(0) > ...
protected void createThumbnail( Volume volume ) { log.debug( "Creating thumbnail" ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Find the original image to use as a staring point ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance ins...
log.warn( "Done, finding name" );
log.debug( "Done, finding name" );
protected void createThumbnail( Volume volume ) { log.debug( "Creating thumbnail" ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Find the original image to use as a staring point ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance ins...
log.warn( "name = " + thumbnailFile.getName() );
log.debug( "name = " + thumbnailFile.getName() );
protected void createThumbnail( Volume volume ) { log.debug( "Creating thumbnail" ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Find the original image to use as a staring point ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance ins...
log.warn( "Filtering..." );
log.debug( "Filtering..." );
protected void createThumbnail( Volume volume ) { log.debug( "Creating thumbnail" ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Find the original image to use as a staring point ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance ins...
log.warn( "done Filtering..." );
log.debug( "done Filtering..." );
protected void createThumbnail( Volume volume ) { log.debug( "Creating thumbnail" ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Find the original image to use as a staring point ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance ins...
log.warn( "Loading thumbnail..." );
log.debug( "Loading thumbnail..." );
protected void createThumbnail( Volume volume ) { log.debug( "Creating thumbnail" ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Find the original image to use as a staring point ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance ins...
log.debug( "Thumbnail loaded" );
protected void createThumbnail( Volume volume ) { log.debug( "Creating thumbnail" ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Find the original image to use as a staring point ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance ins...
log.debug( "getThumbnail: Finding thumbnail for " + uid );
log.debug( "getThumbnail: entry, Finding thumbnail for " + uid );
public Thumbnail getThumbnail() { log.debug( "getThumbnail: Finding thumbnail for " + uid ); if ( thumbnail == null ) { // First try to find an instance from existing instances ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance instance = (ImageInstance) instanc...
log.debug( "getThumbnail: exit" );
public Thumbnail getThumbnail() { log.debug( "getThumbnail: Finding thumbnail for " + uid ); if ( thumbnail == null ) { // First try to find an instance from existing instances ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance instance = (ImageInstance) instanc...
log.debug( "hasThumbnail: Finding thumbnail for " + uid );
log.debug( "hasThumbnail: entry, Finding thumbnail for " + uid );
public boolean hasThumbnail() { log.debug( "hasThumbnail: Finding thumbnail for " + uid ); if ( thumbnail == null ) { // First try to find an instance from existing instances ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance instance = (ImageInstance) instances...
log.debug( "hasThumbnail: exit" );
public boolean hasThumbnail() { log.debug( "hasThumbnail: Finding thumbnail for " + uid ); if ( thumbnail == null ) { // First try to find an instance from existing instances ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance instance = (ImageInstance) instances...
CheckDataPanel cp = new CheckDataPanel(textData);
CheckDataPanel cp = new CheckDataPanel(textData, false);
private void processFile(String fileName, int fileType, String infoFileName){ try { int outputType; long maxDistance; HaploData textData; File OutputFile; File inputFile; inputFile = new File(fileName); if(!inputFile.exists()){ ...
viewMenuItems[i].setEnabled(false);
public HaploView(){ //menu setup JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); JMenuItem menuItem; //file menu JMenu fileMenu = new JMenu("File"); menuBar.add(fileMenu); menuItem = new JMenuItem(READ_GENOTYPES); setAccelerator(menuItem, 'O', ...
viewMenuItems[VIEW_HAP_NUM].setEnabled(true);
void processData() { maxCompDist = Long.parseLong(inputOptions[2])*1000; this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); final SwingWorker worker = new SwingWorker(){ public Object construct(){ dPrimeDisplay=null; theData.infoKnown = fals...
viewMenuItems[VIEW_HAP_NUM].setEnabled(true);
public Object construct(){ dPrimeDisplay=null; theData.infoKnown = false; if (!(inputOptions[1].equals(""))){ readMarkers(new File(inputOptions[1])); } theData.generateDPrimeTable(maxCompDist); theDa...
if(status == null){ status = User.STATUS_ACTIVE; }
public String getStatus() { return status; }
TablePane tp = new TablePane(tab);
TablePane tp = new TablePane(tab, playPen.getFontRenderContext());
public Object createObject(Attributes attributes) { int x = Integer.parseInt(attributes.getValue("x")); int y = Integer.parseInt(attributes.getValue("y")); SQLTable tab = (SQLTable) objectIdMap.get(attributes.getValue("table-ref")); TablePane tp = new TablePane(tab); playPen.add(tp, new Point(x, y)); retu...