rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
log.warn( "Property changed: " + (String) field ); System.out.println( "Property changed: " + (String) field ); | log.debug( "Property changed: " + (String) field ); | public void propertyChange( PropertyChangeEvent ev ) { if ( ev.getPropertyName().equals( "value" ) ) { Object src = ev.getSource(); if ( src.getClass() == JFormattedTextField.class ) { Object field = ((JFormattedTextField) src).getClientProperty( FIELD_NAME ); Object value = ((JFormattedTextField) src).ge... |
qualityField.setSelectedIndex( 0 ); | qualityField.setSelectedIndex( -1 ); | public void setQuality( Number quality ) { if ( quality != null ) { qualityField.setSelectedIndex( quality.intValue() ); } else { qualityField.setSelectedIndex( 0 ); } } |
registerTag( "focusListener", FocusListenerTag.class ); registerTag( "keyListener", KeyListenerTag.class ); | public SwingTagLibrary() { registerTag( "action", ActionTag.class ); registerTag( "font", FontTag.class ); registerTag( "windowListener", WindowListenerTag.class ); // the model tags registerTag( "tableModel", TableModelTag.class ); registerTag( "tableModelColumn", ... | |
if (getSQLObjectListeners().contains(l)) { if (logger.isDebugEnabled()) { logger.debug("NOT Adding duplicate listener "+l+" to SQLObject "+this); } return; | synchronized(sqlObjectListeners) { if (sqlObjectListeners.contains(l)) { if (logger.isDebugEnabled()) { logger.debug("NOT Adding duplicate listener "+l+" to SQLObject "+this); } return; } sqlObjectListeners.add(l); | public void addSQLObjectListener(SQLObjectListener l) { if (l == null) throw new NullPointerException("You can't add a null listener"); if (getSQLObjectListeners().contains(l)) { if (logger.isDebugEnabled()) { logger.debug("NOT Adding duplicate listener "+l+" to SQLObject "+this); } return; } getSQLObject... |
getSQLObjectListeners().add(l); | public void addSQLObjectListener(SQLObjectListener l) { if (l == null) throw new NullPointerException("You can't add a null listener"); if (getSQLObjectListeners().contains(l)) { if (logger.isDebugEnabled()) { logger.debug("NOT Adding duplicate listener "+l+" to SQLObject "+this); } return; } getSQLObject... | |
Iterator it = getSQLObjectListeners().iterator(); int count = 0; while (it.hasNext()) { count ++; ((SQLObjectListener) it.next()).dbChildrenInserted(e); | synchronized(sqlObjectListeners) { Iterator<SQLObjectListener> it = sqlObjectListeners.iterator(); int count = 0; while (it.hasNext()) { count ++; SQLObjectListener nextListener = it.next(); (nextListener).dbChildrenInserted(e); } logger.debug(getClass().getName()+": notified "+count+" listeners"); | protected void fireDbChildrenInserted(int[] newIndices, List newChildren) { if (logger.isDebugEnabled()) { logger.debug(getClass().getName()+" "+toString()+": " + "firing dbChildrenInserted event " + "(secondary = "+isSecondaryChangeMode()+")"); } SQLObjectEvent e = new SQLObjectEvent (this, newIndic... |
logger.debug(getClass().getName()+": notified "+count+" listeners"); | protected void fireDbChildrenInserted(int[] newIndices, List newChildren) { if (logger.isDebugEnabled()) { logger.debug(getClass().getName()+" "+toString()+": " + "firing dbChildrenInserted event " + "(secondary = "+isSecondaryChangeMode()+")"); } SQLObjectEvent e = new SQLObjectEvent (this, newIndic... | |
Iterator it = getSQLObjectListeners().iterator(); while (it.hasNext()) { ((SQLObjectListener) it.next()).dbChildrenRemoved(e); | synchronized(sqlObjectListeners) { Iterator it = sqlObjectListeners.iterator(); while (it.hasNext()) { ((SQLObjectListener) it.next()).dbChildrenRemoved(e); } | protected void fireDbChildrenRemoved(int[] oldIndices, List oldChildren) { if (logger.isDebugEnabled()) { logger.debug(getClass().getName()+" "+toString()+": " + "firing dbChildrenRemoved event " + "(secondary = "+isSecondaryChangeMode()+")"); } SQLObjectEvent e = new SQLObjectEvent (this, oldIndices... |
Iterator it = getSQLObjectListeners().iterator(); while (it.hasNext()) { count++; ((SQLObjectListener) it.next()).dbObjectChanged(e); | synchronized(sqlObjectListeners) { Iterator it = sqlObjectListeners.iterator(); while (it.hasNext()) { count++; ((SQLObjectListener) it.next()).dbObjectChanged(e); } | protected void fireDbObjectChanged(String propertyName, Object oldValue, Object newValue) { SQLObjectEvent e = new SQLObjectEvent( this, propertyName, oldValue, newValue, isSecondaryChangeMode()); boolean same = (oldValue == null ? oldValue == newValue : oldValue.equals(newValue)); if (same) { logg... |
protected void fireDbStructureChanged(String propertyName) { | public void fireDbStructureChanged() { | protected void fireDbStructureChanged(String propertyName) { if (logger.isDebugEnabled()) { logger.debug(getClass().getName()+" "+toString()+": " + "firing dbStructureChanged event " + "(secondary = "+isSecondaryChangeMode()+")"); } SQLObjectEvent e = new SQLObjectEvent( this, propertyName, isSec... |
propertyName, | null, | protected void fireDbStructureChanged(String propertyName) { if (logger.isDebugEnabled()) { logger.debug(getClass().getName()+" "+toString()+": " + "firing dbStructureChanged event " + "(secondary = "+isSecondaryChangeMode()+")"); } SQLObjectEvent e = new SQLObjectEvent( this, propertyName, isSec... |
Iterator it = getSQLObjectListeners().iterator(); while (it.hasNext()) { count++; ((SQLObjectListener) it.next()).dbStructureChanged(e); | synchronized(sqlObjectListeners) { Iterator it = sqlObjectListeners.iterator(); while (it.hasNext()) { count++; ((SQLObjectListener) it.next()).dbStructureChanged(e); } | protected void fireDbStructureChanged(String propertyName) { if (logger.isDebugEnabled()) { logger.debug(getClass().getName()+" "+toString()+": " + "firing dbStructureChanged event " + "(secondary = "+isSecondaryChangeMode()+")"); } SQLObjectEvent e = new SQLObjectEvent( this, propertyName, isSec... |
public List getSQLObjectListeners() { if (sqlObjectListeners == null) { sqlObjectListeners = new LinkedList(); } return sqlObjectListeners; | public List<SQLObjectListener> getSQLObjectListeners() { return sqlObjectListeners; | public List getSQLObjectListeners() { if (sqlObjectListeners == null) { sqlObjectListeners = new LinkedList(); } return sqlObjectListeners; } |
getSQLObjectListeners().remove(l); | synchronized(sqlObjectListeners) { sqlObjectListeners.remove(l); } | public void removeSQLObjectListener(SQLObjectListener l) { getSQLObjectListeners().remove(l); } |
if (! hasTrimmed) { hasTrimmed = true; if (isTrim()) { trimBody(); } } | public Script getBody() { return body; } | |
if ( isTrim() && ! hasTrimmed ) { trimBody(); } | public void invokeBody(XMLOutput output) throws Exception { if ( isTrim() && ! hasTrimmed ) { trimBody(); } getBody().run(context, output); } | |
this.hasTrimmed = true; | protected void trimBody() { // #### should refactor this code into // #### trimWhitespace() methods on the Script objects if ( body instanceof CompositeTextScriptBlock ) { CompositeTextScriptBlock block = (CompositeTextScriptBlock) body; List list = block.... | |
for(Iterator it=mbeanList.iterator(); it.hasNext();){ MBeanConfig mbeanConfig = (MBeanConfig)it.next(); if(mbeanConfig.getObjectName().equals(objectName)){ return true; } } return false; | return findMBeanByObjectName(objectName) != null; | public boolean containsMBean(String objectName) { for(Iterator it=mbeanList.iterator(); it.hasNext();){ MBeanConfig mbeanConfig = (MBeanConfig)it.next(); if(mbeanConfig.getObjectName().equals(objectName)){ return true; } } return false; } |
public BaseObject getFirstObject(String fieldname, XWikiContext context) { Collection objectscoll = getxWikiObjects().values(); if (objectscoll == null) return null; for (Iterator itobjs = objectscoll.iterator(); itobjs.hasNext();) { Vector objects = (Vector) itobjs.next(); for (Iterator itobjs2 = objects.iterator(); ... | public BaseObject getFirstObject(String fieldname) { return getFirstObject(fieldname, null); | public BaseObject getFirstObject(String fieldname, XWikiContext context) { Collection objectscoll = getxWikiObjects().values(); if (objectscoll == null) return null; for (Iterator itobjs = objectscoll.iterator(); itobjs.hasNext();) { Vector objects = (Vector) itobjs.next()... |
if (!dashboardId.equals(dashboardConfig.dashboardId)) return false; return true; | return dashboardId.equals(dashboardConfig.dashboardId); | public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DashboardConfig)) return false; final DashboardConfig dashboardConfig = (DashboardConfig) o; if (!dashboardId.equals(dashboardConfig.dashboardId)) return false; return true; } |
public static boolean isKnownDataType(Class clazz){ if(clazz.isPrimitive() || clazz.isAssignableFrom(Boolean.class) || clazz.isAssignableFrom(Character.class) || clazz.isAssignableFrom(Byte.class) || clazz.isAssignableFrom(Short.class) || clazz.isAssignableFrom(Integer.class) || clazz.isAssignableFrom(Long.class) || cl... | public static boolean isKnownDataType(String type){ if(type.equals("boolean") || type.equals("char") || type.equals("byte") || type.equals("short") || type.equals("int") || type.equals("long") || type.equals("float") || type.equals("double") || type.equals("void") || type.equals("java.lang.Boolean") || type.equals("ja... | public static boolean isKnownDataType(Class clazz){ if(clazz.isPrimitive() || clazz.isAssignableFrom(Boolean.class) || clazz.isAssignableFrom(Character.class) || clazz.isAssignableFrom(Byte.class) || clazz.isAssignableFrom(Short.class) || clazz.isAssigna... |
value = expression.evaluate(context); | value = expression.evaluateRecurse(context); | public void run(JellyContext context, XMLOutput output) throws Exception { if ( ! context.isCacheTags() ) { clearTag(); } try { Tag tag = getTag(); if ( tag == null ) { return; } tag.setContext(context); if ( t... |
}, null); | }, new AbstractAction(){ public void actionPerformed(ActionEvent e) { columnEditPanel.discardChanges(); } }); | private void makeDialog(SQLTable st, int colIdx) throws ArchitectException { if (editDialog != null) { columnEditPanel.setModel(st); columnEditPanel.selectColumn(colIdx); editDialog.setTitle("Column Properties of "+st.getName()); editDialog.setVisible(true); //editDialog.requestFocus(); } else { ... |
WeblogicApplicationForm appForm = (WeblogicApplicationForm)actionForm; | ApplicationForm appForm = (ApplicationForm)actionForm; ModuleConfig moduleConfig = ModuleRegistry.getModule(config.getType()); MetaApplicationConfig metaAppConfig = moduleConfig.getMetaApplicationConfig(); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { ApplicationConfig config =... |
appForm.setHost(config.getHost()); appForm.setPort(String.valueOf(config.getPort())); appForm.setUsername(config.getUsername()); appForm.setPassword(ApplicationForm.FORM_PASSWORD); | appForm.setType(config.getType()); if(metaAppConfig.isDisplayHost()) appForm.setHost(config.getHost()); if(metaAppConfig.isDisplayPort()) appForm.setPort(String.valueOf(config.getPort())); if(metaAppConfig.isDisplayUsername()) appForm.setUsername(config.getUsername()); if(metaAppConfig.isDisplayPassword()) appForm.setP... | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { ApplicationConfig config =... |
checkPanel.setAlignmentX(Component.CENTER_ALIGNMENT); | void readPedGenotypes(String[] f){ //input is a 3 element array with //inputOptions[0] = ped file //inputOptions[1] = info file (null if none) //inputOptions[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) inputOptions = f; File p... | |
theData = new HaploData(); JTable table = checkPanel.getTable(); boolean[] markerResultArray = new boolean[table.getRowCount()]; for (int i = 0; i < table.getRowCount(); i++){ markerResultArray[i] = ((Boolean)table.getValueAt(i,7)).booleanValue(); } theData.linkageToChrom(markerResultArray,checkPanel.getPedFile()); t... | void readPedGenotypes(String[] f){ //input is a 3 element array with //inputOptions[0] = ped file //inputOptions[1] = info file (null if none) //inputOptions[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) inputOptions = f; File p... | |
if (size.width != pref.width && size.width > visRect.width){ | if (size.width != pref.width && pref.width > visRect.width){ | 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... |
dPrimeDisplay.refresh(0); | dPrimeDisplay.refresh(dPrimeDisplay.currentScheme); | 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... |
tdtPanel.refreshTable(); | if (tdtPanel != null){ tdtPanel.refreshTable(); } | 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... |
System.setProperty("swing.disableFileChooserSpeedFix", "true"); | public static void main(String[] args) { boolean nogui = false; //HaploView window; for(int i = 0;i<args.length;i++) { if(args[i].equals("-n") || args[i].equals("-h")) { nogui = true; } } if(nogui) { HaploText textOnly = new HaploTex... | |
if(doTDT) { tdtPanel = new TDTPanel(theData.chromosomes); | if(assocTest > 0) { tdtPanel = new TDTPanel(theData.chromosomes, assocTest); | 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... |
if(doTDT) { tdtPanel = new TDTPanel(theData.chromosomes); | if(assocTest > 0) { tdtPanel = new TDTPanel(theData.chromosomes, assocTest); | public Object construct(){ dPrimeDisplay=null; theData.infoKnown = false; if (!(inputOptions[1].equals(""))){ readMarkers(new File(inputOptions[1])); } theData.generateDPrimeTable(maxCompDist); theDa... |
theData = new HaploData(); | theData = new HaploData(assocTest); | void readPedGenotypes(String[] f){ //input is a 3 element array with //inputOptions[0] = ped file //inputOptions[1] = info file (null if none) //inputOptions[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) inputOptions = f; File p... |
doTDT = false; | assocTest = 0; | void readPhasedGenotypes(String[] f){ //input is a 3 element array with //inputOptions[0] = haps file //inputOptions[1] = info file (null if none) //inputOptions[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) //these are not available f... |
if ( volumes == null ) { getDefaultVolume(); } vol = (Volume) volumes.get( volName ); | PhotovaultSettings settings = PhotovaultSettings.getSettings(); PVDatabase db = settings.getCurrentDatabase(); vol = db.getVolume( volName ); | public static Volume getVolume( String volName ) { Volume vol = null; // Initialize the volumes array and create default volume if it has not been done yet if ( volumes == null ) { getDefaultVolume(); } vol = (Volume) volumes.get( volName ); return vol; } |
public TablePane(SQLTable m, PlayPen parentPP) { super(parentPP.getPlayPenContentPane()); setModel(m); setOpaque(true); setInsertionPoint(COLUMN_INDEX_NONE); dtl = new TablePaneDropListener(this); updateUI(); | public TablePane(TablePane tp, PlayPenContentPane parent) { super(parent); this.model = tp.model; this.selectionListeners = new ArrayList<SelectionListener>(); this.dtl = new TablePaneDropListener(this); this.margin = (Insets) tp.margin.clone(); this.columnSelection = new ArrayList<Boolean>(tp.columnSelection); this.co... | public TablePane(SQLTable m, PlayPen parentPP) { super(parentPP.getPlayPenContentPane()); setModel(m); setOpaque(true); setInsertionPoint(COLUMN_INDEX_NONE); //dt = new DropTarget(parentPP, new TablePaneDropListener(this)); dtl = new TablePaneDropListener(this); updateUI(); } |
columnSelection = new ArrayList(numCols); | columnSelection = new ArrayList<Boolean>(numCols); | 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); } columnHighlight = new ArrayList(numCols); for (in... |
columnHighlight = new ArrayList(numCols); | columnHighlight = new ArrayList<Color>(numCols); | 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); } columnHighlight = new ArrayList(numCols); for (in... |
Iterator it = selectionListeners.iterator(); | Iterator<SelectionListener> it = selectionListeners.iterator(); | protected void fireSelectionEvent(SelectionEvent e) { if (logger.isDebugEnabled()) { logger.debug("Notifying "+selectionListeners.size() +" listeners of selection change"); } Iterator it = selectionListeners.iterator(); if (e.getType() == SelectionEvent.SELECTION_EVENT) { while (it.hasNext()) { ((Sele... |
((SelectionListener) it.next()).itemSelected(e); | it.next().itemSelected(e); | protected void fireSelectionEvent(SelectionEvent e) { if (logger.isDebugEnabled()) { logger.debug("Notifying "+selectionListeners.size() +" listeners of selection change"); } Iterator it = selectionListeners.iterator(); if (e.getType() == SelectionEvent.SELECTION_EVENT) { while (it.hasNext()) { ((Sele... |
((SelectionListener) it.next()).itemDeselected(e); | it.next().itemDeselected(e); | protected void fireSelectionEvent(SelectionEvent e) { if (logger.isDebugEnabled()) { logger.debug("Notifying "+selectionListeners.size() +" listeners of selection change"); } Iterator it = selectionListeners.iterator(); if (e.getType() == SelectionEvent.SELECTION_EVENT) { while (it.hasNext()) { ((Sele... |
columnSelection = new ArrayList(m.getColumns().size()); | columnSelection = new ArrayList<Boolean>(m.getColumns().size()); | public void setModel(SQLTable m) { SQLTable old = model; if (m == null) { throw new IllegalArgumentException("model may not be null"); } else { model = m; } if (old != null) { try { ArchitectUtils.unlistenToHierarchy(this, old); } catch (ArchitectException e) { logger.error("Caught exception while... |
columnHighlight = new ArrayList(m.getColumns().size()); | columnHighlight = new ArrayList<Color>(m.getColumns().size()); | public void setModel(SQLTable m) { SQLTable old = model; if (m == null) { throw new IllegalArgumentException("model may not be null"); } else { model = m; } if (old != null) { try { ArchitectUtils.unlistenToHierarchy(this, old); } catch (ArchitectException e) { logger.error("Caught exception while... |
} else if (column == 17 ) { if (value == null) { formattedValue = "null"; } else if ( value instanceof Number ) { formattedValue = aldf.format(value); } else { formattedValue = value.toString(); } | public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { String formattedValue = new String(); // System.out.println("row:"+row+" column:"+column); DecimalFormat pctFormat = new DecimalFormat("0%"); ... | |
FontRenderContext frc = c.getCurrentFontRederContext(); if (font == null || frc == null) { logger.error("getPreferredSize(): TablePane is missing font or fontRenderContext."); logger.error("getPreferredSize(): component="+c.getName()+"; font="+font+"; frc="+frc); | if (font == null) { logger.error("getPreferredSize(): TablePane is missing font."); | public Dimension getPreferredSize(JComponent jc) { TablePane c = (TablePane) jc; SQLTable table = c.getModel(); if (table == null) return null; int height = 0; int width = 0; try { Insets insets = c.getInsets(); java.util.List columnList = table.getColumns(); int cols = columnList.size(); Font font = c.g... |
width = Math.max(width, (int) font.getStringBounds(theColumn, frc).getWidth()); | if (frc == null) { width = Math.max(width, metrics.stringWidth(theColumn)); } else { width = Math.max(width, (int) font.getStringBounds(theColumn, frc).getWidth()); } | public Dimension getPreferredSize(JComponent jc) { TablePane c = (TablePane) jc; SQLTable table = c.getModel(); if (table == null) return null; int height = 0; int width = 0; try { Insets insets = c.getInsets(); java.util.List columnList = table.getColumns(); int cols = columnList.size(); Font font = c.g... |
System.out.println("Marker " + (pos1+1) + " is monomorphic."); | public PairwiseLinkage computeDPrime(int pos1, int pos2){ compsDone++; int doublehet = 0; int[][] twoMarkerHaplos = new int[3][3]; for (int i = 0; i < twoMarkerHaplos.length; i++){ for (int j = 0; j < twoMarkerHaplos[i].length; j++){ twoMarkerHaplos[i][j] = 0; ... | |
void generateDPrimeTable(long maxdist){ | void generateDPrimeTable(){ | void generateDPrimeTable(long maxdist){ //calculating D prime requires the number of each possible 2 marker //haplotype in the dataset dPrimeTable = new PairwiseLinkage[Chromosome.getSize()][Chromosome.getSize()]; long negMaxdist = -1*maxdist; totalComps = (Chromosome.getSize()*(C... |
long negMaxdist = -1*maxdist; | void generateDPrimeTable(long maxdist){ //calculating D prime requires the number of each possible 2 marker //haplotype in the dataset dPrimeTable = new PairwiseLinkage[Chromosome.getSize()][Chromosome.getSize()]; long negMaxdist = -1*maxdist; totalComps = (Chromosome.getSize()*(C... | |
long sep = Chromosome.getMarker(pos2).getPosition() - Chromosome.getMarker(pos1).getPosition(); if (maxdist > 0){ if ((sep > maxdist || sep < negMaxdist)){ dPrimeTable[pos1][pos2] = null; continue; } } | void generateDPrimeTable(long maxdist){ //calculating D prime requires the number of each possible 2 marker //haplotype in the dataset dPrimeTable = new PairwiseLinkage[Chromosome.getSize()][Chromosome.getSize()]; long negMaxdist = -1*maxdist; totalComps = (Chromosome.getSize()*(C... | |
void prepareMarkerInput(File infile, long maxdist, String[][] hapmapGoodies) throws IOException, HaploViewException{ | void prepareMarkerInput(File infile, long md, String[][] hapmapGoodies) throws IOException, HaploViewException{ | void prepareMarkerInput(File infile, long maxdist, String[][] hapmapGoodies) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position... |
long negMaxdist = -1 * maxdist; | void prepareMarkerInput(File infile, long maxdist, String[][] hapmapGoodies) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position... | |
if (showWM && worldmapRect.contains(clickX,clickY)){ | if (showWM && wmInteriorRect.contains(clickX,clickY)){ | public void mouseClicked(MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) { int clickX = e.getX(); int clickY = e.getY(); if (showWM && worldmapRect.contains(clickX,clickY)){ //convert a click on the wo... |
int bigClickX = (((clickX - getVisibleRect().x) * chartSize.width) / worldmap.getWidth())-getVisibleRect().width/2; | int bigClickX = (((clickX - getVisibleRect().x - (worldmap.getWidth()-wmInteriorRect.width)/2) * chartSize.width) / wmInteriorRect.width)-getVisibleRect().width/2; | public void mouseClicked(MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) { int clickX = e.getX(); int clickY = e.getY(); if (showWM && worldmapRect.contains(clickX,clickY)){ //convert a click on the wo... |
chartSize.height) / worldmap.getHeight()) - | chartSize.height) / wmInteriorRect.height) - | public void mouseClicked(MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) { int clickX = e.getX(); int clickY = e.getY(); if (showWM && worldmapRect.contains(clickX,clickY)){ //convert a click on the wo... |
int width = e.getX() - worldmapRect.x; | int width = e.getX() - wmInteriorRect.x; | public void mouseDragged(MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) { //conveniently, we can tell what do do with the drag event //based on what the cursor is if (getCursor() == Cursor.getPredefinedCursor(Cursor... |
resizeWMRect = new Rectangle(worldmapRect.x+1, worldmapRect.y + worldmapRect.height - height, | resizeWMRect = new Rectangle(wmInteriorRect.x+1, wmInteriorRect.y + wmInteriorRect.height - height, | public void mouseDragged(MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) { //conveniently, we can tell what do do with the drag event //based on what the cursor is if (getCursor() == Cursor.getPredefinedCursor(Cursor... |
!(worldmapRect.contains(clickX,clickY))){ | !(wmInteriorRect.contains(clickX,clickY))){ | public void mousePressed (MouseEvent e) { Rectangle blockselector = new Rectangle(clickXShift-boxRadius,clickYShift - boxRadius, (Chromosome.getFilteredSize()*boxSize), boxSize); //if users right clicks & holds, pop up the info if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == ... |
ir = wmBorder.getInteriorRectangle(this,0,0,worldmap.getWidth(), worldmap.getHeight()); | wmInteriorRect = wmBorder.getInteriorRectangle(this,0,0,worldmap.getWidth(), worldmap.getHeight()); | public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming if (chartSize.getWidth() > (3*visRect.width)){ showWM = true; }else{ ... |
ir.width, | wmInteriorRect.width, | public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming if (chartSize.getWidth() > (3*visRect.width)){ showWM = true; }else{ ... |
wmResizeCorner = new Rectangle(visRect.x + worldmap.getWidth() - (worldmap.getWidth()-ir.width)/2, | wmResizeCorner = new Rectangle(visRect.x + worldmap.getWidth() - (worldmap.getWidth()-wmInteriorRect.width)/2, | public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming if (chartSize.getWidth() > (3*visRect.width)){ showWM = true; }else{ ... |
(worldmap.getWidth()-ir.width)/2, (worldmap.getHeight() -ir.height)/2); | (worldmap.getWidth()-wmInteriorRect.width)/2, (worldmap.getHeight() -wmInteriorRect.height)/2); | public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming if (chartSize.getWidth() > (3*visRect.width)){ showWM = true; }else{ ... |
worldmapRect = new Rectangle(visRect.x, visRect.y+visRect.height-worldmap.getHeight(), worldmap.getWidth(), worldmap.getHeight()); | wmInteriorRect.x = visRect.x + (worldmap.getWidth() - wmInteriorRect.width); wmInteriorRect.y = visRect.y+visRect.height-worldmap.getHeight() + (worldmap.getHeight() - wmInteriorRect.height); | public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming if (chartSize.getWidth() > (3*visRect.width)){ showWM = true; }else{ ... |
double hRatio = ir.getWidth()/pref.getWidth(); double vRatio = ir.getHeight()/pref.getHeight(); int hBump = worldmap.getWidth()-ir.width; int vBump = worldmap.getHeight()-ir.height; | double hRatio = wmInteriorRect.getWidth()/pref.getWidth(); double vRatio = wmInteriorRect.getHeight()/pref.getHeight(); int hBump = worldmap.getWidth()-wmInteriorRect.width; int vBump = worldmap.getHeight()-wmInteriorRect.height; | public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming if (chartSize.getWidth() > (3*visRect.width)){ showWM = true; }else{ ... |
JMenu imageMenu = new JMenu( "Image" ); imageMenu.setMnemonic(KeyEvent.VK_I); menuBar.add( imageMenu ); imageMenu.add( new JMenuItem( viewPane.getEditSelectionPropsAction() ) ); imageMenu.add( new JMenuItem( viewPane.getShowSelectedPhotoAction() ) ); imageMenu.add( new JMenuItem( viewPane.getRotateCWActionAction() ) )... | protected void createUI() { setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE ); tabPane = new JTabbedPane(); queryPane = new QueryPane(); treePane = new PhotoFolderTree(); tabPane.addTab( "Query", queryPane ); tabPane.addTab( "Folders", treePane ); // viewPane = new TableCollectionView(); viewPane = new PhotoColle... | |
Tag tag = (Tag) type.newInstance(); return TagScript.newInstance(tag); | return TagScript.newInstance(type); | public TagScript createTagScript(String name, Attributes attributes) throws Exception { Class type = (Class) tags.get(name); if ( type != null ) { Tag tag = (Tag) type.newInstance(); return TagScript.newInstance(tag); } return null; } |
JButton okButton = new JButton(compareDMPanel.getStartCompareAction()); | JDefaultButton okButton = new JDefaultButton(compareDMPanel.getStartCompareAction()); | public void actionPerformed(ActionEvent e) { // This can not easily be replaced with ArchitectPanelBuilder // because the current CompareDMPanel is not an ArchitectPanel // (and has no intention of becoming one, without some work). final JDialog d = new JDialog(ArchitectFrame.getMainInstance(), "Comp... |
boolean resultFound = false; | public void parseMoreResults(String wga) throws PlinkException { File moreResultsFile = new File(wga); results = hv.getPlinkData(); columns = hv.getPlinkColumns(); Vector newColumns = new Vector(); Vector ignoredMarkers = new Vector(); boolean addColumns = false; try... | |
for (int i = 0; i < results.size(); i++){ currentResult = (AssociationResult)results.get(i); if (currentResult.getMarker().getMarkerID().equals(marker)){ resultFound = true; currentResult.addValues(values); break; } } if (resultFound){ | if (resultsHash.containsKey(marker)){ | public void parseMoreResults(String wga) throws PlinkException { File moreResultsFile = new File(wga); results = hv.getPlinkData(); columns = hv.getPlinkColumns(); Vector newColumns = new Vector(); Vector ignoredMarkers = new Vector(); boolean addColumns = false; try... |
currentResult = (AssociationResult)results.get(((Integer)resultsHash.get(marker)).intValue()); currentResult.addValues(values); | public void parseMoreResults(String wga) throws PlinkException { File moreResultsFile = new File(wga); results = hv.getPlinkData(); columns = hv.getPlinkColumns(); Vector newColumns = new Vector(); Vector ignoredMarkers = new Vector(); boolean addColumns = false; try... | |
if (type == 1){ | if (type == ASSOC_TRIO){ | public double getChiSq(int type) { if(!this.chiSet){ if (type == 1){ this.chiSqVal = Math.pow( (this.counts[0][0] - this.counts[0][1]),2) / (this.counts[0][0] + this.counts[0][1]); }else{ int N = counts[0][0] + counts[0][1] + counts[1][0] + counts[1][1]; ... |
if (type != 1){ | if (type != ASSOC_TRIO){ | public String getOverTransmittedAllele(int type) { String[] alleleCodes = new String[5]; alleleCodes[0] = "X"; alleleCodes[1] = "A"; alleleCodes[2] = "C"; alleleCodes[3] = "G"; alleleCodes[4] = "T"; String retStr; if (this.counts[0][0] > this.counts[0][1]){ ... |
if (type == 1){ | if (type == ASSOC_TRIO){ | public String getTURatio(int type) { if (type == 1){ if (this.counts[0][0] > this.counts[0][1]){ return this.counts[0][0] + ":" + this.counts[0][1]; }else{ return this.counts[0][1] + ":" + this.counts[0][0]; } }else{ if (this.co... |
monitorableProgress = 0; | public void dropConflicting() throws SQLException { if (conflicts == null) { throw new IllegalStateException("You have to call findConflicting() before dropConflicting()"); } dropConflictingStarted = true; Iterator it = conflicts.iterator(); Statement stmt = null; try { stm... | |
ddlStatements.add(new DDLStatement(sqlObject, type, ddl.toString())); | String cat = getTargetCatalog(); if (cat != null) { cat = toIdentifier(cat); } String sch = getTargetSchema(); if (sch != null) { sch = toIdentifier(sch); } ddlStatements.add(new DDLStatement(sqlObject, type, ddl.toString(), cat, sch)); | public final void endStatement(DDLStatement.StatementType type, SQLObject sqlObject) { ddlStatements.add(new DDLStatement(sqlObject, type, ddl.toString())); ddl = new StringBuffer(500); } |
if (caller.dPrimeDisplay != null){ caller.dPrimeDisplay.setVisible(false); } | public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command==RAW_DATA){ load(PED); }else if (command == PHASED_DATA){ load(HAPS); }else if (command == BROWSE_GENO){ browse(GENO); }else if (command == BROWSE_INFO)... | |
if ( date == null ) { return ""; } | public String format() { long lAccuracy = (long) (accuracy * 24 * 3600 * 1000); String dateStr = ""; if ( accuracy > 0 ) { // Find the correct format to use String formatStr =accuracyFormatStrings[0]; for ( int i = 1; i < accuracyFormatLimits.length; i++ ) { if ( accuracy < accuracyFormatLimits[i... | |
TDT myTDT = new TDT(); myTDT.calcTDT(textData.chromosomes); | 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); ... | |
"Added user "+user.getName()+"/"+user.getPassword()); | "Added user "+user.getName()); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... |
this.colorDPrime(STD_SCHEME); | DPrimeDisplay(HaploData h){ theData=h; this.setDoubleBuffered(true); addMouseListener(this); addMouseMotionListener(this); } | |
blockDispHeight = boxSize/2 + fm.getAscent(); | blockDispHeight = boxSize/3 + fm.getAscent(); | public Dimension getPreferredSize() { //loop through table to find deepest non-null comparison PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; int count = 0; for (int x = 0; x < dPrimeTable.length-1; x++){ for (int y = x+1; y < dPrimeTable.length; y++){ ... |
blockDispHeight = boxSize/2; | blockDispHeight = boxSize/3; | public Dimension getPreferredSize() { //loop through table to find deepest non-null comparison PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; int count = 0; for (int x = 0; x < dPrimeTable.length-1; x++){ for (int y = x+1; y < dPrimeTable.length; y++){ ... |
refresh(); | refresh(0); } else if (whichMarker > 0 && whichMarker < Chromosome.realIndex.length){ theData.addMarkerIntoSurroundingBlock(whichMarker); | public void mouseClicked(MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) { int clickX = e.getX(); int clickY = e.getY(); if (showWM && worldmapRect.contains(clickX,clickY)){ //convert a click on the wo... |
refresh(); | refresh(0); | public void mouseReleased(MouseEvent e) { //remove popped up window if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK){ popupExists = false; repaint(); //resize window once user has ceased dragging } else if ((e.getModifiers(... |
g2.setFont(markerNameFont); | g2.setFont(boldMarkerNameFont); | public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming if (chartSize.getWidth() > (3*visRect.width)){ showWM = true; }else{ ... |
g2.fillRect(left + lineLeft+1, 6, lineSpan-1, TICK_HEIGHT-1); | g2.fillRect(left + lineLeft+1, top+1, lineSpan-1, TICK_HEIGHT-1); | public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming if (chartSize.getWidth() > (3*visRect.width)){ showWM = true; }else{ ... |
g2.drawRect(left + lineLeft, 5, lineSpan, TICK_HEIGHT); | g2.drawRect(left + lineLeft, top, lineSpan, TICK_HEIGHT); | public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming if (chartSize.getWidth() > (3*visRect.width)){ showWM = true; }else{ ... |
g2.drawLine(xx, 5, xx, 5 + TICK_HEIGHT); | g2.drawLine(xx, top, xx, top + TICK_HEIGHT); | public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming if (chartSize.getWidth() > (3*visRect.width)){ showWM = true; }else{ ... |
g2.drawLine(xx, 5 + TICK_HEIGHT, left + i*boxSize, TICK_BOTTOM); } top += TICK_BOTTOM; | g2.drawLine(xx, top + TICK_HEIGHT, left + i*boxSize, top+TICK_BOTTOM); } top += TICK_BOTTOM + TICK_HEIGHT; | public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming if (chartSize.getWidth() > (3*visRect.width)){ showWM = true; }else{ ... |
g2.drawString(labelString, left+first*boxSize-boxSize/2+TEXT_GAP, top-boxSize/2); | g2.drawString(labelString, left+first*boxSize-boxSize/2+TEXT_GAP, top-boxSize/3); | public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming if (chartSize.getWidth() > (3*visRect.width)){ showWM = true; }else{ ... |
public void refresh(){ | public void refresh(int scheme){ if (scheme != 0){ colorDPrime(scheme); } | public void refresh(){ noImage = true; repaint(); } |
dataSet(data, 0, this.base_offset, Math.min(this.data_length, data.length)); | dataSet(data, 0, 0, Math.min(this.data_length, data.length)); | public void dataSet(byte[] data) { dataSet(data, 0, this.base_offset, Math.min(this.data_length, data.length)); } |
public void execute() { finished = false; | public void execute() { if (cancelled || finished) return; | public void execute() { finished = false; stmtsTried = 0; stmtsCompleted = 0; SQLDatabase target = architectFrame.playpen.getDatabase(); Connection con; Statement stmt; try { con = target.getConnection(); } catch (ArchitectException ex) { final Exception fex = ex; SwingUtilities.invo... |
statements = ddlg.generateDDLStatements(target); | public void execute() { finished = false; stmtsTried = 0; stmtsCompleted = 0; SQLDatabase target = architectFrame.playpen.getDatabase(); Connection con; Statement stmt; try { con = target.getConnection(); } catch (ArchitectException ex) { final Exception fex = ex; SwingUtilities.invo... | |
} catch (ArchitectException ex) { final Exception fex = ex; SwingUtilities.invokeLater(new Runnable() { public void run() { JOptionPane.showMessageDialog (dialog, "Couldn't generate DDL statements: "+fex.getMessage() +"\nThe problem was detected internally to the Architect."); } }); finished = true; return; | public void execute() { finished = false; stmtsTried = 0; stmtsCompleted = 0; SQLDatabase target = architectFrame.playpen.getDatabase(); Connection con; Statement stmt; try { con = target.getConnection(); } catch (ArchitectException ex) { final Exception fex = ex; SwingUtilities.invo... | |
List conflictingTargetObjects = DDLUtils.findConflicting(con, ddlStmt); if (conflictingTargetObjects.size() > 0) { int decision = JOptionPane.showConfirmDialog (dialog, "The target database already contains object(s) with\n" +"the same name(s) as those you want to create:\n\n" +conflictingTargetObjects +"\nDo you want ... | public void execute() { finished = false; stmtsTried = 0; stmtsCompleted = 0; SQLDatabase target = architectFrame.playpen.getDatabase(); Connection con; Statement stmt; try { con = target.getConnection(); } catch (ArchitectException ex) { final Exception fex = ex; SwingUtilities.invo... | |
(dialog, "You have to specify a target database connection" +"\nbefore executing this script."); | (dialog, "Couldn't connect to target database: "+fex.getMessage() +"\nPlease check the connection settings and try again."); | public void run() { JOptionPane.showMessageDialog (dialog, "You have to specify a target database connection" +"\nbefore executing this script."); ArchitectFrame.getMainInstance().playpen.showDbcsDialog(); } |
(dialog, "Couldn't generate DDL statements: "+fex.getMessage() +"\nThe problem was reported by the target database."); | (dialog, "You have to specify a target database connection" +"\nbefore executing this script."); ArchitectFrame.getMainInstance().playpen.showDbcsDialog(); | public void run() { JOptionPane.showMessageDialog (dialog, "Couldn't generate DDL statements: "+fex.getMessage() +"\nThe problem was reported by the target database."); } |
+"\nThe problem was detected internally to the Architect."); | +"\nThe problem was reported by the target database."); | public void run() { JOptionPane.showMessageDialog (dialog, "Couldn't generate DDL statements: "+fex.getMessage() +"\nThe problem was detected internally to the Architect."); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.