rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
exportMenuItems = new JMenuItem[exportItems.length]; for (int i = 0; i < exportItems.length; i++) { exportMenuItems[i] = new JMenuItem(exportItems[i]); exportMenuItems[i].addActionListener(this); exportMenuItems[i].setEnabled(false); fileMenu.add(exportMenuItems[i]); }
fileMenu.addSeparator();
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', false); menuItem.addActionListener(this); fileMenu.add(menuIte...
fileMenu.addSeparator();
exportMenuItems = new JMenuItem[exportItems.length]; for (int i = 0; i < exportItems.length; i++) { exportMenuItems[i] = new JMenuItem(exportItems[i]); exportMenuItems[i].addActionListener(this); exportMenuItems[i].setEnabled(false); fileMenu.add(exportMenuItems[i]); }
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', false); menuItem.addActionListener(this); fileMenu.add(menuIte...
menuItem = new JMenuItem(QUIT); setAccelerator(menuItem, 'Q', false); menuItem.addActionListener(this); fileMenu.add(menuItem);
fileMenu.addSeparator();
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', false); menuItem.addActionListener(this); fileMenu.add(menuIte...
menuItem = new JMenuItem(QUIT); setAccelerator(menuItem, 'Q', false); menuItem.addActionListener(this); fileMenu.add(menuItem);
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', false); menuItem.addActionListener(this); fileMenu.add(menuIte...
JMenu displayMenu = new JMenu("Display"); menuBar.add(displayMenu);
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', false); menuItem.addActionListener(this); fileMenu.add(menuIte...
ButtonGroup group = new ButtonGroup(); viewMenuItems = new JRadioButtonMenuItem[viewItems.length]; for (int i = 0; i < viewItems.length; i++) { viewMenuItems[i] = new JRadioButtonMenuItem(viewItems[i], i == 0); viewMenuItems[i].addActionListener(this); KeyStroke ks = KeyStroke.getKeyStroke('1' + i, Toolkit.getDefaultT...
JMenu displayMenu = new JMenu("Display"); menuBar.add(displayMenu);
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', false); menuItem.addActionListener(this); fileMenu.add(menuIte...
JMenu analysisMenu = new JMenu("Analysis"); menuBar.add(analysisMenu); defineBlocksItem = new JMenuItem(DEFINE_BLOCKS); setAccelerator(defineBlocksItem, 'B', false); defineBlocksItem.addActionListener(this); defineBlocksItem.setEnabled(false); analysisMenu.add(defineBlocksItem);
ButtonGroup group = new ButtonGroup(); viewMenuItems = new JRadioButtonMenuItem[viewItems.length]; for (int i = 0; i < viewItems.length; i++) { viewMenuItems[i] = new JRadioButtonMenuItem(viewItems[i], i == 0); viewMenuItems[i].addActionListener(this);
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', false); menuItem.addActionListener(this); fileMenu.add(menuIte...
KeyStroke ks = KeyStroke.getKeyStroke('1' + i, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()); viewMenuItems[i].setAccelerator(ks);
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', false); menuItem.addActionListener(this); fileMenu.add(menuIte...
displayMenu.add(viewMenuItems[i]); group.add(viewMenuItems[i]); }
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', false); menuItem.addActionListener(this); fileMenu.add(menuIte...
addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e){ quit(); } });
JMenu analysisMenu = new JMenu("Analysis"); menuBar.add(analysisMenu); defineBlocksItem = new JMenuItem(DEFINE_BLOCKS); setAccelerator(defineBlocksItem, 'B', false); defineBlocksItem.addActionListener(this); defineBlocksItem.setEnabled(false); analysisMenu.add(defineBlocksItem); addWindowListener(new WindowAd...
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', false); menuItem.addActionListener(this); fileMenu.add(menuIte...
String[] methodStrings = {"95% of informative pairwise comparisons show strong LD via confidence intervals (SFS)", "Four Gamete Rule", "Solid block of strong LD via D prime (MJD)"}; JComboBox methodList = new JComboBox(methodStrings); JOptionPane.showMessageDialog(this, methodList, "Select a block-finding algorithm", J...
String[] methodStrings = {"95% of informative pairwise comparisons show strong LD via confidence intervals (SFS)", "Four Gamete Rule", "Solid block of strong LD via D prime (MJD)"}; JComboBox methodList = new JComboBox(methodStrings); JOptionPane.showMessageDialog(this, methodList, "Select a block-finding algorithm", J...
void defineBlocks(){ String[] methodStrings = {"95% of informative pairwise comparisons show strong LD via confidence intervals (SFS)", "Four Gamete Rule", "Solid block of strong LD via D prime (MJD)"}; JComboBox methodList = new JComboBox(methodStrings); JOptionPane.showMessageDialog(this, metho...
} catch (Exception e) { } HaploView window = new HaploView(); window.setTitle("HaploView beta"); window.setSize(800,600);
} catch (Exception e) { }
public static void main(String[] args) {//throws IOException{ try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { } //setup view object HaploView window = new HaploView(); window.setTitle("HaploView beta"); window.setSize(800,600); //center the window on th...
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); window.setLocation((screen.width - window.getWidth()) / 2, (screen.height - window.getHeight()) / 2);
HaploView window = new HaploView(); window.setTitle("HaploView beta"); window.setSize(800,600);
public static void main(String[] args) {//throws IOException{ try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { } //setup view object HaploView window = new HaploView(); window.setTitle("HaploView beta"); window.setSize(800,600); //center the window on th...
window.setVisible(true); ReadDataDialog readDialog = new ReadDataDialog("Welcome to HaploView", window); readDialog.pack(); readDialog.setVisible(true);
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); window.setLocation((screen.width - window.getWidth()) / 2, (screen.height - window.getHeight()) / 2); window.setVisible(true); ReadDataDialog readDialog = new ReadDataDialog("Welcome to HaploView", window); readDialog.pack(); readDialog.setVisible(true);
public static void main(String[] args) {//throws IOException{ try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { } //setup view object HaploView window = new HaploView(); window.setTitle("HaploView beta"); window.setSize(800,600); //center the window on th...
try { int good = theData.prepareMarkerInput(inputFile); if (good == -1){ JOptionPane.showMessageDialog(this, "Number of markers in info file does not match number of markers in dataset.", "Error", JOptionPane.ERROR_MESSAGE); }else{ infoKnown=true; } }catch (IOException ioexec){ JOptionPane.showMessageDialog(this, ioexe...
try { int good = theData.prepareMarkerInput(inputFile); if (good == -1){ JOptionPane.showMessageDialog(this, "Number of markers in info file does not match number of markers in dataset.", "Error", JOptionPane.ERROR_MESSAGE); }else{ infoKnown=true; dPrimeDisplay.loadMarkers(theData.markerInfo); } }catch (IOException ioe...
void readMarkers(File inputFile){ try { int good = theData.prepareMarkerInput(inputFile); if (good == -1){ JOptionPane.showMessageDialog(this, "Number of markers in info file does not match number of markers in dataset.", "Error", JOptionPane.ERROR_MESSAGE); }else{ infoK...
try{ theData = new HaploData(new File(filenames[0])); progressMonitor = new ProgressMonitor(this, "Computing " + theData.getToBeCompleted() + " values of D prime","", 0, theData.getToBeCompleted()); progressMonitor.setProgress(0); progressMonitor.setMillisToDecideToPopup(2000); final SwingWorker worker = new SwingWo...
try{ theData = new HaploData(new File(filenames[0]));
void readPhasedGenotypes(String[] f){ //input is a 2 element array with //filenames[0] = haps file //filenames[1] = info file (null if none) filenames = f; try{ theData = new HaploData(new File(filenames[0])); //compute D primes and monitor progress progressMonitor = new ProgressMonitor(this, "C...
}catch (IOException ioexec){ JOptionPane.showMessageDialog(this, ioexec.getMessage(), "File Error", JOptionPane.ERROR_MESSAGE); }catch (RuntimeException rtexec){ JOptionPane.showMessageDialog(this, "An error has occured. It is probably related to file format:\n"+rtexec.toString(), "Error", JOptionPane.ERROR_MESSAGE); }
progressMonitor = new ProgressMonitor(this, "Computing " + theData.getToBeCompleted() + " values of D prime","", 0, theData.getToBeCompleted()); progressMonitor.setProgress(0); progressMonitor.setMillisToDecideToPopup(2000); final SwingWorker worker = new SwingWorker(){ public Object construct(){ theData.doMonitoredCo...
void readPhasedGenotypes(String[] f){ //input is a 2 element array with //filenames[0] = haps file //filenames[1] = info file (null if none) filenames = f; try{ theData = new HaploData(new File(filenames[0])); //compute D primes and monitor progress progressMonitor = new ProgressMonitor(this, "C...
hapPercentPanel.add(minDisplayField = new NumberTextField(String.valueOf(parent.displayThresh), 3)); minDisplayField.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(DocumentEvent e){ setDisplayThresh(Integer.parseInt(minDisplayField.getText())); } public void changedUpdate(DocumentEv...
hapPercentPanel.add(minDisplayField = new NumberTextField(String.valueOf(parent.displayThresh), 3));
public HaplotypeDisplayController(HaplotypeDisplay parent){ this.parent = parent; setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); JPanel hapPercentPanel = new JPanel(); hapPercentPanel.add(new JLabel("Examine haplotypes above ")); hapPercentPanel.add(minDisplayField = ...
minThinField.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(DocumentEvent e) { setThinThresh(Integer.parseInt(minThinField.getText())); } public void changedUpdate(DocumentEvent e) { } public void removeUpdate(DocumentEvent e) { } });
public HaplotypeDisplayController(HaplotypeDisplay parent){ this.parent = parent; setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); JPanel hapPercentPanel = new JPanel(); hapPercentPanel.add(new JLabel("Examine haplotypes above ")); hapPercentPanel.add(minDisplayField = ...
minThickField.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(DocumentEvent e) { setThickThresh(Integer.parseInt(minThickField.getText())); } public void changedUpdate(DocumentEvent e) { } public void removeUpdate(DocumentEvent e) { } });
public HaplotypeDisplayController(HaplotypeDisplay parent){ this.parent = parent; setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); JPanel hapPercentPanel = new JPanel(); hapPercentPanel.add(new JLabel("Examine haplotypes above ")); hapPercentPanel.add(minDisplayField = ...
goButton = new JButton("Go"); goButton.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { setDisplayThresh(Integer.parseInt(minDisplayField.getText())); setThinThresh(Integer.parseInt(minThinField.getText())); setThickThresh(Integer.parseInt(minThickField.getText())); } }); add(goButto...
public HaplotypeDisplayController(HaplotypeDisplay parent){ this.parent = parent; setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); JPanel hapPercentPanel = new JPanel(); hapPercentPanel.add(new JLabel("Examine haplotypes above ")); hapPercentPanel.add(minDisplayField = ...
return null;
return super.createExpression(factory, tagName, attributeName, attributeValue);
public Expression createExpression( ExpressionFactory factory, String tagName, String attributeName, String attributeValue) throws Exception { // #### may need to include some namespace URI information in the XPath instance? if (attributeName.equals("select")) { ...
public XPathExpression(XPath xpath) { this.xpath = xpath;
public XPathExpression() {
public XPathExpression(XPath xpath) { this.xpath = xpath; }
public JellyException(String message, Throwable cause) { super(message); this.cause = cause;
public JellyException() {
public JellyException(String message, Throwable cause) { super(message); this.cause = cause; }
paintThumbnail( g2, photo, col*columnWidth, row*rowHeight, selection.contains( photo ) );
if ( photo != null ) { paintThumbnail( g2, photo, col*columnWidth, row*rowHeight, selection.contains( photo ) ); }
public void paint( Graphics g ) { super.paint( g ); Graphics2D g2 = (Graphics2D) g; Rectangle clipRect = g.getClipBounds(); Dimension compSize = getSize(); // columnCount = (int)(compSize.getWidth()/columnWidth); int photoCount = 0; if ( photoCollection != nu...
if ( photo != null ) { Thumbnail thumbnail = null; log.debug( "finding thumb" ); boolean hasThumbnail = photo.hasThumbnail(); log.debug( "asked if has thumb" ); if ( hasThumbnail ) { log.debug( "Photo " + photo.getUid() + " has thumbnail" ); thumbnail = photo.getThumbnail(); log.debug( "got thumbnail" ); } else { thumb...
Thumbnail thumbnail = null; log.debug( "finding thumb" ); boolean hasThumbnail = photo.hasThumbnail(); log.debug( "asked if has thumb" ); if ( hasThumbnail ) { log.debug( "Photo " + photo.getUid() + " has thumbnail" ); thumbnail = photo.getThumbnail(); log.debug( "got thumbnail" ); } else { thumbnail = Thumbnail.getDef...
private void paintThumbnail( Graphics2D g2, PhotoInfo photo, int startx, int starty, boolean isSelected ) { log.debug( "paintThumbnail entry " + photo.getUid() ); long startTime = System.currentTimeMillis(); long thumbReadyTime = 0; long thumbDrawnTime = 0; long endTime = 0; // Cu...
log.debug( "starting to draw" ); BufferedImage img = thumbnail.getImage(); int x = startx + (columnWidth - img.getWidth())/(int)2; int y = starty + (rowHeight - img.getHeight())/(int)2; log.debug( "drawing thumbnail" ); g2.drawImage( img, new AffineTransform( 1f, 0f, 0f, 1f, x, y ), null ); log.debug( "Drawn, drawin...
String dateStr = fd.format(); TextLayout txt = new TextLayout( dateStr, attrFont, frc ); Rectangle2D bounds = txt.getBounds(); int xpos = startx + ((int)(columnWidth - bounds.getWidth()))/2 - (int)bounds.getMinX(); g2.clearRect( xpos-2, ypos-2, (int)bounds.getWidth()+4, (int)bounds.getHeight()+4 ); txt.draw( g2, xpos,...
private void paintThumbnail( Graphics2D g2, PhotoInfo photo, int startx, int starty, boolean isSelected ) { log.debug( "paintThumbnail entry " + photo.getUid() ); long startTime = System.currentTimeMillis(); long thumbReadyTime = 0; long thumbDrawnTime = 0; long endTime = 0; // Cu...
thumbDrawnTime = System.currentTimeMillis(); ypos += ((int)img.getHeight())/2 + 4; Color prevBkg = g2.getBackground(); if ( isSelected ) { g2.setBackground( Color.BLUE ); } else { g2.setBackground( this.getBackground() ); } Font attrFont = new Font( "Arial", Font.PLAIN, 10 ); FontRenderContext frc = g2.getFontRende...
g2.clearRect( xpos-2, ypos-2, (int)bounds.getWidth()+4, (int)bounds.getHeight()+4 ); txt.draw( g2, xpos, (int)(ypos + bounds.getHeight()) ); ypos += bounds.getHeight() + 4; } g2.setBackground( prevBkg );
private void paintThumbnail( Graphics2D g2, PhotoInfo photo, int startx, int starty, boolean isSelected ) { log.debug( "paintThumbnail entry " + photo.getUid() ); long startTime = System.currentTimeMillis(); long thumbReadyTime = 0; long thumbDrawnTime = 0; long endTime = 0; // Cu...
this.date = date;
this.date = (date != null) ? (Date) date.clone() : null;
public FuzzyDate( Date date, double accuracy ) { this.date = date; this.accuracy = accuracy; }
public Script parse(InputStream input) throws IOException, SAXException { ensureConfigured(); this.fileName = null; getXMLReader().parse(new InputSource(input)); return script;
public Script parse(File file) throws IOException, SAXException { return parse(file.toURL());
public Script parse(InputStream input) throws IOException, SAXException { ensureConfigured(); this.fileName = null; getXMLReader().parse(new InputSource(input)); return script; }
public void run(Context context, XMLOutput output) throws Exception;
public void run(JellyContext context, XMLOutput output) throws Exception;
public void run(Context context, XMLOutput output) throws Exception;
public Filter<S> and(Filter<S> filter) { if (filter instanceof OpenFilter) { return this; } if (filter instanceof ClosedFilter) { return filter; } return AndFilter.getCanonical(this, filter);
public final Filter<S> and(String expression) { return and(new FilterParser<S>(mType, expression).parseRoot());
public Filter<S> and(Filter<S> filter) { if (filter instanceof OpenFilter) { return this; } if (filter instanceof ClosedFilter) { return filter; } return AndFilter.getCanonical(this, filter); }
public abstract void appendTo(Appendable app, FilterValues<S> values) throws IOException;
public void appendTo(Appendable app) throws IOException { appendTo(app, null); }
public abstract void appendTo(Appendable app, FilterValues<S> values) throws IOException;
public Filter<S> or(Filter<S> filter) { if (filter instanceof OpenFilter) { return filter; } if (filter instanceof ClosedFilter) { return this; } return OrFilter.getCanonical(this, filter);
public final Filter<S> or(String expression) { return or(new FilterParser<S>(mType, expression).parseRoot());
public Filter<S> or(Filter<S> filter) { if (filter instanceof OpenFilter) { return filter; } if (filter instanceof ClosedFilter) { return this; } return OrFilter.getCanonical(this, filter); }
user.setStatus(null);
user.setStatus(User.STATUS_ACTIVE);
public void login(ServiceContext context, String username, String password) throws ServiceException{ LoginCallbackHandler callbackHandler = new LoginCallbackHandler(username, password); User user = null; UserManager userManager = UserMana...
public User getUser(String username){ return users.containsKey(username) ? (User)users.get(username) : null;
public User getUser(String username, char[] password){ User user = (User)users.get(username); if(user != null){ final String hashedPassword = Crypto.hash(password); user = hashedPassword.equals(user.getPassword()) && "A".equals(user.getStatus()) ? user : null; } return user;
public User getUser(String username){ return users.containsKey(username) ? (User)users.get(username) : null; }
public JellyContext newJellyContext() { return createChildContext();
public JellyContext newJellyContext(Map newVariables) { newVariables.put("parentScope", variables); JellyContext answer = createChildContext(); answer.setVariables(newVariables); return answer;
public JellyContext newJellyContext() { return createChildContext(); }
public DataTypeTag(String name, DataType dataType) { this.name = name; this.dataType = dataType; setDynaBean( new ConvertingWrapDynaBean(dataType) );
public DataTypeTag() {
public DataTypeTag(String name, DataType dataType) { this.name = name; this.dataType = dataType; setDynaBean( new ConvertingWrapDynaBean(dataType) ); }
public TaskPropertyTag(String name) { setName(name);
public TaskPropertyTag() {
public TaskPropertyTag(String name) { setName(name); }
*/
public Expression createExpression(ExpressionFactory factory, String tagName, String attributeName, String attributeValue) throws Exception { ExpressionFactory myFactory = getExpressionFactory(); if ( myFactory == null ) { myFactory = factory; } if ( myFactory != null ) { ...
dataType = ih.createElement( getAntProject(), object, name );
dataType = ih.createElement( getAntProject(), object, name.toLowerCase() );
public Object createNestedObject(Object object, String name) throws Exception { Object dataType = null; if ( object != null ) { IntrospectionHelper ih = IntrospectionHelper.getHelper( object.getClass() ); if ( ih != null ) { try { dataType = ih.c...
public BeanTag(Class defaultClass, String tagName) { this(defaultClass, tagName, null);
public BeanTag() { this(null, "bean", null);
public BeanTag(Class defaultClass, String tagName) { this(defaultClass, tagName, null); }
public JellyTagException(String message, Throwable cause) { super(message,cause);
public JellyTagException() {
public JellyTagException(String message, Throwable cause) { super(message,cause); }
if (t == null ) throw new NullPointerException();
private void sqlScriptGenerator(Map<DiffType, AttributeSet> styles, List<DiffChunk<SQLObject>> diff, DDLGenerator gen) throws ArchitectDiffException, SQLException, ArchitectException, BadLocationException, InstantiationException, IllegalAccessException { for (DiffChunk<SQLObject> chunk : diff) { if...
dbcsPanel.setDbcs(new ArchitectDataSource());
public DBCS_OkAction(DBCSPanel dbcsPanel, boolean isNew) { super("Ok"); this.dbcsPanel = dbcsPanel; this.isNew = isNew; dbcsPanel.setDbcs(new ArchitectDataSource()); }
JButton okButton = new JButton(okAction);
JButton okButton = new JDefaultButton(okAction);
public static JDialog createArchitectPanelDialog( final ArchitectPanel arch, final Window dialogParent, final String dialogTitle, final String actionButtonTitle, final Action okAction, final Action cancelAction) { final JDialog d; if (dialogParent instanceof Frame) { d = new JDialog((Frame) dial...
JButton cancelButton = new JButton(cancelAction);
JButton cancelButton = new JDefaultButton(cancelAction);
public static JDialog createArchitectPanelDialog( final ArchitectPanel arch, final Window dialogParent, final String dialogTitle, final String actionButtonTitle, final Action okAction, final Action cancelAction) { final JDialog d; if (dialogParent instanceof Frame) { d = new JDialog((Frame) dial...
public static void showExceptionDialog(Component parent, String message, Throwable throwable) { try { ExceptionReport er = new ExceptionReport(throwable); er.setNumObjectsInPlayPen(ArchitectFrame.getMainInstance().playpen.getTablePanes().size() + ArchitectFrame.getMainInstance().playpen.getRelationships().size()); er.s...
public static void showExceptionDialog(String message, Throwable throwable) { showExceptionDialog(ArchitectFrame.getMainInstance(), message, throwable);
public static void showExceptionDialog(Component parent, String message, Throwable throwable) { try { ExceptionReport er = new ExceptionReport(throwable); er.setNumObjectsInPlayPen(ArchitectFrame.getMainInstance().playpen.getTablePanes().size() + Archit...
while (comparator.compare(sourceTable, targetTable) < 0) {
if (comparator.compare(sourceTable, targetTable) < 0) {
public List<DiffChunk<SQLObject>> generateTableDiffs() throws ArchitectException { try { Iterator sourceIter = sourceTableSet.iterator(); Iterator targetIter = targetTableSet.iterator(); SQLTable targetTable; SQLTable sourceTable; boolean sourceContinue; boolean targetContinue; //Checks if both lists of...
break;
public List<DiffChunk<SQLObject>> generateTableDiffs() throws ArchitectException { try { Iterator sourceIter = sourceTableSet.iterator(); Iterator targetIter = targetTableSet.iterator(); SQLTable targetTable; SQLTable sourceTable; boolean sourceContinue; boolean targetContinue; //Checks if both lists of...
while (comparator.compare(sourceTable, targetTable) > 0) {
if (comparator.compare(sourceTable, targetTable) > 0) {
public List<DiffChunk<SQLObject>> generateTableDiffs() throws ArchitectException { try { Iterator sourceIter = sourceTableSet.iterator(); Iterator targetIter = targetTableSet.iterator(); SQLTable targetTable; SQLTable sourceTable; boolean sourceContinue; boolean targetContinue; //Checks if both lists of...
while (comparator.compare(sourceTable, targetTable) == 0) {
if (comparator.compare(sourceTable, targetTable) == 0) {
public List<DiffChunk<SQLObject>> generateTableDiffs() throws ArchitectException { try { Iterator sourceIter = sourceTableSet.iterator(); Iterator targetIter = targetTableSet.iterator(); SQLTable targetTable; SQLTable sourceTable; boolean sourceContinue; boolean targetContinue; //Checks if both lists of...
g.setColor(new Color(51,153,51));
g.setColor(Color.black);
public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); /* boxSize = ((clipRect.width-2*H_BORDER)/dPrimeTable.length-1); if (boxSize < 12){boxSize=1...
g.drawLine(left + (2*theBlock[j]+1) * boxSize/2 - boxRadius, top + boxSize/2, left + (2*theBlock[j]+1) * boxSize/2, top + boxSize/2 - boxRadius); g.drawLine (left + (2*theBlock[j]) * boxSize/2 - boxRadius, top + boxSize/2 - boxRadius, left + (2*theBlock[j]) * boxSize/2, top + boxSize/2);
g.drawLine(left + (2*theBlock[j]) * boxSize/2, top + boxRadius, left + (2*theBlock[j]) * boxSize/2 + boxRadius, top); g.drawLine (left + (2*theBlock[j]) * boxSize/2, top + boxRadius, left + (2*theBlock[j]-1) * boxSize/2, top-1);
public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); /* boxSize = ((clipRect.width-2*H_BORDER)/dPrimeTable.length-1); if (boxSize < 12){boxSize=1...
public JellyContext runScript(URL url, XMLOutput output) throws Exception { Script script = compileScript(url); URL newJellyContextURL = getJellyContextURL(url); JellyContext newJellyContext = new JellyContext(this, newJellyContextURL); if (log.isDebugEnabled() ) { log.debug( "About to run script: " + url ); log.debu...
public JellyContext runScript(File file, XMLOutput output) throws Exception { return runScript(file.toURL(), output);
public JellyContext runScript(URL url, XMLOutput output) throws Exception { Script script = compileScript(url); URL newJellyContextURL = getJellyContextURL(url); JellyContext newJellyContext = new JellyContext(this, newJellyContextURL); if (log.isDebugEnabled() ) { ...
Iterator kitr = fullProbMap.theMap.keySet().iterator();
ArrayList keys = new ArrayList(fullProbMap.theMap.keySet()); Collections.sort(keys); Iterator kitr = keys.iterator();
private void full_em_breakup( byte[][] input_haplos, int[] block_size, Vector affStatus) throws HaploViewException{ int num_poss, iter; double total = 0; int block, start_locus, end_locus, biggest_block_size; int num_indivs = 0; int num_blocks = block_size.length; int num_h...
public UseBeanTag(Class defaultClass) { this.defaultClass = defaultClass;
public UseBeanTag() {
public UseBeanTag(Class defaultClass) { this.defaultClass = defaultClass; }
if ( enum.hasMoreTokens() ) {
if ( items.hasMoreTokens() ) {
public Point parse(String text) { StringTokenizer items = new StringTokenizer( text, "," ); int x = 0; int y = 0; if ( items.hasMoreTokens() ) { x = parseNumber( items.nextToken() ); } if ( enum.hasMoreTokens() ) { y = parseNumber( items.nextToken() ); ...
}
} return new Point( x, y ); }
public Point parse(String text) { StringTokenizer items = new StringTokenizer( text, "," ); int x = 0; int y = 0; if ( items.hasMoreTokens() ) { x = parseNumber( items.nextToken() ); } if ( enum.hasMoreTokens() ) { y = parseNumber( items.nextToken() ); ...
public String evaluateAsString(Context context);
public String evaluateAsString(JellyContext context);
public String evaluateAsString(Context context);
org.apache.log4j.BasicConfigurator.configure();
public static void main( String[] args ) { org.apache.log4j.BasicConfigurator.configure(); log.setLevel( org.apache.log4j.Level.DEBUG ); org.apache.log4j.Logger folderLog = org.apache.log4j.Logger.getLogger( PhotoFolder.class.getName() ); folderLog.setLevel( org.apache.log4j.Level.DEBUG ); junit.textui.TestRunner.r...
tx = odmg.newTransaction(); tx.begin();
public void setUp() { odmg = OJB.getInstance(); db = odmg.newDatabase(); try { db.open( "repository.xml", Database.OPEN_READ_WRITE ); } catch ( ODMGException e ) { // log.warn( "Could not open database: " + e.getMessage() ); db = null; } tx = odmg.newTransaction(); tx.begin(); }
Transaction tx = odmg.newTransaction(); log.debug( "Changing folder name for " + folder.getFolderId() ); tx.begin(); folder.setName( "testTop" ); tx.commit(); log.debug( "Folder name changed" );
public void testCreate() { PhotoFolder folder = PhotoFolder.create( "Top", null ); // Try to find the object from DB DList folders = null; Transaction tx = odmg.newTransaction(); tx.begin(); try { OQLQuery query = odmg.newOQLQuery(); query.create( "select folders from " + PhotoFolder.class.getName() + " wh...
Transaction tx = odmg.newTransaction(); tx.begin();
public void testCreate() { PhotoFolder folder = PhotoFolder.create( "Top", null ); // Try to find the object from DB DList folders = null; Transaction tx = odmg.newTransaction(); tx.begin(); try { OQLQuery query = odmg.newOQLQuery(); query.create( "select folders from " + PhotoFolder.class.getName() + " wh...
tx.abort();
public void testCreate() { PhotoFolder folder = PhotoFolder.create( "Top", null ); // Try to find the object from DB DList folders = null; Transaction tx = odmg.newTransaction(); tx.begin(); try { OQLQuery query = odmg.newOQLQuery(); query.create( "select folders from " + PhotoFolder.class.getName() + " wh...
boolean found = false;
public void testCreate() { PhotoFolder folder = PhotoFolder.create( "Top", null ); // Try to find the object from DB DList folders = null; Transaction tx = odmg.newTransaction(); tx.begin(); try { OQLQuery query = odmg.newOQLQuery(); query.create( "select folders from " + PhotoFolder.class.getName() + " wh...
if ( folder2.getName().equals( "Top" ) ) { found = true; log.debug( "found top, id = " + folder2.getFolderId() ); assertEquals( "Folder not found in DB", folder2.getName(), "Top" ); log.debug( "Modifying desc" ); folder2.setDescription( "Test description" ); tx.lock( folder2, Transaction.WRITE ); }
log.debug( "found top, id = " + folder2.getFolderId() ); assertEquals( "Folder name does not match", folder2.getName(), "testTop" ); log.debug( "Modifying desc" ); folder2.setDescription( "Test description" );
public void testCreate() { PhotoFolder folder = PhotoFolder.create( "Top", null ); // Try to find the object from DB DList folders = null; Transaction tx = odmg.newTransaction(); tx.begin(); try { OQLQuery query = odmg.newOQLQuery(); query.create( "select folders from " + PhotoFolder.class.getName() + " wh...
tx.commit();
public void testCreate() { PhotoFolder folder = PhotoFolder.create( "Top", null ); // Try to find the object from DB DList folders = null; Transaction tx = odmg.newTransaction(); tx.begin(); try { OQLQuery query = odmg.newOQLQuery(); query.create( "select folders from " + PhotoFolder.class.getName() + " wh...
Transaction tx = odmg.newTransaction(); tx.begin();
public void testSubfolders() { DList folders = null; try { OQLQuery query = odmg.newOQLQuery(); query.create( "select folders from " + PhotoFolder.class.getName() + " where name = \"subfolderTest\"" ); folders = (DList) query.execute(); tx.commit(); } catch ( Exception e ) { tx.abort(); fai...
registerWidgetTag( "scrolledComposite", ScrolledComposite.class, SWT.H_SCROLL | SWT.V_SCROLL);
public SwtTagLibrary() { // widgets registerWidgetTag( "button", Button.class, SWT.BORDER | SWT.PUSH | SWT.CENTER ); registerWidgetTag( "canvas", Canvas.class ); registerWidgetTag( "caret", Caret.class ); registerWidgetTag( "combo", Combo.class, SWT.DROP_DOWN ); registerWid...
public WidgetTag(Class widgetClass, int style) { super(widgetClass); this.style = style; }
public WidgetTag(Class widgetClass) { super(widgetClass); }
public WidgetTag(Class widgetClass, int style) { super(widgetClass); this.style = style; }
request.setAttribute(RequestAttributes.NAV_CURRENT_PAGE, "Edit Application");
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception{ ...
public void registerBean(String name, Class type, Method method) { registerBean(name, type); if (method != null) { invokeMethods.put(name, method); } else { invokeMethods.remove(name); }
public void registerBean(String name, Class type) { beanTypes.put(name, type);
public void registerBean(String name, Class type, Method method) { registerBean(name, type); if (method != null) { invokeMethods.put(name, method); } else { invokeMethods.remove(name); } }
tab.setColumnsPopulated(false); tab.setRelationshipsPopulated(false); tab.initFolders();
tab.initFolders(false);
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!"); } String populated = attributes.getValue("populated"); ...
propNames.put("type", new Integer(((SQLTable.Folder) o).getType()));
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(); t...
d.addObjectCreate("*/folder", SQLTable.Folder.class);
SQLFolderFactory folderFactory = new SQLFolderFactory(); d.addFactoryCreate("*/folder", folderFactory);
protected Digester setupDigester() { Digester d = new Digester(); d.setValidating(false); d.push(this); // project name d.addCallMethod("architect-project/project-name", "setName", 0); // argument is element body text // source DB connection specs DBCSFactory dbcsFactory = new DBCSFactory(); d.addFactoryCreate...
public Relationship(PlayPen parentPP, SQLRelationship model) throws ArchitectException { super(parentPP.getPlayPenContentPane()); this.model = model; setPkTable(getPlayPen().findTablePane(model.getPkTable())); setFkTable(getPlayPen().findTablePane(model.getFkTable())); setup();
public Relationship(Relationship r, PlayPenContentPane contentPane, TablePane pkTable, TablePane fkTable) { super(contentPane); this.model = r.model; this.pkTable = r.pkTable; this.fkTable = r.fkTable; this.popup =r.popup; this.selected = false; this.ppcListener = new PlayPenComponentListener(); this.columnHighlightCol...
public Relationship(PlayPen parentPP, SQLRelationship model) throws ArchitectException { super(parentPP.getPlayPenContentPane()); this.model = model; setPkTable(getPlayPen().findTablePane(model.getPkTable())); setFkTable(getPlayPen().findTablePane(model.getFkTable())); setup(); }
public SQLTable() { children = new ArrayList();
public SQLTable(SQLObject parent, String name, String remarks, String objectType) { logger.debug("NEW TABLE "+name+"@"+hashCode()); this.parent = parent; this.tableName = name; this.remarks = remarks; this.objectType = objectType; this.children = new ArrayList(); initFolders(false); importedKeysFolder.addSQLObjectLi...
public SQLTable() { //columnsPopulated = true; //relationshipsPopulated = true; children = new ArrayList(); }
public PlayPen(SQLDatabase db) { this(); setDatabase(db);
public PlayPen() { zoom = 1.0; setBackground(java.awt.Color.white); contentPane = new PlayPenContentPane(this); setLayout(null); setName("Play Pen"); setMinimumSize(new Dimension(1,1)); dt = new DropTarget(this, new PlayPenDropListener()); bringToFrontAction = new BringToFrontAction(this); sendToBackAction = new SendTo...
public PlayPen(SQLDatabase db) { this(); setDatabase(db); }
public DBTree(List initialDatabases) throws ArchitectException { this(); setDatabaseList(initialDatabases);
public DBTree() { setRootVisible(false); setShowsRootHandles(true); ds = new DragSource(); DragGestureRecognizer dgr = ds.createDefaultDragGestureRecognizer (this, DnDConstants.ACTION_COPY, new DBTreeDragGestureListener()); newDBCSAction = new NewDBCSAction(); setupPropDialog(); popup = setupPopupMenu(); addMouseListe...
public DBTree(List initialDatabases) throws ArchitectException { this(); setDatabaseList(initialDatabases); }
public DBTreeModel(Collection initialDatabases) throws ArchitectException { this.root = new DBTreeRoot(); if (initialDatabases != null) { Iterator it = initialDatabases.iterator(); while (it.hasNext()) { root.addChild((SQLDatabase) it.next()); } } this.treeModelListeners = new LinkedList(); ArchitectUtils.listenToHiera...
public DBTreeModel() throws ArchitectException { this(null);
public DBTreeModel(Collection initialDatabases) throws ArchitectException { this.root = new DBTreeRoot(); if (initialDatabases != null) { Iterator it = initialDatabases.iterator(); while (it.hasNext()) { root.addChild((SQLDatabase) it.next()); } } this.treeModelListeners = new LinkedList(); ArchitectUtil...
public XMLOutput( ContentHandler contentHandler, LexicalHandler lexicalHandler) { this.contentHandler = contentHandler; this.lexicalHandler = lexicalHandler;
public XMLOutput() {
public XMLOutput( ContentHandler contentHandler, LexicalHandler lexicalHandler) { this.contentHandler = contentHandler; this.lexicalHandler = lexicalHandler; }
namespaceStack.popNamespace(prefix);
public void endPrefixMapping(String prefix) throws SAXException { namespaceStack.popNamespace(prefix); // End prefix mapping was already called after endElement // contentHandler.endPrefixMapping(prefix); }
public void setContext(JellyContext context);
public void setContext(JellyContext context) throws Exception;
public void setContext(JellyContext context);
public Object evaluate(Context context);
public Object evaluate(JellyContext context);
public Object evaluate(Context context);
public StartupException(String message, Throwable cause) { super(message, cause);
public StartupException() { super();
public StartupException(String message, Throwable cause) { super(message, cause); }
public SamplingException(String message, Throwable cause) { super(message, cause);
public SamplingException() { super();
public SamplingException(String message, Throwable cause) { super(message, cause); }
this.defaultEncountered = false; this.someCaseMatched = false; this.fallingThru = false;
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { if(null == on) { throw new MissingAttributeException("on"); } else { value = on.evaluate(context); invokeBody(output); } }
public CheckDataPanel(PedFile pf) throws IOException, PedFileException{
public CheckDataPanel(HaploData hd) throws IOException, PedFileException{ STATUS_COL = 8;
public CheckDataPanel(PedFile pf) throws IOException, PedFileException{ setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); pedfile = pf; Vector result = pedfile.getResults(); int numResults = result.size(); Vector tableColumnNames = new Vector(); tableColumnNames.add("#"); ...
pedfile = pf;
pedfile = hd.getPedFile(); theData = hd;
public CheckDataPanel(PedFile pf) throws IOException, PedFileException{ setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); pedfile = pf; Vector result = pedfile.getResults(); int numResults = result.size(); Vector tableColumnNames = new Vector(); tableColumnNames.add("#"); ...
tableColumnNames.add("Name");
if (theData.infoKnown){ tableColumnNames.add("Name"); tableColumnNames.add("Position"); STATUS_COL += 2; }
public CheckDataPanel(PedFile pf) throws IOException, PedFileException{ setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); pedfile = pf; Vector result = pedfile.getResults(); int numResults = result.size(); Vector tableColumnNames = new Vector(); tableColumnNames.add("#"); ...
tempVect.add(currentResult.getName());
if (theData.infoKnown){ tempVect.add(Chromosome.getMarker(i).getName()); tempVect.add(new Long(Chromosome.getMarker(i).getPosition())); }
public CheckDataPanel(PedFile pf) throws IOException, PedFileException{ setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); pedfile = pf; Vector result = pedfile.getResults(); int numResults = result.size(); Vector tableColumnNames = new Vector(); tableColumnNames.add("#"); ...
table.getColumnModel().getColumn(1).setPreferredWidth(100);
if (theData.infoKnown){ table.getColumnModel().getColumn(1).setPreferredWidth(100); }
public CheckDataPanel(PedFile pf) throws IOException, PedFileException{ setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); pedfile = pf; Vector result = pedfile.getResults(); int numResults = result.size(); Vector tableColumnNames = new Vector(); tableColumnNames.add("#"); ...
protected void attachWidgets(Widget parent, Widget widget) { if (parent instanceof ScrolledComposite && widget instanceof Control) { ScrolledComposite scrolledComposite = (ScrolledComposite) parent; scrolledComposite.setContent((Control) widget); } }
protected void attachWidgets(Object parent, Widget widget) throws JellyTagException { if (parent instanceof ScrolledComposite && widget instanceof Control) { ScrolledComposite scrolledComposite = (ScrolledComposite) parent; scrolledComposite.setContent((Control) widget); } }
protected void attachWidgets(Widget parent, Widget widget) { // set the content that will be scrolled if the parent is a ScrolledComposite if (parent instanceof ScrolledComposite && widget instanceof Control) { ScrolledComposite scrolledComposite = (ScrolledComposite) parent; scrolledComposite.setContent((Contro...
if (parent == null) { WidgetTag tag = (WidgetTag) findAncestorWithClass(WidgetTag.class); if (tag != null) { parent = tag.getWidget(); } } return parent; }
if (parent == null) { WidgetTag tag = (WidgetTag) findAncestorWithClass(WidgetTag.class); if (tag != null) { return tag.getWidget(); } } return parent; }
public Widget getParentWidget() { if (parent == null) { WidgetTag tag = (WidgetTag) findAncestorWithClass(WidgetTag.class); if (tag != null) { parent = tag.getWidget(); } } return parent; }
registerTag( "classLoader", ClassLoaderTag.class );
public DefineTagLibrary() { registerTag( "taglib", TaglibTag.class ); registerTag( "tag", TagTag.class ); registerTag( "bean", BeanTag.class ); registerTag( "jellybean", JellyBeanTag.class ); registerTag( "attribute", AttributeTag.class ); registerTag( "invokeBody", InvokeB...
if(!(chromosomeArg.equalsIgnoreCase("x"))){
if(!(chromosomeArg.equalsIgnoreCase("X")) && !(chromosomeArg.equalsIgnoreCase("Y"))){
private void argHandler(String[] args){ argHandlerMessages = new Vector(); int maxDistance = -1; //this means that user didn't specify any output type if it doesn't get changed below blockOutputType = -1; double hapThresh = -1; double minimumMAF=-1; double spacingThr...
die("-chromosome requires a chromsome name of 1-22 or X");
die("-chromosome requires a chromsome name of 1-22, X, or Y");
private void argHandler(String[] args){ argHandlerMessages = new Vector(); int maxDistance = -1; //this means that user didn't specify any output type if it doesn't get changed below blockOutputType = -1; double hapThresh = -1; double minimumMAF=-1; double spacingThr...
if (!(chromosomeArg.equalsIgnoreCase("x"))){ die("chromsome specification must be betweeen 1 and 22 or X");
if (!(chromosomeArg.equalsIgnoreCase("X")) && !(chromosomeArg.equalsIgnoreCase("Y"))){ die("chromsome specification must be betweeen 1 and 22, X, or Y");
private void argHandler(String[] args){ argHandlerMessages = new Vector(); int maxDistance = -1; //this means that user didn't specify any output type if it doesn't get changed below blockOutputType = -1; double hapThresh = -1; double minimumMAF=-1; double spacingThr...
public AssociationTestSet(String fileName) throws IOException, HaploViewException{ tests = new Vector();
public AssociationTestSet(){ results = new Vector();
public AssociationTestSet(String fileName) throws IOException, HaploViewException{ tests = new Vector(); whitelist = new HashSet(); File testListFile = new File(fileName); BufferedReader in = new BufferedReader(new FileReader(testListFile)); String currentLine; int lineCoun...