rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
JMenuItem propsItem = new JMenuItem( "Properties" ); propsItem.addActionListener( this ); propsItem.setActionCommand( PHOTO_PROPS_CMD ); JMenuItem showItem = new JMenuItem( "Show image" ); showItem.addActionListener( this ); showItem.setActionCommand( PHOTO_SHOW_CMD ); JMenuItem rotateCW = new JMenuItem( "Rotate 90 deg...
editSelectionPropsAction = new EditSelectionPropsAction( this, "Properties...", null, "Edit properties of the selected photos", KeyEvent.VK_P ); JMenuItem propsItem = new JMenuItem( editSelectionPropsAction ); showSelectedPhotoAction = new ShowSelectedPhotoAction( this, "Show image", null, "Show the selected phot(s)", ...
void createUI() { photoTransferHandler = new PhotoCollectionTransferHandler( this ); setTransferHandler( photoTransferHandler ); addMouseListener( this ); addMouseMotionListener( this ); // Create the popup menu popup = new JPopupMenu(); JMenuItem props...
Rectangle r = new Rectangle(e.getX(), e.getY(), 1, 1); scrollRectToVisible(r);
public void mouseDragged(MouseEvent e ) { switch ( dragType ) { case DRAG_TYPE_SELECT: handleSelectionDragEvent( e ); break; case DRAG_TYPE_DND: handleDnDDragEvent( e ); break; default: log.error( "Invalid drag type" ); } }
Thumbnail thumbnail = photo.getThumbnail(); if ( thumbnail != null ) { BufferedImage img = thumbnail.getImage(); int x = startx + (columnWidth - img.getWidth())/(int)2; int y = starty + (rowHeight - img.getHeight())/(int)2; g2.drawImage( img, new AffineTransform( 1f, 0f, 0f, 1f, x, y ), null ); if ( isSelected ) { ...
Thumbnail thumbnail = null; if ( photo.hasThumbnail() ) { thumbnail = photo.getThumbnail(); } else { thumbnail = Thumbnail.getDefaultThumbnail(); if ( !thumbCreatorThread.isBusy() ) { thumbCreatorThread.createThumbnail( photo ); } } BufferedImage img = thumbnail.getImage(); int x = startx + (columnWidth - img.getWidt...
private void paintThumbnail( Graphics2D g2, PhotoInfo photo, int startx, int starty, boolean isSelected ) { // Current position in which attributes can be drawn int ypos = starty + rowHeight/2; if ( photo != null ) { Thumbnail thumbnail = photo.getThumbnail(); if (...
Color prevBkg = g2.getBackground(); if ( isSelected ) { g2.setBackground( Color.BLUE ); } Font attrFont = new Font( "Arial", Font.PLAIN, 10 ); FontRenderContext frc = g2.getFontRenderContext(); if ( showDate && photo.getShootTime() != null ) { DateFormat df = new SimpleDateFormat( "dd.MM.yyyy k:mm" ); String dateStr = ...
g2.drawImage( img, new AffineTransform( 1f, 0f, 0f, 1f, x, y ), null ); if ( isSelected ) { Stroke prevStroke = g2.getStroke(); Color prevColor = g2.getColor(); g2.setStroke( new BasicStroke( 3.0f) ); g2.setColor( Color.BLUE ); g2.drawRect( x, y, img.getWidth(), img.getHeight() ); g2.setColor( prevColor ); g2.setStroke...
private void paintThumbnail( Graphics2D g2, PhotoInfo photo, int startx, int starty, boolean isSelected ) { // Current position in which attributes can be drawn int ypos = starty + rowHeight/2; if ( photo != null ) { Thumbnail thumbnail = photo.getThumbnail(); if (...
logger.debug(toString());
logger.debug("posting report: "+toString());
public void postReport() { logger.debug(toString()); if (numReportsThisRun++ > MAX_REPORT_TRIES) { logger.info( String.format( "Not logging this error, threshold of %d exceeded", MAX_REPORT_TRIES)); return; } exception.printStackTra...
BufferedReader in = new BufferedReader(new InputStreamReader(dest.getInputStream()));
InputStreamReader inputStreamReader = new InputStreamReader(dest.getInputStream()); BufferedReader in = new BufferedReader(inputStreamReader);
public void postReport() { logger.debug(toString()); if (numReportsThisRun++ > MAX_REPORT_TRIES) { logger.info( String.format( "Not logging this error, threshold of %d exceeded", MAX_REPORT_TRIES)); return; } exception.printStackTra...
logger.debug("Finished posting report");
public void postReport() { logger.debug(toString()); if (numReportsThisRun++ > MAX_REPORT_TRIES) { logger.info( String.format( "Not logging this error, threshold of %d exceeded", MAX_REPORT_TRIES)); return; } exception.printStackTra...
T.add((getSubscribersLink(topicID,String.valueOf(emailCount))),4,row);
T.add((getSubscribersLink(topic.getListId(),String.valueOf(emailCount))),4,row);
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",...
pairwiseButton.setSelected(true);
tripleButton.setSelected(true);
public void refreshTable(){ this.removeAll(); snpsByName = new Hashtable(); this.setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); Vector columnNames = new Vector(); Vector tableData = new Vector(); columnNames.add("#"); columnNames.add("Name"); columnNames.add...
Vector results = pedFile.getResults();
Vector results = null; if (pedFile != null){ results = pedFile.getResults(); }
void prepareMarkerInput(File infile, 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. the maxdist ...
MarkerResult mr = (MarkerResult)results.elementAt(i);
MarkerResult mr = null; if (results != null){ mr = (MarkerResult)results.elementAt(i); }
void prepareMarkerInput(File infile, 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. the maxdist ...
pos, Math.rint(mr.getMAF()*100.0)/100.0, a1, a2,
pos, maf, a1, a2,
void prepareMarkerInput(File infile, 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. the maxdist ...
double genoPC = mr.getGenoPercent(); if (prevPosition != Long.MIN_VALUE){ if (pos == prevPosition){ dupsToBeFlagged = true; if (genoPC >= mr.getGenoPercent()){ thisMarker.setDup(1); prevMarker.setDup(2); }else{ thisMarker.setDup(2); prevMarker.setDup(1);
if (mr != null){ double genoPC = mr.getGenoPercent(); if (prevPosition != Long.MIN_VALUE){ if (pos == prevPosition){ dupsToBeFlagged = true; if (genoPC >= mr.getGenoPercent()){ thisMarker.setDup(1); prevMarker.setDup(2); }else{ thisMarker.setDup(2); prevMarker.setDup(1); }
void prepareMarkerInput(File infile, 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. the maxdist ...
} prevPosition = pos; prevMarker = thisMarker;
prevPosition = pos; prevMarker = thisMarker; }
void prepareMarkerInput(File infile, 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. the maxdist ...
markerInfo.add(new SNP("Marker " + String.valueOf(i+1), (i*4000), Math.rint(mr.getMAF()*100.0)/100.0,a1,a2));
markerInfo.add(new SNP("Marker " + String.valueOf(i+1), (i*4000), maf,a1,a2));
void prepareMarkerInput(File infile, 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. the maxdist ...
service.addApplication(Utils.getServiceContext(context), appConfigData);
service.addAppWithDashboard(Utils.getServiceContext(context), appConfigData);
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception{ ...
public UserList(int count, String namePrefix, String domain, String password) { this(count, namePrefix, domain); m_password = password;
public UserList(int count, String namePrefix, String domain) { m_count = count; m_namePrefix = namePrefix; m_domain = domain;
public UserList(int count, String namePrefix, String domain, String password) { this(count, namePrefix, domain); m_password = password; }
p.add(filename = new JTextField((ddlg.getFile() == null ? "" : ddlg.getFile().getPath()), 35));
File outFile = ddlg.getFile(); if (outFile == null) { outFile = new File(System.getProperty("user.dir"), project.getName()+".ddl"); } p.add(filename = new JTextField((outFile.getPath()), 35));
protected void setup() { GenericDDLGenerator ddlg = project.getDDLGenerator(); setLayout(new FormLayout()); add(new JLabel("Allow Connection?")); add(allowConnection = new JCheckBox()); allowConnection.setSelected(ddlg.getAllowConnection()); add(new JLabel("Output File")); JPanel p = new JPanel(new FlowLayout()...
registerTag("setTimeZone", SetTimeZoneTag.class); registerTag("timeZone", TimeZoneTag.class);
public FmtTagLibrary() { registerTag("bundle", BundleTag.class); registerTag("message", MessageTag.class); registerTag("param", ParamTag.class); registerTag("setLocale", SetLocaleTag.class); }
System.out.println("SQLObject: firing dbChildrenInserted event");
System.out.println(getClass().getName()+": firing dbChildrenInserted event");
protected void fireDbChildrenInserted(int[] newIndices, List newChildren) { System.out.println("SQLObject: firing dbChildrenInserted event"); SQLObjectEvent e = new SQLObjectEvent (this, newIndices, (SQLObject[]) newChildren.toArray(new SQLObject[newChildren.size()])); Iterator it = getSqlObjectListeners()....
System.out.println("SQLObject: notified "+count+" listeners");
System.out.println(getClass().getName()+": notified "+count+" listeners");
protected void fireDbChildrenInserted(int[] newIndices, List newChildren) { System.out.println("SQLObject: firing dbChildrenInserted event"); SQLObjectEvent e = new SQLObjectEvent (this, newIndices, (SQLObject[]) newChildren.toArray(new SQLObject[newChildren.size()])); Iterator it = getSqlObjectListeners()....
expression = createExpression( localName, attributeName, attributeValue );
expression = createConstantExpression( localName, attributeName, attributeValue );
protected TagScript createStaticTag( String namespaceURI, String localName, Attributes list ) throws SAXException { try { Tag tag = new StaticTag( namespaceURI, localName ); TagScript script = new TagScript( tag ); // now iterate through through th...
expression = createExpression( localName, attributeName, attributeValue );
expression = createConstantExpression( localName, attributeName, attributeValue );
protected TagScript createTag( String namespaceURI, String localName, Attributes list ) throws SAXException { try { // use the URI to load a taglib TagLibrary taglib = (TagLibrary) taglibs.get( namespaceURI ); if ( taglib == null ) { if ( namespaceURI != null &...
XMLParser parser = new XMLParser(); parser.setContext( getContext() ); Script script = parser.parse( getUrl().openStream() ); script = script.compile(); if ( log.isDebugEnabled() ) { log.debug( "Compiled script: " + getUrl() ); } return script; }
XMLParser parser = new XMLParser(); parser.setJellyContext(getJellyContext()); Script script = parser.parse(getUrl().openStream()); script = script.compile(); if (log.isDebugEnabled()) { log.debug("Compiled script: " + getUrl()); } return script; }
public Script compileScript() throws Exception { XMLParser parser = new XMLParser(); parser.setContext( getContext() ); Script script = parser.parse( getUrl().openStream() ); script = script.compile(); if ( log.isDebugEnabled() ) { log.debug( "Compiled script: "...
if ( args.length <= 0 ) { System.out.println( "Usage: Jelly scriptFile [outputFile]" ); return; } Jelly jelly = new Jelly(); jelly.setScript( args[0] ); Writer writer = new BufferedWriter( new OutputStreamWriter( System.out ) ); Script script = jelly.compileScript(); XMLOutput output = XMLOutput.createXMLOutput( w...
if (args.length <= 0) { System.out.println("Usage: Jelly scriptFile [outputFile]"); return; } Jelly jelly = new Jelly(); jelly.setScript(args[0]); Writer writer = new BufferedWriter(new OutputStreamWriter(System.out)); Script script = jelly.compileScript(); XMLOutput output = XMLOutput.createXMLOutput(writer); Jell...
public static void main(String[] args) throws Exception { if ( args.length <= 0 ) { System.out.println( "Usage: Jelly scriptFile [outputFile]" ); return; } Jelly jelly = new Jelly(); jelly.setScript( args[0] ); /* // later we might wann...
oldThumbnail = null;
protected void createThumbnail( VolumeBase volume ) { log.debug( "Creating thumbnail for " + uid ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Maximum size of the thumbnail int maxThumbWidth = 100; int maxThumbHeight = 1...
oldThumbnail = null;
public Thumbnail getExistingThumbnail() { if ( thumbnail == null ) { log.debug( "Finding thumbnail from database" ); // First try to find an instance from existing instances ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ...
oldThumbnail = null;
public Thumbnail getThumbnail() { log.debug( "getThumbnail: entry, Finding thumbnail for " + uid ); if ( thumbnail == null ) { thumbnail = getExistingThumbnail(); if ( thumbnail == null ) { // Next try to create a new thumbnail instance log.debug( "N...
thumbnail = null;
invalidateThumbnail();
public void setCropBounds( Rectangle2D cropBounds ) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); if ( !cropBounds.equals( getCropBounds() ) ) { // Rotation changes, invalidate the thumbnail thumbnail = null; } cropMinX = cro...
thumbnail = null;
invalidateThumbnail();
public void setPrefRotation(double v) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); if ( v != prefRotation ) { // Rotation changes, invalidate the thumbnail thumbnail = null; } this.prefRotation = v; modified(); ...
String newPhotographer = "New photographer"; ctrl.setField( PhotoInfoController.PHOTOGRAPHER, newPhotographer ); try { ctrl.save(); } catch ( Exception e ) { fail( "Exception while saving: " + e.getMessage() ); } assertEquals( "PhotoInfo fields should match ctrl", newPhotographer, photo.getPhotographer() ); try { Photo...
public void testNewPhotoCreation() { File testFile = new File( "c:\\java\\photovault\\testfiles\\test1.jpg" ); ctrl.createNewPhoto( testFile ); String photographer = "Test photographer"; ctrl.setField( PhotoInfoController.PHOTOGRAPHER, photographer ); assertEquals( photographer, ctrl.getField( PhotoInfoCont...
Expression expression = (Expression) entry.getValue();
if(name.indexOf(':')!=-1) name = name.substring(name.indexOf(':')+1); ExpressionAttribute expat = (ExpressionAttribute) entry.getValue(); Expression expression = expat.exp;
public void run(JellyContext context, XMLOutput output) throws JellyTagException { try { startNamespacePrefixes(output); } catch (SAXException e) { throw new JellyTagException("could not start namespace prefixes",e); } Tag tag = null; try { tag = g...
dynaTag.setAttribute(name, value);
if(expat.prefix!=null || expat.prefix.length()>0 && tag instanceof StaticTag) ((StaticTag) dynaTag).setAttribute(name,expat.prefix, expat.nsURI,value); else dynaTag.setAttribute(name, value);
public void run(JellyContext context, XMLOutput output) throws JellyTagException { try { startNamespacePrefixes(output); } catch (SAXException e) { throw new JellyTagException("could not start namespace prefixes",e); } Tag tag = null; try { tag = g...
System.out.println("The current Name is the same as the old name");
logger.debug("The current Name is the same as the old name");
public void actionPerformed(ActionEvent e) { logger.debug("DBCS Action invoked"); ArchitectDataSource newDS = dbcsPanel.getDbcs(); String curName = null; for (Component c : ((TextPanel)dbcsPanel.getComponents()[0]).getComponents()) { if ("dbNameField".equals(c.getName())){ curName = ((JTextField) c).getText(...
} else { this.shouldExport = false;
public void setExport(String export) { if ("true".equals(export)) { this.shouldExport = true; } }
} else { this.shouldInherit = false;
public void setInherit(String inherit) { if ("true".equals(inherit)) { this.shouldInherit = true; } }
public void characters(char ch[], int start, int length) throws SAXException {
public void characters(char[] ch, int start, int length) throws SAXException {
public void characters(char ch[], int start, int length) throws SAXException { contentHandler.characters(ch, start, length); }
if (log.isDebugEnabled()) log.debug("error setting lexical handler properties", e);
if (log.isDebugEnabled()) { log.debug("error setting lexical handler properties", e); }
public static XMLOutput createXMLOutput(XMLReader xmlReader) { XMLOutput output = new XMLOutput(xmlReader.getContentHandler()); // isn't it lovely what we've got to do to find the LexicalHandler... ;-) for (int i = 0; i < LEXICAL_HANDLER_NAMES.length; i++) { try { Obje...
contentHandler.endPrefixMapping(prefix);
namespaceStack.popNamespace(prefix);
public void endPrefixMapping(String prefix) throws SAXException { contentHandler.endPrefixMapping(prefix); }
} else if (contentHandler instanceof XMLOutput) { ((XMLOutput)contentHandler).flush();
public void flush() throws IOException { if( contentHandler instanceof XMLWriter ) { ((XMLWriter)contentHandler).flush(); } }
public void ignorableWhitespace(char ch[], int start, int length)
public void ignorableWhitespace(char[] ch, int start, int length)
public void ignorableWhitespace(char ch[], int start, int length) throws SAXException { contentHandler.ignorableWhitespace(ch, start, length); }
contentHandler.startPrefixMapping(prefix, uri);
namespaceStack.pushNamespace(prefix, uri);
public void startPrefixMapping(String prefix, String uri) throws SAXException { contentHandler.startPrefixMapping(prefix, uri); }
if (Options.getAssocTest() == 2) {
if (Options.getAssocTest() == ASSOC_TRIO) {
private void full_em_breakup( byte[][] input_haplos, int[] block_size, int numTrios, Vector affStatus) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//, best, h1, h2; int...
if (Options.getAssocTest() == 1){
if (Options.getAssocTest() == ASSOC_CC){
private void full_em_breakup( byte[][] input_haplos, int[] block_size, int numTrios, Vector affStatus) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//, best, h1, h2; int...
if(Options.getAssocTest() == 2)
if(Options.getAssocTest() == ASSOC_TRIO)
private void full_em_breakup( byte[][] input_haplos, int[] block_size, int numTrios, Vector affStatus) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//, best, h1, h2; int...
} else if (Options.getAssocTest() == 1){
} else if (Options.getAssocTest() == ASSOC_CC){
private void full_em_breakup( byte[][] input_haplos, int[] block_size, int numTrios, Vector affStatus) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//, best, h1, h2; int...
parent = new SQLTable();
protected void setUp() throws Exception { parent.addChild(child); }
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 { getBody().run( context, output ); }
double genoPct = 100.0*(het+hom)/(het+hom+missing); return genoPct;
if (het+hom+missing == 0){ return 0; }else{ return 100.0*(het+hom)/(het+hom+missing); }
private double getGenoPercent(int het, int hom, int missing){ double genoPct = 100.0*(het+hom)/(het+hom+missing); return genoPct; }
clickY-botEdgeShift,
clickY-botEdgeShift+smallDataVertSlop,
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) == ...
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 { DynaTag dynaTag = (DynaTag) tag; // ### probably compiling this to 2 arrays might be quicker and smaller for ( Iterator iter = attributes.entrySet().iterator(); iter.hasNext(); ) { Map.Entry entry =...
mouseMode = mouseModeType.SELECT_TABLE;
mouseMode = MouseModeType.SELECT_TABLE;
protected void cleanup() { if(addToPP) { pp.unzoomPoint(p); logger.debug("Placing table at: "+p); pp.addImpl(tp,p,pp.getPPComponentCount()); try { pp.db.addChild(tp.getModel()); pp.selectNone(); tp.setSelected(true); mouseMode = mouseModeType.SELECT_TABLE; } catch (ArchitectExceptio...
mouseMode = mouseModeType.RUBBERBAND_MOVE;
mouseMode = MouseModeType.RUBBERBAND_MOVE;
public void mouseMoved(MouseEvent evt) { if (rubberBand != null) { // repaint old region in case of shrinkage Rectangle dirtyRegion = zoomRect(new Rectangle(rubberBand)); Point p = unzoomPoint(evt.getPoint()); rubberBand.setBounds(rubberBandOrigin.x, rubberBandOrigin.y, 0, 0); rubberBand.add(p); ...
if ( mouseMode == mouseModeType.CREATING_RELATIONSHIP ) { } else {
if ( mouseMode == MouseModeType.CREATING_RELATIONSHIP ) { } else {
public void mousePressed(MouseEvent evt) { requestFocus(); maybeShowPopup(evt); Point p = evt.getPoint(); unzoomPoint(p); PlayPenComponent c = contentPane.getComponentAt(p); if (c != null) p.translate(-c.getX(), -c.getY()); if (c instanceof Relationship) { Relationship r = (Relationship) c; ...
mouseMode = mouseModeType.MULTI_SELECT; } else { mouseMode = mouseModeType.SELECT_RELATIONSHIP;
mouseMode = MouseModeType.MULTI_SELECT; } else { mouseMode = MouseModeType.SELECT_RELATIONSHIP;
public void mousePressed(MouseEvent evt) { requestFocus(); maybeShowPopup(evt); Point p = evt.getPoint(); unzoomPoint(p); PlayPenComponent c = contentPane.getComponentAt(p); if (c != null) p.translate(-c.getX(), -c.getY()); if (c instanceof Relationship) { Relationship r = (Relationship) c; ...
if ( mouseMode == mouseModeType.CREATING_TABLE ) {
if ( mouseMode == MouseModeType.CREATING_TABLE ) {
public void mousePressed(MouseEvent evt) { requestFocus(); maybeShowPopup(evt); Point p = evt.getPoint(); unzoomPoint(p); PlayPenComponent c = contentPane.getComponentAt(p); if (c != null) p.translate(-c.getX(), -c.getY()); if (c instanceof Relationship) { Relationship r = (Relationship) c; ...
if ( !tp.isSelected() || mouseMode == mouseModeType.IDLE ) { mouseMode = mouseModeType.SELECT_TABLE;
if ( !tp.isSelected() || mouseMode == MouseModeType.IDLE ) { mouseMode = MouseModeType.SELECT_TABLE;
public void mousePressed(MouseEvent evt) { requestFocus(); maybeShowPopup(evt); Point p = evt.getPoint(); unzoomPoint(p); PlayPenComponent c = contentPane.getComponentAt(p); if (c != null) p.translate(-c.getX(), -c.getY()); if (c instanceof Relationship) { Relationship r = (Relationship) c; ...
mouseMode = mouseModeType.MULTI_SELECT;
mouseMode = MouseModeType.MULTI_SELECT;
public void mousePressed(MouseEvent evt) { requestFocus(); maybeShowPopup(evt); Point p = evt.getPoint(); unzoomPoint(p); PlayPenComponent c = contentPane.getComponentAt(p); if (c != null) p.translate(-c.getX(), -c.getY()); if (c instanceof Relationship) { Relationship r = (Relationship) c; ...
mouseMode = mouseModeType.SELECT_COLUMN;
mouseMode = MouseModeType.SELECT_COLUMN;
public void mousePressed(MouseEvent evt) { requestFocus(); maybeShowPopup(evt); Point p = evt.getPoint(); unzoomPoint(p); PlayPenComponent c = contentPane.getComponentAt(p); if (c != null) p.translate(-c.getX(), -c.getY()); if (c instanceof Relationship) { Relationship r = (Relationship) c; ...
mouseMode = mouseModeType.IDLE;
mouseMode = MouseModeType.IDLE;
public void mousePressed(MouseEvent evt) { requestFocus(); maybeShowPopup(evt); Point p = evt.getPoint(); unzoomPoint(p); PlayPenComponent c = contentPane.getComponentAt(p); if (c != null) p.translate(-c.getX(), -c.getY()); if (c instanceof Relationship) { Relationship r = (Relationship) c; ...
mouseMode = mouseModeType.MULTI_SELECT;
mouseMode = MouseModeType.MULTI_SELECT;
public void mouseReleased(MouseEvent evt) { draggingTablePanes = false; if (rubberBand != null) { if (evt.getButton() == MouseEvent.BUTTON1) { Rectangle dirtyRegion = rubberBand; rubberBandOrigin = null; rubberBand = null; zoomRect(dirtyRegion); repaintRubberBandRegion(dirtyRegion...
mouseMode = mouseModeType.IDLE;
mouseMode = MouseModeType.IDLE;
public void mouseReleased(MouseEvent evt) { draggingTablePanes = false; if (rubberBand != null) { if (evt.getButton() == MouseEvent.BUTTON1) { Rectangle dirtyRegion = rubberBand; rubberBandOrigin = null; rubberBand = null; zoomRect(dirtyRegion); repaintRubberBandRegion(dirtyRegion...
mouseMode = MouseModeType.MULTI_SELECT;
public void selectAll() { for (int i = 0, n = contentPane.getComponentCount(); i < n; i++) { if (contentPane.getComponent(i) instanceof Selectable) { Selectable s = (Selectable) contentPane.getComponent(i); s.setSelected(true); } } }
public static void setMouseMode(mouseModeType mouseMode) {
public static void setMouseMode(MouseModeType mouseMode) {
public static void setMouseMode(mouseModeType mouseMode) { PlayPen.mouseMode = mouseMode; }
noImage = true;
public void loadMarkers(){ markersLoaded = true; repaint(); }
System.out.println(System.currentTimeMillis());
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...
textData = new HaploData();
textData = new HaploData(0);
private void processFile(String fileName,int fileType,String infoFileName){ try { int outputType; long maxDistance; long negMaxDistance; HaploData textData; File OutputFile; File inputFile; inputFile = new File(fileName); ...
loginContext = new LoginContext(AuthConstants.AUTH_CONFIG_INDEX, callbackHandler);
final LoginContext loginContext = new LoginContext(AuthConstants.AUTH_CONFIG_INDEX, callbackHandler);
public void login(ServiceContext context, String username, String password) throws ServiceException{ LoginCallbackHandler callbackHandler = new LoginCallbackHandler(username, password); User user = null; UserManager userManager = UserMana...
try{ loginContext.logout(); UserActivityLogger.getInstance().logActivity(user.getName(), "logged out successfully"); }catch(LoginException lex){ throw new ServiceException(ErrorCodes.UNKNOWN_ERROR); }
UserActivityLogger.getInstance().logActivity(user.getName(), "logged out successfully");
public void logout(ServiceContext context, User user)throws ServiceException{ try{ loginContext.logout(); UserActivityLogger.getInstance().logActivity(user.getName(), "logged out successfully"); }catch(LoginException lex){ throw new ServiceException(...
Point bcp = new Point(Math.max(0, Math.min(tpsize.width, p.x)), Math.max(0, Math.min(tpsize.height, p.y))); boolean adjustX = bcp.y != 0 && bcp.y != tpsize.height; boolean adjustY = bcp.x != 0 && bcp.x != tpsize.width;
if (tp == relationship.getPkTable()) { if ((orientation & PARENT_FACES_LEFT) != 0) ep = new Point(0, Math.max(0, Math.min(tpsize.height, p.y))); else if ((orientation & PARENT_FACES_RIGHT) != 0) ep = new Point(tpsize.width, Math.max(0, Math.min(tpsize.height, p.y))); else if ((orientation & PARENT_FACES_TOP) != 0) ep...
public Point closestEdgePoint(TablePane tp, Point p) { Dimension tpsize = tp.getSize(); // clip point p to inside of tp Point bcp = new Point(Math.max(0, Math.min(tpsize.width, p.x)), Math.max(0, Math.min(tpsize.height, p.y))); boolean adjustX = bcp.y != 0 && bcp.y != tpsize.height; boolean adjustY = bc...
if (adjustX) { if (bcp.x < (tpsize.width/2)) { bcp.x = 0; } else { bcp.x = tpsize.width;
ep = new Point(Math.max(0, Math.min(tpsize.width, p.x)), Math.max(0, Math.min(tpsize.height, p.y))); boolean adjustX = ep.y != 0 && ep.y != tpsize.height; boolean adjustY = ep.x != 0 && ep.x != tpsize.width; if (adjustX) { if (ep.x < (tpsize.width/2)) { ep.x = 0; } else { ep.x = tpsize.width; }
public Point closestEdgePoint(TablePane tp, Point p) { Dimension tpsize = tp.getSize(); // clip point p to inside of tp Point bcp = new Point(Math.max(0, Math.min(tpsize.width, p.x)), Math.max(0, Math.min(tpsize.height, p.y))); boolean adjustX = bcp.y != 0 && bcp.y != tpsize.height; boolean adjustY = bc...
} if (adjustY) { if (bcp.y < (tpsize.height/2)) { bcp.y = 0; } else { bcp.y = tpsize.height;
if (adjustY) { if (ep.y < (tpsize.height/2)) { ep.y = 0; } else { ep.y = tpsize.height; }
public Point closestEdgePoint(TablePane tp, Point p) { Dimension tpsize = tp.getSize(); // clip point p to inside of tp Point bcp = new Point(Math.max(0, Math.min(tpsize.width, p.x)), Math.max(0, Math.min(tpsize.height, p.y))); boolean adjustX = bcp.y != 0 && bcp.y != tpsize.height; boolean adjustY = bc...
return bcp;
return ep;
public Point closestEdgePoint(TablePane tp, Point p) { Dimension tpsize = tp.getSize(); // clip point p to inside of tp Point bcp = new Point(Math.max(0, Math.min(tpsize.width, p.x)), Math.max(0, Math.min(tpsize.height, p.y))); boolean adjustX = bcp.y != 0 && bcp.y != tpsize.height; boolean adjustY = bc...
this.getRootPane().setDefaultButton(okButton);
void load(int ft){ fileType = ft; JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); JPanel filePanel = new JPanel(); filePanel.setLayout(new BoxLayout(filePanel, BoxLayout.Y_AXIS)); JPanel topFilePanel = new JPanel(); JPan...
if ( selected != null ) { String newName = (String) JOptionPane.showInputDialog( this, "Enter name for new folder", "New folder", JOptionPane.PLAIN_MESSAGE, null, null, "New folder" ); if ( newName != null ) { PhotoFolder newFolder = PhotoFolder.create( newName, selected ); } }
if ( selected != null ) { boolean ready = false; while ( !ready ) { String newName = (String) JOptionPane.showInputDialog( this, "Enter name for new folder", "New folder", JOptionPane.PLAIN_MESSAGE, null, null, "New folder" ); if ( newName != null ) { if ( newName.length() > PhotoFolder.NAME_LENGTH ) { JOptionPane.show...
void createNewFolder() { if ( selected != null ) { String newName = (String) JOptionPane.showInputDialog( this, "Enter name for new folder", "New folder", JOptionPane.PLAIN_MESSAGE, null, null, "New folder" ); if ( newName != null ) { PhotoFolder newFolder = PhotoFolder.create( new...
String newName = (String) JOptionPane.showInputDialog( this, "Enter new name", "Rename folder", JOptionPane.PLAIN_MESSAGE, null, null, origName ); if ( newName != null ) { PhotoFolder f = selected; f.setName( newName ); log.debug( "Changed name to " + newName ); } }
boolean ready = false; while ( !ready ) { String newName = (String) JOptionPane.showInputDialog( this, "Enter new name", "Rename folder", JOptionPane.PLAIN_MESSAGE, null, null, origName ); if ( newName != null ) { PhotoFolder f = selected; try { f.setName( newName ); ready = true; } catch ( IllegalArgumentException e )...
void renameSelectedFolder() { if ( selected != null ) { String origName = selected.getName(); String newName = (String) JOptionPane.showInputDialog( this, "Enter new name", "Rename folder", JOptionPane.PLAIN_MESSAGE, null, null, origName ); if ( newName != null ) { PhotoFolder f = s...
markerInfo.add(new SNP(String.valueOf(i), (i*4000), maf));
markerInfo.add(new SNP(String.valueOf(i), (i*3000), maf));
public void linkageToChrom(boolean[] markerResults, PedFile pedFile){ Vector indList = pedFile.getOrder(); int numMarkers = 0; Vector usedParents = new Vector(); Individual currentInd; Family currentFamily; Vector chrom = new Vector(); for(int x=0; x < indList.size()...
markerInfo.add(new SNP(String.valueOf(i), (i*4000), maf));
markerInfo.add(new SNP(String.valueOf(i), (i*3000), maf));
void prepareHapsInput(File infile) throws IOException{ //this method is called to suck in data from a file (its only argument) //of genotypes and sets up the Chromosome objects. String currentLine; Vector chroms = new Vector(); byte[] genos = new byte[0]; String ped, indiv;...
int prepareMarkerInput(File infile) throws IOException{
int prepareMarkerInput(File infile, long maxdist) throws IOException{
int prepareMarkerInput(File infile) throws IOException{ //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 String currentLine; Vector markers = new Vecto...
for (int pos2 = 1; pos2 < dPrimeTable.length; pos2++){ for (int pos1 = 0; pos1 < pos2; pos1++){ long sep = Chromosome.getMarker(pos1).getPosition() - Chromosome.getMarker(pos2).getPosition(); if (maxdist > 0){ if ((sep > maxdist || sep < negMaxdist)){ dPrimeTable[pos1][pos2] = null; continue; } } } }
int prepareMarkerInput(File infile) throws IOException{ //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 String currentLine; Vector markers = new Vecto...
public CreateRelationshipAction(PlayPen pp) {
public CreateRelationshipAction() {
public CreateRelationshipAction(PlayPen pp) { super("Create Relationship"); this.pp = pp; pp.addSelectionListener(this); }
this.pp = pp; pp.addSelectionListener(this);
setEnabled(false);
public CreateRelationshipAction(PlayPen pp) { super("Create Relationship"); this.pp = pp; pp.addSelectionListener(this); }
setShoresMixedCaseIdentifier(dbmd.storesMixedCaseIdentifiers()); setShoresUpperCaseIdentifier(dbmd.storesMixedCaseIdentifiers()); setShoresLowerCaseIdentifier(dbmd.storesMixedCaseIdentifiers());
public synchronized void populate() throws ArchitectException { if (populated) return; int oldSize = children.size(); logger.debug("SQLDatabase: populate starting"); Connection con = null; ResultSet rs = null; try { con = getConnection(); DatabaseMetaData dbmd = con.getMetaData(); rs = dbmd.getCatalogs...
EM(){
EM(Vector chromosomes, int numTrios){
EM(){ //an old-school speedup courtesy of mjdaly two_n[0]=1; for (int i=1; i<31; i++){ two_n[i]=2*two_n[i-1]; } }
this.chromosomes = chromosomes; this.numTrios = numTrios;
EM(){ //an old-school speedup courtesy of mjdaly two_n[0]=1; for (int i=1; i<31; i++){ two_n[i]=2*two_n[i-1]; } }
public EMReturn full_em_breakup( byte[][] input_haplos, int max_missing, int[] block_size, int dump_phased_haplos, int numTrios) throws HaploViewException{
private void full_em_breakup( byte[][] input_haplos, int[] block_size, int numTrios, Vector affStatus) throws HaploViewException{
public EMReturn full_em_breakup( byte[][] input_haplos, int max_missing, int[] block_size, int dump_phased_haplos, int numTrios) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//...
boolean trioPhasing = true;
public EMReturn full_em_breakup( byte[][] input_haplos, int max_missing, int[] block_size, int dump_phased_haplos, int numTrios) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//...
if (trioPhasing) {
if (Options.getAssocTest() == 2) {
public EMReturn full_em_breakup( byte[][] input_haplos, int max_missing, int[] block_size, int dump_phased_haplos, int numTrios) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//...
tempHap = (String)theHaplos.nextElement(); System.out.println(tempHap); } */
tempHap = (String)theHaplos.nextElement(); System.out.println(tempHap); } */ Vector caseFreqs = new Vector(); Vector controlFreqs = new Vector(); double[] tempCase, tempControl, totalCase, totalControl; if (Options.getAssocTest() == 1){ tempCase = new double[poss_full]; tempControl = new double[poss_full]; totalCase =...
public EMReturn full_em_breakup( byte[][] input_haplos, int max_missing, int[] block_size, int dump_phased_haplos, int numTrios) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//...
if(trioPhasing)
if(Options.getAssocTest() == 2)
public EMReturn full_em_breakup( byte[][] input_haplos, int max_missing, int[] block_size, int dump_phased_haplos, int numTrios) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//...
int best1=0,best2=0,h1,h2; double tempnorm=0,product,bestProduct=0;
double tempnorm=0,product;
public EMReturn full_em_breakup( byte[][] input_haplos, int max_missing, int[] block_size, int dump_phased_haplos, int numTrios) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//...
best1=0; best2=0; bestProduct=-999.999; tempnorm=0.00; for (int n=0; n<superdata[i].nsuper; n++) { for (int m=0; m<superdata[i+1].nsuper; m++) { if (kid_consistent(superdata[i].superposs[n].h1, superdata[i+1].superposs[m].h1,num_blocks, block_size,hlist,num_hlist,i/2,num_loci)) { product=superdata[i].superposs[n].p...
if (((Integer)affStatus.elementAt(i)).intValue() == 2){ tempnorm=0.00; for (int n=0; n<superdata[i].nsuper; n++) { for (int m=0; m<superdata[i+1].nsuper; m++) { if (kid_consistent(superdata[i].superposs[n].h1, superdata[i+1].superposs[m].h1,num_blocks, block_size,hlist,num_hlist,i/2,num_loci)) { product=superdata[i]....
public EMReturn full_em_breakup( byte[][] input_haplos, int max_missing, int[] block_size, int dump_phased_haplos, int numTrios) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//...
if (superdata[i].superposs[n].h1 != superdata[i].superposs[n].h2) { tempT[superdata[i].superposs[n].h1]+=product; tempU[superdata[i].superposs[n].h2]+=product;
} } if (tempnorm > 0.00) { for (int j=0; j<poss_full; j++) { if (tempT[j] > 0.0000 || tempU[j] > 0.0000) { totalT[j] += (tempT[j]/tempnorm); totalU[j] += (tempU[j]/tempnorm); tempT[j]=tempU[j]=0.0000;
public EMReturn full_em_breakup( byte[][] input_haplos, int max_missing, int[] block_size, int dump_phased_haplos, int numTrios) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//...
if (superdata[i+1].superposs[m].h1 != superdata[i+1].superposs[m].h2) { tempT[superdata[i+1].superposs[m].h1]+=product; tempU[superdata[i+1].superposs[m].h2]+=product; } tempnorm+=product;
public EMReturn full_em_breakup( byte[][] input_haplos, int max_missing, int[] block_size, int dump_phased_haplos, int numTrios) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//...
} } if (tempnorm > 0.00) { for (int j=0; j<poss_full; j++) { if (tempT[j] > 0.0000 || tempU[j] > 0.0000) { totalT[j] += (tempT[j]/tempnorm); totalU[j] += (tempU[j]/tempnorm); tempT[j]=tempU[j]=0.0000; } } tempnorm=0.00;
tempnorm=0.00; }
public EMReturn full_em_breakup( byte[][] input_haplos, int max_missing, int[] block_size, int dump_phased_haplos, int numTrios) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//...
EMReturn results;
public EMReturn full_em_breakup( byte[][] input_haplos, int max_missing, int[] block_size, int dump_phased_haplos, int numTrios) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//...
if (trioPhasing){ results = new EMReturn((int[][])haplos_present.toArray(new int[0][0]), freqs, obsT, obsU); }else{ results = new EMReturn((int[][])haplos_present.toArray(new int[0][0]), freqs); } return results;
this.haplotypes = (int[][])haplos_present.toArray(new int[0][0]); this.frequencies = freqs; if (Options.getAssocTest() == 2){ this.obsT = obsT; this.obsU = obsU; } else if (Options.getAssocTest() == 1){ this.caseFreqs = caseFreqs; this.controlFreqs = controlFreqs; }
public EMReturn full_em_breakup( byte[][] input_haplos, int max_missing, int[] block_size, int dump_phased_haplos, int numTrios) throws HaploViewException{ int num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_locus, end_locus, biggest_block_size; int poss_full;//...
suite.addTestSuite(TestRelationship.class);
public static Test suite() { TestSuite suite = new TestSuite("Test for Architect's Swing GUI"); //$JUnit-BEGIN$ suite.addTestSuite(TestSwingUIProject.class); suite.addTestSuite(TestArchitectFrame.class); suite.addTestSuite(TestAutoLayoutAction.class); suite.addTestSuite(TestPlayPen.class); suite.addTestSuite(...
public float getFStop() {
public double getFStop() {
public float getFStop() { return FStop; }
public float getFocalLength() {
public double getFocalLength() {
public float getFocalLength() { return focalLength; }