bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
private JButton getDefaultButton(final ModuleContainer module) { JButton button = new JButton(module.getName()); button.setFocusPainted(false); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { ModuleFactory.newInstance(module); } catch (Exception exc) { ExceptionDialog.show( Messages.getString("MODULE_INSTANTIATION_EXCEPTION_NOTICE") //$NON-NLS-1$ +":\n"+ //$NON-NLS-1$ module.getId(), exc); } } }); return button; }
private JButton getDefaultButton(final ModuleContainer module) { JButton button = new JButton(module.getName()); button.setFocusPainted(false); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { ModuleFactory.newInstance(module); } catch (Exception exc) { ExceptionDialog.show( Messages.getString("ToolBar.MODULE_INSTANTIATION_EXCEPTION_NOTICE") //$NON-NLS-1$ +":\n"+ //$NON-NLS-1$ module.getId(), exc); } } }); return button; }
1,120,727
public void actionPerformed(ActionEvent e) { try { ModuleFactory.newInstance(module); } catch (Exception exc) { ExceptionDialog.show( Messages.getString("MODULE_INSTANTIATION_EXCEPTION_NOTICE") //$NON-NLS-1$ +":\n"+ //$NON-NLS-1$ module.getId(), exc); } }
public void actionPerformed(ActionEvent e) { try { ModuleFactory.newInstance(module); } catch (Exception exc) { ExceptionDialog.show( Messages.getString("ToolBar.MODULE_INSTANTIATION_EXCEPTION_NOTICE") //$NON-NLS-1$ +":\n"+ //$NON-NLS-1$ module.getId(), exc); } }
1,120,728
public String make27(String in) { String out = ""; if (in.length() > 27) { out = in.substring(0, 27); } if (in.length() < 27) { out = in + Tool.space(27 - in.length()); } out = codingToDtaus(out); return out; }
public String make27(String in) { String out = ""; if (in.length() >= 27) { out = in.substring(0, 27); } if (in.length() < 27) { out = in + Tool.space(27 - in.length()); } out = codingToDtaus(out); return out; }
1,120,730
public Collection getEvent(BwCalendar calendar, String guid, String rid, int recurRetrieval) throws CalFacadeException { CoreEventInfo cei = null; BwEvent master = null; TreeSet ts = new TreeSet(); HibSession sess = getSess(); /* This (seems) to work as follows: * * First try to retrieve the event from the events table. * * If not there try the annotations table. If it's there, it's a reference * to an event owned by somebody else. Otherwise we drew a blank. * * If we want the recurrences and the event is recurring we go on to try to * retrieve the rest. */ if (rid == null) { // First look in the events table for the master. eventQuery(BwEventObj.class, calendar, guid, rid, true); /* There should be one only */ cei = postGetEvent((BwEvent)sess.getUnique(), privRead, noAccessReturnsNull, false); // XXX Don't want annotations in the trash if (cei == null) { /* Look for an annotation to that event by the current user. */ eventQuery(BwEventAnnotation.class, calendar, guid, rid, true); cei = postGetEvent((BwEvent)sess.getUnique(), privRead, noAccessReturnsNull, false); if (cei != null) { cei.setEvent(new BwEventProxy((BwEventAnnotation)cei.getEvent())); } } if (cei == null) { return ts; } master = cei.getEvent(); ts.add(cei); if ((recurRetrieval == CalFacadeDefs.retrieveRecurMaster) || (!master.getRecurring())) { return ts; } // Fetch all overrrides for this master event. /* FIXME Note that master.getOwner() cripples looking for user overrides of * the instances. * * We probably need to be able to fetch overrides by a user of instances * owned by another user. For the moment we just use the original * overrides - if any */ /* eventQuery(BwEventAnnotation.class, guid, rid, seqnum, false); Collection ovs = sess.getList(); Collection overrides = new TreeSet(); Iterator it = ovs.iterator(); while (it.hasNext()) { BwEventAnnotation override = (BwEventAnnotation)it.next(); BwEventProxy proxy = (BwEventProxy)postGetEvent( makeProxy(null, override, null, CalFacadeDefs.retrieveRecurExpanded), privRead, noAccessReturnsNull); if (proxy != null) { overrides.add(proxy); } } if (recurRetrieval == CalFacadeDefs.retrieveRecurOverrides) { // Overrides only - we're done ts.addAll(overrides); return ts; } */ if (recurRetrieval == CalFacadeDefs.retrieveRecurOverrides) { eventQuery(BwEventAnnotation.class, calendar, guid, rid, false); Collection ovs = sess.getList(); Collection overrides = new TreeSet(); Iterator it = ovs.iterator(); while (it.hasNext()) { BwEventAnnotation override = (BwEventAnnotation)it.next(); cei = makeProxy(null, override, null, CalFacadeDefs.retrieveRecurExpanded, false); if (cei != null) { overrides.add(cei); } } ts.addAll(overrides); return ts; } /* We want all instances. Get them and return. * Note that the overrides come with the instances. */ StringBuffer sb = new StringBuffer(); sb.append("from "); sb.append(BwRecurrenceInstance.class.getName()); sb.append(" rec "); sb.append(" where rec.master=:master "); sess.createQuery(sb.toString()); sess.setEntity("master", master); Collection instances = sess.getList(); Iterator it = instances.iterator(); while (it.hasNext()) { BwRecurrenceInstance instance = (BwRecurrenceInstance)it.next(); ts.add(makeProxy(instance, null, null, CalFacadeDefs.retrieveRecurExpanded, false)); } return ts; } /* Rid is non-null - look first for an override then for the instance. */ eventQuery(BwEventAnnotation.class, calendar, guid, rid, false); BwEventAnnotation override = (BwEventAnnotation)sess.getUnique(); if (override != null) { cei = makeProxy(null, override, null, CalFacadeDefs.retrieveRecurExpanded, false); } else { // Look in the recurrences table StringBuffer sb = new StringBuffer(); sb.append("from "); sb.append(BwRecurrenceInstance.class.getName()); sb.append(" rec "); sb.append(" where rec.master.guid=:guid "); sb.append(" and rec.recurrenceId=:rid "); sess.createQuery(sb.toString()); sess.setString("guid", guid); sess.setString("rid", rid); BwRecurrenceInstance inst = (BwRecurrenceInstance)sess.getUnique(); if (inst == null) { return ts; } cei = makeProxy(inst, null, null, CalFacadeDefs.retrieveRecurExpanded, false); } if (cei != null) { ts.add(cei); } return ts; }
public Collection getEvent(BwCalendar calendar, String guid, String rid, int recurRetrieval) throws CalFacadeException { CoreEventInfo cei = null; BwEvent master = null; TreeSet ts = new TreeSet(); HibSession sess = getSess(); /* This (seems) to work as follows: * * First try to retrieve the event from the events table. * * If not there try the annotations table. If it's there, it's a reference * to an event owned by somebody else. Otherwise we drew a blank. * * If we want the recurrences and the event is recurring we go on to try to * retrieve the rest. */ if (rid == null) { // First look in the events table for the master. eventQuery(BwEventObj.class, calendar, guid, rid, true); /* There should be one only */ cei = postGetEvent((BwEvent)sess.getUnique(), privRead, noAccessReturnsNull, false); // XXX Don't want annotations in the trash if (cei == null) { /* Look for an annotation to that event by the current user. */ eventQuery(BwEventAnnotation.class, calendar, guid, rid, true); cei = postGetEvent((BwEvent)sess.getUnique(), privRead, noAccessReturnsNull, false); if (cei != null) { cei.setEvent(new BwEventProxy((BwEventAnnotation)cei.getEvent())); } } if (cei == null) { return ts; } master = cei.getEvent(); ts.add(cei); if ((recurRetrieval == CalFacadeDefs.retrieveRecurMaster) || (!master.getRecurring())) { return ts; } // Fetch all overrrides for this master event. /* FIXME Note that master.getOwner() cripples looking for user overrides of * the instances. * * We probably need to be able to fetch overrides by a user of instances * owned by another user. For the moment we just use the original * overrides - if any */ /* eventQuery(BwEventAnnotation.class, guid, rid, seqnum, false); Collection ovs = sess.getList(); Collection overrides = new TreeSet(); Iterator it = ovs.iterator(); while (it.hasNext()) { BwEventAnnotation override = (BwEventAnnotation)it.next(); BwEventProxy proxy = (BwEventProxy)postGetEvent( makeProxy(null, override, null, CalFacadeDefs.retrieveRecurExpanded), privRead, noAccessReturnsNull); if (proxy != null) { overrides.add(proxy); } } if (recurRetrieval == CalFacadeDefs.retrieveRecurOverrides) { // Overrides only - we're done ts.addAll(overrides); return ts; } */ if (recurRetrieval == CalFacadeDefs.retrieveRecurOverrides) { eventQuery(BwEventAnnotation.class, calendar, guid, rid, false); Collection ovs = sess.getList(); Collection overrides = new TreeSet(); Iterator it = ovs.iterator(); while (it.hasNext()) { BwEventAnnotation override = (BwEventAnnotation)it.next(); cei = makeProxy(null, override, null, CalFacadeDefs.retrieveRecurExpanded, false); if (cei != null) { overrides.add(cei); } } ts.addAll(overrides); return ts; } /* We want all instances. Get them and return. * Note that the overrides come with the instances. */ StringBuffer sb = new StringBuffer(); sb.append("from "); sb.append(BwRecurrenceInstance.class.getName()); sb.append(" rec "); sb.append(" where rec.master=:master "); sess.createQuery(sb.toString()); sess.setEntity("master", master); Collection instances = sess.getList(); Iterator it = instances.iterator(); while (it.hasNext()) { BwRecurrenceInstance instance = (BwRecurrenceInstance)it.next(); ts.add(makeProxy(instance, null, null, CalFacadeDefs.retrieveRecurExpanded, false)); } return ts; } /* Rid is non-null - look first for an override then for the instance. */ eventQuery(BwEventAnnotation.class, calendar, guid, rid, false); BwEventAnnotation override = (BwEventAnnotation)sess.getUnique(); if (override != null) { cei = makeProxy(null, override, null, CalFacadeDefs.retrieveRecurExpanded, false); } else { // Look in the recurrences table StringBuffer sb = new StringBuffer(); sb.append("from "); sb.append(BwRecurrenceInstance.class.getName()); sb.append(" rec "); sb.append(" where rec.master.guid=:guid "); sb.append(" and rec.recurrenceId=:rid "); sess.createQuery(sb.toString()); sess.setString("guid", guid); sess.setString("rid", rid); BwRecurrenceInstance inst = (BwRecurrenceInstance)sess.getUnique(); if (inst == null) { return ts; } cei = makeProxy(inst, null, null, CalFacadeDefs.retrieveRecurExpanded, false); } if (cei != null) { ts.add(cei); } return ts; }
1,120,731
public void delete(WebdavNsNode node) throws WebdavIntfException { try { CaldavBwNode uwnode = getBwnode(node); if (!(uwnode instanceof CaldavComponentNode)) { throw WebdavIntfException.unauthorized(); } CaldavComponentNode cnode = (CaldavComponentNode)uwnode; BwEvent ev = cnode.getEvent(); if (ev != null) { if (debug) { trace("About to delete event " + ev); } svci.deleteEvent(ev, true); } else { if (debug) { trace("No event object available"); } } } catch (WebdavIntfException we) { throw we; } catch (Throwable t) { throw new WebdavIntfException(t); } }
public void delete(WebdavNsNode node) throws WebdavIntfException { try { CaldavBwNode uwnode = getBwnode(node); if (!(uwnode instanceof CaldavComponentNode)) { throw WebdavIntfException.unauthorized(); } CaldavComponentNode cnode = (CaldavComponentNode)uwnode; BwEvent ev = cnode.getEventInfo().getEvent(); if (ev != null) { if (debug) { trace("About to delete event " + ev); } svci.deleteEvent(ev, true); } else { if (debug) { trace("No event object available"); } } } catch (WebdavIntfException we) { throw we; } catch (Throwable t) { throw new WebdavIntfException(t); } }
1,120,732
public void emitAcl(WebdavNsNode node) throws WebdavIntfException { CaldavBwNode uwnode = getBwnode(node); CaldavURI cdUri = uwnode.getCDURI(); Acl acl = null; try { if (cdUri.isCalendar()) { acl = getSvci().getAcl(cdUri.getCal()); } else { acl = getSvci().getAcl(((CaldavComponentNode)node).getEvent()); } emitAccess.emitAcl(acl); } catch (Throwable t) { throw new WebdavIntfException(t); } }
public void emitAcl(WebdavNsNode node) throws WebdavIntfException { CaldavBwNode uwnode = getBwnode(node); CaldavURI cdUri = uwnode.getCDURI(); Acl acl = null; try { if (cdUri.isCalendar()) { acl = cdUri.getCal().getCurrentAccess().acl; } else { acl = getSvci().getAcl(((CaldavComponentNode)node).getEvent()); } emitAccess.emitAcl(acl); } catch (Throwable t) { throw new WebdavIntfException(t); } }
1,120,733
public void emitAcl(WebdavNsNode node) throws WebdavIntfException { CaldavBwNode uwnode = getBwnode(node); CaldavURI cdUri = uwnode.getCDURI(); Acl acl = null; try { if (cdUri.isCalendar()) { acl = getSvci().getAcl(cdUri.getCal()); } else { acl = getSvci().getAcl(((CaldavComponentNode)node).getEvent()); } emitAccess.emitAcl(acl); } catch (Throwable t) { throw new WebdavIntfException(t); } }
public void emitAcl(WebdavNsNode node) throws WebdavIntfException { CaldavBwNode uwnode = getBwnode(node); CaldavURI cdUri = uwnode.getCDURI(); Acl acl = null; try { if (cdUri.isCalendar()) { acl = getSvci().getAcl(cdUri.getCal()); } else { acl = ((CaldavComponentNode)node).getEventInfo().getCurrentAccess().acl; } emitAccess.emitAcl(acl); } catch (Throwable t) { throw new WebdavIntfException(t); } }
1,120,734
public void updateAccess(AclInfo ainfo) throws WebdavIntfException { CdAclInfo info = (CdAclInfo)ainfo; CaldavBwNode node = (CaldavBwNode)getNode(info.what); CalSvcI svci = getSvci(); try { if (node.isCalendar()) { BwCalendar cal = node.getCDURI().getCal(); svci.changeAccess(cal, info.aces); svci.updateCalendar(cal); } else { BwEvent ev = ((CaldavComponentNode)node).getEvent(); svci.changeAccess(ev, info.aces); svci.updateEvent(ev); } } catch (WebdavIntfException wi) { throw wi; } catch (Throwable t) { throw new WebdavIntfException(t); } }
public void updateAccess(AclInfo ainfo) throws WebdavIntfException { CdAclInfo info = (CdAclInfo)ainfo; CaldavBwNode node = (CaldavBwNode)getNode(info.what); CalSvcI svci = getSvci(); try { if (node.isCalendar()) { BwCalendar cal = node.getCDURI().getCal(); svci.changeAccess(cal, info.aces); svci.updateCalendar(cal); } else { BwEvent ev = ((CaldavComponentNode)node).getEventInfo().getEvent(); svci.changeAccess(ev, info.aces); svci.updateEvent(ev); } } catch (WebdavIntfException wi) { throw wi; } catch (Throwable t) { throw new WebdavIntfException(t); } }
1,120,735
private String getRealPathToReportFile(String fileName, String extension, long folderIdentifier) { IWMainApplication mainApp = getIWApplicationContext().getIWMainApplication(); String separator = FileUtil.getFileSeparator(); StringBuffer path = new StringBuffer(mainApp.getApplicationRealPath()); path.append(IWCacheManager.IW_ROOT_CACHE_DIRECTORY) .append(separator) .append(REPORT_FOLDER); // check if the folder exists create it if necessary // usually the folder should be already be there. // the folder is never deleted by this class String folderPath = path.toString(); File[] files = FileUtil.getAllFilesInDirectory(folderPath); if(files!=null){ long currentTime = System.currentTimeMillis(); for (int i = 0; i < files.length; i++) { File file = files[i]; long modifiedFile = file.lastModified(); if (currentTime - modifiedFile > 300000) { String pathToFile = file.getAbsolutePath(); FileUtil.deleteAllFilesInDirectory(pathToFile); file.delete(); } } } path.append(separator); path.append(folderIdentifier); folderPath = path.toString(); FileUtil.createFolder(folderPath); path.append(separator) .append(fileName) .append(DOT) .append(extension); return path.toString(); }
private String getRealPathToReportFile(String fileName, String extension, long folderIdentifier) { IWMainApplication mainApp = getIWApplicationContext().getIWMainApplication(); String separator = FileUtil.getFileSeparator(); StringBuffer path = new StringBuffer(mainApp.getApplicationRealPath()); path.append(IWCacheManager.IW_ROOT_CACHE_DIRECTORY) .append(separator) .append(REPORT_FOLDER); // check if the folder exists create it if necessary // usually the folder should be already be there. // the folder is never deleted by this class String folderPath = path.toString(); File[] files = FileUtil.getAllFilesInDirectory(folderPath); if(files!=null){ long currentTime = System.currentTimeMillis(); for (int i = 0; i < files.length; i++) { File file = files[i]; long modifiedFile = file.lastModified(); if (currentTime - modifiedFile > 300000) { String pathToFile = file.getAbsolutePath(); FileUtil.deleteAllFilesInDirectory(pathToFile); file.delete(); } } } path.append(separator); path.append(folderIdentifier); folderPath = path.toString(); FileUtil.createFolder(folderPath); path.append(separator) .append(fileName) .append(DOT) .append(extension); return path.toString(); }
1,120,736
public ATObject meta_newInstance(ATTable initargs) throws InterpreterException { ATObject newhost = initargs.base_at(NATNumber.ONE); if (newhost.isJavaObjectUnderSymbiosis()) { return new JavaField(newhost.asJavaObjectUnderSymbiosis().getWrappedObject(), field_); } else { throw new XIllegalArgument("Java Field re-initialization requires a symbiotic Java object, given " + newhost); } }
public ATObject meta_newInstance(ATTable initargs) throws InterpreterException { ATObject newhost = initargs.base_at(NATNumber.ONE); if (newhost.isJavaObjectUnderSymbiosis()) { return new JavaField(newhost.asJavaObjectUnderSymbiosis().getWrappedObject(), field_); } else { throw new XIllegalArgument("Java Field re-initialization requires a symbiotic Java object, given " + newhost); } }
1,120,737
public ATObject meta_newInstance(ATTable initargs) throws InterpreterException { ATObject newhost = initargs.base_at(NATNumber.ONE); if (newhost.isJavaObjectUnderSymbiosis()) { return new JavaField(newhost.asJavaObjectUnderSymbiosis().getWrappedObject(), field_); } else { throw new XIllegalArgument("Java Field re-initialization requires a symbiotic Java object, given " + newhost); } }
public ATObject meta_newInstance(ATTable initargs) throws InterpreterException { ATObject newhost = initargs.base_at(NATNumber.ONE); if (newhost.isJavaObjectUnderSymbiosis()) { return new JavaField(newhost.asJavaObjectUnderSymbiosis().getWrappedObject(), field_); } else { ATObject newhost = initargs.base_at(NATNumber.ONE); if (newhost.isJavaObjectUnderSymbiosis()) { return new JavaField(newhost.asJavaObjectUnderSymbiosis().getWrappedObject(), field_); } else { throw new XIllegalArgument("Java Field re-initialization requires a symbiotic Java object, given " + newhost); } } }
1,120,738
public void testNullValueMapping() { Map nullKeyMap = new HashMap(); nullKeyMap.put("A", "B"); nullKeyMap.put("wombat", null); try { MultivaluedPersonAttributeUtils.parseAttributeToAttributeMapping(nullKeyMap); } catch (IllegalArgumentException iae) { // good return; } fail("Should have rejected map argument containing null value."); }
public void testNullValueMapping() { Map nullKeyMap = new HashMap(); nullKeyMap.put("A", "B"); nullKeyMap.put("wombat", null); try { MultivaluedPersonAttributeUtils.parseAttributeToAttributeMapping(nullKeyMap); } catch (IllegalArgumentException iae) { // good return; } fail("Should have rejected map argument containing null value."); }
1,120,739
private Class getDescriptorClassNameForViewId(String viewId) throws ClassNotFoundException{ String encryptedClassName = null; //if(viewId.startsWith("/window")){ // encryptedClassName = viewId.substring(11,viewId.length()); //} //else{ String[] urlArray= StringHandler.breakDownURL(viewId); if(urlArray.length<1){ //encryptedClassName = "6975"; Class defaultClass = Class.forName("com.idega.workspace.WorkspaceLoginPage"); encryptedClassName = IWMainApplication.getEncryptedClassName(defaultClass); } else if(urlArray.length==1){ encryptedClassName = urlArray[0]; } else if(urlArray.length==2){ encryptedClassName = urlArray[1]; } //String encryptedClassName=urlArray[1]; //} String realClassName = IWMainApplication.decryptClassName(encryptedClassName); return Class.forName(realClassName); }
private Class getDescriptorClassNameForViewId(String viewId) throws ClassNotFoundException{ String encryptedClassName = null; //if(viewId.startsWith("/window")){ // encryptedClassName = viewId.substring(11,viewId.length()); //} //else{ String[] urlArray= StringHandler.breakDownURL(viewId); if(urlArray == null || urlArray.length<1){ //encryptedClassName = "6975"; Class defaultClass = Class.forName("com.idega.workspace.WorkspaceLoginPage"); encryptedClassName = IWMainApplication.getEncryptedClassName(defaultClass); } else if(urlArray.length==1){ encryptedClassName = urlArray[0]; } else if(urlArray.length==2){ encryptedClassName = urlArray[1]; } //String encryptedClassName=urlArray[1]; //} String realClassName = IWMainApplication.decryptClassName(encryptedClassName); return Class.forName(realClassName); }
1,120,740
public CalSvcTestWrapper(String user, int access, boolean publicEvents, boolean debug) throws Throwable { super(); //this.debug = debug; isPublic = publicEvents; this.user = user; String envPrefix; if (publicEvents) { envPrefix = webAdminAppPrefix; } else if (user == null) { envPrefix = webPublicAppPrefix; } else { envPrefix = webPersonalAppPrefix; } CalSvcIPars pars = new CalSvcIPars(user, user, envPrefix, publicEvents, false, // caldav null, // synch debug); init(pars); }
public CalSvcTestWrapper(String user, int access, boolean publicEvents, boolean debug) throws Throwable { super(); //this.debug = debug; isPublic = publicEvents; this.user = user; String envPrefix; if (publicEvents) { envPrefix = webAdminAppPrefix; } else if (user == null) { envPrefix = webPublicAppPrefix; } else { envPrefix = webPersonalAppPrefix; } CalSvcIPars pars = new CalSvcIPars(user, user, null, envPrefix, publicEvents, false, // caldav null, // synch debug); init(pars); }
1,120,741
public synchronized void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) { logger.debug("IN DRAW LABELS"); Color color = new Color(0, 0, 0, 128); graphics2D.setColor(color); java.awt.Dimension dimension = getSize(); float fontSize = dimension.width / 20; if(fontSize < 4) fontSize = 4; else if(fontSize > 32) fontSize = 32; Font font = new Font("serif", Font.BOLD, (int)fontSize); graphics2D.setFont(font); String labelStr = new String(); labelStr = particleMotion.hseis.getSeismogram().getName(); int x = (dimension.width - (int)(labelStr.length()*fontSize)) / 2 - getInsets().left - getInsets().right; int y = dimension.height - 4; graphics2D.drawString(labelStr, x, y); labelStr = particleMotion.vseis.getSeismogram().getName(); x = font.getSize(); y = (dimension.height - (int)(labelStr.length()*fontSize)) / 2 - getInsets().top - getInsets().bottom; //get the original AffineTransform AffineTransform oldTransform = graphics2D.getTransform(); AffineTransform ct = AffineTransform.getTranslateInstance(x, y); graphics2D.transform(ct); graphics2D.transform(AffineTransform.getRotateInstance(Math.PI/2)); graphics2D.drawString(labelStr, 0, 0); //restore the original AffineTransform graphics2D.setTransform(oldTransform); }
public synchronized void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) { logger.debug("IN DRAW LABELS"); Color color = new Color(0, 0, 0, 128); graphics2D.setColor(color); java.awt.Dimension dimension = getSize(); float fontSize = dimension.width / 20; if(fontSize < 4) fontSize = 4; else if(fontSize > 32) fontSize = 32; Font font = new Font("serif", Font.BOLD, (int)fontSize); graphics2D.setFont(font); String labelStr = new String(); labelStr = particleMotion.hseis.getName(); int x = (dimension.width - (int)(labelStr.length()*fontSize)) / 2 - getInsets().left - getInsets().right; int y = dimension.height - 4; graphics2D.drawString(labelStr, x, y); labelStr = particleMotion.vseis.getSeismogram().getName(); x = font.getSize(); y = (dimension.height - (int)(labelStr.length()*fontSize)) / 2 - getInsets().top - getInsets().bottom; //get the original AffineTransform AffineTransform oldTransform = graphics2D.getTransform(); AffineTransform ct = AffineTransform.getTranslateInstance(x, y); graphics2D.transform(ct); graphics2D.transform(AffineTransform.getRotateInstance(Math.PI/2)); graphics2D.drawString(labelStr, 0, 0); //restore the original AffineTransform graphics2D.setTransform(oldTransform); }
1,120,742
public synchronized void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) { logger.debug("IN DRAW LABELS"); Color color = new Color(0, 0, 0, 128); graphics2D.setColor(color); java.awt.Dimension dimension = getSize(); float fontSize = dimension.width / 20; if(fontSize < 4) fontSize = 4; else if(fontSize > 32) fontSize = 32; Font font = new Font("serif", Font.BOLD, (int)fontSize); graphics2D.setFont(font); String labelStr = new String(); labelStr = particleMotion.hseis.getSeismogram().getName(); int x = (dimension.width - (int)(labelStr.length()*fontSize)) / 2 - getInsets().left - getInsets().right; int y = dimension.height - 4; graphics2D.drawString(labelStr, x, y); labelStr = particleMotion.vseis.getSeismogram().getName(); x = font.getSize(); y = (dimension.height - (int)(labelStr.length()*fontSize)) / 2 - getInsets().top - getInsets().bottom; //get the original AffineTransform AffineTransform oldTransform = graphics2D.getTransform(); AffineTransform ct = AffineTransform.getTranslateInstance(x, y); graphics2D.transform(ct); graphics2D.transform(AffineTransform.getRotateInstance(Math.PI/2)); graphics2D.drawString(labelStr, 0, 0); //restore the original AffineTransform graphics2D.setTransform(oldTransform); }
public synchronized void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) { logger.debug("IN DRAW LABELS"); Color color = new Color(0, 0, 0, 128); graphics2D.setColor(color); java.awt.Dimension dimension = getSize(); float fontSize = dimension.width / 20; if(fontSize < 4) fontSize = 4; else if(fontSize > 32) fontSize = 32; Font font = new Font("serif", Font.BOLD, (int)fontSize); graphics2D.setFont(font); String labelStr = new String(); labelStr = particleMotion.hseis.getSeismogram().getName(); int x = (dimension.width - (int)(labelStr.length()*fontSize)) / 2 - getInsets().left - getInsets().right; int y = dimension.height - 4; graphics2D.drawString(labelStr, x, y); labelStr = particleMotion.vseis.getName(); x = font.getSize(); y = (dimension.height - (int)(labelStr.length()*fontSize)) / 2 - getInsets().top - getInsets().bottom; //get the original AffineTransform AffineTransform oldTransform = graphics2D.getTransform(); AffineTransform ct = AffineTransform.getTranslateInstance(x, y); graphics2D.transform(ct); graphics2D.transform(AffineTransform.getRotateInstance(Math.PI/2)); graphics2D.drawString(labelStr, 0, 0); //restore the original AffineTransform graphics2D.setTransform(oldTransform); }
1,120,743
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getUserAuth().isSuperUser()) { return "noAccess"; } /** Set the objects to null so we get new ones. */ form.initFields(); form.assignAddingAdmingroup(false); return "continue"; }
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getUserAuth().isSuperUser()) { return "noAccess"; } /** Set the objects to null so we get new ones. */ initFields(form); form.assignAddingAdmingroup(false); return "continue"; }
1,120,744
public void setKonto(String value) throws DtausException { try { aKonto = Long.parseLong(value); } catch (NumberFormatException e) { throw new DtausException(DtausException.A_KONTO_FEHLERHAFT); } }
public void setKonto(String value) throws DtausException { try { aKonto = Long.parseLong(value); } catch (NumberFormatException e) { throw new DtausException(DtausException.A_KONTO_FEHLERHAFT, value); } }
1,120,746
public void field(String name) throws java.lang.Exception{ BwPreferences p = (BwPreferences)top(); if (ownedEntityTags(p, name)) { return; } if (name.equals("email")) { p.setEmail(stringFld()); } else if (name.equals("default-calendar")) { p.setDefaultCalendar(calendarFld()); } else if (name.equals("skinName")) { p.setSkinName(stringFld()); } else if (name.equals("skinStyle")) { p.setSkinStyle(stringFld()); } else if (name.equals("preferredView")) { p.setPreferredView(stringFld()); } else if (name.equals("subscriptions")) { // Nothing to do now } else if (name.equals("workDays")) { p.setWorkDays(stringFld()); } else if (name.equals("workdayStart")) { p.setWorkdayStart(intFld()); } else if (name.equals("workdayEnd")) { p.setWorkdayEnd(intFld()); // subscription fields } else if (name.equals("subscription")) { globals.subscriptionsTbl.put(p.getOwner(), globals.curSub); p.addSubscription(globals.curSub); globals.curSub = null; } else if (name.equals("sub-id")) { globals.curSub = new BwSubscription(); globals.curSub.setId(intFld()); } else if (name.equals("sub-seq")) { globals.curSub.setSeq(intFld()); } else if (name.equals("sub-name")) { globals.curSub.setName(stringFld()); } else if (name.equals("sub-owner")) { if (p.getOwner().getId() != intFld()) { error("Subscription owners don't match for " + globals.curSub); error(" Found owner id " + intFld() + " expected " + p); } globals.curSub.setOwner(p.getOwner()); } else if (name.equals("sub-uri")) { globals.curSub.setUri(stringFld()); } else if (name.equals("sub-affectsFreeBusy")) { globals.curSub.setAffectsFreeBusy(booleanFld()); } else if (name.equals("sub-display")) { globals.curSub.setDisplay(booleanFld()); } else if (name.equals("sub-style")) { globals.curSub.setStyle(stringFld()); } else if (name.equals("sub-internalSubscription")) { globals.curSub.setInternalSubscription(booleanFld()); } else if (name.equals("sub-emailNotifications")) { globals.curSub.setEmailNotifications(booleanFld()); } else if (name.equals("sub-calendarDeleted")) { globals.curSub.setCalendarDeleted(booleanFld()); } else if (name.equals("sub-unremoveable")) { globals.curSub.setUnremoveable(booleanFld()); // view fields } else if (name.equals("view")) { p.addView(globals.curView); globals.curView = null; } else if (name.equals("view-id")) { globals.curView = new BwView(); globals.curView.setId(intFld()); } else if (name.equals("view-seq")) { globals.curView.setSeq(intFld()); } else if (name.equals("view-name")) { globals.curView.setName(stringFld()); } else if (name.equals("view-owner")) { if (p.getOwner().getId() != intFld()) { error("Viewowners don't match for " + globals.curView); error(" Found owner id " + intFld() + " expected " + p.getOwner()); } globals.curView.setOwner(p.getOwner()); } else if (name.equals("view-subscriptions")) { } else if (name.equals("view-sub-id")) { BwSubscription sub = globals.subscriptionsTbl.getSub(p.getOwner(), intFld()); if (sub == null) { error(" Missing subscription " + intFld() + " for view " + globals.curView); } else { globals.curView.addSubscription(sub); } } }
public void field(String name) throws java.lang.Exception{ BwPreferences p = (BwPreferences)top(); if (ownedEntityTags(p, name)) { return; } if (name.equals("email")) { p.setEmail(stringFld()); } else if (name.equals("default-calendar")) { p.setDefaultCalendar(calendarFld()); } else if (name.equals("skinName")) { p.setSkinName(stringFld()); } else if (name.equals("skinStyle")) { p.setSkinStyle(stringFld()); } else if (name.equals("preferredView")) { p.setPreferredView(stringFld()); } else if (name.equals("subscriptions")) { // Nothing to do now } else if (name.equals("workDays")) { p.setWorkDays(stringFld()); } else if (name.equals("workdayStart")) { p.setWorkdayStart(intFld()); } else if (name.equals("workdayEnd")) { p.setWorkdayEnd(intFld()); // subscription fields } else if (name.equals("subscription")) { globals.subscriptionsTbl.put(p.getOwner(), globals.curSub); p.addSubscription(globals.curSub); globals.curSub = null; } else if (name.equals("sub-id")) { globals.curSub = new BwSubscription(); globals.curSub.setId(intFld()); } else if (name.equals("sub-seq")) { globals.curSub.setSeq(intFld()); } else if (name.equals("sub-name")) { globals.curSub.setName(stringFld()); } else if (name.equals("sub-owner")) { BwUser sowner = userFld(); if (!p.getOwner().equals(sowner)) { error("Subscription owners don't match for " + globals.curSub); error(" Found owner id " + intFld() + " expected " + p); } globals.curSub.setOwner(p.getOwner()); } else if (name.equals("sub-uri")) { globals.curSub.setUri(stringFld()); } else if (name.equals("sub-affectsFreeBusy")) { globals.curSub.setAffectsFreeBusy(booleanFld()); } else if (name.equals("sub-display")) { globals.curSub.setDisplay(booleanFld()); } else if (name.equals("sub-style")) { globals.curSub.setStyle(stringFld()); } else if (name.equals("sub-internalSubscription")) { globals.curSub.setInternalSubscription(booleanFld()); } else if (name.equals("sub-emailNotifications")) { globals.curSub.setEmailNotifications(booleanFld()); } else if (name.equals("sub-calendarDeleted")) { globals.curSub.setCalendarDeleted(booleanFld()); } else if (name.equals("sub-unremoveable")) { globals.curSub.setUnremoveable(booleanFld()); // view fields } else if (name.equals("view")) { p.addView(globals.curView); globals.curView = null; } else if (name.equals("view-id")) { globals.curView = new BwView(); globals.curView.setId(intFld()); } else if (name.equals("view-seq")) { globals.curView.setSeq(intFld()); } else if (name.equals("view-name")) { globals.curView.setName(stringFld()); } else if (name.equals("view-owner")) { BwUser sowner = userFld(); if (!p.getOwner().equals(sowner)) { error("Viewowners don't match for " + globals.curView); error(" Found owner id " + intFld() + " expected " + p.getOwner()); } globals.curView.setOwner(p.getOwner()); } else if (name.equals("view-subscriptions")) { } else if (name.equals("view-sub-id")) { BwSubscription sub = globals.subscriptionsTbl.getSub(p.getOwner(), intFld()); if (sub == null) { error(" Missing subscription " + intFld() + " for view " + globals.curView); } else { globals.curView.addSubscription(sub); } } }
1,120,747
public void field(String name) throws java.lang.Exception{ BwPreferences p = (BwPreferences)top(); if (ownedEntityTags(p, name)) { return; } if (name.equals("email")) { p.setEmail(stringFld()); } else if (name.equals("default-calendar")) { p.setDefaultCalendar(calendarFld()); } else if (name.equals("skinName")) { p.setSkinName(stringFld()); } else if (name.equals("skinStyle")) { p.setSkinStyle(stringFld()); } else if (name.equals("preferredView")) { p.setPreferredView(stringFld()); } else if (name.equals("subscriptions")) { // Nothing to do now } else if (name.equals("workDays")) { p.setWorkDays(stringFld()); } else if (name.equals("workdayStart")) { p.setWorkdayStart(intFld()); } else if (name.equals("workdayEnd")) { p.setWorkdayEnd(intFld()); // subscription fields } else if (name.equals("subscription")) { globals.subscriptionsTbl.put(p.getOwner(), globals.curSub); p.addSubscription(globals.curSub); globals.curSub = null; } else if (name.equals("sub-id")) { globals.curSub = new BwSubscription(); globals.curSub.setId(intFld()); } else if (name.equals("sub-seq")) { globals.curSub.setSeq(intFld()); } else if (name.equals("sub-name")) { globals.curSub.setName(stringFld()); } else if (name.equals("sub-owner")) { if (p.getOwner().getId() != intFld()) { error("Subscription owners don't match for " + globals.curSub); error(" Found owner id " + intFld() + " expected " + p); } globals.curSub.setOwner(p.getOwner()); } else if (name.equals("sub-uri")) { globals.curSub.setUri(stringFld()); } else if (name.equals("sub-affectsFreeBusy")) { globals.curSub.setAffectsFreeBusy(booleanFld()); } else if (name.equals("sub-display")) { globals.curSub.setDisplay(booleanFld()); } else if (name.equals("sub-style")) { globals.curSub.setStyle(stringFld()); } else if (name.equals("sub-internalSubscription")) { globals.curSub.setInternalSubscription(booleanFld()); } else if (name.equals("sub-emailNotifications")) { globals.curSub.setEmailNotifications(booleanFld()); } else if (name.equals("sub-calendarDeleted")) { globals.curSub.setCalendarDeleted(booleanFld()); } else if (name.equals("sub-unremoveable")) { globals.curSub.setUnremoveable(booleanFld()); // view fields } else if (name.equals("view")) { p.addView(globals.curView); globals.curView = null; } else if (name.equals("view-id")) { globals.curView = new BwView(); globals.curView.setId(intFld()); } else if (name.equals("view-seq")) { globals.curView.setSeq(intFld()); } else if (name.equals("view-name")) { globals.curView.setName(stringFld()); } else if (name.equals("view-owner")) { if (p.getOwner().getId() != intFld()) { error("Viewowners don't match for " + globals.curView); error(" Found owner id " + intFld() + " expected " + p.getOwner()); } globals.curView.setOwner(p.getOwner()); } else if (name.equals("view-subscriptions")) { } else if (name.equals("view-sub-id")) { BwSubscription sub = globals.subscriptionsTbl.getSub(p.getOwner(), intFld()); if (sub == null) { error(" Missing subscription " + intFld() + " for view " + globals.curView); } else { globals.curView.addSubscription(sub); } } }
public void field(String name) throws java.lang.Exception{ BwPreferences p = (BwPreferences)top(); if (ownedEntityTags(p, name)) { return; } if (name.equals("email")) { p.setEmail(stringFld()); } else if (name.equals("default-calendar")) { p.setDefaultCalendar(calendarFld()); } else if (name.equals("skinName")) { p.setSkinName(stringFld()); } else if (name.equals("skinStyle")) { p.setSkinStyle(stringFld()); } else if (name.equals("preferredView")) { p.setPreferredView(stringFld()); } else if (name.equals("subscriptions")) { // Nothing to do now } else if (name.equals("workDays")) { p.setWorkDays(stringFld()); } else if (name.equals("workdayStart")) { p.setWorkdayStart(intFld()); } else if (name.equals("workdayEnd")) { p.setWorkdayEnd(intFld()); // subscription fields } else if (name.equals("subscription")) { globals.subscriptionsTbl.put(p.getOwner(), globals.curSub); p.addSubscription(globals.curSub); globals.curSub = null; } else if (name.equals("sub-id")) { globals.curSub = new BwSubscription(); globals.curSub.setId(intFld()); } else if (name.equals("sub-seq")) { globals.curSub.setSeq(intFld()); } else if (name.equals("sub-name")) { globals.curSub.setName(stringFld()); } else if (name.equals("sub-owner")) { if (p.getOwner().getId() != intFld()) { error("Subscription owners don't match for " + globals.curSub); error(" Found owner " + sowner + " expected " + p.getOwner()); } globals.curSub.setOwner(p.getOwner()); } else if (name.equals("sub-uri")) { globals.curSub.setUri(stringFld()); } else if (name.equals("sub-affectsFreeBusy")) { globals.curSub.setAffectsFreeBusy(booleanFld()); } else if (name.equals("sub-display")) { globals.curSub.setDisplay(booleanFld()); } else if (name.equals("sub-style")) { globals.curSub.setStyle(stringFld()); } else if (name.equals("sub-internalSubscription")) { globals.curSub.setInternalSubscription(booleanFld()); } else if (name.equals("sub-emailNotifications")) { globals.curSub.setEmailNotifications(booleanFld()); } else if (name.equals("sub-calendarDeleted")) { globals.curSub.setCalendarDeleted(booleanFld()); } else if (name.equals("sub-unremoveable")) { globals.curSub.setUnremoveable(booleanFld()); // view fields } else if (name.equals("view")) { p.addView(globals.curView); globals.curView = null; } else if (name.equals("view-id")) { globals.curView = new BwView(); globals.curView.setId(intFld()); } else if (name.equals("view-seq")) { globals.curView.setSeq(intFld()); } else if (name.equals("view-name")) { globals.curView.setName(stringFld()); } else if (name.equals("view-owner")) { if (p.getOwner().getId() != intFld()) { error("Viewowners don't match for " + globals.curView); error(" Found owner id " + intFld() + " expected " + p.getOwner()); } globals.curView.setOwner(p.getOwner()); } else if (name.equals("view-subscriptions")) { } else if (name.equals("view-sub-id")) { BwSubscription sub = globals.subscriptionsTbl.getSub(p.getOwner(), intFld()); if (sub == null) { error(" Missing subscription " + intFld() + " for view " + globals.curView); } else { globals.curView.addSubscription(sub); } } }
1,120,748
public void field(String name) throws java.lang.Exception{ BwPreferences p = (BwPreferences)top(); if (ownedEntityTags(p, name)) { return; } if (name.equals("email")) { p.setEmail(stringFld()); } else if (name.equals("default-calendar")) { p.setDefaultCalendar(calendarFld()); } else if (name.equals("skinName")) { p.setSkinName(stringFld()); } else if (name.equals("skinStyle")) { p.setSkinStyle(stringFld()); } else if (name.equals("preferredView")) { p.setPreferredView(stringFld()); } else if (name.equals("subscriptions")) { // Nothing to do now } else if (name.equals("workDays")) { p.setWorkDays(stringFld()); } else if (name.equals("workdayStart")) { p.setWorkdayStart(intFld()); } else if (name.equals("workdayEnd")) { p.setWorkdayEnd(intFld()); // subscription fields } else if (name.equals("subscription")) { globals.subscriptionsTbl.put(p.getOwner(), globals.curSub); p.addSubscription(globals.curSub); globals.curSub = null; } else if (name.equals("sub-id")) { globals.curSub = new BwSubscription(); globals.curSub.setId(intFld()); } else if (name.equals("sub-seq")) { globals.curSub.setSeq(intFld()); } else if (name.equals("sub-name")) { globals.curSub.setName(stringFld()); } else if (name.equals("sub-owner")) { if (p.getOwner().getId() != intFld()) { error("Subscription owners don't match for " + globals.curSub); error(" Found owner id " + intFld() + " expected " + p); } globals.curSub.setOwner(p.getOwner()); } else if (name.equals("sub-uri")) { globals.curSub.setUri(stringFld()); } else if (name.equals("sub-affectsFreeBusy")) { globals.curSub.setAffectsFreeBusy(booleanFld()); } else if (name.equals("sub-display")) { globals.curSub.setDisplay(booleanFld()); } else if (name.equals("sub-style")) { globals.curSub.setStyle(stringFld()); } else if (name.equals("sub-internalSubscription")) { globals.curSub.setInternalSubscription(booleanFld()); } else if (name.equals("sub-emailNotifications")) { globals.curSub.setEmailNotifications(booleanFld()); } else if (name.equals("sub-calendarDeleted")) { globals.curSub.setCalendarDeleted(booleanFld()); } else if (name.equals("sub-unremoveable")) { globals.curSub.setUnremoveable(booleanFld()); // view fields } else if (name.equals("view")) { p.addView(globals.curView); globals.curView = null; } else if (name.equals("view-id")) { globals.curView = new BwView(); globals.curView.setId(intFld()); } else if (name.equals("view-seq")) { globals.curView.setSeq(intFld()); } else if (name.equals("view-name")) { globals.curView.setName(stringFld()); } else if (name.equals("view-owner")) { if (p.getOwner().getId() != intFld()) { error("Viewowners don't match for " + globals.curView); error(" Found owner id " + intFld() + " expected " + p.getOwner()); } globals.curView.setOwner(p.getOwner()); } else if (name.equals("view-subscriptions")) { } else if (name.equals("view-sub-id")) { BwSubscription sub = globals.subscriptionsTbl.getSub(p.getOwner(), intFld()); if (sub == null) { error(" Missing subscription " + intFld() + " for view " + globals.curView); } else { globals.curView.addSubscription(sub); } } }
public void field(String name) throws java.lang.Exception{ BwPreferences p = (BwPreferences)top(); if (ownedEntityTags(p, name)) { return; } if (name.equals("email")) { p.setEmail(stringFld()); } else if (name.equals("default-calendar")) { p.setDefaultCalendar(calendarFld()); } else if (name.equals("skinName")) { p.setSkinName(stringFld()); } else if (name.equals("skinStyle")) { p.setSkinStyle(stringFld()); } else if (name.equals("preferredView")) { p.setPreferredView(stringFld()); } else if (name.equals("subscriptions")) { // Nothing to do now } else if (name.equals("workDays")) { p.setWorkDays(stringFld()); } else if (name.equals("workdayStart")) { p.setWorkdayStart(intFld()); } else if (name.equals("workdayEnd")) { p.setWorkdayEnd(intFld()); // subscription fields } else if (name.equals("subscription")) { globals.subscriptionsTbl.put(p.getOwner(), globals.curSub); p.addSubscription(globals.curSub); globals.curSub = null; } else if (name.equals("sub-id")) { globals.curSub = new BwSubscription(); globals.curSub.setId(intFld()); } else if (name.equals("sub-seq")) { globals.curSub.setSeq(intFld()); } else if (name.equals("sub-name")) { globals.curSub.setName(stringFld()); } else if (name.equals("sub-owner")) { if (p.getOwner().getId() != intFld()) { error("Subscription owners don't match for " + globals.curSub); error(" Found owner id " + intFld() + " expected " + p); } globals.curSub.setOwner(p.getOwner()); } else if (name.equals("sub-uri")) { globals.curSub.setUri(stringFld()); } else if (name.equals("sub-affectsFreeBusy")) { globals.curSub.setAffectsFreeBusy(booleanFld()); } else if (name.equals("sub-display")) { globals.curSub.setDisplay(booleanFld()); } else if (name.equals("sub-style")) { globals.curSub.setStyle(stringFld()); } else if (name.equals("sub-internalSubscription")) { globals.curSub.setInternalSubscription(booleanFld()); } else if (name.equals("sub-emailNotifications")) { globals.curSub.setEmailNotifications(booleanFld()); } else if (name.equals("sub-calendarDeleted")) { globals.curSub.setCalendarDeleted(booleanFld()); } else if (name.equals("sub-unremoveable")) { globals.curSub.setUnremoveable(booleanFld()); // view fields } else if (name.equals("view")) { p.addView(globals.curView); globals.curView = null; } else if (name.equals("view-id")) { globals.curView = new BwView(); globals.curView.setId(intFld()); } else if (name.equals("view-seq")) { globals.curView.setSeq(intFld()); } else if (name.equals("view-name")) { globals.curView.setName(stringFld()); } else if (name.equals("view-owner")) { if (p.getOwner().getId() != intFld()) { error("Viewowners don't match for " + globals.curView); error(" Found owner id " + intFld() + " expected " + p.getOwner()); } globals.curView.setOwner(p.getOwner()); } else if (name.equals("view-subscriptions")) { } else if (name.equals("view-sub-id")) { BwSubscription sub = globals.subscriptionsTbl.getSub(p.getOwner(), intFld()); if (sub == null) { error(" Missing subscription " + intFld() + " for view " + globals.curView); } else { globals.curView.addSubscription(sub); } } }
1,120,749
private void drawString(Graphics2D graphics2d, String string, Point p, int alignment, double orientation) { int xc = p.x; int yc = p.y; AffineTransform transform = graphics2d.getTransform(); transform(graphics2d, orientation, xc, yc); FontMetrics fm = graphics2d.getFontMetrics(); double realTextWidth = fm.stringWidth(string); double realTextHeight = fm.getHeight() - fm.getDescent(); int offsetX = (int) (realTextWidth * (double) (alignment % 3) / 2.0); int offsetY = (int) (-realTextHeight * (double) (alignment / 3) / 2.0); if ((graphics2d != null) && (string != null)) { graphics2d.drawString(string, xc - offsetX, yc - offsetY); } graphics2d.setTransform(transform); }
private void drawString(Graphics2D graphics2d, String string, Point p, int alignment, double orientation) { int xc = p.x; int yc = p.y; AffineTransform transform = graphics2d.getTransform(); transform(graphics2d, orient, xc, yc); FontMetrics fm = graphics2d.getFontMetrics(); double realTextWidth = fm.stringWidth(string); double realTextHeight = fm.getHeight() - fm.getDescent(); int offsetX = (int) (realTextWidth * (double) (alignment % 3) / 2.0); int offsetY = (int) (-realTextHeight * (double) (alignment / 3) / 2.0); if ((graphics2d != null) && (string != null)) { graphics2d.drawString(string, xc - offsetX, yc - offsetY); } graphics2d.setTransform(transform); }
1,120,750
public void testExtend() { try { NATObject parent = new NATObject(lexicalRoot_); ATSymbol superSemantics = AGSymbol.alloc(NATText.atValue("superSemantics")); AGScopeTest test = new AGScopeTest(null, null, parent); NATObject child = (NATObject)parent.meta_extend( new NATClosure( new NATMethod(AGSymbol.alloc(NATText.atValue("lambda")), NATTable.EMPTY, new AGDefMethod(superSemantics, NATTable.EMPTY, new AGBegin( new NATTable( new ATObject[] { test } )))), lexicalRoot_)); test.scope_ = child; test.self_ = child; ATSymbol lateBoundSelf = AGSymbol.alloc(NATText.atValue("lateBoundSelf")); ATMethod lateBoundSelfTestMethod = new NATMethod( lateBoundSelf, NATTable.EMPTY, new AGScopeTest(parent, child, NATNil._INSTANCE_)); parent.meta_addMethod(lateBoundSelfTestMethod); child.meta_invoke(child, lateBoundSelf, NATTable.EMPTY); child.meta_invoke(child, superSemantics, NATTable.EMPTY); } catch (NATException e) { e.printStackTrace(); fail(); } }
public void testExtend() { try { NATObject parent = new NATObject(lexicalRoot_); ATSymbol superSemantics = AGSymbol.alloc(NATText.atValue("superSemantics")); AGScopeTest test = new AGScopeTest(null, null, parent); NATObject child = (NATObject)parent.meta_extend( new NATClosure( new NATMethod(AGSymbol.alloc(NATText.atValue("lambda")), NATTable.EMPTY, new AGDefFunction(superSemantics, NATTable.EMPTY, new AGBegin( new NATTable( new ATObject[] { test } )))), lexicalRoot_)); test.scope_ = child; test.self_ = child; ATSymbol lateBoundSelf = AGSymbol.alloc(NATText.atValue("lateBoundSelf")); ATMethod lateBoundSelfTestMethod = new NATMethod( lateBoundSelf, NATTable.EMPTY, new AGScopeTest(parent, child, NATNil._INSTANCE_)); parent.meta_addMethod(lateBoundSelfTestMethod); child.meta_invoke(child, lateBoundSelf, NATTable.EMPTY); child.meta_invoke(child, superSemantics, NATTable.EMPTY); } catch (NATException e) { e.printStackTrace(); fail(); } }
1,120,751
private Coercer(NATObject principal) { principal_ = principal; owningActor_ = (ELActor) EventLoop.currentEventLoop(); }
private Coercer(NATObject principal) { principal_ = principal; wrappingThread_ = Thread.currentThread(); }
1,120,752
public Object invoke(Object receiver, final Method method, Object[] arguments) throws Throwable { // handle toString, hashCode and equals in a dedicated fashion if (method.getDeclaringClass() == Object.class) { // invoke these methods on the principal rather than on the proxy try { return method.invoke(principal_, arguments); } catch (InvocationTargetException e) { throw e.getTargetException(); } // intercept access to the wrapped object for Java->AT value conversion } else if (method.getDeclaringClass() == SymbioticATObjectMarker.class) { return principal_; } else { final ATObject[] symbioticArgs; // support for variable-arity invocations from within AmbientTalk if ((arguments != null) && (arguments.length == 1) && (arguments[0] instanceof ATObject[])) { // no need to convert arguments symbioticArgs = (ATObject[]) arguments[0]; } else { symbioticArgs = new ATObject[(arguments == null) ? 0 : arguments.length]; for (int i = 0; i < symbioticArgs.length; i++) { symbioticArgs[i] = Symbiosis.javaToAmbientTalk(arguments[i]); } } // if the current thread is not an actor thread, treat the Java invocation // as a message send instead and enqueue it in my actor's thread if (!(Thread.currentThread() instanceof EventProcessor)) { // because a message send is asynchronous and Java threads work synchronously, // we'll have to make the Java thread wait for the result return owningActor_.sync_event_symbioticInvocation(new Callable() { public Object call(Object actorMirror) throws Exception { ATObject result = Reflection.downInvocation(principal_, method, symbioticArgs); return Symbiosis.ambientTalkToJava(result, method.getReturnType()); } }); } else { if (owningActor_ == EventLoop.currentEventLoop()) { // perform a synchronous invocation ATObject result = Reflection.downInvocation(principal_, method, symbioticArgs); // properly 'cast' the returned object into the appropriate interface return Symbiosis.ambientTalkToJava(result, method.getReturnType()); } else { // another event loop has direct access to this object, this means // an AT object has been shared between actors via Java, signal an error throw new XIllegalOperation("Detected illegal invocation: sharing via Java level of object " + principal_); } } } }
public Object invoke(Object receiver, final Method method, Object[] arguments) throws Throwable { // handle toString, hashCode and equals in a dedicated fashion if (method.getDeclaringClass() == Object.class) { // invoke these methods on the principal rather than on the proxy try { return method.invoke(principal_, arguments); } catch (InvocationTargetException e) { throw e.getTargetException(); } // intercept access to the wrapped object for Java->AT value conversion } else if (method.getDeclaringClass() == SymbioticATObjectMarker.class) { return principal_; } else { final ATObject[] symbioticArgs; // support for variable-arity invocations from within AmbientTalk if ((arguments != null) && (arguments.length == 1) && (arguments[0] instanceof ATObject[])) { // no need to convert arguments symbioticArgs = (ATObject[]) arguments[0]; } else { symbioticArgs = new ATObject[(arguments == null) ? 0 : arguments.length]; for (int i = 0; i < symbioticArgs.length; i++) { symbioticArgs[i] = Symbiosis.javaToAmbientTalk(arguments[i]); } } // if the current thread is not an actor thread, treat the Java invocation // as a message send instead and enqueue it in my actor's thread if (Thread.currentThread() != wrappingThread_) { if (Thread.currentThread() instanceof EventProcessor) { throw new XIllegalOperation("Detected illegal invocation: sharing via Java level of object " + principal_); } // because a message send is asynchronous and Java threads work synchronously, // we'll have to make the Java thread wait for the result return owningActor_.sync_event_symbioticInvocation(new Callable() { public Object call(Object actorMirror) throws Exception { ATObject result = Reflection.downInvocation(principal_, method, symbioticArgs); return Symbiosis.ambientTalkToJava(result, method.getReturnType()); } }); } else { if (owningActor_ == EventLoop.currentEventLoop()) { // perform a synchronous invocation ATObject result = Reflection.downInvocation(principal_, method, symbioticArgs); // properly 'cast' the returned object into the appropriate interface return Symbiosis.ambientTalkToJava(result, method.getReturnType()); } else { // another event loop has direct access to this object, this means // an AT object has been shared between actors via Java, signal an error throw new XIllegalOperation("Detected illegal invocation: sharing via Java level of object " + principal_); } } } }
1,120,753
public Object invoke(Object receiver, final Method method, Object[] arguments) throws Throwable { // handle toString, hashCode and equals in a dedicated fashion if (method.getDeclaringClass() == Object.class) { // invoke these methods on the principal rather than on the proxy try { return method.invoke(principal_, arguments); } catch (InvocationTargetException e) { throw e.getTargetException(); } // intercept access to the wrapped object for Java->AT value conversion } else if (method.getDeclaringClass() == SymbioticATObjectMarker.class) { return principal_; } else { final ATObject[] symbioticArgs; // support for variable-arity invocations from within AmbientTalk if ((arguments != null) && (arguments.length == 1) && (arguments[0] instanceof ATObject[])) { // no need to convert arguments symbioticArgs = (ATObject[]) arguments[0]; } else { symbioticArgs = new ATObject[(arguments == null) ? 0 : arguments.length]; for (int i = 0; i < symbioticArgs.length; i++) { symbioticArgs[i] = Symbiosis.javaToAmbientTalk(arguments[i]); } } // if the current thread is not an actor thread, treat the Java invocation // as a message send instead and enqueue it in my actor's thread if (!(Thread.currentThread() instanceof EventProcessor)) { // because a message send is asynchronous and Java threads work synchronously, // we'll have to make the Java thread wait for the result return owningActor_.sync_event_symbioticInvocation(new Callable() { public Object call(Object actorMirror) throws Exception { ATObject result = Reflection.downInvocation(principal_, method, symbioticArgs); return Symbiosis.ambientTalkToJava(result, method.getReturnType()); } }); } else { if (owningActor_ == EventLoop.currentEventLoop()) { // perform a synchronous invocation ATObject result = Reflection.downInvocation(principal_, method, symbioticArgs); // properly 'cast' the returned object into the appropriate interface return Symbiosis.ambientTalkToJava(result, method.getReturnType()); } else { // another event loop has direct access to this object, this means // an AT object has been shared between actors via Java, signal an error throw new XIllegalOperation("Detected illegal invocation: sharing via Java level of object " + principal_); } } } }
public Object invoke(Object receiver, final Method method, Object[] arguments) throws Throwable { // handle toString, hashCode and equals in a dedicated fashion if (method.getDeclaringClass() == Object.class) { // invoke these methods on the principal rather than on the proxy try { return method.invoke(principal_, arguments); } catch (InvocationTargetException e) { throw e.getTargetException(); } // intercept access to the wrapped object for Java->AT value conversion } else if (method.getDeclaringClass() == SymbioticATObjectMarker.class) { return principal_; } else { final ATObject[] symbioticArgs; // support for variable-arity invocations from within AmbientTalk if ((arguments != null) && (arguments.length == 1) && (arguments[0] instanceof ATObject[])) { // no need to convert arguments symbioticArgs = (ATObject[]) arguments[0]; } else { symbioticArgs = new ATObject[(arguments == null) ? 0 : arguments.length]; for (int i = 0; i < symbioticArgs.length; i++) { symbioticArgs[i] = Symbiosis.javaToAmbientTalk(arguments[i]); } } // if the current thread is not an actor thread, treat the Java invocation // as a message send instead and enqueue it in my actor's thread if (!(Thread.currentThread() instanceof EventProcessor)) { // because a message send is asynchronous and Java threads work synchronously, // we'll have to make the Java thread wait for the result ELActor owningActor = (ELActor) EventLoop.toEventLoop(wrappingThread_); return owningActor.sync_event_symbioticInvocation(new Callable() { public Object call(Object actorMirror) throws Exception { ATObject result = Reflection.downInvocation(principal_, method, symbioticArgs); return Symbiosis.ambientTalkToJava(result, method.getReturnType()); } }); } else { if (owningActor_ == EventLoop.currentEventLoop()) { // perform a synchronous invocation ATObject result = Reflection.downInvocation(principal_, method, symbioticArgs); // properly 'cast' the returned object into the appropriate interface return Symbiosis.ambientTalkToJava(result, method.getReturnType()); } else { // another event loop has direct access to this object, this means // an AT object has been shared between actors via Java, signal an error throw new XIllegalOperation("Detected illegal invocation: sharing via Java level of object " + principal_); } } } }
1,120,754
public Object invoke(Object receiver, final Method method, Object[] arguments) throws Throwable { // handle toString, hashCode and equals in a dedicated fashion if (method.getDeclaringClass() == Object.class) { // invoke these methods on the principal rather than on the proxy try { return method.invoke(principal_, arguments); } catch (InvocationTargetException e) { throw e.getTargetException(); } // intercept access to the wrapped object for Java->AT value conversion } else if (method.getDeclaringClass() == SymbioticATObjectMarker.class) { return principal_; } else { final ATObject[] symbioticArgs; // support for variable-arity invocations from within AmbientTalk if ((arguments != null) && (arguments.length == 1) && (arguments[0] instanceof ATObject[])) { // no need to convert arguments symbioticArgs = (ATObject[]) arguments[0]; } else { symbioticArgs = new ATObject[(arguments == null) ? 0 : arguments.length]; for (int i = 0; i < symbioticArgs.length; i++) { symbioticArgs[i] = Symbiosis.javaToAmbientTalk(arguments[i]); } } // if the current thread is not an actor thread, treat the Java invocation // as a message send instead and enqueue it in my actor's thread if (!(Thread.currentThread() instanceof EventProcessor)) { // because a message send is asynchronous and Java threads work synchronously, // we'll have to make the Java thread wait for the result return owningActor_.sync_event_symbioticInvocation(new Callable() { public Object call(Object actorMirror) throws Exception { ATObject result = Reflection.downInvocation(principal_, method, symbioticArgs); return Symbiosis.ambientTalkToJava(result, method.getReturnType()); } }); } else { if (owningActor_ == EventLoop.currentEventLoop()) { // perform a synchronous invocation ATObject result = Reflection.downInvocation(principal_, method, symbioticArgs); // properly 'cast' the returned object into the appropriate interface return Symbiosis.ambientTalkToJava(result, method.getReturnType()); } else { // another event loop has direct access to this object, this means // an AT object has been shared between actors via Java, signal an error throw new XIllegalOperation("Detected illegal invocation: sharing via Java level of object " + principal_); } } } }
public Object invoke(Object receiver, final Method method, Object[] arguments) throws Throwable { // handle toString, hashCode and equals in a dedicated fashion if (method.getDeclaringClass() == Object.class) { // invoke these methods on the principal rather than on the proxy try { return method.invoke(principal_, arguments); } catch (InvocationTargetException e) { throw e.getTargetException(); } // intercept access to the wrapped object for Java->AT value conversion } else if (method.getDeclaringClass() == SymbioticATObjectMarker.class) { return principal_; } else { final ATObject[] symbioticArgs; // support for variable-arity invocations from within AmbientTalk if ((arguments != null) && (arguments.length == 1) && (arguments[0] instanceof ATObject[])) { // no need to convert arguments symbioticArgs = (ATObject[]) arguments[0]; } else { symbioticArgs = new ATObject[(arguments == null) ? 0 : arguments.length]; for (int i = 0; i < symbioticArgs.length; i++) { symbioticArgs[i] = Symbiosis.javaToAmbientTalk(arguments[i]); } } // if the current thread is not an actor thread, treat the Java invocation // as a message send instead and enqueue it in my actor's thread if (!(Thread.currentThread() instanceof EventProcessor)) { // because a message send is asynchronous and Java threads work synchronously, // we'll have to make the Java thread wait for the result return owningActor_.sync_event_symbioticInvocation(new Callable() { public Object call(Object actorMirror) throws Exception { ATObject result = Reflection.downInvocation(principal_, method, symbioticArgs); return Symbiosis.ambientTalkToJava(result, method.getReturnType()); } }); } else { if (owningActor_ == EventLoop.currentEventLoop()) { // perform a synchronous invocation ATObject result = Reflection.downInvocation(principal_, method, symbioticArgs); // properly 'cast' the returned object into the appropriate interface return Symbiosis.ambientTalkToJava(result, method.getReturnType()); } else { // another event loop has direct access to this object, this means // an AT object has been shared between actors via Java, signal an error throw new XIllegalOperation("Detected illegal invocation: sharing via Java level of object " + principal_); } } } }
1,120,755
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { if (semanticHint == null) { semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.profile.edit.parts.EnumerationEditPart.VISUAL_ID); view.setType(semanticHint); } super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); if (!ProfileEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ shortcutAnnotation.getDetails().put("modelID", ProfileEditPart.MODEL_ID); //$NON-NLS-1$ view.getEAnnotations().add(shortcutAnnotation); } getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(EnumerationNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(EnumerationLiteralsEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); }
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { if (semanticHint == null) { semanticHint = UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID); view.setType(semanticHint); } super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); if (!ProfileEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ shortcutAnnotation.getDetails().put("modelID", ProfileEditPart.MODEL_ID); //$NON-NLS-1$ view.getEAnnotations().add(shortcutAnnotation); } getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(EnumerationNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(EnumerationLiteralsEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); }
1,120,756
public double[] acf95conf(int maxlag) { double[] acfVals = acf(maxlag); double[] out = new double[acfVals.length]; double sumsqrs=0; for (int i=0; i<acfVals.length; i++) { sumsqrs += acfVals[i]*acfVals[i]; out[i] = 1.96*Math.sqrt(1+2*sumsqrs) / Math.sqrt(getLength()); } return out; }
public double[] acf95conf(int maxlag) { double[] acfVals = acf(maxlag); double[] out = new double[acfVals.length]; double sumsqrs=0; for (int i=0; i<acfVals.length; i++) { sumsqrs += acfVals[i]*acfVals[i]; out[i] = 1.96*Math.sqrt(1+2*sumsqrs) / Math.sqrt(getLength()); } return out; }
1,120,757
public double[] acf95conf(int maxlag) { double[] acfVals = acf(maxlag); double[] out = new double[acfVals.length]; double sumsqrs=0; for (int i=0; i<acfVals.length; i++) { sumsqrs += acfVals[i]*acfVals[i]; out[i] = 1.96*Math.sqrt(1+2*sumsqrs) / Math.sqrt(getLength()); } return out; }
public double[] acf95conf(int maxlag) { double[] acfVals = acf(maxlag); double[] out = new double[acfVals.length]; double sumsqrs=0; for (int i=0; i<acfVals.length; i++) { sumsqrs += acfVals[i]*acfVals[i]; out[i] = 1.96*Math.sqrt(1+2*sumsqrs) / Math.sqrt(getLength()); } return out; }
1,120,758
public double[] acfTRatio(int maxlag) { double[] acfVals = acf(maxlag); double[] conf = acf95conf(maxlag); double[] out = new double[acfVals.length]; for (int i=0; i<acfVals.length; i++) { out[i] = 1.96* Math.abs(acfVals[i]) / conf[i]; } return out; }
public double[] acfTRatio(int maxlag) { double[] acfVals = acf(maxlag); double[] conf = acf95conf(maxlag); double[] out = new double[acfVals.length]; for (int i=0; i<acfVals.length; i++) { out[i] = 1.96* Math.abs(acfVals[i]) / conf[i]; } return out; }
1,120,759
public double[] acfTRatio(int maxlag) { double[] acfVals = acf(maxlag); double[] conf = acf95conf(maxlag); double[] out = new double[acfVals.length]; for (int i=0; i<acfVals.length; i++) { out[i] = 1.96* Math.abs(acfVals[i]) / conf[i]; } return out; }
public double[] acfTRatio(int maxlag) { double[] acfVals = acf(maxlag); double[] conf = acf95conf(maxlag); double[] out = new double[acfVals.length]; for (int i=0; i<acfVals.length; i++) { out[i] = 1.96* Math.abs(acfVals[i]) / conf[i]; } return out; }
1,120,760
private double[] calculateMinMaxMean(int beginIndex, int endIndex){ double[] outMinMaxMean = new double[3]; outMinMaxMean[0] = Double.POSITIVE_INFINITY; outMinMaxMean[1] = Double.NEGATIVE_INFINITY; outMinMaxMean[2] = 0; if (iSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], iSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], iSeries[i]); outMinMaxMean[2] += iSeries[i]; } // end of for (int i=0; i<iSeries.length; i++) } else if (sSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], sSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], sSeries[i]); outMinMaxMean[2] += sSeries[i]; } // end of for (int i=0; i<sSeries.length; i++) } else if (fSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], fSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], fSeries[i]); outMinMaxMean[2] += fSeries[i]; } // end of for (int i=0; i<fSeries.length; i++) } else if (dSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], dSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], dSeries[i]); outMinMaxMean[2] += dSeries[i]; } // end of for (int i=0; i<dSeries.length; i++) } outMinMaxMean[2] /= (endIndex - beginIndex); return outMinMaxMean; }
private double[] calculateMinMaxMean(int beginIndex, int endIndex){ double[] outMinMaxMean = new double[3]; outMinMaxMean[0] = Double.POSITIVE_INFINITY; outMinMaxMean[1] = Double.NEGATIVE_INFINITY; outMinMaxMean[2] = 0; if (iSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], iSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], iSeries[i]); outMinMaxMean[2] += iSeries[i]; } // end of for (int i=0; i<iSeries.length; i++) } else if (sSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], sSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], sSeries[i]); outMinMaxMean[2] += sSeries[i]; } // end of for (int i=0; i<sSeries.length; i++) } else if (fSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], fSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], fSeries[i]); outMinMaxMean[2] += fSeries[i]; } // end of for (int i=0; i<fSeries.length; i++) } else if (dSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], dSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], dSeries[i]); outMinMaxMean[2] += dSeries[i]; } // end of for (int i=0; i<dSeries.length; i++) } outMinMaxMean[2] /= (endIndex - beginIndex); return outMinMaxMean; }
1,120,761
private double[] calculateMinMaxMean(int beginIndex, int endIndex){ double[] outMinMaxMean = new double[3]; outMinMaxMean[0] = Double.POSITIVE_INFINITY; outMinMaxMean[1] = Double.NEGATIVE_INFINITY; outMinMaxMean[2] = 0; if (iSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], iSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], iSeries[i]); outMinMaxMean[2] += iSeries[i]; } // end of for (int i=0; i<iSeries.length; i++) } else if (sSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], sSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], sSeries[i]); outMinMaxMean[2] += sSeries[i]; } // end of for (int i=0; i<sSeries.length; i++) } else if (fSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], fSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], fSeries[i]); outMinMaxMean[2] += fSeries[i]; } // end of for (int i=0; i<fSeries.length; i++) } else if (dSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], dSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], dSeries[i]); outMinMaxMean[2] += dSeries[i]; } // end of for (int i=0; i<dSeries.length; i++) } outMinMaxMean[2] /= (endIndex - beginIndex); return outMinMaxMean; }
private double[] calculateMinMaxMean(int beginIndex, int endIndex){ double[] outMinMaxMean = new double[3]; outMinMaxMean[0] = Double.POSITIVE_INFINITY; outMinMaxMean[1] = Double.NEGATIVE_INFINITY; outMinMaxMean[2] = 0; if (iSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], iSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], iSeries[i]); outMinMaxMean[2] += iSeries[i]; } // end of for (int i=0; i<iSeries.length; i++) } else if (sSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], sSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], sSeries[i]); outMinMaxMean[2] += sSeries[i]; } // end of for (int i=0; i<sSeries.length; i++) } else if (fSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], fSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], fSeries[i]); outMinMaxMean[2] += fSeries[i]; } // end of for (int i=0; i<fSeries.length; i++) } else if (dSeries != null) { for (int i = beginIndex; i < endIndex; i++) { outMinMaxMean[0] = Math.min(outMinMaxMean[0], dSeries[i]); outMinMaxMean[1] = Math.max(outMinMaxMean[1], dSeries[i]); outMinMaxMean[2] += dSeries[i]; } // end of for (int i=0; i<dSeries.length; i++) } outMinMaxMean[2] /= (endIndex - beginIndex); return outMinMaxMean; }
1,120,762
private double dBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * dSeries[i]; } return val; } else { int middle = (start + finish) / 2; return dBinarySum(start, middle) + dBinarySum(middle, finish); } }
private double dBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * dSeries[i]; } return val; } else { int middle = (start + finish) / 2; return dBinarySum(start, middle) + dBinarySum(middle, finish); } }
1,120,763
private double dBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * dSeries[i]; } return val; } else { int middle = (start + finish) / 2; return dBinarySum(start, middle) + dBinarySum(middle, finish); } }
private double dBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * dSeries[i]; } return val; } else { int middle = (start + finish) / 2; return dBinarySum(start, middle) + dBinarySum(middle, finish); } }
1,120,764
private double dBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * dSeries[i]; } return val; } else { int middle = (start + finish) / 2; return dBinarySum(start, middle) + dBinarySum(middle, finish); } }
private double dBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * dSeries[i]; return val; else { int middle = (start + finish) / 2; return dBinarySum(start, middle) + dBinarySum(middle, finish);
1,120,765
private double dBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += dSeries[i]; } return val; } else { int middle = (start + finish) / 2; return dBinarySum(start, middle) + dBinarySum(middle, finish); } }
private double dBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += dSeries[i]; } return val; } else { int middle = (start + finish) / 2; return dBinarySum(start, middle) + dBinarySum(middle, finish); } }
1,120,766
private double dBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += dSeries[i]; } return val; } else { int middle = (start + finish) / 2; return dBinarySum(start, middle) + dBinarySum(middle, finish); } }
private double dBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += dSeries[i]; } return val; } else { int middle = (start + finish) / 2; return dBinarySum(start, middle) + dBinarySum(middle, finish); } }
1,120,767
private double dBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += dSeries[i]; } return val; } else { int middle = (start + finish) / 2; return dBinarySum(start, middle) + dBinarySum(middle, finish); } }
private double dBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += dSeries[i]; return val; else { int middle = (start + finish) / 2; return dBinarySum(start, middle) + dBinarySum(middle, finish);
1,120,768
private double dBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (dSeries[i]-mean)*(dSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return dBinarySumDevLag(start, middle, mean, lag) + dBinarySumDevLag(middle, finish, mean, lag); } }
private double dBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (dSeries[i]-mean)*(dSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return dBinarySumDevLag(start, middle, mean, lag) + dBinarySumDevLag(middle, finish, mean, lag); } }
1,120,769
private double dBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (dSeries[i]-mean)*(dSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return dBinarySumDevLag(start, middle, mean, lag) + dBinarySumDevLag(middle, finish, mean, lag); } }
private double dBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (dSeries[i]-mean)*(dSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return dBinarySumDevLag(start, middle, mean, lag) + dBinarySumDevLag(middle, finish, mean, lag); } }
1,120,770
private double dBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (dSeries[i]-mean)*(dSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return dBinarySumDevLag(start, middle, mean, lag) + dBinarySumDevLag(middle, finish, mean, lag); } }
private double dBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (dSeries[i]-mean)*(dSeries[i+lag]-mean); return val; else { int middle = (start + finish) / 2; return dBinarySumDevLag(start, middle, mean, lag) + dBinarySumDevLag(middle, finish, mean, lag);
1,120,771
private double dBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (dSeries[i]-mean)*(dSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return dBinarySumDevSqr(start, middle, mean) + dBinarySumDevSqr(middle, finish, mean); } }
private double dBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (dSeries[i]-mean)*(dSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return dBinarySumDevSqr(start, middle, mean) + dBinarySumDevSqr(middle, finish, mean); } }
1,120,772
private double dBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (dSeries[i]-mean)*(dSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return dBinarySumDevSqr(start, middle, mean) + dBinarySumDevSqr(middle, finish, mean); } }
private double dBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (dSeries[i]-mean)*(dSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return dBinarySumDevSqr(start, middle, mean) + dBinarySumDevSqr(middle, finish, mean); } }
1,120,773
private double dBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (dSeries[i]-mean)*(dSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return dBinarySumDevSqr(start, middle, mean) + dBinarySumDevSqr(middle, finish, mean); } }
private double dBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (dSeries[i]-mean)*(dSeries[i]-mean); return val; else { int middle = (start + finish) / 2; return dBinarySumDevSqr(start, middle, mean) + dBinarySumDevSqr(middle, finish, mean);
1,120,774
private double fBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * fSeries[i]; } return val; } else { int middle = (start + finish) / 2; return fBinarySum(start, middle) + fBinarySum(middle, finish); } }
private double fBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * fSeries[i]; } return val; } else { int middle = (start + finish) / 2; return fBinarySum(start, middle) + fBinarySum(middle, finish); } }
1,120,775
private double fBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * fSeries[i]; } return val; } else { int middle = (start + finish) / 2; return fBinarySum(start, middle) + fBinarySum(middle, finish); } }
private double fBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * fSeries[i]; } return val; } else { int middle = (start + finish) / 2; return fBinarySum(start, middle) + fBinarySum(middle, finish); } }
1,120,776
private double fBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * fSeries[i]; } return val; } else { int middle = (start + finish) / 2; return fBinarySum(start, middle) + fBinarySum(middle, finish); } }
private double fBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * fSeries[i]; return val; else { int middle = (start + finish) / 2; return fBinarySum(start, middle) + fBinarySum(middle, finish);
1,120,777
private double fBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += fSeries[i]; } return val; } else { int middle = (start + finish) / 2; return fBinarySum(start, middle) + fBinarySum(middle, finish); } }
private double fBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += fSeries[i]; } return val; } else { int middle = (start + finish) / 2; return fBinarySum(start, middle) + fBinarySum(middle, finish); } }
1,120,778
private double fBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += fSeries[i]; } return val; } else { int middle = (start + finish) / 2; return fBinarySum(start, middle) + fBinarySum(middle, finish); } }
private double fBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += fSeries[i]; } return val; } else { int middle = (start + finish) / 2; return fBinarySum(start, middle) + fBinarySum(middle, finish); } }
1,120,779
private double fBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += fSeries[i]; } return val; } else { int middle = (start + finish) / 2; return fBinarySum(start, middle) + fBinarySum(middle, finish); } }
private double fBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += fSeries[i]; return val; else { int middle = (start + finish) / 2; return fBinarySum(start, middle) + fBinarySum(middle, finish);
1,120,780
private double fBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (fSeries[i]-mean)*(fSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return fBinarySumDevLag(start, middle, mean, lag) + fBinarySumDevLag(middle, finish, mean, lag); } }
private double fBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (fSeries[i]-mean)*(fSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return fBinarySumDevLag(start, middle, mean, lag) + fBinarySumDevLag(middle, finish, mean, lag); } }
1,120,781
private double fBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (fSeries[i]-mean)*(fSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return fBinarySumDevLag(start, middle, mean, lag) + fBinarySumDevLag(middle, finish, mean, lag); } }
private double fBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (fSeries[i]-mean)*(fSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return fBinarySumDevLag(start, middle, mean, lag) + fBinarySumDevLag(middle, finish, mean, lag); } }
1,120,782
private double fBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (fSeries[i]-mean)*(fSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return fBinarySumDevLag(start, middle, mean, lag) + fBinarySumDevLag(middle, finish, mean, lag); } }
private double fBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (fSeries[i]-mean)*(fSeries[i+lag]-mean); return val; else { int middle = (start + finish) / 2; return fBinarySumDevLag(start, middle, mean, lag) + fBinarySumDevLag(middle, finish, mean, lag);
1,120,783
private double fBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (fSeries[i]-mean)*(fSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return fBinarySumDevSqr(start, middle, mean) + fBinarySumDevSqr(middle, finish, mean); } }
private double fBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (fSeries[i]-mean)*(fSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return fBinarySumDevSqr(start, middle, mean) + fBinarySumDevSqr(middle, finish, mean); } }
1,120,784
private double fBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (fSeries[i]-mean)*(fSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return fBinarySumDevSqr(start, middle, mean) + fBinarySumDevSqr(middle, finish, mean); } }
private double fBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (fSeries[i]-mean)*(fSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return fBinarySumDevSqr(start, middle, mean) + fBinarySumDevSqr(middle, finish, mean); } }
1,120,785
private double fBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (fSeries[i]-mean)*(fSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return fBinarySumDevSqr(start, middle, mean) + fBinarySumDevSqr(middle, finish, mean); } }
private double fBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (fSeries[i]-mean)*(fSeries[i]-mean); return val; else { int middle = (start + finish) / 2; return fBinarySumDevSqr(start, middle, mean) + fBinarySumDevSqr(middle, finish, mean);
1,120,786
public int[] histogram(double start, double width, int number) { int[] histo = new int[number]; int bin; if (iSeries != null) { for (int i=0; i< iSeries.length; i++) { bin = (int)Math.floor((iSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } if (sSeries != null) { for (int i=0; i< sSeries.length; i++) { bin = (int)Math.floor((sSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } if (fSeries != null) { for (int i=0; i< fSeries.length; i++) { bin = (int)Math.floor((fSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } if (dSeries != null) { for (int i=0; i< dSeries.length; i++) { bin = (int)Math.floor((dSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } return new int[0]; }
public int[] histogram(double start, double width, int number) { int[] histo = new int[number]; int bin; if (iSeries != null) { for (int i=0; i< iSeries.length; i++) { bin = (int)Math.floor((iSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } if (sSeries != null) { for (int i=0; i< sSeries.length; i++) { bin = (int)Math.floor((sSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } if (fSeries != null) { for (int i=0; i< fSeries.length; i++) { bin = (int)Math.floor((fSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } if (dSeries != null) { for (int i=0; i< dSeries.length; i++) { bin = (int)Math.floor((dSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } return new int[0]; }
1,120,787
public int[] histogram(double start, double width, int number) { int[] histo = new int[number]; int bin; if (iSeries != null) { for (int i=0; i< iSeries.length; i++) { bin = (int)Math.floor((iSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } if (sSeries != null) { for (int i=0; i< sSeries.length; i++) { bin = (int)Math.floor((sSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } if (fSeries != null) { for (int i=0; i< fSeries.length; i++) { bin = (int)Math.floor((fSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } if (dSeries != null) { for (int i=0; i< dSeries.length; i++) { bin = (int)Math.floor((dSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } return new int[0]; }
public int[] histogram(double start, double width, int number) { int[] histo = new int[number]; int bin; if (iSeries != null) { for (int i=0; i< iSeries.length; i++) { bin = (int)Math.floor((iSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } if (sSeries != null) { for (int i=0; i< sSeries.length; i++) { bin = (int)Math.floor((sSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } if (fSeries != null) { for (int i=0; i< fSeries.length; i++) { bin = (int)Math.floor((fSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } if (dSeries != null) { for (int i=0; i< dSeries.length; i++) { bin = (int)Math.floor((dSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number) } // end of for (int i=0; i< iSeries.length; i++) return histo; } return new int[0]; }
1,120,788
private double iBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * iSeries[i]; } return val; } else { int middle = (start + finish) / 2; return iBinarySum(start, middle) + iBinarySum(middle, finish); } }
private double iBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * iSeries[i]; } return val; } else { int middle = (start + finish) / 2; return iBinarySum(start, middle) + iBinarySum(middle, finish); } }
1,120,789
private double iBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * iSeries[i]; } return val; } else { int middle = (start + finish) / 2; return iBinarySum(start, middle) + iBinarySum(middle, finish); } }
private double iBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * iSeries[i]; } return val; } else { int middle = (start + finish) / 2; return iBinarySum(start, middle) + iBinarySum(middle, finish); } }
1,120,790
private double iBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * iSeries[i]; } return val; } else { int middle = (start + finish) / 2; return iBinarySum(start, middle) + iBinarySum(middle, finish); } }
private double iBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * iSeries[i]; return val; else { int middle = (start + finish) / 2; return iBinarySum(start, middle) + iBinarySum(middle, finish);
1,120,791
private double iBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += iSeries[i]; } return val; } else { int middle = (start + finish) / 2; return iBinarySum(start, middle) + iBinarySum(middle, finish); } }
private double iBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += iSeries[i]; } return val; } else { int middle = (start + finish) / 2; return iBinarySum(start, middle) + iBinarySum(middle, finish); } }
1,120,792
private double iBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += iSeries[i]; } return val; } else { int middle = (start + finish) / 2; return iBinarySum(start, middle) + iBinarySum(middle, finish); } }
private double iBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += iSeries[i]; } return val; } else { int middle = (start + finish) / 2; return iBinarySum(start, middle) + iBinarySum(middle, finish); } }
1,120,793
private double iBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += iSeries[i]; } return val; } else { int middle = (start + finish) / 2; return iBinarySum(start, middle) + iBinarySum(middle, finish); } }
private double iBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += iSeries[i]; return val; else { int middle = (start + finish) / 2; return iBinarySum(start, middle) + iBinarySum(middle, finish);
1,120,794
private double iBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (iSeries[i]-mean)*(iSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return iBinarySumDevLag(start, middle, mean, lag) + iBinarySumDevLag(middle, finish, mean, lag); } }
private double iBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (iSeries[i]-mean)*(iSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return iBinarySumDevLag(start, middle, mean, lag) + iBinarySumDevLag(middle, finish, mean, lag); } }
1,120,795
private double iBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (iSeries[i]-mean)*(iSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return iBinarySumDevLag(start, middle, mean, lag) + iBinarySumDevLag(middle, finish, mean, lag); } }
private double iBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (iSeries[i]-mean)*(iSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return iBinarySumDevLag(start, middle, mean, lag) + iBinarySumDevLag(middle, finish, mean, lag); } }
1,120,796
private double iBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (iSeries[i]-mean)*(iSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return iBinarySumDevLag(start, middle, mean, lag) + iBinarySumDevLag(middle, finish, mean, lag); } }
private double iBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (iSeries[i]-mean)*(iSeries[i+lag]-mean); return val; else { int middle = (start + finish) / 2; return iBinarySumDevLag(start, middle, mean, lag) + iBinarySumDevLag(middle, finish, mean, lag);
1,120,797
private double iBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (iSeries[i]-mean)*(iSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return iBinarySumDevSqr(start, middle, mean) + iBinarySumDevSqr(middle, finish, mean); } }
private double iBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (iSeries[i]-mean)*(iSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return iBinarySumDevSqr(start, middle, mean) + iBinarySumDevSqr(middle, finish, mean); } }
1,120,798
private double iBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (iSeries[i]-mean)*(iSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return iBinarySumDevSqr(start, middle, mean) + iBinarySumDevSqr(middle, finish, mean); } }
private double iBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (iSeries[i]-mean)*(iSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return iBinarySumDevSqr(start, middle, mean) + iBinarySumDevSqr(middle, finish, mean); } }
1,120,799
private double iBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (iSeries[i]-mean)*(iSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return iBinarySumDevSqr(start, middle, mean) + iBinarySumDevSqr(middle, finish, mean); } }
private double iBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (iSeries[i]-mean)*(iSeries[i]-mean); return val; else { int middle = (start + finish) / 2; return iBinarySumDevSqr(start, middle, mean) + iBinarySumDevSqr(middle, finish, mean);
1,120,800
public static void main(String[] args) { int[] testSeries = new int[10]; testSeries[0] = 13; testSeries[1] = 8; testSeries[2] = 15; testSeries[3] = 4; testSeries[4] = 4; testSeries[5] = 12; testSeries[6] = 11; testSeries[7] = 7; testSeries[8] = 14; testSeries[9] = 12; Statistics s = new Statistics(testSeries); System.out.println("Mean = "+s.mean()); System.out.println("Variance = "+s.var()); double[] testACF = s.acf(5); for (int i=0; i<testACF.length; i++) { System.out.println("acf "+i+" = "+testACF[i]); } double[] testPACF = s.pacf(5); for (int i=0; i<testPACF.length; i++) { System.out.println("pacf "+i+" = "+testPACF[i]); } }
public static void main(String[] args) { int[] testSeries = new int[10]; testSeries[0] = 13; testSeries[1] = 8; testSeries[2] = 15; testSeries[3] = 4; testSeries[4] = 4; testSeries[5] = 12; testSeries[6] = 11; testSeries[7] = 7; testSeries[8] = 14; testSeries[9] = 12; Statistics s = new Statistics(testSeries); System.out.println("Mean = "+s.mean()); System.out.println("Variance = "+s.var()); double[] testACF = s.acf(5); for (int i=0; i<testACF.length; i++) { System.out.println("acf "+i+" = "+testACF[i]); } double[] testPACF = s.pacf(5); for (int i=0; i<testPACF.length; i++) { System.out.println("pacf "+i+" = "+testPACF[i]); } }
1,120,801
public static void main(String[] args) { int[] testSeries = new int[10]; testSeries[0] = 13; testSeries[1] = 8; testSeries[2] = 15; testSeries[3] = 4; testSeries[4] = 4; testSeries[5] = 12; testSeries[6] = 11; testSeries[7] = 7; testSeries[8] = 14; testSeries[9] = 12; Statistics s = new Statistics(testSeries); System.out.println("Mean = "+s.mean()); System.out.println("Variance = "+s.var()); double[] testACF = s.acf(5); for (int i=0; i<testACF.length; i++) { System.out.println("acf "+i+" = "+testACF[i]); } double[] testPACF = s.pacf(5); for (int i=0; i<testPACF.length; i++) { System.out.println("pacf "+i+" = "+testPACF[i]); } }
public static void main(String[] args) { int[] testSeries = new int[10]; testSeries[0] = 13; testSeries[1] = 8; testSeries[2] = 15; testSeries[3] = 4; testSeries[4] = 4; testSeries[5] = 12; testSeries[6] = 11; testSeries[7] = 7; testSeries[8] = 14; testSeries[9] = 12; Statistics s = new Statistics(testSeries); System.out.println("Mean = "+s.mean()); System.out.println("Variance = "+s.var()); double[] testACF = s.acf(5); for (int i=0; i<testACF.length; i++) { System.out.println("acf "+i+" = "+testACF[i]); } double[] testPACF = s.pacf(5); for (int i=0; i<testPACF.length; i++) { System.out.println("pacf "+i+" = "+testPACF[i]); } }
1,120,802
public double[] pacfTRatio(int maxlag) { double[] pacfVals = pacf(maxlag); double conf = pacf95conf(maxlag); double[] out = new double[pacfVals.length]; for (int i=0; i<pacfVals.length; i++) { out[i] = 1.96* Math.abs(pacfVals[i]) / conf; } return out; }
public double[] pacfTRatio(int maxlag) { double[] pacfVals = pacf(maxlag); double conf = pacf95conf(maxlag); double[] out = new double[pacfVals.length]; for (int i=0; i<pacfVals.length; i++) { out[i] = 1.96* Math.abs(pacfVals[i]) / conf; } return out; }
1,120,803
public double[] pacfTRatio(int maxlag) { double[] pacfVals = pacf(maxlag); double conf = pacf95conf(maxlag); double[] out = new double[pacfVals.length]; for (int i=0; i<pacfVals.length; i++) { out[i] = 1.96* Math.abs(pacfVals[i]) / conf; } return out; }
public double[] pacfTRatio(int maxlag) { double[] pacfVals = pacf(maxlag); double conf = pacf95conf(maxlag); double[] out = new double[pacfVals.length]; for (int i=0; i<pacfVals.length; i++) { out[i] = 1.96* Math.abs(pacfVals[i]) / conf; } return out; }
1,120,804
private double sBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } }
private double sBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } }
1,120,805
private double sBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } }
private double sBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } }
1,120,806
private double sBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } }
private double sBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * sSeries[i]; return val; else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish);
1,120,807
private double sBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } }
private double sBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } }
1,120,808
private double sBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } }
private double sBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } }
1,120,809
private double sBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish); } }
private double sBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += sSeries[i]; return val; else { int middle = (start + finish) / 2; return sBinarySum(start, middle) + sBinarySum(middle, finish);
1,120,810
private double sBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (sSeries[i]-mean)*(sSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevLag(start, middle, mean, lag) + sBinarySumDevLag(middle, finish, mean, lag); } }
private double sBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (sSeries[i]-mean)*(sSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevLag(start, middle, mean, lag) + sBinarySumDevLag(middle, finish, mean, lag); } }
1,120,811
private double sBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (sSeries[i]-mean)*(sSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevLag(start, middle, mean, lag) + sBinarySumDevLag(middle, finish, mean, lag); } }
private double sBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (sSeries[i]-mean)*(sSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevLag(start, middle, mean, lag) + sBinarySumDevLag(middle, finish, mean, lag); } }
1,120,812
private double sBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (sSeries[i]-mean)*(sSeries[i+lag]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevLag(start, middle, mean, lag) + sBinarySumDevLag(middle, finish, mean, lag); } }
private double sBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (sSeries[i]-mean)*(sSeries[i+lag]-mean); return val; else { int middle = (start + finish) / 2; return sBinarySumDevLag(start, middle, mean, lag) + sBinarySumDevLag(middle, finish, mean, lag);
1,120,813
private double sBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (sSeries[i]-mean)*(sSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevSqr(start, middle, mean) + sBinarySumDevSqr(middle, finish, mean); } }
private double sBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (sSeries[i]-mean)*(sSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevSqr(start, middle, mean) + sBinarySumDevSqr(middle, finish, mean); } }
1,120,814
private double sBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (sSeries[i]-mean)*(sSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevSqr(start, middle, mean) + sBinarySumDevSqr(middle, finish, mean); } }
private double sBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (sSeries[i]-mean)*(sSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevSqr(start, middle, mean) + sBinarySumDevSqr(middle, finish, mean); } }
1,120,815
private double sBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (sSeries[i]-mean)*(sSeries[i]-mean); } return val; } else { int middle = (start + finish) / 2; return sBinarySumDevSqr(start, middle, mean) + sBinarySumDevSqr(middle, finish, mean); } }
private double sBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (sSeries[i]-mean)*(sSeries[i]-mean); return val; else { int middle = (start + finish) / 2; return sBinarySumDevSqr(start, middle, mean) + sBinarySumDevSqr(middle, finish, mean);
1,120,816
public void init(WebdavServlet servlet, HttpServletRequest req, Properties props, boolean debug) throws WebdavIntfException { super.init(servlet, req, props, debug); try { HttpSession session = req.getSession(); ServletContext sc = session.getServletContext(); String appName = sc.getInitParameter("bwappname"); if ((appName == null) || (appName.length() == 0)) { appName = "unknown-app-name"; } envPrefix = "org.bedework.app." + appName + "."; namespacePrefix = WebdavUtils.getUrlPrefix(req); namespace = namespacePrefix + "/schema"; CalEnv env = new CalEnv(envPrefix, debug); sysi = (SysIntf)env.getAppObject("sysintfimpl", SysIntf.class); sysi.init(req, envPrefix, account, debug); emitAccess = new EmitAccess(namespacePrefix, xml); } catch (Throwable t) { throw new WebdavIntfException(t); } }
public void init(WebdavServlet servlet, HttpServletRequest req, Properties props, boolean debug) throws WebdavIntfException { super.init(servlet, req, props, debug); try { HttpSession session = req.getSession(); ServletContext sc = session.getServletContext(); String appName = sc.getInitParameter("bwappname"); if ((appName == null) || (appName.length() == 0)) { appName = "unknown-app-name"; } envPrefix = "org.bedework.app." + appName + "."; namespacePrefix = WebdavUtils.getUrlPrefix(req); namespace = namespacePrefix + "/schema"; CalEnvI env = CalEnvFactory.getEnv(envPrefix, debug); sysi = (SysIntf)env.getAppObject("sysintfimpl", SysIntf.class); sysi.init(req, envPrefix, account, debug); emitAccess = new EmitAccess(namespacePrefix, xml); } catch (Throwable t) { throw new WebdavIntfException(t); } }
1,120,817
private void setPageHelperMethod(URL url) { try { super.setPage(url); setCaretPosition(0); } catch (Throwable t) { showError(t); } }
private void setPageHelperMethod(URL url) { try { super.setPage(url); } catch (Throwable t) { showError(t); } }
1,120,818
public void addSubscription(BwPreferences p, BwUser user, BwCalendar cal, boolean toplevel) throws Throwable { globals.subscriptions++; BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), true, false, false); sub.setOwner(user); p.addSubscription(sub); if (curView == null) { // One-shot. curView = new BwView(); curView.setName(cal.getName()); curView.setOwner(user); curView.addSubscription(sub); p.addView(curView); curView = null; } else { curView.addSubscription(sub); } }
public void addSubscription(BwPreferences p, BwUser user, BwCalendar cal, boolean toplevel) throws Throwable { globals.subscriptions++; BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), true, false, false); sub.setOwner(user); p.addSubscription(sub); if (curView == null) { // One-shot. curView = new BwView(); curView.setName(cal.getName()); curView.setOwner(user); curView.addSubscription(sub); p.addView(curView); curView = null; } else { curView.addSubscription(sub); } }
1,120,819
public void addSubscription(BwPreferences p, BwUser user, BwCalendar cal, boolean toplevel) throws Throwable { globals.subscriptions++; BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), true, false, false); sub.setOwner(user); p.addSubscription(sub); if (curView == null) { // One-shot. curView = new BwView(); curView.setName(cal.getName()); curView.setOwner(user); curView.addSubscription(sub); p.addView(curView); curView = null; } else { curView.addSubscription(sub); } }
public void addSubscription(BwPreferences p, BwUser user, BwCalendar cal, boolean toplevel) throws Throwable { globals.subscriptions++; BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), display, freeBusy, false); sub.setOwner(user); p.addSubscription(sub); if (curView == null) { // One-shot. curView = new BwView(); curView.setName(cal.getName()); curView.setOwner(user); curView.addSubscription(sub); p.addView(curView); curView = null; } else { curView.addSubscription(sub); } }
1,120,820
public void addSubscription(BwPreferences p, BwUser user, BwCalendar cal, boolean toplevel) throws Throwable { globals.subscriptions++; BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), true, false, false); sub.setOwner(user); p.addSubscription(sub); if (curView == null) { // One-shot. curView = new BwView(); curView.setName(cal.getName()); curView.setOwner(user); curView.addSubscription(sub); p.addView(curView); curView = null; } else { curView.addSubscription(sub); } }
public void addSubscription(BwPreferences p, BwUser user, BwCalendar cal, boolean toplevel) throws Throwable { globals.subscriptions++; BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), true, false, false); sub.setOwner(user); p.addSubscription(sub); if (curView == null) { // One-shot. curView = new BwView(); curView.setName(cal.getName()); curView.setOwner(user); curView.addSubscription(sub); p.addView(curView); curView = null; } else { curView.addSubscription(sub); } }
1,120,821
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences prefs = new BwPreferences(); prefs.setId(nextId); nextId++; prefs.setOwner(o); if (globals.publicUser.equals(o)) { /* Subscribe to all top level collections */ BwCalendar root = globals.publicCalRoot; Iterator calit = root.iterateChildren(); while (calit.hasNext()) { BwCalendar cal = (BwCalendar)calit.next(); addSubscription(prefs, globals.publicUser, cal, true); } } else { BwCalendar cal = (BwCalendar)globals.defaultCalendars.get( new Integer(o.getId())); prefs.setDefaultCalendar(cal); // Add default subscription for default calendar. BwSubscription defSub = BwSubscription.makeSubscription(cal, cal.getName(), true, true, false); defSub.setOwner(o); prefs.addSubscription(defSub); // Add default subscription for trash calendar. cal = (BwCalendar)globals.trashCalendars.get(new Integer(o.getId())); BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), false, false, false); sub.setOwner(o); prefs.addSubscription(sub); // Add a default view for the default calendar subscription curView = new BwView(); curView.setName(globals.syspars.getDefaultUserViewName()); curView.addSubscription(defSub); curView.setOwner(o); prefs.addView(curView); Collection s = globals.subscriptionsTbl.getCalendarids(o); if (s != null) { Iterator subit = s.iterator(); globals.subscribedUsers++; while (subit.hasNext()) { /* Fixing up calendars for move from 2.3.2. Table value is the * id of a calendar * Make up a subscription. */ Integer calid = (Integer)subit.next(); cal = (BwCalendar)globals.filterToCal.get(calid); addSubscription(prefs, o, cal, true); } } } if (globals.rintf != null) { globals.rintf.restoreUserPrefs(prefs); } } }
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences prefs = new BwPreferences(); prefs.setId(nextId); nextId++; prefs.setOwner(o); if (globals.publicUser.equals(o)) { /* Subscribe to all top level collections */ BwCalendar root = globals.publicCalRoot; Iterator calit = root.iterateChildren(); while (calit.hasNext()) { BwCalendar cal = (BwCalendar)calit.next(); addSubscription(prefs, curView, o, cal, true, false, true); } } else { BwCalendar cal = (BwCalendar)globals.defaultCalendars.get( new Integer(o.getId())); prefs.setDefaultCalendar(cal); // Add default subscription for default calendar. BwSubscription defSub = BwSubscription.makeSubscription(cal, cal.getName(), true, true, false); defSub.setOwner(o); prefs.addSubscription(defSub); // Add default subscription for trash calendar. cal = (BwCalendar)globals.trashCalendars.get(new Integer(o.getId())); BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), false, false, false); sub.setOwner(o); prefs.addSubscription(sub); // Add a default view for the default calendar subscription curView = new BwView(); curView.setName(globals.syspars.getDefaultUserViewName()); curView.addSubscription(defSub); curView.setOwner(o); prefs.addView(curView); Collection s = globals.subscriptionsTbl.getCalendarids(o); if (s != null) { Iterator subit = s.iterator(); globals.subscribedUsers++; while (subit.hasNext()) { /* Fixing up calendars for move from 2.3.2. Table value is the * id of a calendar * Make up a subscription. */ Integer calid = (Integer)subit.next(); cal = (BwCalendar)globals.filterToCal.get(calid); addSubscription(prefs, o, cal, true); } } } if (globals.rintf != null) { globals.rintf.restoreUserPrefs(prefs); } } }
1,120,822
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences prefs = new BwPreferences(); prefs.setId(nextId); nextId++; prefs.setOwner(o); if (globals.publicUser.equals(o)) { /* Subscribe to all top level collections */ BwCalendar root = globals.publicCalRoot; Iterator calit = root.iterateChildren(); while (calit.hasNext()) { BwCalendar cal = (BwCalendar)calit.next(); addSubscription(prefs, globals.publicUser, cal, true); } } else { BwCalendar cal = (BwCalendar)globals.defaultCalendars.get( new Integer(o.getId())); prefs.setDefaultCalendar(cal); // Add default subscription for default calendar. BwSubscription defSub = BwSubscription.makeSubscription(cal, cal.getName(), true, true, false); defSub.setOwner(o); prefs.addSubscription(defSub); // Add default subscription for trash calendar. cal = (BwCalendar)globals.trashCalendars.get(new Integer(o.getId())); BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), false, false, false); sub.setOwner(o); prefs.addSubscription(sub); // Add a default view for the default calendar subscription curView = new BwView(); curView.setName(globals.syspars.getDefaultUserViewName()); curView.addSubscription(defSub); curView.setOwner(o); prefs.addView(curView); Collection s = globals.subscriptionsTbl.getCalendarids(o); if (s != null) { Iterator subit = s.iterator(); globals.subscribedUsers++; while (subit.hasNext()) { /* Fixing up calendars for move from 2.3.2. Table value is the * id of a calendar * Make up a subscription. */ Integer calid = (Integer)subit.next(); cal = (BwCalendar)globals.filterToCal.get(calid); addSubscription(prefs, o, cal, true); } } } if (globals.rintf != null) { globals.rintf.restoreUserPrefs(prefs); } } }
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences prefs = new BwPreferences(); prefs.setId(nextId); nextId++; prefs.setOwner(o); if (globals.publicUser.equals(o)) { /* Subscribe to all top level collections */ BwCalendar root = globals.publicCalRoot; Iterator calit = root.iterateChildren(); while (calit.hasNext()) { BwCalendar cal = (BwCalendar)calit.next(); addSubscription(prefs, globals.publicUser, cal, true); } } else { BwCalendar cal = (BwCalendar)globals.defaultCalendars.get( new Integer(o.getId())); prefs.setDefaultCalendar(cal); // Add default subscription for default calendar. BwSubscription defSub = BwSubscription.makeSubscription(cal, cal.getName(), true, true, false); defSub.setOwner(o); prefs.addSubscription(defSub); // Add default subscription for trash calendar. cal = (BwCalendar)globals.trashCalendars.get(new Integer(o.getId())); BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), false, false, false); sub.setOwner(o); prefs.addSubscription(sub); // Add a default view for the default calendar subscription curView = new BwView(); curView.setName(globals.syspars.getDefaultUserViewName()); curView.addSubscription(defSub); curView.setOwner(o); prefs.addView(curView); Collection s = globals.subscriptionsTbl.getCalendarids(o); if (s != null) { Iterator subit = s.iterator(); globals.subscribedUsers++; while (subit.hasNext()) { /* Fixing up calendars for move from 2.3.2. Table value is the * id of a calendar * Make up a subscription. */ Integer calid = (Integer)subit.next(); cal = (BwCalendar)globals.filterToCal.get(calid); addSubscription(prefs, o, cal, true); } } } if (globals.rintf != null) { globals.rintf.restoreUserPrefs(prefs); } } }
1,120,823
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences prefs = new BwPreferences(); prefs.setId(nextId); nextId++; prefs.setOwner(o); if (globals.publicUser.equals(o)) { /* Subscribe to all top level collections */ BwCalendar root = globals.publicCalRoot; Iterator calit = root.iterateChildren(); while (calit.hasNext()) { BwCalendar cal = (BwCalendar)calit.next(); addSubscription(prefs, globals.publicUser, cal, true); } } else { BwCalendar cal = (BwCalendar)globals.defaultCalendars.get( new Integer(o.getId())); prefs.setDefaultCalendar(cal); // Add default subscription for default calendar. BwSubscription defSub = BwSubscription.makeSubscription(cal, cal.getName(), true, true, false); defSub.setOwner(o); prefs.addSubscription(defSub); // Add default subscription for trash calendar. cal = (BwCalendar)globals.trashCalendars.get(new Integer(o.getId())); BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), false, false, false); sub.setOwner(o); prefs.addSubscription(sub); // Add a default view for the default calendar subscription curView = new BwView(); curView.setName(globals.syspars.getDefaultUserViewName()); curView.addSubscription(defSub); curView.setOwner(o); prefs.addView(curView); Collection s = globals.subscriptionsTbl.getCalendarids(o); if (s != null) { Iterator subit = s.iterator(); globals.subscribedUsers++; while (subit.hasNext()) { /* Fixing up calendars for move from 2.3.2. Table value is the * id of a calendar * Make up a subscription. */ Integer calid = (Integer)subit.next(); cal = (BwCalendar)globals.filterToCal.get(calid); addSubscription(prefs, o, cal, true); } } } if (globals.rintf != null) { globals.rintf.restoreUserPrefs(prefs); } } }
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences prefs = new BwPreferences(); prefs.setId(nextId); nextId++; prefs.setOwner(o); if (globals.publicUser.equals(o)) { /* Subscribe to all top level collections */ BwCalendar root = globals.publicCalRoot; Iterator calit = root.iterateChildren(); while (calit.hasNext()) { BwCalendar cal = (BwCalendar)calit.next(); addSubscription(prefs, globals.publicUser, cal, true); } } else { BwCalendar cal = (BwCalendar)globals.defaultCalendars.get( new Integer(o.getId())); prefs.setDefaultCalendar(cal); // Add default subscription for default calendar. BwSubscription defSub = BwSubscription.makeSubscription(cal, cal.getName(), true, true, false); defSub.setOwner(o); prefs.addSubscription(defSub); // Add default subscription for trash calendar. cal = (BwCalendar)globals.trashCalendars.get(new Integer(o.getId())); BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), false, false, false); sub.setOwner(o); prefs.addSubscription(sub); // Add a default view for the default calendar subscription curView = new BwView(); curView.setName(globals.syspars.getDefaultUserViewName()); curView.addSubscription(defSub); curView.setOwner(o); prefs.addView(curView); Collection s = globals.subscriptionsTbl.getCalendarids(o); if (s != null) { Iterator subit = s.iterator(); globals.subscribedUsers++; while (subit.hasNext()) { /* Fixing up calendars for move from 2.3.2. Table value is the * id of a calendar * Make up a subscription. */ Integer calid = (Integer)subit.next(); cal = (BwCalendar)globals.filterToCal.get(calid); addSubscription(prefs, o, cal, true); } } } if (globals.rintf != null) { globals.rintf.restoreUserPrefs(prefs); } } }
1,120,824
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences prefs = new BwPreferences(); prefs.setId(nextId); nextId++; prefs.setOwner(o); if (globals.publicUser.equals(o)) { /* Subscribe to all top level collections */ BwCalendar root = globals.publicCalRoot; Iterator calit = root.iterateChildren(); while (calit.hasNext()) { BwCalendar cal = (BwCalendar)calit.next(); addSubscription(prefs, globals.publicUser, cal, true); } } else { BwCalendar cal = (BwCalendar)globals.defaultCalendars.get( new Integer(o.getId())); prefs.setDefaultCalendar(cal); // Add default subscription for default calendar. BwSubscription defSub = BwSubscription.makeSubscription(cal, cal.getName(), true, true, false); defSub.setOwner(o); prefs.addSubscription(defSub); // Add default subscription for trash calendar. cal = (BwCalendar)globals.trashCalendars.get(new Integer(o.getId())); BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), false, false, false); sub.setOwner(o); prefs.addSubscription(sub); // Add a default view for the default calendar subscription curView = new BwView(); curView.setName(globals.syspars.getDefaultUserViewName()); curView.addSubscription(defSub); curView.setOwner(o); prefs.addView(curView); Collection s = globals.subscriptionsTbl.getCalendarids(o); if (s != null) { Iterator subit = s.iterator(); globals.subscribedUsers++; while (subit.hasNext()) { /* Fixing up calendars for move from 2.3.2. Table value is the * id of a calendar * Make up a subscription. */ Integer calid = (Integer)subit.next(); cal = (BwCalendar)globals.filterToCal.get(calid); addSubscription(prefs, o, cal, true); } } } if (globals.rintf != null) { globals.rintf.restoreUserPrefs(prefs); } } }
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences prefs = new BwPreferences(); prefs.setId(nextId); nextId++; prefs.setOwner(o); if (globals.publicUser.equals(o)) { /* Subscribe to all top level collections */ BwCalendar root = globals.publicCalRoot; Iterator calit = root.iterateChildren(); while (calit.hasNext()) { BwCalendar cal = (BwCalendar)calit.next(); addSubscription(prefs, globals.publicUser, cal, true); } } else { BwCalendar cal = (BwCalendar)globals.defaultCalendars.get( new Integer(o.getId())); prefs.setDefaultCalendar(cal); // Add default subscription for default calendar. BwSubscription defSub = BwSubscription.makeSubscription(cal, cal.getName(), true, true, false); defSub.setOwner(o); prefs.addSubscription(defSub); // Add default subscription for trash calendar. cal = (BwCalendar)globals.trashCalendars.get(new Integer(o.getId())); BwSubscription sub = BwSubscription.makeSubscription(cal, cal.getName(), false, false, false); sub.setOwner(o); prefs.addSubscription(sub); // Add a default view for the default calendar subscription curView = new BwView(); curView.setName(globals.syspars.getDefaultUserViewName()); curView.addSubscription(defSub); curView.setOwner(o); prefs.addView(curView); Collection s = globals.subscriptionsTbl.getCalendarids(o); if (s != null) { Iterator subit = s.iterator(); globals.subscribedUsers++; while (subit.hasNext()) { /* Fixing up calendars for move from 2.3.2. Table value is the * id of a calendar * Make up a subscription. */ Integer calid = (Integer)subit.next(); cal = (BwCalendar)globals.filterToCal.get(calid); addSubscription(prefs, o, cal, true); } } } if (globals.rintf != null) { globals.rintf.restoreUserPrefs(prefs); } } }
1,120,825
boolean processArgs(String[] args) throws Throwable { if (args == null) { return true; } for (int i = 0; i < args.length; i++) { if (args[i].equals("")) { // null arg generated by ant } else if (args[i].equals("-debug")) { globals.debug = true; } else if (args[i].equals("-ndebug")) { globals.debug = false; } else if (args[i].equals("-debugentity")) { globals.debugEntity = true; } else if (args[i].equals("-ndebugentity")) { globals.debugEntity = false; } else if (args[i].equals("-noarg")) { globals.debug = false; } else if (argpar("-supergroup", args, i)) { i++; globals.superGroupName = args[i]; } else if (argpar("-defaultpubliccal", args, i)) { i++; globals.defaultPublicCalPath = args[i]; trace("Setting null event calendars to " + args[i]); } else if (argpar("-fixOwner", args, i)) { i++; globals.fixOwnerAccount = args[i]; } else if (args[i].equals("-from2p3px")) { globals.from2p3px = true; } else if (argpar("-d", args, i)) { i++; driver = args[i]; } else if (argpar("-i", args, i)) { i++; id = args[i]; } else if (argpar("-p", args, i)) { i++; pw = args[i]; } else if (argpar("-u", args, i)) { i++; url = args[i]; } else if (argpar("-f", args, i)) { i++; fileName = args[i]; } else if (argpar("-timezones", args, i)) { i++; globals.timezonesFilename = args[i]; /* System parameters */ } else if (argpar("-sysname", args, i)) { i++; globals.syspars.setName(args[i]); } else if (argpar("-tzid", args, i)) { i++; globals.syspars.setTzid(args[i]); } else if (argpar("-sysid", args, i)) { i++; globals.syspars.setSystemid(args[i]); } else if (argpar("-publiccalroot", args, i)) { i++; globals.syspars.setPublicCalendarRoot(args[i]); } else if (argpar("-usercalroot", args, i)) { i++; globals.syspars.setUserCalendarRoot(args[i]); } else if (argpar("-defusercal", args, i)) { i++; globals.syspars.setUserDefaultCalendar(args[i]); } else if (argpar("-deftrashcal", args, i)) { i++; globals.syspars.setDefaultTrashCalendar(args[i]); } else if (argpar("-definbox", args, i)) { i++; globals.syspars.setUserInbox(args[i]); } else if (argpar("-defoutbox", args, i)) { i++; globals.syspars.setUserOutbox(args[i]); } else if (argpar("-defuview", args, i)) { i++; globals.syspars.setDefaultUserViewName(args[i]); } else if (argpar("-pu", args, i)) { i++; globals.syspars.setPublicUser(args[i]); } else if (argpar("-httpconnsperuser", args, i)) { i++; globals.syspars.setHttpConnectionsPerUser(intPar(args[i])); globals.sysparsSetHttpConnectionsPerUser = true; } else if (argpar("-httpconnsperhost", args, i)) { i++; globals.syspars.setHttpConnectionsPerHost(intPar(args[i])); globals.sysparsSetHttpConnectionsPerHost = true; } else if (argpar("-httpconns", args, i)) { i++; globals.syspars.setHttpConnections(intPar(args[i])); globals.sysparsSetHttpConnections = true; } else if (argpar("-defuquota", args, i)) { i++; globals.syspars.setDefaultUserQuota(longPar(args[i])); globals.sysparsSetDefaultUserQuota = true; } else if (argpar("-userauthClass", args, i)) { i++; globals.syspars.setUserauthClass(args[i]); } else if (argpar("-mailerClass", args, i)) { i++; globals.syspars.setMailerClass(args[i]); } else if (argpar("-admingroupsClass", args, i)) { i++; globals.syspars.setAdmingroupsClass(args[i]); } else if (argpar("-usergroupsClass", args, i)) { i++; globals.syspars.setUsergroupsClass(args[i]); } else { error("Illegal argument: '" + args[i] + "'"); usage(); return false; } } return true; }
boolean processArgs(String[] args) throws Throwable { if (args == null) { return true; } for (int i = 0; i < args.length; i++) { if (args[i].equals("")) { // null arg generated by ant } else if (args[i].equals("-debug")) { globals.debug = true; } else if (args[i].equals("-ndebug")) { globals.debug = false; } else if (args[i].equals("-debugentity")) { globals.debugEntity = true; } else if (args[i].equals("-ndebugentity")) { globals.debugEntity = false; } else if (args[i].equals("-noarg")) { globals.debug = false; } else if (argpar("-supergroup", args, i)) { i++; globals.superGroupName = args[i]; } else if (argpar("-defaultpubliccal", args, i)) { i++; globals.defaultPublicCalPath = args[i]; trace("Setting null event calendars to " + args[i]); } else if (argpar("-fixOwner", args, i)) { i++; globals.fixOwnerAccount = args[i]; } else if (args[i].equals("-from2p3px")) { globals.from2p3px = true; } else if (argpar("-d", args, i)) { i++; driver = args[i]; } else if (argpar("-i", args, i)) { i++; id = args[i]; } else if (argpar("-p", args, i)) { i++; pw = args[i]; } else if (argpar("-u", args, i)) { i++; url = args[i]; } else if (argpar("-f", args, i)) { i++; fileName = args[i]; } else if (argpar("-timezones", args, i)) { i++; globals.timezonesFilename = args[i]; /* System parameters */ } else if (argpar("-sysname", args, i)) { i++; globals.syspars.setName(args[i]); } else if (argpar("-tzid", args, i)) { i++; globals.syspars.setTzid(args[i]); } else if (argpar("-sysid", args, i)) { i++; globals.syspars.setSystemid(args[i]); } else if (argpar("-publiccalroot", args, i)) { i++; globals.syspars.setPublicCalendarRoot(args[i]); } else if (argpar("-usercalroot", args, i)) { i++; globals.syspars.setUserCalendarRoot(args[i]); } else if (argpar("-defusercal", args, i)) { i++; globals.syspars.setUserDefaultCalendar(args[i]); } else if (argpar("-deftrashcal", args, i)) { i++; globals.syspars.setDefaultTrashCalendar(args[i]); } else if (argpar("-definbox", args, i)) { i++; globals.syspars.setUserInbox(args[i]); } else if (argpar("-defoutbox", args, i)) { i++; globals.syspars.setUserOutbox(args[i]); } else if (argpar("-defuview", args, i)) { i++; globals.syspars.setDefaultUserViewName(args[i]); } else if (argpar("-pu", args, i)) { i++; globals.syspars.setPublicUser(args[i]); } else if (argpar("-httpconnsperuser", args, i)) { i++; globals.syspars.setHttpConnectionsPerUser(intPar(args[i])); globals.sysparsSetHttpConnectionsPerUser = true; } else if (argpar("-httpconnsperhost", args, i)) { i++; globals.syspars.setHttpConnectionsPerHost(intPar(args[i])); globals.sysparsSetHttpConnectionsPerHost = true; } else if (argpar("-httpconns", args, i)) { i++; globals.syspars.setHttpConnections(intPar(args[i])); globals.sysparsSetHttpConnections = true; } else if (argpar("-defuquota", args, i)) { i++; globals.syspars.setDefaultUserQuota(longPar(args[i])); globals.sysparsSetDefaultUserQuota = true; } else if (argpar("-userauthClass", args, i)) { i++; globals.syspars.setUserauthClass(args[i]); } else if (argpar("-mailerClass", args, i)) { i++; globals.syspars.setMailerClass(args[i]); } else if (argpar("-admingroupsClass", args, i)) { i++; globals.syspars.setAdmingroupsClass(args[i]); } else if (argpar("-usergroupsClass", args, i)) { i++; globals.syspars.setUsergroupsClass(args[i]); } else { error("Illegal argument: '" + args[i] + "'"); usage(); return false; } } return true; }
1,120,826
public void addTab(IPanel panel) { if (panel == null) { return; } int index = getTabCount(); String title = panel.getTitle(); Icon icon = panel.getIcon(); Component component = panel.getPanelInstance(); if (title == null || title.length() == 0) { title = Messages.getString("TabBar.UNTITLED"); //$NON-NLS-1$ } super.insertTab(title, icon, component, title, index); // super.insertTab removes the component <-> panel // pair from the table if it already was contained table.put(component, panel); setSelectedComponent(component); forwardFocusInWindow(); }
public void addTab(IPanel panel) { if (panel == null) { return; } int index = getTabCount(); String title = panel.getTitle(); Icon icon = panel.getIcon(); Component component = panel.getPanelInstance(); if (title == null || title.length() == 0) { title = Messages.getString("TabBar.UNTITLED"); //$NON-NLS-1$ } super.insertTab(title, icon, component, title, index); // super.insertTab removes the component <-> panel // pair from the table if it already was contained table.put(component, panel); setSelectedComponent(component); requestFocusInWindow(); component.requestFocusInWindow(); }
1,120,827
public String getEnvProperty(String name) throws CalFacadeException { try { return CalEnv.getProperty(name); } catch (Throwable t) { throw new CalFacadeException(t); } }
public String getEnvProperty(String name) throws CalFacadeException { try { return CalEnv.getProperty(name); } catch (Throwable t) { throw new CalFacadeException(t); } }
1,120,828