rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile);
textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), outputFile);
private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; AssociationTestSet customAssocSet; if(!quietMode && fileName != null){ System.out.println("Using data ...
textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile);;
textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), outputFile);;
private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; AssociationTestSet customAssocSet; if(!quietMode && fileName != null){ System.out.println("Using data ...
OutputFile = validateOutputFile(fileName + ".LD");
outputFile = validateOutputFile(fileName + ".LD");
private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; AssociationTestSet customAssocSet; if(!quietMode && fileName != null){ System.out.println("Using data ...
textData.saveDprimeToText(OutputFile, TABLE_TYPE, 0, Chromosome.getSize());
textData.saveDprimeToText(outputFile, TABLE_TYPE, 0, Chromosome.getSize());
private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; AssociationTestSet customAssocSet; if(!quietMode && fileName != null){ System.out.println("Using data ...
textData.saveDprimeToText(OutputFile, LIVE_TYPE, 0, Chromosome.getSize());
textData.saveDprimeToText(outputFile, LIVE_TYPE, 0, Chromosome.getSize());
private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; AssociationTestSet customAssocSet; if(!quietMode && fileName != null){ System.out.println("Using data ...
OutputFile = validateOutputFile(fileName + ".LD.PNG");
outputFile = validateOutputFile(fileName + ".LD.PNG");
private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; AssociationTestSet customAssocSet; if(!quietMode && fileName != null){ System.out.println("Using data ...
Jimi.putImage("image/png", i, OutputFile.getAbsolutePath());
Jimi.putImage("image/png", i, outputFile.getAbsolutePath());
private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; AssociationTestSet customAssocSet; if(!quietMode && fileName != null){ System.out.println("Using data ...
String volumeRoot = "c:\\temp\\photoVaultVolumeTest"; volume = new Volume( "testVolume", volumeRoot );
try { volumeRoot = File.createTempFile( "photovaultVolumeTest", "" ); volumeRoot.delete(); volumeRoot.mkdir(); extvolRoot = File.createTempFile( "photovaultVolumeTestExt", "" ); extvolRoot.delete(); extvolRoot.mkdir(); } catch (IOException ex) { ex.printStackTrace(); } volume = new Volume( "testVolume", volumeRoot.getA...
public void setUp() { String volumeRoot = "c:\\temp\\photoVaultVolumeTest"; volume = new Volume( "testVolume", volumeRoot ); extVol = new ExternalVolume( "extVolume", extvolRoot.getAbsolutePath() ); PhotovaultSettings settings = PhotovaultSettings.getSettings(); PVDatabase curDb = settings.getCurrent...
topicID = Integer.parseInt(topic.toString());
topicID = topic.getIdentifier().intValue();
public PresentationObject getTopicsOverView(IWContext iwc){ Table T = new Table(); int row = 1; T.add(getTopicLink(-1,iwrb.getLocalizedString("new_topic","New topic")),1,row); row++; T.add(tf.format(iwrb.getLocalizedString("name","Name"),tf.HEADER),1,row); T.add(tf.format(iwrb.getLocalizedString("category",...
query = query.withValues(values.getValuesFor(filter));
query = query.withValues(values.getSuppliedValuesFor(filter));
private Query<S> applyFilterValues(FilterValues<S> values) { // FIXME: figure out how to transfer values directly to query. Query<S> query = mQuery; Filter<S> filter = query.getFilter(); // FIXME: this code can get confused if filter has constants. if (values != null && filter != ...
returnStrings = new String[]{plinkFileField.getText(), plinkMapField.getText(),embed};
returnStrings = new String[]{plinkFileField.getText(), plinkMapField.getText(),null,embed};
public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command.equals(BROWSE_GENO)){ browse(GENO_FILE); }else if (command.equals(BROWSE_HAPS)){ browse(HAPS_FILE); }else if (command.equals(BROWSE_HMP)){ browse(HMP_FILE); ...
XMLParser parser = (XMLParser) parserPool.get(); if (parser == null) { parser = createXMLParser(); parserPool.set(parser); }
XMLParser parser = createXMLParser();
protected XMLParser getXMLParser() { XMLParser parser = (XMLParser) parserPool.get(); if (parser == null) { parser = createXMLParser(); parserPool.set(parser); } return parser; }
Enumeration enum= listModel.elements(); while (enum.hasMoreElements()) { v.add(enum.nextElement());
Enumeration items = listModel.elements(); while (items.hasMoreElements()) { v.add(items.nextElement());
public void buildPage(String template, JellyContext ctx) { // try {// // Embedded embedded = new Embedded();// embedded.setOutputStream(new FileOutputStream("out.html"));// //embedded.setVariable("some-var","some-object");// // embedded.setScript("file:///anoncvs/jakarta-commons-sandbox/jelly/sample.jell...
e.printStackTrace(); } }
public void buildPage(String template, JellyContext ctx) { // try {// // Embedded embedded = new Embedded();// embedded.setOutputStream(new FileOutputStream("out.html"));// //embedded.setVariable("some-var","some-object");// // embedded.setScript("file:///anoncvs/jakarta-commons-sandbox/jelly/sample.jell...
JTable table; TDT theTDT = new TDT(); Vector result = theTDT.calcTDT(chromosomes); Vector tableColumnNames = new Vector();
public TDTPanel(Vector chromosomes) { JTable table; TDT theTDT = new TDT(); Vector result = theTDT.calcTDT(chromosomes); Vector tableColumnNames = new Vector(); tableColumnNames.add("Name"); tableColumnNames.add("Chi Squared"); tableColumnNames.add("T/U Ratio"); ...
Vector tableData = new Vector(); int numRes = Chromosome.getFilteredSize(); for (int i = 0; i < numRes; i++){ Vector tempVect = new Vector(); TDTResult currentResult = (TDTResult)result.get(Chromosome.realIndex[i]); tempVect.add(currentResult.getName()); tempVect.add(new Double(currentResult.getChiSq())); tempVect.add...
public TDTPanel(Vector chromosomes) { JTable table; TDT theTDT = new TDT(); Vector result = theTDT.calcTDT(chromosomes); Vector tableColumnNames = new Vector(); tableColumnNames.add("Name"); tableColumnNames.add("Chi Squared"); tableColumnNames.add("T/U Ratio"); ...
folderTreePane = new FolderTreePane( ctrl.getFolderController() ); pane.add( folderTreePane, BorderLayout.NORTH );
GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; c.weightx = 1; c.weighty = 1; pane.add( folderTreePane, c );
protected void createFolderPaneUI() { JPanel pane = new JPanel(); tabPane.addTab( "Folders", pane ); folderTreePane = new FolderTreePane( ctrl.getFolderController() ); pane.add( folderTreePane, BorderLayout.NORTH ); }
this.parent = parent; setName(name); this.remarks = remarks; this.objectType = objectType; this.children = new ArrayList();
setup(parent, name, remarks, objectType);
public SQLTable(SQLObject parent, String name, String remarks, String objectType, boolean startPopulated) throws ArchitectException { logger.debug("NEW TABLE "+name+"@"+hashCode()); this.parent = parent; setName(name); this.remarks = remarks; this.objectType = objectType; this.children = new ArrayList(); initFo...
if (this.objectType == null) throw new NullPointerException();
public void setObjectType(String argObjectType) { String oldObjectType = this.objectType; this.objectType = argObjectType; fireDbObjectChanged("objectType",oldObjectType, argObjectType); }
new NumberTextField(String.valueOf(parent.displayThresh), 3, false));
new NumberTextField(String.valueOf(Options.getHaplotypeDisplayThreshold()), 3, false));
public HaplotypeDisplayController(HaplotypeDisplay parent){ this.parent = parent; setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); JPanel leftPanel = new JPanel(); leftPanel.setLayout(new BoxLayout(leftPanel, BoxLayout.Y_AXIS)); JPanel rightPanel = new JPanel(); rightPanel...
if (parent.displayThresh != amount){ parent.adjustDisplay(amount);
if (Options.getHaplotypeDisplayThreshold() != amount){ Options.setHaplotypeDisplayThreshold(amount); parent.adjustDisplay();
public void setDisplayThresh(int amount){ if (parent.displayThresh != amount){ parent.adjustDisplay(amount); } }
protected int countSourceTables(int count, SQLObject o) throws ArchitectException {
protected int countSourceTables(SQLObject o) throws ArchitectException {
protected int countSourceTables(int count, SQLObject o) throws ArchitectException { if (o instanceof SQLTable) { return count + 1; } else { Iterator it = o.getChildren().iterator(); while (it.hasNext()) { count += countSourceTables(count, (SQLObject) it.next()); } } return count; }
return count + 1;
return 1; } else if (o == playPen.getDatabase()) { return 0;
protected int countSourceTables(int count, SQLObject o) throws ArchitectException { if (o instanceof SQLTable) { return count + 1; } else { Iterator it = o.getChildren().iterator(); while (it.hasNext()) { count += countSourceTables(count, (SQLObject) it.next()); } } return count; }
count += countSourceTables(count, (SQLObject) it.next());
myCount += countSourceTables((SQLObject) it.next());
protected int countSourceTables(int count, SQLObject o) throws ArchitectException { if (o instanceof SQLTable) { return count + 1; } else { Iterator it = o.getChildren().iterator(); while (it.hasNext()) { count += countSourceTables(count, (SQLObject) it.next()); } } return count; }
return count;
protected int countSourceTables(int count, SQLObject o) throws ArchitectException { if (o instanceof SQLTable) { return count + 1; } else { Iterator it = o.getChildren().iterator(); while (it.hasNext()) { count += countSourceTables(count, (SQLObject) it.next()); } } return count; }
pm.setMaximum(countSourceTables(0, (SQLObject) sourceDatabases.getModel().getRoot()) + playPen.getComponentCount() * 2);
int pmMax = countSourceTables((SQLObject) sourceDatabases.getModel().getRoot()) + playPen.getComponentCount() * 2; logger.debug("Setting progress monitor maximum to "+pmMax); pm.setMaximum(pmMax);
public void save(ProgressMonitor pm) throws IOException, ArchitectException { out = new PrintWriter(new BufferedWriter(new FileWriter(file))); objectIdMap = new HashMap(); dbcsIdMap = new HashMap(); indent = 0; this.pm = pm; pm.setMinimum(0); pm.setMaximum(countSourceTables(0, (SQLObject) sourceDatabases.getMod...
logger.debug("column "+o+" source is "+sourceCol+" (hash "+sourceCol.hashCode() +"; id "+objectIdMap.get(sourceCol) +", parent "+sourceCol.getParent()+" hash "+sourceCol.getParent().hashCode() +", parent "+sourceCol.getParent().getParent()+" hash "+sourceCol.getParent().getParent().hashCode() +", parent "+sourceCol.get...
protected void saveSQLObject(SQLObject o) throws IOException, ArchitectException { String id = (String) objectIdMap.get(o); if (id != null) { println("<reference ref-id=\""+id+"\" />"); return; } String type; Map propNames = new TreeMap(); if (o instanceof SQLDatabase) { id = "DB"+objectIdMap.size(); ...
Tag tag = getTag();
public void run(JellyContext context, XMLOutput output) throws Exception { startNamespacePrefixes(output); if ( firstRun ) { firstRun = false; // lets see if we have a dynamic tag tag = findDynamicTag(context, (StaticTag) tag); } ...
if ( tag == null ) { return; }
public void run(JellyContext context, XMLOutput output) throws Exception { startNamespacePrefixes(output); if ( firstRun ) { firstRun = false; // lets see if we have a dynamic tag tag = findDynamicTag(context, (StaticTag) tag); } ...
WeblogicApplicationForm appForm = (WeblogicApplicationForm)actionForm;
ApplicationForm appForm = (ApplicationForm)actionForm;
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
config.setPort(new Integer(appForm.getPort()));
if(appForm.getPort() != null) config.setPort(new Integer(appForm.getPort()));
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
if(!password.equals(config.getPassword())){
if(password != null && !password.equals(config.getPassword())){
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
return new FileScannerTag(new FileScanner(getProject()));
return new FileScannerTag(new FileScanner());
public TagScript createCustomTagScript(final String name, Attributes attributes) throws Exception { // custom Ant tags if ( name.equals("fileScanner") ) { return new BeanTagScript( new TagFactory() { public Tag createTag() throws Exception { ...
return new FileScannerTag(new FileScanner(getProject()));
return new FileScannerTag(new FileScanner());
public Tag createTag() throws Exception { return new FileScannerTag(new FileScanner(getProject())); }
public static Project createProject() { Project project = new Project();
public static Project createProject(JellyContext context) { GrantProject project = new GrantProject(); project.setPropsHandler(new JellyPropsHandler(context));
public static Project createProject() { Project project = new Project(); BuildLogger logger = new NoBannerLogger(); logger.setMessageOutputLevel( org.apache.tools.ant.Project.MSG_INFO ); logger.setOutputPrintStream( System.out ); logger.setErrorPrintStream( System.err); pro...
AntTag tag = new AntTag( getProject(), name );
AntTag tag = new AntTag( name );
public Tag createTag(String name) throws Exception { AntTag tag = new AntTag( getProject(), name ); if ( name.equals( "echo" ) ) { tag.setTrim(false); } return tag; }
Project project = (Project) context.findVariable( "org.apache.commons.jelly.ant.Project" );
Project project = (Project) context.findVariable( PROJECT_CONTEXT_HANDLE );
public static Project getProject(JellyContext context) { Project project = (Project) context.findVariable( "org.apache.commons.jelly.ant.Project" ); if ( project == null ) { project = createProject(); context.setVariable( "org.apache.commons.jelly.ant.Project", project ); ...
project = createProject(); context.setVariable( "org.apache.commons.jelly.ant.Project", project );
project = createProject(context); context.setVariable( PROJECT_CONTEXT_HANDLE , project );
public static Project getProject(JellyContext context) { Project project = (Project) context.findVariable( "org.apache.commons.jelly.ant.Project" ); if ( project == null ) { project = createProject(); context.setVariable( "org.apache.commons.jelly.ant.Project", project ); ...
TablePane tp = (TablePane) getComponent(j); if (selectedChild == tp) selectedChild = null; if (tp.getModel() == c[i]) { remove(j); fireEvent = true;
if (getComponent(j) instanceof TablePane) { TablePane tp = (TablePane) getComponent(j); if (selectedChild == tp) selectedChild = null; if (tp.getModel() == c[i]) { remove(j); fireEvent = true; }
public void dbChildrenRemoved(SQLObjectEvent e) { logger.debug("SQLObject children got removed: "+e); boolean fireEvent = false; SQLObject o = e.getSQLSource(); SQLObject[] c = e.getChildren(); for (int i = 0; i < c.length; i++) { try { ArchitectUtils.unlistenToHierarchy(this, c[i]); } catch (ArchitectExce...
Relationship r = (Relationship) getComponent(j); if (selectedChild == r) selectedChild = null; if (r.getModel() == c[i]) { remove(j); fireEvent = true;
if (getComponent(j) instanceof Relationship) { Relationship r = (Relationship) getComponent(j); if (selectedChild == r) selectedChild = null; if (r.getModel() == c[i]) { remove(j); fireEvent = true; }
public void dbChildrenRemoved(SQLObjectEvent e) { logger.debug("SQLObject children got removed: "+e); boolean fireEvent = false; SQLObject o = e.getSQLSource(); SQLObject[] c = e.getChildren(); for (int i = 0; i < c.length; i++) { try { ArchitectUtils.unlistenToHierarchy(this, c[i]); } catch (ArchitectExce...
selectedChild = e.getSelectedItem(); fireSelectionEvent(e.getSelectedItem());
if (e.getSelectedItem().isSelected()) { logger.debug("Child "+e.getSelectedItem()+" is now selected"); selectedChild = e.getSelectedItem(); fireSelectionEvent(e.getSelectedItem()); }
public void itemSelected(SelectionEvent e) { selectedChild = e.getSelectedItem(); fireSelectionEvent(e.getSelectedItem()); }
tablePanePopup.addSeparator(); mi = new JMenuItem("Create Relationship"); tablePanePopup.add(mi); tablePanePopup.addSeparator(); mi = new JMenuItem("Show listeners"); mi.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { TablePane tp = (TablePane) getSelection(); JOptionPane.show...
if (logger.isDebugEnabled()) { tablePanePopup.addSeparator(); mi = new JMenuItem("Show listeners"); mi.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { TablePane tp = (TablePane) getSelection(); JOptionPane.showMessageDialog(tp, new JScrollPane(new JList(new java.util.Vector(tp.ge...
void setupTablePanePopup() { ArchitectFrame af = ArchitectFrame.getMainInstance(); tablePanePopup = new JPopupMenu(); JMenuItem mi; mi = new JMenuItem(); mi.setAction(af.editColumnAction); tablePanePopup.add(mi); mi = new JMenuItem(); mi.setAction(af.insertColumnAction); tablePanePopup.add(mi); mi = new JMen...
table.initSingleColumnSize(viewColumn);
initSingleColumnSize(viewColumn);
public void mouseClicked(MouseEvent e) { JTableHeader h = (JTableHeader) e.getSource(); TableColumnModel columnModel = h.getColumnModel(); int viewColumn = columnModel.getColumnIndexAtX(e.getX()); //XXX: Should change to a better condition for size editting ...
public TableModelColumnAutofit(TableModel tableModel, ProfileTable table){
public TableModelColumnAutofit(TableModel tableModel, JTable table){
public TableModelColumnAutofit(TableModel tableModel, ProfileTable table){ this.tableModel = tableModel; this.table = table; mouseListener = new MouseListener(); }
startDrawingTime = System.currentTimeMillis();
public void paint( Graphics g ) { super.paint( g ); Graphics2D g2 = (Graphics2D) g; // Current position in which attributes can be drawn Dimension compSize = getSize(); int ypos = ((int)compSize.getHeight())/2; if ( thumbnail != null ) { // Find the position for the thumbnail BufferedImage img = thumbnail.g...
long endTime = System.currentTimeMillis(); log.debug( "Drawn thumbnail, thumb fetch " + (startDrawingTime - startTime) + ", thumb draw " + (attrDrawingStartTime - startDrawingTime) + ", attribute draw " + (endTime - attrDrawingStartTime) + ", total " + (endTime - startTime) );
public void paint( Graphics g ) { super.paint( g ); Graphics2D g2 = (Graphics2D) g; // Current position in which attributes can be drawn Dimension compSize = getSize(); int ypos = ((int)compSize.getHeight())/2; if ( thumbnail != null ) { // Find the position for the thumbnail BufferedImage img = thumbnail.g...
if (SwingUtilities.isEventDispatchThread()) { notifier.run(); } else { SwingUtilities.invokeLater(notifier); }
notifier.run();
protected void fireTreeNodesChanged(TreeModelEvent e) { final TreeModelEvent ev =e; Runnable notifier = new Runnable(){ public void run() { Iterator it = treeModelListeners.iterator(); while (it.hasNext()) { ((TreeModelListener) it.next()).treeNodesChanged(ev); } } }; if (SwingUtilities.isEventDi...
if (SwingUtilities.isEventDispatchThread()) {
protected void fireTreeNodesInserted(TreeModelEvent e) { if (logger.isDebugEnabled()) logger.debug("Firing treeNodesInserted event: "+e); final TreeModelEvent ev =e; Runnable notifier = new Runnable(){ public void run() { Iterator it = treeModelListeners.iterator(); while (it.hasNext()) { ((TreeModelLi...
} else { SwingUtilities.invokeLater(notifier); }
protected void fireTreeNodesInserted(TreeModelEvent e) { if (logger.isDebugEnabled()) logger.debug("Firing treeNodesInserted event: "+e); final TreeModelEvent ev =e; Runnable notifier = new Runnable(){ public void run() { Iterator it = treeModelListeners.iterator(); while (it.hasNext()) { ((TreeModelLi...
if (SwingUtilities.isEventDispatchThread()) { notifier.run(); } else { SwingUtilities.invokeLater(notifier); }
notifier.run();
protected void fireTreeNodesRemoved(TreeModelEvent e) { if (logger.isDebugEnabled()) logger.debug("Firing treeNodesRemoved event "+e); final TreeModelEvent ev =e; Runnable notifier = new Runnable(){ public void run() { Iterator it = treeModelListeners.iterator(); while (it.hasNext()) { ((TreeModelListe...
if (SwingUtilities.isEventDispatchThread()) {
protected void fireTreeStructureChanged(TreeModelEvent e) { final TreeModelEvent ev =e; Runnable notifier = new Runnable(){ public void run() { Iterator it = treeModelListeners.iterator(); while (it.hasNext()) { ((TreeModelListener) it.next()).treeStructureChanged(ev); } } }; if (SwingUtilities.i...
} else { SwingUtilities.invokeLater(notifier); }
protected void fireTreeStructureChanged(TreeModelEvent e) { final TreeModelEvent ev =e; Runnable notifier = new Runnable(){ public void run() { Iterator it = treeModelListeners.iterator(); while (it.hasNext()) { ((TreeModelListener) it.next()).treeStructureChanged(ev); } } }; if (SwingUtilities.i...
for(int i=0; i< parent.getChildCount(); i++){ parent.removeChild(0); }
protected SQLExceptionNode putExceptionNodeUnder(final SQLObject parent, Throwable ex) { // dig for root cause and message logger.info("Adding exception node under "+parent, ex); String message = ex.getMessage(); Throwable cause = ex; while (cause.getCause() != null) { cause = cause.getCause(); if (cause.getM...
if(!(allele1T == 5 && allele1U == 5 && allele2T !=5 && allele2U != 5) && !(allele1T != 5 && allele1U != 5 && allele2T ==5 && allele2U == 5)) { curRes.tallyInd(allele1T,allele1U); curRes.tallyInd(allele2T,allele2U); }
curRes.tallyInd(allele1T,allele1U); curRes.tallyInd(allele2T,allele2U);
public static Vector calcTDT(Vector chromosomes) { Vector results = new Vector(); int numMarkers = Chromosome.getSize(); for(int k=0;k<numMarkers;k++){ results.add(new TDTResult(Chromosome.getMarker(k))); } for(int i=0;i<chromosomes.size()-3;i++){ Chromosome ...
r.setPkConnectionPoint(translatePoint(e.getPoint()));
r.setPkConnectionPoint(translatePoint(p));
public void mouseMoved(MouseEvent e) { if (movingPk) { r.setPkConnectionPoint(translatePoint(e.getPoint())); } else { r.setFkConnectionPoint(translatePoint(e.getPoint())); } }
r.setFkConnectionPoint(translatePoint(e.getPoint()));
r.setFkConnectionPoint(translatePoint(p));
public void mouseMoved(MouseEvent e) { if (movingPk) { r.setPkConnectionPoint(translatePoint(e.getPoint())); } else { r.setFkConnectionPoint(translatePoint(e.getPoint())); } }
setOpaque(true);
setOpaque(false);
protected void setup() { pkConnectionPoint = new Point(); fkConnectionPoint = new Point(); updateUI(); setOpaque(true); setBackground(Color.green); model.addSQLObjectListener(this); setToolTipText(model.getName()); ui.bestConnectionPoints(pkTable, fkTable, pkConnectionPoint, // in pktable-space ...
int missing=0; for (int j = 0; j < theBlock.length; j++){ byte theGeno = thisChrom.getFilteredGenotype(theBlock[j]); byte nextGeno = nextChrom.getFilteredGenotype(theBlock[j]); if(theGeno == 0 || nextGeno == 0) missing++; } if (! (missing > theBlock.length/2 || missing > missingLimit)){
boolean tooManyMissingInASegment = false; int totalMissing = 0; int segmentShift = 0; for (int n = 0; n < block_size.length; n++){ int missing = 0; for (int j = 0; j < block_size[n]; j++){ byte theGeno = thisChrom.getFilteredGenotype(theBlock[segmentShift+j]); byte nextGeno = nextChrom.getFilteredGenotype(theBlock[segm...
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo...
int[] block_size; if (theBlock.length < 9){ block_size = new int[1]; block_size[0] = theBlock.length; } else { int ones = theBlock.length%8; int eights = (theBlock.length - ones)/8; if (ones == 0){ block_size = new int[eights]; for (int i = 0; i < eights; i++){ block_size[i]=8; } } else { block_size = new int[eights+1...
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo...
public Object createObject(Attributes attributes) {
public Object createObject(Attributes attributes) throws ArchitectException{
public Object createObject(Attributes attributes) { SQLTable tab = new SQLTable(); String id = attributes.getValue("id"); if (id != null) { objectIdMap.put(id, tab); } else { logger.warn("No ID found in table element while loading project...
public Tag createTag() throws Exception {
public Tag createTag(String name, Attributes attributes) throws Exception {
public Tag createTag() throws Exception { return (Tag) tagClass.newInstance(); }
log.warn( "ancestor " + ancestor.getName() );
protected PhotoFolder[] findFolderPath( PhotoFolder folder ) { // Construct a TreePath for this object // Number of ancestors between this Vector ancestors = new Vector(); // Add first the final folder ancestors.add( folder ); PhotoFolder ancestor = folder.getParentFolder(); while ( ancestor != rootFolder && ances...
log.warn( "collectionChanged " + path.length );
public void photoCollectionChanged(PhotoCollectionChangeEvent e) { PhotoFolder changedFolder = (PhotoFolder)e.getSource(); PhotoFolder[] path = findFolderPath( changedFolder ); // Construct the correct event TreeModelEvent treeEvent = new TreeModelEvent( changedFolder, path ); fireTreeModelEvent( treeEvent ); ...
log.warn( "structureChanged " + path.length );
public void structureChanged( PhotoFolderEvent e ) { PhotoFolder changedFolder = (PhotoFolder)e.getSource(); PhotoFolder[] path = findFolderPath( changedFolder ); // Construct the correct event TreeModelEvent treeEvent = new TreeModelEvent( changedFolder, path ); fireTreeModelEvent( treeEvent ); }
log.warn( "subfolderChanged " + path.length );
public void subfolderChanged( PhotoFolderEvent e ) { PhotoFolder changedFolder = (PhotoFolder)e.getSource(); PhotoFolder[] path = findFolderPath( changedFolder ); // Construct the correct event TreeModelEvent treeEvent = new TreeModelEvent( changedFolder, path ); fireTreeModelEvent( treeEvent ); }
select = createXPathFromBody(xpathContext);
throw new MissingAttributeException( "select" );
public void doTag(XMLOutput output) throws Exception { Object xpathContext = getXPathContext(); if (select == null) { select = createXPathFromBody(xpathContext); } String text = select.valueOf(xpathContext); if ( text != null ) { output.write(...
String text = select.valueOf(xpathContext);
String text = select.stringValueOf(xpathContext);
public void doTag(XMLOutput output) throws Exception { Object xpathContext = getXPathContext(); if (select == null) { select = createXPathFromBody(xpathContext); } String text = select.valueOf(xpathContext); if ( text != null ) { output.write(...
final JellyContext newContext = new JellyContext(context);
public void doTag(final XMLOutput output) throws Exception { if ( xmlOutput == null ) { // lets default to system.out xmlOutput = XMLOutput.createXMLOutput( System.out ); } Thread thread = new Thread( new Runnable() { public void run() { ...
invokeBody(xmlOutput);
getBody().run(newContext, xmlOutput);
public void doTag(final XMLOutput output) throws Exception { if ( xmlOutput == null ) { // lets default to system.out xmlOutput = XMLOutput.createXMLOutput( System.out ); } Thread thread = new Thread( new Runnable() { public void run() { ...
invokeBody(xmlOutput);
getBody().run(newContext, xmlOutput);
public void run() { try { invokeBody(xmlOutput); xmlOutput.close(); } catch (Exception e) { e.printStackTrace(); } }
if (configFile == null) configFile = ConfigFile.getDefaultInstance();
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...
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.MAIN_FRAME_WIDTH, getWidth()); sprefs.setInt(SwingUserSettings.MAIN_FRAME_HEI...
setProject(new SwingUIProject("New Project")); } catch (Exception ex) { JOptionPane.showMessageDialog(ArchitectFrame.this, "Can't create new project: "+ex.getMessage()); logger.error("Got exception while creating new project", ex);
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...
project = new SwingUIProject("New Project"); setName("Power*Architect: "+project.getName());
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); } project = new SwingUIProject("New Project"); set...
playpen = new PlayPen(project.getTargetDatabase()); List databases = project.getSourceDatabases(); dbTree = new DBTree(databases); ((SQLObject) dbTree.getModel().getRoot()).addChild(project.getTargetDatabase()); splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(dbTree), new JScrollPane(playpen...
toolBar = new JToolBar(); toolBar.add(new JButton(saveSettingsAction)); toolBar.add(new JButton(createRelationshipAction)); cp.add(toolBar, BorderLayout.NORTH); splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); getContentPane().add(splitPane, BorderLayout.CENTER); logger.debug("Added splitpane to content pane")...
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); } project = new SwingUIProject("New Project"); set...
dbTree.getPreferredSize().width)); toolBar = new JToolBar(); toolBar.add(new JButton(saveSettingsAction)); toolBar.add(new JButton(new CreateRelationshipAction(playpen))); cp.add(toolBar, BorderLayout.NORTH);
150));
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); } project = new SwingUIProject("New Project"); set...
setProject(new SwingUIProject("New Project"));
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); } project = new SwingUIProject("New Project"); set...
JFileChooser fc = new JFileChooser(System.getProperty("user.dir")); fc.setSelectedFile(null); int returned = fc.showOpenDialog(this);
HaploView h = (HaploView) this.getParent(); h.fc.setSelectedFile(null); int returned = h.fc.showOpenDialog(this);
void browse(int browseType){ String name; String markerInfoName = ""; JFileChooser fc = new JFileChooser(System.getProperty("user.dir")); fc.setSelectedFile(null); int returned = fc.showOpenDialog(this); if (returned != JFileChooser.APPROVE_OPTION) return; File file ...
File file = fc.getSelectedFile();
File file = h.fc.getSelectedFile();
void browse(int browseType){ String name; String markerInfoName = ""; JFileChooser fc = new JFileChooser(System.getProperty("user.dir")); fc.setSelectedFile(null); int returned = fc.showOpenDialog(this); if (returned != JFileChooser.APPROVE_OPTION) return; File file ...
(new ActionEvent(tp, ActionEvent.ACTION_PERFORMED, "DoubleClick"));
(new ActionEvent(tp, ActionEvent.ACTION_PERFORMED, ArchitectSwingConstants.ACTION_COMMAND_SRC_PLAYPEN));
public void mouseClicked(MouseEvent evt) { if ((evt.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) { TablePane tp = (TablePane) evt.getSource(); if (evt.getClickCount() == 2) { // double click if (tp.isSelected()) { ArchitectFrame af = ArchitectFrame.getMainInstance(); int selectedColIndex = tp.getSel...
public CompareSchemaWorker (SQLSchema source, SQLSchema target ) throws ArchitectException {
public CompareSchemaWorker (SQLSchema source, SQLSchema target, GenericDDLGenerator gen ) throws ArchitectException {
public CompareSchemaWorker (SQLSchema source, SQLSchema target ) throws ArchitectException { this.source = source; this.target = target; jobSize = source.getChildren().size(); progress = 0; finished = false; }
ddlGenerator = gen;
public CompareSchemaWorker (SQLSchema source, SQLSchema target ) throws ArchitectException { this.source = source; this.target = target; jobSize = source.getChildren().size(); progress = 0; finished = false; }
OracleDDLGenerator od = new OracleDDLGenerator();
public void run() { // FIXME: this should not be hardwired to oracle! OracleDDLGenerator od = new OracleDDLGenerator(); final DefaultStyledDocument output = new DefaultStyledDocument(); SimpleAttributeSet attrsSource = new SimpleAttributeSet(); SimpleAttributeSet attrsTarget = new SimpleAttri...
if ( sourceInd ) { sourceSchemaDropdown.removeAllItems(); sourceSchemaDropdown.setVisible(true); Iterator it = schema.iterator(); while (it.hasNext()) { sourceSchemaDropdown.addItem((String)it.next()); } if (sourceSchemaDropdown.getItemCount() >0) { sourceSchemaDropdown.setEnabled(true); } sourceDatabase = db; } el...
outputTextPane.setDocument(output);
public void run() { if ( sourceInd ) { sourceSchemaDropdown.removeAllItems(); sourceSchemaDropdown.setVisible(true); Iterator it = schema.iterator(); while (it.hasNext()) { sourceSchemaDropdown.addItem((String)it.next()); } // If it has a schema set this enabled ...
public Integer getJobSize() throws ArchitectException { return progressMonitor.getJobSize(); }
public Integer getJobSize() throws ArchitectException;
public Integer getJobSize() throws ArchitectException { return progressMonitor.getJobSize(); }
public int getProgress() throws ArchitectException { return progressMonitor.getProgress(); }
public int getProgress() throws ArchitectException;
public int getProgress() throws ArchitectException { return progressMonitor.getProgress(); }
public boolean isFinished() throws ArchitectException { return progressMonitor.isFinished(); }
public boolean isFinished() throws ArchitectException;
public boolean isFinished() throws ArchitectException { return progressMonitor.isFinished(); }
sourceSQLSchema = sourceDatabase.getSchemaByName((String)sourceSchemaDropdown.getSelectedItem()); targetSQLSchema = targetDatabase.getSchemaByName((String)targetSchemaDropdown.getSelectedItem()); CompareSchemaWorker worker = new CompareSchemaWorker(sourceSQLSchema,targetSQLSchema); StyledDocument styledDoc = outputTe...
if (targetSQLSchema != null && sourceSQLSchema != null) { LabelValueBean lvb =(LabelValueBean) sqlTypeDropdown.getSelectedItem(); CompareSchemaWorker worker = new CompareSchemaWorker(sourceSQLSchema,targetSQLSchema,(GenericDDLGenerator)(((Class )(lvb.getValue())).newInstance())); StyledDocument styledDoc = outputTex...
public void actionPerformed(ActionEvent e) { try { startCompareAction.setEnabled(false); SimpleAttributeSet attrsMsg = new SimpleAttributeSet(); StyleConstants.setFontFamily(attrsMsg, "Courier New"); StyleConstants.setFontSize(attrsMsg, 12); StyleConstants.setForeground(attr...
System.err.println("Couldn't insert styled text."); }
logger.error("Couldn't insert styled text."); } catch (InstantiationException ie) { logger.error("Someone put a non GenericDDLGenerator class into the lvb contained in the source pulldown menu",ie); } catch (IllegalAccessException iae) { logger.error("Cannot access the classes's constructor ",iae); }
public void actionPerformed(ActionEvent e) { try { startCompareAction.setEnabled(false); SimpleAttributeSet attrsMsg = new SimpleAttributeSet(); StyleConstants.setFontFamily(attrsMsg, "Courier New"); StyleConstants.setFontSize(attrsMsg, 12); StyleConstants.setForeground(attr...
JRadioButton sourcePlayPenRadio = new JRadioButton();
sourcePlayPenRadio = new JRadioButton();
private void buildUI() { ArchitectFrame af = ArchitectFrame.getMainInstance(); SwingUIProject project = af.getProject(); // layout source database option/combox target combox JRadioButton sourcePlayPenRadio = new JRadioButton(); sourcePlayPenRadio.setName("sourcePlayPenRadio"); sourcePlayPenRadio.setActionComman...
JRadioButton sourcePhysicalRadio = new JRadioButton();
sourcePhysicalRadio = new JRadioButton();
private void buildUI() { ArchitectFrame af = ArchitectFrame.getMainInstance(); SwingUIProject project = af.getProject(); // layout source database option/combox target combox JRadioButton sourcePlayPenRadio = new JRadioButton(); sourcePlayPenRadio.setName("sourcePlayPenRadio"); sourcePlayPenRadio.setActionComman...
sourceDatabaseDropdown.addActionListener(new ConnectionListener());
sourceDatabaseDropdown.addActionListener(new CatalogPopulator(sourceSchemaDropdown,sourceCatalogDropdown));
private void buildUI() { ArchitectFrame af = ArchitectFrame.getMainInstance(); SwingUIProject project = af.getProject(); // layout source database option/combox target combox JRadioButton sourcePlayPenRadio = new JRadioButton(); sourcePlayPenRadio.setName("sourcePlayPenRadio"); sourcePlayPenRadio.setActionComman...
sourceCatalogDropdown = new JComboBox(); sourceCatalogDropdown.setName("sourceCatalogDropdown"); sourceCatalogDropdown.setEnabled(false); sourceSchemaDropdown = new JComboBox(); sourceSchemaDropdown.setName("sourceSchemaDropdown"); sourceSchemaDropdown.setEnabled(false);
targetCatalogDropdown = new JComboBox(); targetCatalogDropdown.setName("targetCatalogDropdown"); targetCatalogDropdown.setEnabled(false); targetSchemaDropdown = new JComboBox(); targetSchemaDropdown.setName("targetSchemaDropdown"); targetSchemaDropdown.setEnabled(false);
private void buildUI() { ArchitectFrame af = ArchitectFrame.getMainInstance(); SwingUIProject project = af.getProject(); // layout source database option/combox target combox JRadioButton sourcePlayPenRadio = new JRadioButton(); sourcePlayPenRadio.setName("sourcePlayPenRadio"); sourcePlayPenRadio.setActionComman...
targetDatabaseDropdown.addActionListener(new ConnectionListener());
targetDatabaseDropdown.addActionListener(new CatalogPopulator(targetSchemaDropdown,targetCatalogDropdown));
private void buildUI() { ArchitectFrame af = ArchitectFrame.getMainInstance(); SwingUIProject project = af.getProject(); // layout source database option/combox target combox JRadioButton sourcePlayPenRadio = new JRadioButton(); sourcePlayPenRadio.setName("sourcePlayPenRadio"); sourcePlayPenRadio.setActionComman...
targetCatalogDropdown = new JComboBox(); targetCatalogDropdown.setName("targetCatalogDropdown"); targetCatalogDropdown.setEnabled(false); targetSchemaDropdown = new JComboBox(); targetSchemaDropdown.setName("targetSchemaDropdown"); targetSchemaDropdown.setEnabled(false);
private void buildUI() { ArchitectFrame af = ArchitectFrame.getMainInstance(); SwingUIProject project = af.getProject(); // layout source database option/combox target combox JRadioButton sourcePlayPenRadio = new JRadioButton(); sourcePlayPenRadio.setName("sourcePlayPenRadio"); sourcePlayPenRadio.setActionComman...
JComboBox sqlTypeDropdown = new JComboBox(DDLUtils.getDDLTypes());
sqlTypeDropdown = new JComboBox(DDLUtils.getDDLTypes());
private void buildUI() { ArchitectFrame af = ArchitectFrame.getMainInstance(); SwingUIProject project = af.getProject(); // layout source database option/combox target combox JRadioButton sourcePlayPenRadio = new JRadioButton(); sourcePlayPenRadio.setName("sourcePlayPenRadio"); sourcePlayPenRadio.setActionComman...
outputTextPane.setDocument(output); }
f.add(new CompareDMPanel()); f.pack(); f.setVisible(true); };
public void run() { outputTextPane.setDocument(output); }
txw.commit();
public void exportPhoto( File file, int width, int height ) { 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++ ) { ...
if (messenger == null) { throw new JellyException("No JMS Connection could be found!" ); }
public void doTag(XMLOutput output) throws Exception { ConnectionContext messengerTag = (ConnectionContext) findAncestorWithClass( ConnectionContext.class ); if ( messengerTag == null ) { throw new JellyException("<jms:destination> tag must be within a <jms:connection> or <jms:send>...
getBody().run(context, output);
invokeBody(output);
public void doTag(XMLOutput output) throws Exception { // evaluate body as it may contain a <destination> tag getBody().run(context, output); Destination destination = getDestination(); if ( destination == null ) { throw new JellyException( "No destination specified. E...
registerTag("file", FileTag.class);
public CoreTagLibrary() { registerTag("jelly", JellyTag.class); // core tags registerTag("out", ExprTag.class); registerTag("forEach", ForEachTag.class); registerTag("set", SetTag.class); // conditional tags registerTag("if", IfTag.class); registerTag(...