rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
String testImgDir = "c:\\java\\photovault\\testfiles";
public void testGetThumbnail() { String testImgDir = "c:\\java\\photovault\\testfiles"; String fname = "test1.jpg"; File f = new File( testImgDir, fname ); PhotoInfo photo = null; try { photo = PhotoInfo.addToDB( f ); } catch ( PhotoNotFoundException e ) { fail( "Could not find photo: " + e.getMessage() ); ...
File testFile = new File( "c:\\java\\photovault\\testfiles\\test1.jpg" );
File testFile = new File( testImgDir, "test1.jpg" );
public void testInstanceAddition() { File testFile = new File( "c:\\java\\photovault\\testfiles\\test1.jpg" ); File instanceFile = Volume.getDefaultVolume().getFilingFname( testFile ); try { FileUtils.copyFile( testFile, instanceFile ); } catch ( IOException e ) { fail( e.getMessage() ); } PhotoInfo photo =...
File testFile = new File( "c:\\java\\photovault\\testfiles\\test1.jpg" );
File testFile = new File( testImgDir, "test1.jpg" );
public void testThumbWithNoInstances() { PhotoInfo photo = PhotoInfo.create(); Thumbnail thumb = photo.getThumbnail(); assertTrue( "getThumbnail should return default thumbnail", thumb == Thumbnail.getDefaultThumbnail() ) ; assertEquals( "No new instances should have been created", 0, photo.getNumInstances() )...
String testImgDir = "c:\\java\\photovault\\testfiles";
public void testThumbnailCreate() { String testImgDir = "c:\\java\\photovault\\testfiles"; String fname = "test1.jpg"; File f = new File( testImgDir, fname ); PhotoInfo photo = null; try { photo = PhotoInfo.addToDB( f ); } catch ( PhotoNotFoundException e ) { fail( "Could not find photo: " + e.getMessage() ...
String testImgDir = "c:\\java\\photovault\\testfiles";
public void testThumbnailCreateCorruptInstances() throws Exception { String testImgDir = "c:\\java\\photovault\\testfiles"; String fname = "test1.jpg"; File f = new File( testImgDir, fname ); PhotoInfo photo = null; try { photo = PhotoInfo.addToDB( f ); } catch ( PhotoNotFoundException e ) { fail( "Could n...
String testImgDir = "c:\\java\\photovault\\testfiles";
public void testThumbnailRotation() { String testImgDir = "c:\\java\\photovault\\testfiles"; String fname = "test1.jpg"; File f = new File( testImgDir, fname ); PhotoInfo photo = null; try { photo = PhotoInfo.addToDB( f ); } catch ( PhotoNotFoundException e ) { fail( "Could not find photo: " + e.getMessage(...
String testImgDir = "c:\\_directoryThatDoesNotExist";
public void testfailedCreation() { String testImgDir = "c:\\_directoryThatDoesNotExist"; String fname = "test1.jpg"; File f = new File( testImgDir, fname ); PhotoInfo photo = null; try { photo = PhotoInfo.addToDB( f ); // Execution should never proceed this far since addToDB // should produce exception...
File f = new File( testImgDir, fname );
File f = new File( nonExistingDir, fname );
public void testfailedCreation() { String testImgDir = "c:\\_directoryThatDoesNotExist"; String fname = "test1.jpg"; File f = new File( testImgDir, fname ); PhotoInfo photo = null; try { photo = PhotoInfo.addToDB( f ); // Execution should never proceed this far since addToDB // should produce exception...
protected void createThumbnail() { Volume vol = Volume.getDefaultVolume(); createThumbnail( vol );
protected void createThumbnail( Volume volume ) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance instance = (ImageInstance) instances.get( n ); if ( instance.getInstanceType() == ImageInstance.I...
protected void createThumbnail() { Volume vol = Volume.getDefaultVolume(); createThumbnail( vol ); }
File f = new File( "c:\\temp", "error_" + file.getName() );
File f = new File( tmpDir, "error_" + file.getName() );
public static boolean compareImgToFile( BufferedImage img, File file ) { if ( file.exists() ) { System.err.println( "File " + file.getName() + " exists" ); BufferedImage fImg = null; try { fImg = ImageIO.read( file ); System.err.println( "Read image" ); } catch ( IOException e ) { System.err.p...
return (byte)CHARSET[getRandomInt()];
return (byte)(Math.random() * 255);
public static byte getRandomByte() { return (byte)CHARSET[getRandomInt()]; }
UserActivityLogger logger = UserActivityLogger.getInstance(); logger.log(context.getUser().getUsername(),"Add User", user.getName()+"/"+user.getPassword());
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
org.apache.log4j.Logger folderLog = org.apache.log4j.Logger.getLogger( PhotoFolder.class.getName() ); folderLog.setLevel( org.apache.log4j.Level.DEBUG );
public static void main( String[] args ) { org.apache.log4j.BasicConfigurator.configure(); log.setLevel( org.apache.log4j.Level.DEBUG ); JFrame frame = new JFrame( "PhotoFoldertree test" ); PhotoFolderTree view = new PhotoFolderTree(); frame.getContentPane().add( view, BorderLayout.CENTER ); frame.addWindowListener...
log.warn( "Not implemented: 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 = selected; f.setName( newName ); f.setDescription( "Changed name to "...
void renameSelectedFolder() { log.warn( "Not implemented: renameSelectedFolder()" ); }
ODMGXAWrapper txw = new ODMGXAWrapper(); Implementation odmg = ODMG.getODMGImplementation();
PhotoFolder rootFolder = PhotoFolder.rootFolder; if ( rootFolder == null ) { ODMGXAWrapper txw = new ODMGXAWrapper(); Implementation odmg = ODMG.getODMGImplementation();
public static PhotoFolder getRoot() { ODMGXAWrapper txw = new ODMGXAWrapper(); Implementation odmg = ODMG.getODMGImplementation(); DList folders = null; boolean mustCommit = false; try { OQLQuery query = odmg.newOQLQuery(); query.create( "select folders from " + PhotoFolder.class.getName() + " where folder...
DList folders = null; boolean mustCommit = false; try { OQLQuery query = odmg.newOQLQuery(); query.create( "select folders from " + PhotoFolder.class.getName() + " where folderId = 1" ); folders = (DList) query.execute(); } catch ( Exception e ) { txw.abort(); return null; } PhotoFolder rootFolder = (PhotoFolder) folde...
DList folders = null; boolean mustCommit = false; try { OQLQuery query = odmg.newOQLQuery(); query.create( "select folders from " + PhotoFolder.class.getName() + " where folderId = 1" ); folders = (DList) query.execute(); } catch ( Exception e ) { txw.abort(); return null; } rootFolder = (PhotoFolder) folders.get( 0 );...
public static PhotoFolder getRoot() { ODMGXAWrapper txw = new ODMGXAWrapper(); Implementation odmg = ODMG.getODMGImplementation(); DList folders = null; boolean mustCommit = false; try { OQLQuery query = odmg.newOQLQuery(); query.create( "select folders from " + PhotoFolder.class.getName() + " where folder...
public PrintPreviewPanel(PrintPanel settings) { this.settings = settings;
public PrintPreviewPanel() {
public PrintPreviewPanel(PrintPanel settings) { this.settings = settings; setDoubleBuffered(false); settings.addPropertyChangeListener(this); }
settings.addPropertyChangeListener(this);
PrintPanel.this.addPropertyChangeListener(this); PreviewZoomAdjuster adjuster = new PreviewZoomAdjuster(); addMouseMotionListener(adjuster); addMouseListener(adjuster);
public PrintPreviewPanel(PrintPanel settings) { this.settings = settings; setDoubleBuffered(false); settings.addPropertyChangeListener(this); }
settings.validateLayout(); double iW = settings.pageFormat.getImageableWidth(); double iH = settings.pageFormat.getImageableHeight(); double printoutWidth = settings.pagesAcross * iW; double printoutHeight = settings.pagesDown * iH;
validateLayout(); double iW = pageFormat.getImageableWidth(); double iH = pageFormat.getImageableHeight(); double printoutWidth = pagesAcross * iW; double printoutHeight = pagesDown * iH;
public Dimension getPreferredSize() { settings.validateLayout(); double iW = settings.pageFormat.getImageableWidth(); double iH = settings.pageFormat.getImageableHeight(); double printoutWidth = settings.pagesAcross * iW; double printoutHeight = settings.pagesDown * iH; double preferredScale = 500.0/print...
settings.validateLayout(); double iW = settings.pageFormat.getImageableWidth(); double iH = settings.pageFormat.getImageableHeight(); double printoutWidth = settings.pagesAcross * iW; double printoutHeight = settings.pagesDown * iH;
validateLayout();
public void paintComponent(Graphics g) { settings.validateLayout(); double iW = settings.pageFormat.getImageableWidth(); double iH = settings.pageFormat.getImageableHeight(); double printoutWidth = settings.pagesAcross * iW; double printoutHeight = settings.pagesDown * iH; // create a bitmapped image of t...
g2.setColor(settings.getBackground());
g2.setColor(pp.getBackground());
public void paintComponent(Graphics g) { settings.validateLayout(); double iW = settings.pageFormat.getImageableWidth(); double iH = settings.pageFormat.getImageableHeight(); double printoutWidth = settings.pagesAcross * iW; double printoutHeight = settings.pagesDown * iH; // create a bitmapped image of t...
double previewZoomX = (double) getWidth() / printoutWidth; double previewZoomY = (double) getHeight() / printoutHeight; double zoom = Math.min(previewZoomX, previewZoomY);
double zoom = calculateZoom();
public void paintComponent(Graphics g) { settings.validateLayout(); double iW = settings.pageFormat.getImageableWidth(); double iH = settings.pageFormat.getImageableHeight(); double printoutWidth = settings.pagesAcross * iW; double printoutHeight = settings.pagesDown * iH; // create a bitmapped image of t...
logger.debug("After scaling, preview will seem to be size ("+scaledWidth+","+scaledHeight+")");
public void paintComponent(Graphics g) { settings.validateLayout(); double iW = settings.pageFormat.getImageableWidth(); double iH = settings.pageFormat.getImageableHeight(); double printoutWidth = settings.pagesAcross * iW; double printoutHeight = settings.pagesDown * iH; // create a bitmapped image of t...
if (logger.isDebugEnabled()) { Dimension ppSize = pp.getPreferredSize(); logger.debug("PlayPen preferred size = "+ppSize.width+"x"+ppSize.height); logger.debug("After scaling, preview panel coordinate space is "+scaledWidth+"x"+scaledHeight); }
public void paintComponent(Graphics g) { settings.validateLayout(); double iW = settings.pageFormat.getImageableWidth(); double iH = settings.pageFormat.getImageableHeight(); double printoutWidth = settings.pagesAcross * iW; double printoutHeight = settings.pagesDown * iH; // create a bitmapped image of t...
g2.translate((scaledWidth - printoutWidth) / 2, (scaledHeight - printoutHeight) / 2); AffineTransform backup = g2.getTransform(); g2.setColor(settings.pp.getBackground()); g2.fill(new Rectangle(0, 0, (int) printoutWidth, (int) printoutHeight));
public void paintComponent(Graphics g) { settings.validateLayout(); double iW = settings.pageFormat.getImageableWidth(); double iH = settings.pageFormat.getImageableHeight(); double printoutWidth = settings.pagesAcross * iW; double printoutHeight = settings.pagesDown * iH; // create a bitmapped image of t...
g2.scale(settings.zoom, settings.zoom);
public void paintComponent(Graphics g) { settings.validateLayout(); double iW = settings.pageFormat.getImageableWidth(); double iH = settings.pageFormat.getImageableHeight(); double printoutWidth = settings.pagesAcross * iW; double printoutHeight = settings.pagesDown * iH; // create a bitmapped image of t...
logger.debug("Printout size = ("+printoutWidth+","+printoutHeight +"); playpen size = "+settings.pp.getPreferredSize());
public void paintComponent(Graphics g) { settings.validateLayout(); double iW = settings.pageFormat.getImageableWidth(); double iH = settings.pageFormat.getImageableHeight(); double printoutWidth = settings.pagesAcross * iW; double printoutHeight = settings.pagesDown * iH; // create a bitmapped image of t...
SwingUtilities.paintComponent(g2, settings.pp, new Container(), 0, 0, (int) (printoutWidth/settings.zoom), (int) (printoutHeight/settings.zoom)); ArchitectFrame.getMainInstance().splitPane.setRightComponent(settings.pp);
SwingUtilities.paintComponent(g2, pp, new Container(), 0, 0, scaledWidth, scaledHeight); ArchitectFrame.getMainInstance().splitPane.setRightComponent(pp);
public void paintComponent(Graphics g) { settings.validateLayout(); double iW = settings.pageFormat.getImageableWidth(); double iH = settings.pageFormat.getImageableHeight(); double printoutWidth = settings.pagesAcross * iW; double printoutHeight = settings.pagesDown * iH; // create a bitmapped image of t...
g2.setTransform(backup); g2.setColor(getForeground()); for (int i = 0; i <= settings.pagesAcross; i++) { g2.drawLine((int) (i * iW), 0, (int) (i * iW), (int) printoutHeight); logger.debug("Drew page separator at x="+(i*iW));
double iW = pageFormat.getImageableWidth(); double iH = pageFormat.getImageableHeight(); g2.scale(1/PrintPanel.this.zoom, 1/PrintPanel.this.zoom); g2.setColor(pp.getForeground()); for (int i = 0; i <= pagesAcross; i++) { g2.drawLine((int) (i * iW), 0, (int) (i * iW), (int) (scaledHeight*PrintPanel.this.zoom)); if (log...
public void paintComponent(Graphics g) { settings.validateLayout(); double iW = settings.pageFormat.getImageableWidth(); double iH = settings.pageFormat.getImageableHeight(); double printoutWidth = settings.pagesAcross * iW; double printoutHeight = settings.pagesDown * iH; // create a bitmapped image of t...
for (int i = 0; i <= settings.pagesDown; i++) { g2.drawLine(0, (int) (i * iH), (int) printoutWidth, (int) (i * iH)); logger.debug("Drew page separator at y="+(i*iH));
for (int i = 0; i <= pagesDown; i++) { g2.drawLine(0, (int) (i * iH), (int) (scaledWidth*PrintPanel.this.zoom), (int) (i * iH)); if (logger.isDebugEnabled()) logger.debug("Drew page separator at y="+(i*iH));
public void paintComponent(Graphics g) { settings.validateLayout(); double iW = settings.pageFormat.getImageableWidth(); double iH = settings.pageFormat.getImageableHeight(); double printoutWidth = settings.pagesAcross * iW; double printoutHeight = settings.pagesDown * iH; // create a bitmapped image of t...
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
public PrintPanel(PlayPen pp) { super(); setOpaque(true); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.pp = pp; job = PrinterJob.getPrinterJob(); jobAttributes = new HashPrintRequestAttributeSet(); pageFormat = job.defaultPage(); JPanel formPanel = new JPanel(new FormLayout()); formPanel.add(new JLa...
add(new PrintPreviewPanel());
public PrintPanel(PlayPen pp) { super(); setOpaque(true); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.pp = pp; job = PrinterJob.getPrinterJob(); jobAttributes = new HashPrintRequestAttributeSet(); pageFormat = job.defaultPage(); JPanel formPanel = new JPanel(new FormLayout()); formPanel.add(new JLa...
throws ClassNotFoundException, InstantiationException, IllegalAccessException { log.info("Loading JDBC driver: [" + driverClassName + "]");
throws ClassNotFoundException, InstantiationException, IllegalAccessException {
public void setDriverClassName(String driverClassName) throws ClassNotFoundException, InstantiationException, IllegalAccessException { log.info("Loading JDBC driver: [" + driverClassName + "]"); this.driverClassName = driverClassName; getClass().getClassLoader().loadClass(driverClassName).newInstance(); }
this.driverClassName = driverClassName; getClass().getClassLoader().loadClass(driverClassName).newInstance(); }
if (log.isDebugEnabled()) { log.debug("Loading JDBC driver: [" + driverClassName + "]"); } this.driverClassName = driverClassName; getClass().getClassLoader().loadClass(driverClassName).newInstance(); }
public void setDriverClassName(String driverClassName) throws ClassNotFoundException, InstantiationException, IllegalAccessException { log.info("Loading JDBC driver: [" + driverClassName + "]"); this.driverClassName = driverClassName; getClass().getClassLoader().loadClass(driverClassName).newInstance(); }
log.info("Setting url to: " + jdbcURL); this.jdbcURL = jdbcURL; }
this.jdbcURL = jdbcURL; }
public void setJdbcURL(String jdbcURL) { log.info("Setting url to: " + jdbcURL); this.jdbcURL = jdbcURL; }
} else if (str.startsWith("\\q")){ System.exit(0);
private void doEscape(String str) throws IOException, SQLException, ArchitectException { String rest = null; if (str.length() > 2) { rest = str.substring(2); } if (str.startsWith("\\d")) { // Display if (rest == null){ throw new ArchitectException("\\d needs display arg"); } display(rest); } else if...
public static void deleteApplication(String applicationId) {
public static ApplicationConfig deleteApplication(String applicationId) {
public static void deleteApplication(String applicationId) { assert applicationId != null: "applicationId is null"; ApplicationConfig config = getApplicationConfig(applicationId); assert config != null: "there is no application with id="+applicationId; deleteApplication(config); }
return(config);
public static void deleteApplication(String applicationId) { assert applicationId != null: "applicationId is null"; ApplicationConfig config = getApplicationConfig(applicationId); assert config != null: "there is no application with id="+applicationId; deleteApplication(config); }
List<DashboardConfig> dashboardConfigList = null; Element dashboards = config.getRootElement().getChild(DASHBOARDS); if(dashboards != null){ dashboardConfigList = getDashboardConfigList(dashboards.getChildren()); }else{ dashboardConfigList = new LinkedList<DashboardConfig>(); } return new Config(appConfigList, dashboar...
return new Config(appConfigList);
public Config read(){ List applications = config.getRootElement().getChild(APPLICATIONS).getChildren(); List<ApplicationConfig> appConfigList = getApplicationConfigList(applications, null); List<DashboardConfig> dashboardConfigList = null; Element dashboards = config.getRo...
for(Iterator it=config.getApplications().iterator(); it.hasNext();){ ApplicationConfig application = (ApplicationConfig)it.next();
for(ApplicationConfig application : config.getApplications()){
public void write(Config config) { try { Document doc = new Document(); Element rootElement = new Element(ConfigConstants.APPLICATION_CONFIG); /* applications */ Element applicationsElement = new Element(ConfigConstants.APPLICATIONS); rootElement.addCont...
Element dashboardsElement = new Element(ConfigConstants.DASHBOARDS); rootElement.addContent(dashboardsElement); for(Iterator it=config.getDashboards().iterator(); it.hasNext();){ DashboardConfig dashboard = (DashboardConfig)it.next(); Element dashboardElement = new Element(ConfigConstants.DASHBOARD);; dashboardElement....
public void write(Config config) { try { Document doc = new Document(); Element rootElement = new Element(ConfigConstants.APPLICATION_CONFIG); /* applications */ Element applicationsElement = new Element(ConfigConstants.APPLICATIONS); rootElement.addCont...
(int)(Options.getSpacingThreshold()*100));
(int)(Options.getSpacingThreshold()*200));
public ProportionalSpacingDialog(HaploView h, String title){ super (h, title); hv = h; JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); JSlider slider = new JSlider(0,100, (int)(Options.getSpacingThreshold()*100)); ...
Options.setSpacingThreshold(thresh);
Options.setSpacingThreshold(thresh*0.5);
public void stateChanged(ChangeEvent e) { JSlider source = (JSlider)e.getSource(); if (!source.getValueIsAdjusting()) { double thresh = ((double)source.getValue())/100; Options.setSpacingThreshold(thresh); hv.dPrimeDisplay.computePreferredSize(); if (hv.dPri...
} catch (ArchitectException ex) { logger.error("Error in Profile Action ", ex); ASUtils.showExceptionDialog(dbTree, "Error during profile run", ex);
} catch (ArchitectException e1) { e1.printStackTrace();
public void taskFinished(TaskTerminationEvent e) { System.out.println("\n\n\n========================================="); try { for ( SQLTable t : tables ) { ProfileResult pr = profileManager.getResult(t); System.out.println(...
d = new JDialog(ArchitectFrame.getMainInstance(), "Table Profiles"); ProfilePanel p = new ProfilePanel(); List<SQLTable> list = new ArrayList(tables); p.setTables(list);
d = new JDialog(ArchitectFrame.getMainInstance(),"Table Profiles"); final JPanel cp = new JPanel(new BorderLayout()); final JProgressBar bar = new JProgressBar(); bar.setPreferredSize(new Dimension(450,20)); cp.add(bar, BorderLayout.CENTER); cp.add(buttonPanel, BorderLayout.SOUTH);
public void actionPerformed(ActionEvent e) { if (dbTree == null) { logger.debug("dbtree was null when actionPerformed called"); return; } try { if ( dbTree.getSelectionPaths() == null ) return; final Set <SQLTable> tables = ...
d.setContentPane(p);
d.getRootPane().setDefaultButton(okButton); d.setContentPane(cp);
public void actionPerformed(ActionEvent e) { if (dbTree == null) { logger.debug("dbtree was null when actionPerformed called"); return; } try { if ( dbTree.getSelectionPaths() == null ) return; final Set <SQLTable> tables = ...
new ProgressWatcher(bar,profileManager); new Thread( new Runnable() { public void run() { try { profileManager.createProfiles(tables);
public void actionPerformed(ActionEvent e) { if (dbTree == null) { logger.debug("dbtree was null when actionPerformed called"); return; } try { if ( dbTree.getSelectionPaths() == null ) return; final Set <SQLTable> tables = ...
FileOutputStream file = null; ByteArrayOutputStream buffer = new ByteArrayOutputStream(); List tabList = new ArrayList(tables); try { new ProfilePDFFormat().createPdf(buffer,tabList,profileManager); file = new FileOutputStream(new File("M:\\architect_profile.pdf")); buffer.writeTo(file); } catch (Exception e) { ASUtils...
public void actionPerformed(ActionEvent e) { if (dbTree == null) { logger.debug("dbtree was null when actionPerformed called"); return; } try { if ( dbTree.getSelectionPaths() == null ) return; final Set <SQLTable> tables = ...
public synchronized void createProfiles(Collection<SQLTable> tables ) throws SQLException, ArchitectException { createProfiles(tables,null);
public synchronized void createProfiles(Collection<SQLTable> tables, JLabel workingOn) throws SQLException, ArchitectException { synchronized (monitorableMutex) { int objCount = 0; for (SQLTable t : tables) { objCount += 1; objCount += t.getColumns().size(); } jobSize = new Integer(objCount); finished = false; progress...
public synchronized void createProfiles(Collection<SQLTable> tables ) throws SQLException, ArchitectException { createProfiles(tables,null); }
totalColumn = headings.length;
public ProfilePDFFormat() { super(); // TODO Auto-generated constructor stub }
public static void createPdf(OutputStream out,
public void createPdf(OutputStream out,
public static void createPdf(OutputStream out, java.util.List<SQLTable> tables, ProfileManager pm) throws DocumentException, IOException, SQLException, ArchitectException, InstantiationException, IllegalAccessExceptio...
final int minRowsTogether = 5;
final int minRowsTogether = 1;
public static void createPdf(OutputStream out, java.util.List<SQLTable> tables, ProfileManager pm) throws DocumentException, IOException, SQLException, ArchitectException, InstantiationException, IllegalAccessExceptio...
final float fsize = 12f;
final float fsize = 6f;
public static void createPdf(OutputStream out, java.util.List<SQLTable> tables, ProfileManager pm) throws DocumentException, IOException, SQLException, ArchitectException, InstantiationException, IllegalAccessExceptio...
int vcols = 18; float[] widths = new float[vcols];
float[] widths = new float[totalColumn];
public static void createPdf(OutputStream out, java.util.List<SQLTable> tables, ProfileManager pm) throws DocumentException, IOException, SQLException, ArchitectException, InstantiationException, IllegalAccessExceptio...
ProfileResult tpr = pm.getResult(t);
public static void createPdf(OutputStream out, java.util.List<SQLTable> tables, ProfileManager pm) throws DocumentException, IOException, SQLException, ArchitectException, InstantiationException, IllegalAccessExceptio...
public static void showExceptionDialogNoReport(Component parent,String string, Throwable ex) { displayExceptionDialog(parent, string, ex); }
public static void showExceptionDialogNoReport(String string, Throwable ex) { displayExceptionDialog(ArchitectFrame.getMainInstance(), string, ex); }
public static void showExceptionDialogNoReport(Component parent,String string, Throwable ex) { displayExceptionDialog(parent, string, ex); }
Set mbeans = connection.queryNames(monitorObjName); if(mbeans != null && mbeans.size() > 0){ connection.unregisterMBean(monitorObjName); }
public void register(AlertHandler handler, String alertId, String alertName){ assert this.handler == null; assert connection == null; this.handler = handler; /* start looking for this notification */ connection = ServerConnector.getS...
connection.removeNotificationListener(monitorObjName, listener, filter, null);
try { connection.removeNotificationListener(monitorObjName, listener, filter, null); } catch (Exception e) { logger.log(Level.WARNING, "Error while Removing Notification Listener", e); }
public void unregister() { assert connection != null; assert monitorObjName != null; /* remove notification listener */ connection.removeNotificationListener(monitorObjName, listener, filter, null); /* unregister GaugeMonitor MBean */ connection.unregisterMBea...
connection.unregisterMBean(monitorObjName);
try { connection.unregisterMBean(monitorObjName); } catch (Exception e) { logger.log(Level.WARNING, "Error while unregistering MBean: " + monitorObjName, e); }
public void unregister() { assert connection != null; assert monitorObjName != null; /* remove notification listener */ connection.removeNotificationListener(monitorObjName, listener, filter, null); /* unregister GaugeMonitor MBean */ connection.unregisterMBea...
logger.info("Connected to " + appConfig.getURL());
getServerConnection(ApplicationConfig appConfig) throws ConnectionFailedException{ ModuleConfig moduleConfig = ModuleRegistry.getModule(appConfig.getType()); assert moduleConfig != null: "Invalid type=" + appConfig.getType(); final ClassLoader classLoader = mod...
public AlertInfo(ObjectNotification notification){ setAlertId(notification.getType() + System.currentTimeMillis()); setType(notification.getType()); setSequenceNumber(notification.getSequenceNumber()); setMessage(notification.getMessage()); setTimeStamp(notification.getTimeStamp()); setUserData(notification.getUserDat...
public AlertInfo(){}
public AlertInfo(ObjectNotification notification){ // todo: figure out a better way to generate unique alert ids setAlertId(notification.getType() + System.currentTimeMillis()); setType(notification.getType()); setSequenceNumber(notification.getSequenceNumber()); setMessage(notifi...
public TextScript(String text) { this.text = text;
public TextScript() {
public TextScript(String text) { this.text = text; }
if (myRating%(-2) != 0){ myRating++;
myRating *= -1; if ((myRating & 1) != 0){
public Component getTableCellRendererComponent (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component cell = super.getTableCellRendererComponent (table, value, isSelected, hasFocus, row, column); int myRating = ((CheckDataTableModel)table....
if (myRating%(-4) != 0){ myRating += 2;
if ((myRating & 2) != 0){
public Component getTableCellRendererComponent (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component cell = super.getTableCellRendererComponent (table, value, isSelected, hasFocus, row, column); int myRating = ((CheckDataTableModel)table....
if (myRating%(-8) != 0){ myRating += 4;
if ((myRating & 4) != 0){
public Component getTableCellRendererComponent (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component cell = super.getTableCellRendererComponent (table, value, isSelected, hasFocus, row, column); int myRating = ((CheckDataTableModel)table....
if (myRating < -7 && thisColumnName.equals("MendErr")){ cell.setForeground(Color.red);
if ((myRating & 8) != 0){ if (thisColumnName.equals("MendErr")){ cell.setForeground(Color.red); }
public Component getTableCellRendererComponent (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component cell = super.getTableCellRendererComponent (table, value, isSelected, hasFocus, row, column); int myRating = ((CheckDataTableModel)table....
if ((myRating & 16) != 0){ if (thisColumnName.equals("MAF")){ cell.setForeground(Color.red); } }
public Component getTableCellRendererComponent (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component cell = super.getTableCellRendererComponent (table, value, isSelected, hasFocus, row, column); int myRating = ((CheckDataTableModel)table....
public CheckDataPanel(File file, int type) throws IOException, PedFileException{
public CheckDataPanel(PedFile pf) throws IOException, PedFileException{
public CheckDataPanel(File file, int type) throws IOException, PedFileException{ setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); //okay, for now we're going to assume the ped file has no header Vector pedFileStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileRead...
Vector pedFileStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(file)); String line; while((line = reader.readLine())!=null){ if (line.length() == 0){ continue; } if (line.startsWith("#")){ continue; } pedFileStrings.add(line); } pedfile = new PedFile(); if (type == 3){ pedfile.parseL...
pedfile = pf;
public CheckDataPanel(File file, int type) throws IOException, PedFileException{ setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); //okay, for now we're going to assume the ped file has no header Vector pedFileStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileRead...
int[] ratingArray = new int[numResults];
int[] markerRatings = new int[numResults];
public CheckDataPanel(File file, int type) throws IOException, PedFileException{ setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); //okay, for now we're going to assume the ped file has no header Vector pedFileStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileRead...
ratingArray[i] = currentResult.getRating();
markerRatings[i] = currentResult.getRating();
public CheckDataPanel(File file, int type) throws IOException, PedFileException{ setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); //okay, for now we're going to assume the ped file has no header Vector pedFileStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileRead...
final CheckDataTableModel tableModel = new CheckDataTableModel(tableColumnNames, tableData, ratingArray);
final CheckDataTableModel tableModel = new CheckDataTableModel(tableColumnNames, tableData, markerRatings);
public CheckDataPanel(File file, int type) throws IOException, PedFileException{ setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); //okay, for now we're going to assume the ped file has no header Vector pedFileStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileRead...
table.setValueAt(new Boolean(true),i,7);
table.setValueAt(new Boolean(true),i,STATUS_COL);
public void redoRatings(){ try{ Vector result = pedfile.check(); for (int i = 0; i < table.getRowCount(); i++){ MarkerResult cur = (MarkerResult)result.get(i); int rating = cur.getRating(); if (rating > 0){ table.setValueAt...
table.setValueAt(new Boolean(false),i,7);
table.setValueAt(new Boolean(false),i,STATUS_COL);
public void redoRatings(){ try{ Vector result = pedfile.check(); for (int i = 0; i < table.getRowCount(); i++){ MarkerResult cur = (MarkerResult)result.get(i); int rating = cur.getRating(); if (rating > 0){ table.setValueAt...
}catch (PedFileException pfe){
((CheckDataTableModel)table.getModel()).ratings = ratings; table.repaint(); }catch (Exception e){ e.printStackTrace();
public void redoRatings(){ try{ Vector result = pedfile.check(); for (int i = 0; i < table.getRowCount(); i++){ MarkerResult cur = (MarkerResult)result.get(i); int rating = cur.getRating(); if (rating > 0){ table.setValueAt...
table.setValueAt(new Boolean(true), i, 7);
table.setValueAt(new Boolean(true), i, STATUS_COL);
public void selectAll(){ for (int i = 0; i < table.getRowCount(); i++){ table.setValueAt(new Boolean(true), i, 7); } }
if (e.getColumn() == 7){
if (e.getColumn() == STATUS_COL){
public void tableChanged(TableModelEvent e) { if (e.getColumn() == 7){ changed = true; } }
if (! xpath.evaluateAsBoolean(context)) {
Object xpathContext = getXPathContext(); if (! xpath.booleanValueOf(xpathContext)) {
public void doTag(XMLOutput output) throws Exception { if (test == null && xpath == null) { throw new MissingAttributeException( "test" ); } if (test != null) { if (! test.evaluateAsBoolean(context)) { fail( getBodyText(), "evaluating test: "+ test ); ...
public void setXpath(Expression xpath) {
public void setXpath(XPath xpath) {
public void setXpath(Expression xpath) { this.xpath = xpath; }
public boolean evaluateAsBoolean(Context context);
public boolean evaluateAsBoolean(JellyContext context);
public boolean evaluateAsBoolean(Context context);
JComponent[] fields = new JComponent[] {dbNameField,
JComponent[] fields = new JComponent[] {historyBox, dbNameField,
public DBCSPanel() { setLayout(new BorderLayout()); dbDriverField = new JComboBox(getDriverClasses()); dbDriverField.insertItemAt("", 0); dbNameField = new JTextField(); JComponent[] fields = new JComponent[] {dbNameField, dbDriverField, dbUrlField = new JTextField(), dbUserField ...
String[] labels = new String[] {"Connection Name",
String[] labels = new String[] {"History", "Connection Name",
public DBCSPanel() { setLayout(new BorderLayout()); dbDriverField = new JComboBox(getDriverClasses()); dbDriverField.insertItemAt("", 0); dbNameField = new JTextField(); JComponent[] fields = new JComponent[] {dbNameField, dbDriverField, dbUrlField = new JTextField(), dbUserField ...
char[] mnemonics = new char[] {'n', 'd', 'u', 'r', 'p'}; int[] widths = new int[] {30, 30, 40, 20, 20}; String[] tips = new String[] {"The name of this database", "The class name of the JDBC Driver", "Vendor-specific JDBC URL", "Username for this database", "Password for this database"};
char[] mnemonics = new char[] {'h', 'n', 'd', 'u', 'r', 'p'}; int[] widths = new int[] {30, 30, 30, 40, 20, 20}; String[] tips = new String[] {"A list of connections you have made in the past", "The name of this database", "The class name of the JDBC Driver", "Vendor-specific JDBC URL", "Username for this database", "P...
public DBCSPanel() { setLayout(new BorderLayout()); dbDriverField = new JComboBox(getDriverClasses()); dbDriverField.insertItemAt("", 0); dbNameField = new JTextField(); JComponent[] fields = new JComponent[] {dbNameField, dbDriverField, dbUrlField = new JTextField(), dbUserField ...
if (historyBox.getSelectedIndex() == 0) { ArchitectFrame.getMainInstance().getUserSettings().getConnections().add(dbcs); history.add(ASUtils.lvb(name, dbcs)); }
public void applyChanges() { String name = dbNameField.getText(); dbcs.setName(name); dbcs.setDisplayName(name); dbcs.setDriverClass(dbDriverField.getSelectedItem().toString()); dbcs.setUrl(dbUrlField.getText()); dbcs.setUser(dbUserField.getText()); dbcs.setPass(new String(dbPassField.getPassword())); // comple...
historyBox.setSelectedIndex(findHistoryConnection(dbcs));
public void setDbcs(DBConnectionSpec dbcs) { dbNameField.setText(dbcs.getName()); dbDriverField.removeItemAt(0); if (dbcs.getDriverClass() != null) { dbDriverField.insertItemAt(dbcs.getDriverClass(), 0); } else { dbDriverField.insertItemAt("", 0); } dbDriverField.setSelectedIndex(0); dbUrlField.setText(dbcs...
if ( log.isDebugEnabled() ) { log.debug( "About to evaluate stylesheet on source: " + source ); }
public void doTag(XMLOutput output) throws Exception { // for use by inner classes this.output = output; try { // run the body to add the rules getBody().run(context, output); stylesheet.setModeName( getMode() ); stylesheet...
two_n[0]=1; for (i=1; i<31; i++) two_n[i]=2*two_n[i-1];
public void full_em_breakup( byte[][] input_haplos, int max_missing, int[] num_haplos_present, Vector haplos_present, Vector haplo_freq, int[] block_size, int dump_phased_haplos) throws HaploViewException{ int i, j, k, num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_lo...
SUPER_OBS foo = superdata[i]; int bar = foo.superposs[0].h1; superprob[bar] += 1.0;
superprob[superdata[i].superposs[0].h1]+=1.0;
public void full_em_breakup( byte[][] input_haplos, int max_missing, int[] num_haplos_present, Vector haplos_present, Vector haplo_freq, int[] block_size, int dump_phased_haplos) throws HaploViewException{ int i, j, k, num_poss, iter;//, maxk, numk; double total;//, maxprob; int block, start_lo...
float cutHighCI = 0.98f; float cutLowCI = 0.70f; float recHighCI = 0.90f;
double cutHighCI = 0.98; double cutLowCI = 0.70; double recHighCI = 0.90;
Vector doSFS(){ float cutHighCI = 0.98f; float cutLowCI = 0.70f; float recHighCI = 0.90f; int numStrong = 0; int numRec = 0; int numInGroup = 0; Vector blocks = new Vector(); Vector strongPairs = new Vector(); //first make a list of marker pairs in "strong LD", sorted by distance apart for (int x = 0; x < dPrime....
StringTokenizer st = new StringTokenizer(dPrime[x][y]);
PairwiseLinkage thisPair = dPrime[x][y];
Vector doSFS(){ float cutHighCI = 0.98f; float cutLowCI = 0.70f; float recHighCI = 0.90f; int numStrong = 0; int numRec = 0; int numInGroup = 0; Vector blocks = new Vector(); Vector strongPairs = new Vector(); //first make a list of marker pairs in "strong LD", sorted by distance apart for (int x = 0; x < dPrime....
st.nextToken(); float lod = Float.parseFloat(st.nextToken()); st.nextToken(); float lowCI = Float.parseFloat(st.nextToken()); float highCI = Float.parseFloat(st.nextToken());
double lod = thisPair.getLOD(); double lowCI = thisPair.getConfidenceLow(); double highCI = thisPair.getConfidenceHigh();
Vector doSFS(){ float cutHighCI = 0.98f; float cutLowCI = 0.70f; float recHighCI = 0.90f; int numStrong = 0; int numRec = 0; int numInGroup = 0; Vector blocks = new Vector(); Vector strongPairs = new Vector(); //first make a list of marker pairs in "strong LD", sorted by distance apart for (int x = 0; x < dPrime....
StringTokenizer st = new StringTokenizer(dPrime[i][j]);
PairwiseLinkage thisPair = dPrime[i][j];
Vector doMJD(){ // find blocks by searching for stretches between two markers A,B where // D prime is > 0.8 for all informative combinations of A, (A+1...B) int baddies; int verticalExtent=0; int horizontalExtent=0; Vector blocks = new Vector(); for (int i = 0; i < dPrime.length; i++){ baddies=0; //find ho...
if (Float.parseFloat(st.nextToken()) < 0.8){
if (thisPair.getDPrime() < 0.8){
Vector doMJD(){ // find blocks by searching for stretches between two markers A,B where // D prime is > 0.8 for all informative combinations of A, (A+1...B) int baddies; int verticalExtent=0; int horizontalExtent=0; Vector blocks = new Vector(); for (int i = 0; i < dPrime.length; i++){ baddies=0; //find ho...
StringTokenizer st = new StringTokenizer(dPrime[k][m]); if(Float.parseFloat(st.nextToken()) < 0.8){
PairwiseLinkage thisPair = dPrime[k][m]; if(thisPair.getDPrime() < 0.8){
Vector doMJD(){ // find blocks by searching for stretches between two markers A,B where // D prime is > 0.8 for all informative combinations of A, (A+1...B) int baddies; int verticalExtent=0; int horizontalExtent=0; Vector blocks = new Vector(); for (int i = 0; i < dPrime.length; i++){ baddies=0; //find ho...
Chromosome(String p, String i, byte[] g, boolean isTransmitted){
Chromosome(String p, String i, byte[] g, boolean a, String o){
Chromosome(String p, String i, byte[] g, boolean isTransmitted){ ped = p; individual = i; genotypes = g; origin = "unknown"; trueSize = genotypes.length; transmitted = isTransmitted; }
origin = "unknown";
affected = a; origin = o;
Chromosome(String p, String i, byte[] g, boolean isTransmitted){ ped = p; individual = i; genotypes = g; origin = "unknown"; trueSize = genotypes.length; transmitted = isTransmitted; }
transmitted = isTransmitted;
Chromosome(String p, String i, byte[] g, boolean isTransmitted){ ped = p; individual = i; genotypes = g; origin = "unknown"; trueSize = genotypes.length; transmitted = isTransmitted; }
if ((evt.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) { TablePane tp = (TablePane) evt.getComponent(); PlayPen pp = (PlayPen) tp.getParent(); try { pp.selectNone(); tp.setSelected(true); tp.selectNone(); tp.selectColumn(tp.pointToColumnIndex(evt.getPoint())); } catch (ArchitectException e) { logger.error("Exception ...
public void mousePressed(MouseEvent evt) { evt.getComponent().requestFocus(); maybeShowPopup(evt); }
if ((evt.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) { TablePane tp = (TablePane) evt.getComponent(); PlayPen pp = (PlayPen) tp.getParent(); try { pp.selectNone(); tp.setSelected(true); tp.selectNone(); tp.selectColumn(tp.pointToColumnIndex(evt.getPoint())); } catch (ArchitectException e) { logger.error("Exception ...
public void mouseReleased(MouseEvent evt) { maybeShowPopup(evt); // table/column selection if ((evt.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) { TablePane tp = (TablePane) evt.getComponent(); PlayPen pp = (PlayPen) tp.getParent(); try { pp.selectNone(); tp.setSelected(true); tp.selectN...
selectNone();
public void dbChildrenRemoved(SQLObjectEvent e) { if (e.getSource() == this.model.getColumnsFolder()) { int ci[] = e.getChangedIndices(); for (int i = 0; i < ci.length; i++) { columnSelection.remove(ci[i]); } if (columnSelection.size() > 0) { columnSelection.set(Math.min(ci[0], columnSelection.size()-1)...