rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if ( i == 0 ) {
if ( rect == null ) {
protected void init() throws ArchitectException { int accelMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); prefs = PrefsUtils.getUserPrefsNode(architectSession); UserSettings us; // must be done right away, because a static // initializer in this class effects BeanUtils // behaviour whi...
double zoom = playpen.getViewportSize().getHeight()/rect.height; double zoom1 = playpen.getViewportSize().getWidth()/rect.width; if ( zoom1 < zoom ) zoom = zoom1; zoom *= 0.95;
if ( rect == null ) return; double zoom = Math.min(playpen.getViewportSize().getHeight()/rect.height, playpen.getViewportSize().getWidth()/rect.width); zoom *= 0.90;
protected void init() throws ArchitectException { int accelMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); prefs = PrefsUtils.getUserPrefsNode(architectSession); UserSettings us; // must be done right away, because a static // initializer in this class effects BeanUtils // behaviour whi...
playpen.scrollRectToVisible(playpen.unzoomRect(rect));
playpen.scrollRectToVisible(playpen.zoomRect(rect));
protected void init() throws ArchitectException { int accelMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); prefs = PrefsUtils.getUserPrefsNode(architectSession); UserSettings us; // must be done right away, because a static // initializer in this class effects BeanUtils // behaviour whi...
zoomAllAction.putValue(AbstractAction.SHORT_DESCRIPTION, "View All");
zoomAllAction.putValue(AbstractAction.SHORT_DESCRIPTION, "Zoom to fit");
protected void init() throws ArchitectException { int accelMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); prefs = PrefsUtils.getUserPrefsNode(architectSession); UserSettings us; // must be done right away, because a static // initializer in this class effects BeanUtils // behaviour whi...
if ( i == 0 ) {
if ( rect == null ) {
public void actionPerformed(ActionEvent e) { Rectangle rect = null; if ( playpen != null ) { for (int i = 0; i < playpen.getContentPane().getComponentCount(); i++) { PlayPenComponent ppc = playpen.getContentPane().getComponent(i); if ( i == 0 ) { rect = new Rectangle(ppc.getLocation(...
double zoom = playpen.getViewportSize().getHeight()/rect.height; double zoom1 = playpen.getViewportSize().getWidth()/rect.width; if ( zoom1 < zoom ) zoom = zoom1; zoom *= 0.95;
if ( rect == null ) return; double zoom = Math.min(playpen.getViewportSize().getHeight()/rect.height, playpen.getViewportSize().getWidth()/rect.width); zoom *= 0.90;
public void actionPerformed(ActionEvent e) { Rectangle rect = null; if ( playpen != null ) { for (int i = 0; i < playpen.getContentPane().getComponentCount(); i++) { PlayPenComponent ppc = playpen.getContentPane().getComponent(i); if ( i == 0 ) { rect = new Rectangle(ppc.getLocation(...
playpen.scrollRectToVisible(playpen.unzoomRect(rect));
playpen.scrollRectToVisible(playpen.zoomRect(rect));
public void actionPerformed(ActionEvent e) { Rectangle rect = null; if ( playpen != null ) { for (int i = 0; i < playpen.getContentPane().getComponentCount(); i++) { PlayPenComponent ppc = playpen.getContentPane().getComponent(i); if ( i == 0 ) { rect = new Rectangle(ppc.getLocation(...
public void addDatabase( PVDatabase db ) {
public void addDatabase( PVDatabase db ) throws PhotovaultException { if ( databases.containsKey( db.getName() ) ) { throw new PhotovaultException( "Database " + db.getDbName() + " already exists!" ); }
public void addDatabase( PVDatabase db ) { databases.put( db.getName(), db ); }
if (cls.getSuperclass().getName().equals(CLASS_CONNECTOR_SUPPORT)) {
if (objMBean instanceof ConnectorSupport) {
private static ConnectorRegistry create(ApplicationConfig config) throws Exception { Map paramValues = config.getParamValues(); String appId = config.getApplicationId(); String connectorId = (String) paramValues.get("connectorId"); File file1 = new File(CoreUtils.getConnectorDir() + File...
getBody().run(context, output);
invokeBody(output);
public void doTag(XMLOutput output) throws Exception { if ( log.isDebugEnabled() ) { log.debug( "Running body: " + getBody() ); } getBody().run(context, output); }
final Writer writer = ( args.length > 1 ) ? new FileWriter( args[1] ) : new OutputStreamWriter( System.out );
final XMLOutput output = (args.length > 1) ? XMLOutput.createXMLOutput(new FileWriter(args[1])) : XMLOutput.createXMLOutput(System.out);
public static void main(String[] args) throws Exception { try { if (args.length <= 0) { System.out.println("Usage: Jelly scriptFile [outputFile]"); return; } Jelly jelly = new Jelly(); jelly.setScript(args[0]); ...
XMLOutput output = XMLOutput.createXMLOutput(writer);
public static void main(String[] args) throws Exception { try { if (args.length <= 0) { System.out.println("Usage: Jelly scriptFile [outputFile]"); return; } Jelly jelly = new Jelly(); jelly.setScript(args[0]); ...
writer.close();
output.close();
public static void main(String[] args) throws Exception { try { if (args.length <= 0) { System.out.println("Usage: Jelly scriptFile [outputFile]"); return; } Jelly jelly = new Jelly(); jelly.setScript(args[0]); ...
writer.close();
output.close();
public void run() { try { writer.close(); } catch (Exception e) { // ignore errors } }
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 { // Try find find the body from the reserved 'org.apache.commons.jelly.body' variable Script script = (Script) context.getVariable( "org.apache.commons.jelly.body" ); if ( script != null ) { script.run( context, out...
protected Stylesheet createStylesheet() {
protected Stylesheet createStylesheet(final XMLOutput output) {
protected Stylesheet createStylesheet() { // add default actions Stylesheet answer = new Stylesheet(); answer.setValueOfAction( new Action() { public void run(Node node) throws Exception { String text = node.getStringValue(); ...
this.output = output; Stylesheet stylesheet = getStylesheet(); stylesheet.clear();
stylesheet = createStylesheet(output);
public void doTag(XMLOutput output) throws Exception { // for use by inner classes this.output = output; Stylesheet stylesheet = getStylesheet(); stylesheet.clear(); // run the body to add the rules invokeBody(output); stylesheet.setModeName(getMode()); if (var != null) { context.setVariable(var, stylesheet)...
if ( stylesheet == null ) { stylesheet = createStylesheet(); }
public Stylesheet getStylesheet() { if ( stylesheet == null ) { stylesheet = createStylesheet(); } return stylesheet; }
Crypto.hash(password), roles, "A", 0));
Crypto.hash(password), roles, User.STATUS_ACTIVE, 0));
public static void main(String[] args) throws Exception{ /* display info */ message(); /* get password from user */ char[] password = getPassword(); if(password == null){ return; } EncryptedKey encryptedKey = new EncryptedKey(password); /* wr...
plCreateTxProgressBar.setVisible(false);
public synchronized void setupDialog() { logger.debug("running setupDialog()"); // always refresh Target Database (it might have changed) plexp.setTargetDataSource(ArchitectFrame.getMainInstance().getProject().getTargetDatabase().getDataSource()); if (d != null) { refreshConnections(); return; } d = new JD...
plCreateTxLabel.setVisible(false);
public synchronized void setupDialog() { logger.debug("running setupDialog()"); // always refresh Target Database (it might have changed) plexp.setTargetDataSource(ArchitectFrame.getMainInstance().getProject().getTargetDatabase().getDataSource()); if (d != null) { refreshConnections(); return; } d = new JD...
logger.debug("progressBar preferred size: " + plCreateTxProgressBar.getPreferredSize()); logger.debug("progressPanel preferred size: " + progressPanel.getPreferredSize()); logger.debug("bottomPanel preferred size: " + bottomPanel.getPreferredSize()); logger.debug("plp preferred size: " + plp.getPreferredSize()); logger...
public synchronized void setupDialog() { logger.debug("running setupDialog()"); // always refresh Target Database (it might have changed) plexp.setTargetDataSource(ArchitectFrame.getMainInstance().getProject().getTargetDatabase().getDataSource()); if (d != null) { refreshConnections(); return; } d = new JD...
g.setColor(Color.WHITE);
g.setColor(Color.white);
public void mousePressed (MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK){ final int clickX = e.getX(); final int clickY = e.getY(); double dboxX = (double)(clickX - clickXShift - (clickY-clic...
g.setColor(Color.BLACK);
g.setColor(Color.black);
public void mousePressed (MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK){ final int clickX = e.getX(); final int clickY = e.getY(); double dboxX = (double)(clickX - clickXShift - (clickY-clic...
g.setColor(Color.WHITE);
g.setColor(Color.white);
public Object construct(){ final int leftMargin = 12; String[] displayStrings = new String[5]; if (theData.infoKnown){ displayStrings[0] = new String ("(" +Chromoso...
g.setColor(Color.BLACK);
g.setColor(Color.black);
public Object construct(){ final int leftMargin = 12; String[] displayStrings = new String[5]; if (theData.infoKnown){ displayStrings[0] = new String ("(" +Chromoso...
g2.setColor(Color.BLACK);
g2.setColor(Color.black);
public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); ...
gw2.setColor(Color.BLACK);
gw2.setColor(Color.black);
public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); ...
if (e.getSource() == connection) { setComps(connComp, true); setComps(physicalComp, false); setComps(loadComp, false); } else if (e.getSource() == physical) { setComps(connComp, false); setComps(physicalComp, true); setComps(loadComp, false); } else if (e.getSource() == load) { setComps(connComp, false); setComps(physi...
enableDisablePhysicalComps(); boolean enableLoadComps = e.getSource() == loadRadio; loadFilePath.setEnabled(enableLoadComps); loadFileButton.setEnabled(enableLoadComps); }
public void actionPerformed(ActionEvent e) { if (e.getSource() == connection) { setComps(connComp, true); setComps(physicalComp, false); setComps(loadComp, false); } else if (e.getSource() == physical) { setComps(connComp, false); setComps(physicalComp, true); setComps(loadComp, false); } ...
physicalComp = new ArrayList<JComponent>(); physicalComp.add(databaseDropdown); physicalComp.add(catalogDropdown); physicalComp.add(schemaDropdown); physicalComp.add(newConnButton); loadComp = new ArrayList<JComponent>(); loadComp.add(loadFilePath); loadComp.add(loadFileButton); ActionListener listener = new OptionGr...
ActionListener listener = new OptionGroupListener();
private void buildPartialUI(DefaultFormBuilder builder, boolean defaultPlayPen) { String prefix; if (defaultPlayPen == true){ prefix = "source"; } else{ prefix = "target"; } CellConstraints cc = new CellConstraints(); ArchitectFrame af = ArchitectFrame.getMainInstance(); SwingUIProject project ...
printQualified(t.getPhysicalName());
print( DDLUtils.toQualifiedName(t.getCatalogName(),t.getSchemaName(),t.getPhysicalName()) );
public void modifyColumn(SQLColumn c) throws ArchitectDiffException { Map colNameMap = new HashMap(); SQLTable t = c.getParentTable(); print("\n ALTER TABLE "); printQualified(t.getPhysicalName()); print(" ALTER COLUMN "); print(columnDefinition(c,colNameMap)); endStatement(DDLStatement.StatementType.MODIFY, c...
assertEquals(target.getName(), "Target Database");
assertEquals(target.getName(), "Not Configured");
public void testLoad() throws Exception { // StringReader r = new StringReader(testData); ByteArrayInputStream r = new ByteArrayInputStream(testData.getBytes()); project.load(r); assertFalse("Project starts out with undo history",project.getUndoManager().canUndoOrRedo()); DBTree tree = project.getSourceDatabases(...
public void doTag(XMLOutput output) throws Exception {
public void doTag(XMLOutput output) throws JellyTagException {
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.getExpres...
Object xpathContext = getXPathContext(); if (! xpath.booleanValueOf(xpathContext)) { fail( getBodyText(), "evaluating xpath: "+ xpath );
try { Object xpathContext = getXPathContext(); if (! xpath.booleanValueOf(xpathContext)) { fail( getBodyText(), "evaluating xpath: "+ xpath ); } } catch (JaxenException anException) { throw new JellyTagException("Error evaluating xpath", anException);
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.getExpres...
.initialFilterValues().withValues(mValues.getValues());
.initialFilterValues().withValues(mValues.getSuppliedValues());
public Query<S> and(Filter<S> filter) throws FetchException { FilterValues<S> newValues; if (mValues == null) { newValues = filter.initialFilterValues(); } else { newValues = mValues.getFilter().and(filter) .initialFilterValues().withValues(mValues.getValues...
.initialFilterValues().withValues(mValues.getValues());
.initialFilterValues().withValues(mValues.getSuppliedValues());
public Query<S> or(Filter<S> filter) throws FetchException { if (mValues == null) { throw new IllegalStateException("Query is already guaranteed to fetch everything"); } FilterValues<S> newValues = mValues.getFilter().or(filter) .initialFilterValues().withValues(mValues.ge...
break;
public byte[] getValue( int index) { int avStart = 0; byte[] value = null; for ( int i=0; i < index && avStart < fBytes.length; i++) avStart += fBytes[ avStart] + 1; if ( avStart < fBytes.length) { int avLen = fBytes[ avStart]; int aLen = 0; for ( aLen=0; aLen < avLen; aLen++) { if ( fBytes[ avSt...
public static ClassLoader getClassLoader(ClassLoader specifiedLoader, Class callingClass) {
public static ClassLoader getClassLoader(ClassLoader specifiedLoader, boolean useContextClassLoader, Class callingClass) {
public static ClassLoader getClassLoader(ClassLoader specifiedLoader, Class callingClass) { if (specifiedLoader != null) { return specifiedLoader; } return getClassLoader(callingClass); }
if (useContextClassLoader) { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); if (classLoader != null) { return classLoader; } }
public static ClassLoader getClassLoader(ClassLoader specifiedLoader, Class callingClass) { if (specifiedLoader != null) { return specifiedLoader; } return getClassLoader(callingClass); }
if (log.isInfoEnabled() ) { log.info( "Attempting to deduce DataSource from: " + rawDataSource ); }
static DataSource getDataSource(Object rawDataSource, JellyContext pc) throws JellyException { DataSource dataSource = null; if (log.isInfoEnabled() ) { log.info( "Attempting to deduce DataSource from: " + rawDataSource ); } if (rawDataSource == null) { rawDataSource = pc.getVariable("org.apache.commons.jel...
log.info( "rawDataSource is a String" );
static DataSource getDataSource(Object rawDataSource, JellyContext pc) throws JellyException { DataSource dataSource = null; if (log.isInfoEnabled() ) { log.info( "Attempting to deduce DataSource from: " + rawDataSource ); } if (rawDataSource == null) { rawDataSource = pc.getVariable("org.apache.commons.jel...
logger.debug("SQLCatalog: populate starting");
public void populate() throws ArchitectException { if (populated) return; int oldSize = children.size(); synchronized (parent) { ResultSet rs = null; try { Connection con = ((SQLDatabase)parent).getConnection(); DatabaseMetaData dbmd = con.getMetaData(); con.setCatalog(getName()); rs = ...
logger.debug("SQLCatalog: populate finished");
public void populate() throws ArchitectException { if (populated) return; int oldSize = children.size(); synchronized (parent) { ResultSet rs = null; try { Connection con = ((SQLDatabase)parent).getConnection(); DatabaseMetaData dbmd = con.getMetaData(); con.setCatalog(getName()); rs = ...
DashboardRepository.getInstance();
public static void main(String[] args) throws Exception{ if (System.getSecurityManager() == null) { System.setSecurityManager(new RMISecurityManager()); } /* create logs dir */ new File(CoreUtils.getLogDir()).mkdirs(); UserManager userManager = UserManager.getInstanc...
settings.addDatabase( db );
try { settings.addDatabase( db ); } catch (PhotovaultException ex) { fail( "Exception while creating database: " + ex.getMessage() ); }
public void testCreateDB() { File confFile = null; File dbDir = null; // Create an empty configuration file & volume directory try { confFile = File.createTempFile( "photovault_settings_", ".xml" ); confFile.delete(); dbDir = File.createTempFile( "photova...
PVDatabase db2 = new PVDatabase(); db2.setInstanceType( PVDatabase.TYPE_EMBEDDED ); db2.setEmbeddedDirectory( dbDir ); boolean throwsException = false; try { settings.addDatabase( db2 ); } catch (PhotovaultException ex) { throwsException = true; } assertTrue( "Adding another database with same name must throw exception...
public void testCreateDB() { File confFile = null; File dbDir = null; // Create an empty configuration file & volume directory try { confFile = File.createTempFile( "photovault_settings_", ".xml" ); confFile.delete(); dbDir = File.createTempFile( "photova...
settings.addDatabase( db );
try { settings.addDatabase( db ); } catch (PhotovaultException ex) { fail( "Exception while creating database: " + ex.getMessage() ); }
public void testNoSettingsFile() { try { File f = File.createTempFile( "photovault_settings", ".xml" ); f.delete(); System.setProperty( "photovault.configfile", f.getAbsolutePath() ); } catch ( Exception e ) { fail( e.getMessage() ); } Photovau...
ArchitectFrame.getMainInstance().getUserSettings().getConnections().add(dbcs);
edittingDB = db;
protected JPopupMenu setupPopupMenu() { JPopupMenu newMenu = new JPopupMenu(); JMenuItem popupNewDatabase = new JMenuItem("New Database Connection..."); popupNewDatabase.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { DBConnectionSpec dbcs = new DBConnectionSpec(); ...
ArchitectFrame.getMainInstance().getUserSettings().getConnections().add(dbcs);
edittingDB = db;
public void actionPerformed(ActionEvent e) { DBConnectionSpec dbcs = new DBConnectionSpec(); dbcs.setName("New Connection"); dbcs.setDisplayName("New Connection"); SQLDatabase db = new SQLDatabase(dbcs); ((DBTreeModel.DBTreeRoot) getModel().getRoot()).addChild(db); ArchitectFrame.getMainInst...
edittingDB.setConnectionSpec(dbcsPanel.getDbcs());
protected void setupPropDialog() { propDialog = new JDialog(ArchitectFrame.getMainInstance(), "Database Connection Properties"); final JButton okButton = new JButton("Ok"); final JButton cancelButton = new JButton("Cancel"); final JPanel southPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); dbcsPan...
edittingDB.setConnectionSpec(dbcsPanel.getDbcs());
public void actionPerformed(ActionEvent e) { dbcsPanel.applyChanges(); propDialog.dispose(); }
static TimeZone getTimeZone(JellyContext jc, Tag fromTag) { TimeZone tz = null; Tag t = findAncestorWithClass(fromTag, TimeZoneTag.class); if (t != null) { TimeZoneTag parent = (TimeZoneTag) t; tz = parent.getTimeZone(); } else { Object obj = jc.getVariable(Config.FMT_TIME_ZONE); if (obj != null) { if (obj instanceo...
public TimeZone getTimeZone() { return timeZone;
static TimeZone getTimeZone(JellyContext jc, Tag fromTag) { TimeZone tz = null; Tag t = findAncestorWithClass(fromTag, TimeZoneTag.class); if (t != null) { // use time zone from parent <timeZone> tag TimeZoneTag parent = (TimeZoneTag) t; tz = parent.getTimeZone(...
} int schemaVersion = db.getSchemaVersion(); if ( schemaVersion < db.CURRENT_SCHEMA_VERSION ) { String options[] = {"Proceed", "Exit Photovault"}; if ( JOptionPane.YES_OPTION == JOptionPane.showOptionDialog( ld, "The database was created with an older version of Photovault\n" + "Photovault will upgrade the database fo...
int schemaVersion = db.getSchemaVersion(); if ( schemaVersion < db.CURRENT_SCHEMA_VERSION ) { String options[] = {"Proceed", "Exit Photovault"}; if ( JOptionPane.YES_OPTION == JOptionPane.showOptionDialog( ld, "The database was created with an older version of Photovault\n" + "Photovault will upgrade the database forma...
private boolean login( LoginDlg ld ) { boolean success = false; String user = ld.getUsername(); String passwd = ld.getPassword(); String dbName = ld.getDb(); log.debug( "Using configuration " + dbName ); settings.setConfiguration( dbName ); PVDatabase db = settings.getDatabase( dbName ); String...
changeToolTip(pp.getSelectedItems());
try { setupAction(pp.getSelectedItems()); } catch (ArchitectException e1) { throw new ArchitectRuntimeException(e1); }
public void itemDeselected(SelectionEvent e) { changeToolTip(pp.getSelectedItems()); }
changeToolTip(pp.getSelectedItems());
try { setupAction(pp.getSelectedItems()); } catch (ArchitectException e1) { throw new ArchitectRuntimeException(e1); }
public void itemSelected(SelectionEvent e) { changeToolTip(pp.getSelectedItems()); }
theData.getPedFile().saveCheckDataToText(outfile);
checkPanel.saveTableToText(outfile);
void export(Component c, int format, int start, int stop){ if (c == null) return; fc.setSelectedFile(new File("")); if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION){ File outfile = fc.getSelectedFile(); if (format == PNG_MODE || format == COMPRESSED_PNG_MODE){ ...
long position = Long.parseLong(st.nextToken());
String pos = st.nextToken(); if (pos.startsWith("-")){ continue; } long position = Long.parseLong(pos);
public void parseWGA(String wga, String map, boolean embed) throws PlinkException { markers = new Vector(); results = new Vector(); columns = new Vector(); columns.add("Result"); columns.add("Chrom"); columns.add("Marker"); columns.add("Position"); final File ...
if (xml == null) {
Object xmlObj = this.getXml(); if (xmlObj == null) {
protected Document getXmlDocument(XMLOutput output) throws Exception { Document document = null; if (xml == null) { document = parseBody(output); } else { document = parse(xml); } return document; }
document = parse(xml);
document = parse(xmlObj);
protected Document getXmlDocument(XMLOutput output) throws Exception { Document document = null; if (xml == null) { document = parseBody(output); } else { document = parse(xml); } return document; }
NumberFormat nf = NumberFormat.getInstance();
NumberFormat nf = NumberFormat.getInstance(Locale.US);
public void paintComponent(Graphics graphics) { if (filteredHaplos == null){ super.paintComponent(graphics); return; } Graphics2D g = (Graphics2D) graphics; g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); ...
NumberFormat nfMulti = NumberFormat.getInstance();
NumberFormat nfMulti = NumberFormat.getInstance(Locale.US);
public void paintComponent(Graphics graphics) { if (filteredHaplos == null){ super.paintComponent(graphics); return; } Graphics2D g = (Graphics2D) graphics; g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); ...
NumberFormat nfMarker = NumberFormat.getInstance();
NumberFormat nfMarker = NumberFormat.getInstance(Locale.US);
public void paintComponent(Graphics graphics) { if (filteredHaplos == null){ super.paintComponent(graphics); return; } Graphics2D g = (Graphics2D) graphics; g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); ...
populate();
public SQLTable getTableByName(String tableName) throws ArchitectException { Iterator childit = children.iterator(); while (childit.hasNext()) { SQLTable child = (SQLTable) childit.next(); if (child.getTableName().equalsIgnoreCase(tableName)) { return child; } } return null; }
getBody().run(context, output);
invokeBody(output);
public void doTag(final XMLOutput output) throws Exception { AttainTag attainTag = (AttainTag) findAncestorWithClass( AttainTag.class ); Session session = null; if ( attainTag == null ) { session = new JellySession( output ); } else { session = attainTag.get...
userForm.setConfirmPassword(UserForm.FORM_PASSWORD);
private void prepareUserForm(ActionForm form, User user){ UserForm userForm = (UserForm)form; userForm.setUsername(user.getUsername()); userForm.setPassword(UserForm.FORM_PASSWORD); //TODO Need to handle multiple role scenario userForm.setRole(((Role)user.getRoles().get(0)).getNam...
public void doTag(XMLOutput output) throws Exception {
public void doTag(XMLOutput output) throws JellyTagException {
public void doTag(XMLOutput output) throws Exception { Test test = getTest(); if ( test == null ) { test = (Test) context.getVariable("org.apache.commons.jelly.junit.suite"); } if ( test == null ) { throw new MissingAttributeException( "test" ); } ...
populate();
public SQLSchema getSchemaByName(String schemaName) throws ArchitectException { if (!isSchemaContainer()) { return null; } Iterator childit = children.iterator(); while (childit.hasNext()) { SQLSchema schema = (SQLSchema) childit.next(); if (schema.getName().equalsIgnoreCase(schemaName)) { return schema; ...
populate();
protected SQLTable getTableByName(String tableName) throws ArchitectException { Iterator childit = children.iterator(); while (childit.hasNext()) { SQLObject child = (SQLObject) childit.next(); if (child instanceof SQLTable) { SQLTable table = (SQLTable) child; if (table.getName().equalsIgnoreCase(tableNam...
addMouseListener(new PopMouseListener(this));
addMouseListener(this); addMouseMotionListener(this);
DPrimeDisplay(HaploData h){ theData=h; this.setDoubleBuffered(true); addMouseListener(new PopMouseListener(this)); }
int high = 2*V_BORDER + count*boxSize/2;
Graphics g = this.getGraphics(); g.setFont(markerNameFont); FontMetrics fm = g.getFontMetrics(); blockDispHeight = boxSize/2 + fm.getAscent(); int high = 2*V_BORDER + count*boxSize/2 + blockDispHeight;
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++){ ...
if (theData.isInBlock[j]){
if (theData.isInBlock[Chromosome.realIndex[j]]){
public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); ...
final int WM_BD_HEIGHT = 4; final int WM_MAX_WIDTH = visRect.width/3; double sizingScalefactor; sizingScalefactor = (double) (chartSize.width)/WM_MAX_WIDTH;
final int WM_BD_GAP = 1; final int WM_BD_HEIGHT = 2; final int WM_BD_TOTAL = WM_BD_HEIGHT + 2*WM_BD_GAP; if (wmMaxWidth == 0){ wmMaxWidth = visRect.width/3; }
public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); ...
scalefactor = (double)(chartSize.width)/(WM_MAX_WIDTH-WM_BD_HEIGHT*4);
scalefactor = (double)(chartSize.width)/wmMaxWidth;
public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); ...
(int)(chartSize.height/sizingScalefactor)+wmBorder.getBorderInsets(this).top*2,
(int)(chartSize.height/scalefactor)+wmBorder.getBorderInsets(this).top*2+WM_BD_TOTAL,
public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); ...
gw2.fillRect(1,1,worldmap.getWidth()-2,worldmap.getHeight()-2);
gw2.fillRect(1,1,worldmap.getWidth()-1,worldmap.getHeight()-1);
public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); ...
wmBorder.paintBorder(this,gw2,0,0,worldmap.getWidth()-1,worldmap.getHeight()-1); ir = wmBorder.getInteriorRectangle(this,0,0,worldmap.getWidth()-1, worldmap.getHeight()-1); ir.height -= WM_BD_HEIGHT; double prefBoxSize = boxSize/scalefactor;
wmBorder.paintBorder(this,gw2,0,0,worldmap.getWidth(),worldmap.getHeight()); ir = wmBorder.getInteriorRectangle(this,0,0,worldmap.getWidth(), worldmap.getHeight()); double prefBoxSize = boxSize/(scalefactor*((double)wmMaxWidth/(double)(wmMaxWidth-WM_BD_TOTAL)));
public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); ...
double yy = (y - x)*prefBoxSize/2+wmBorder.getBorderInsets(this).top+WM_BD_HEIGHT;
double yy = (y - x)*prefBoxSize/2+wmBorder.getBorderInsets(this).top + WM_BD_TOTAL;
public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); ...
wmBorder.getBorderInsets(this).top,
wmBorder.getBorderInsets(this).top+WM_BD_GAP,
public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); ...
wmBorder.getBorderInsets(this).top+voffset, (int)((last-first)*prefBoxSize),
wmBorder.getBorderInsets(this).top+voffset+WM_BD_GAP, (int)((last-first+1)*prefBoxSize),
public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); ...
if (resizeRectExists){ g2.setColor(Color.black); g2.drawRect(resizeWMRect.x, resizeWMRect.y, resizeWMRect.width, resizeWMRect.height); }
public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); ...
textData.pickTags(haplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(haplos), OutputFile);
filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile);
private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; if(!quietMode && fileName != null){ System.out.println("Using data file " + fileName); } in...
textData.pickTags(haplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(haplos), OutputFile);
filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile);;
private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; if(!quietMode && fileName != null){ System.out.println("Using data file " + fileName); } in...
this.shouldInherit = false;
public ImportTag() { this.shouldInherit = false; }
context.runScript(uri, output, true, getInherit() );
context.runScript(uri, output, true, isInherit() );
public void doTag(XMLOutput output) throws Exception { if (uri == null) { throw new MissingAttributeException( "uri" ); } // we need to create a new JellyContext of the URI // take off the script name from the URL context.runScript(uri, output, true, getInherit() ); ...
public void setInherit(String inherit) { if ( "true".equals( inherit ) ) { this.shouldInherit = true; }
public void setInherit(boolean inherit) { this.inherit = inherit;
public void setInherit(String inherit) { if ( "true".equals( inherit ) ) { this.shouldInherit = true; } }
getBody().run(context, output);
invokeBody(output);
protected Action createAction() { return new Action() { public void run(Node node) throws Exception { xpathSource = node; if (log.isDebugEnabled()) { log.debug( "Firing template body for match: " + match + " and node: " + node ); ...
getBody().run(context, output);
invokeBody(output);
public void run(Node node) throws Exception { xpathSource = node; if (log.isDebugEnabled()) { log.debug( "Firing template body for match: " + match + " and node: " + node ); } getBody().run(context, output); ...
if ( numberOfFreqValue.getText().length() > 0 ) { try { proj.getProfileManager().setTopNCount(Integer.valueOf(numberOfFreqValue.getText())); } catch ( NumberFormatException e ) { ASUtils.showExceptionDialogNoReport(this, "Number Format Error", e); } }
public boolean applyChanges() { logger.debug("Setting snapshot option to:"+saveEntireSource.isSelected()); proj.setSavingEntireSource(saveEntireSource.isSelected()); logger.debug("Project "+proj.getName() +" snapshot option is:"+proj.isSavingEntireSource()); if ( clearProfile.isSelected()...
add(new JLabel("Number of Most Frequent Value in Profile:")); add( numberOfFreqValue=new JTextField(String.valueOf(proj.getProfileManager().getTopNCount()),6));
public void setup() { setLayout(new FormLayout()); add(new JLabel("Snapshot entire source database in project file?")); add(saveEntireSource = new JCheckBox()); add(new JLabel("Clear the Profile result in the project?")); add( clearProfile=new JCheckBox()); }
viewMenuItems[VIEW_CHECK_NUM].setEnabled(false);
public HaploView(){ //menu setup JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); JMenuItem menuItem; //file menu JMenu fileMenu = new JMenu("File"); menuBar.add(fileMenu); menuItem = new JMenuItem(READ_GENOTYPES); setAccelerator(menuItem, 'O', ...
if(doTDT) { tdtPanel = new TDTPanel(theData.chromosomes); tabs.addTab(viewItems[VIEW_TDT_NUM], tdtPanel); }
void processData() { maxCompDist = Long.parseLong(inputOptions[2])*1000; try{ this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); final SwingWorker worker = new SwingWorker(){ public Object construct(){ dPrimeDisplay=null; ...
if(doTDT) { tdtPanel = new TDTPanel(theData.chromosomes); tabs.addTab(viewItems[VIEW_TDT_NUM], tdtPanel); }
public Object construct(){ dPrimeDisplay=null; theData.infoKnown = false; if (!(inputOptions[1].equals(""))){ readMarkers(new File(inputOptions[1])); } theData.generateDPrimeTable(maxCom...
viewMenuItems[VIEW_CHECK_NUM].setEnabled(false); viewMenuItems[VIEW_TDT_NUM].setEnabled(false); checkPanel = null; doTDT = false;
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) inputOptions = f; th...
photos.clear();
protected void query() { StringBuffer sqlBuf = new StringBuffer( "select * from photos" ); if ( startDate != null || endDate != null ) { sqlBuf.append( " where " ); if ( startDate != null ) { sqlBuf.append( "shoot_time >= ? " ); } if ( endDate != null ) { if ( startDate != null ) { sqlBuf.app...
public synchronized boolean equals(int status) { return this.status == status;
public synchronized boolean equals(RunnableStatus status) { return status.get() == this.status;
public synchronized boolean equals(int status) { return this.status == status; }
((ProfileTableModel)viewTable.getModel()).refresh();
TableModelSortDecorator t = (TableModelSortDecorator) viewTable.getModel(); ProfileTableModel t2 = (ProfileTableModel) t.getTableModel(); t2.refresh();
public void actionPerformed(ActionEvent e) { if (dbTree == null) { logger.debug("dbtree was null when actionPerformed called"); return; } if ( dbTree.getSelectionPaths() == null ) { logger.debug("dbtree path selection was null when actionPerformed called"); ...
((ProfileTableModel)viewTable.getModel()).refresh();
TableModelSortDecorator t = (TableModelSortDecorator) viewTable.getModel(); ProfileTableModel t2 = (ProfileTableModel) t.getTableModel(); t2.refresh();
public void run() { try { List<SQLTable> toBeProfiled = new ArrayList<SQLTable>(); for (SQLTable t: tables) { if (profileManager.getResult(t)== null) { toBeProfiled.add(t); ...
((ProfileTableModel)viewTable.getModel()).refresh();
TableModelSortDecorator t = (TableModelSortDecorator) viewTable.getModel(); ProfileTableModel t2 = (ProfileTableModel) t.getTableModel(); t2.refresh();
public void actionPerformed(ActionEvent e) { int[] killMe = viewTable.getSelectedRows(); Arrays.sort(killMe); // iterate backwards so the rows don't shift away on us! f...
((ProfileTableModel)viewTable.getModel()).refresh();
TableModelSortDecorator t = (TableModelSortDecorator) viewTable.getModel(); ProfileTableModel t2 = (ProfileTableModel) t.getTableModel(); t2.refresh();
public void actionPerformed(ActionEvent e) { profileManager.clear(); ((ProfileTableModel)viewTable.getModel()).refresh(); }
public TableModelSortDecorator(TableModel tableModel) { this(); setTableModel(tableModel);
public TableModelSortDecorator() { this.mouseListener = new MouseHandler(); this.tableModelListener = new TableModelHandler();
public TableModelSortDecorator(TableModel tableModel) { this(); setTableModel(tableModel); }