public void set(MouseEvent e, SAMRecord sr) { if (sr == null) return; StringBuffer text = new StringBuffer(); text.append("<html>"); if (sr != null) { text.append( MessageManager.getString("shortreadtrack.name") + " " + sr.getReadName() + "<br/>"); text.append( MessageManager.getString("shortreadtrack.len") + " " + sr.getReadLength() + "<br/>"); text.append( MessageManager.getString("shortreadtrack.cigar") + " " + sr.getCigarString() + "<br/>"); text.append( MessageManager.getString("shortreadtrack.sequence") + " " + rerun(sr.getReadString()) + "<br/>"); text.append( MessageManager.getString("shortreadtrack.paired") + " " + sr.getReadPairedFlag() + "<br/>"); if (sr.getReadPairedFlag()) { if (!sr.getMateUnmappedFlag()) text.append( MessageManager.getString("shortreadtrack.mate") + " " + sr.getMateReferenceName() + ":" + sr.getMateAlignmentStart() + "<br/>"); else text.append(MessageManager.getString("shortreadtrack.mate_missing") + "<br/>"); text.append( MessageManager.getString("shortreadtrack.second") + " " + sr.getFirstOfPairFlag()); } // text.append("<br/>"); } text.append("</html>"); if (!text.toString().equals(floater.getText())) { floater.setText(text.toString()); this.pack(); } setLocation(e.getXOnScreen() + 5, e.getYOnScreen() + 5); if (!isVisible()) { setVisible(true); } }
protected TrackConfig(Model model, DataKey dataKey) { this.dataKey = dataKey; this.model = model; guicontainer.add( new JLabel(MessageManager.getString("trackconfig.track_key") + " \n" + dataKey), guicontainer.gc); guicontainer.gc.gridy++; guicontainer.add( new StringConfig( "track:alias:" + dataKey, MessageManager.getString("trackconfig.track_alias"), model), guicontainer.gc); guicontainer.gc.gridy++; Configuration.getVisible(dataKey); guicontainer.add( new BooleanConfig( "track:visible:" + dataKey, MessageManager.getString("trackconfig.track_visible"), model), guicontainer.gc); guicontainer.gc.gridy++; guicontainer.add( new BooleanConfig( "track:highlight:" + dataKey, MessageManager.getString("trackconfig.track_highlight"), model), guicontainer.gc); if (isCollapsible()) { guicontainer.gc.gridy++; guicontainer.add( new BooleanConfig( "track:collapsed:" + dataKey, MessageManager.getString("trackconfig.track_collapsed"), model), guicontainer.gc); } }
public void set(MouseEvent e, ShortReadInsertion sri) { if (sri == null) return; StringBuffer text = new StringBuffer(); text.append("<html>"); if (sri != null) { text.append(MessageManager.getString("shortreadtrack.insertion") + " "); byte[] bases = sri.esr.getReadBases(); for (int i = sri.start; i < sri.start + sri.len; i++) { text.append((char) bases[i]); } text.append("<br/>"); } text.append("</html>"); if (!text.toString().equals(floater.getText())) { floater.setText(text.toString()); this.pack(); } setLocation(e.getXOnScreen() + 5, e.getYOnScreen() + 5); if (!isVisible()) { setVisible(true); } }