rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public NamedColor(int r, int b, int g, int a, String name){ super(r, g, b, a); this.name = name;
public NamedColor(Color color, String name){ this(color.getRed(), color.getBlue(), color.getGreen(), color.getAlpha(), name);
public NamedColor(int r, int b, int g, int a, String name){ super(r, g, b, a); this.name = name; }
calculateTicks();
TimeScaleCalc (int totalPixels, TimeConfigRegistrar tr){ this.totalPixels = totalPixels; this.timeRegistrar = new TimeConfigRegistrar(tr, this); setTimes(); calculateTicks(); }
left = 10;
left = 15;
public LeftTitleBorder(String title) { top = 0; left = 10; right = 0; bottom = 0; this.title = title; isChannelTitle = false; }
public void removeSelectionDisplay(){ if(selectionDisplay != null){ Iterator e = basicDisplays.iterator(); while(e.hasNext()){ ((BasicSeismogramDisplay)e.next()).clearRegSelections(); } selectionWindow.dispose(); selectionDisplay.parent = null; selectionDisplay.removeAll(); selectionDisplay = null;
public void removeSelectionDisplay(VerticalSeismogramDisplay display){ if(display == selectionDisplay){ removeSelectionDisplay(); }else if(display == threeSelectionDisplay){ remove3CSelectionDisplay();
public void removeSelectionDisplay(){ if(selectionDisplay != null){ Iterator e = basicDisplays.iterator(); while(e.hasNext()){ ((BasicSeismogramDisplay)e.next()).clearRegSelections(); } selectionWindow.dispose(); selectionDisplay.parent = null; selectionDisplay.removeAll(); selectionDis...
if(threeSelectionDisplay != null){ Iterator e = basicDisplays.iterator(); while(e.hasNext()){ ((BasicSeismogramDisplay)e.next()).clear3CSelections(); }
Iterator e = basicDisplays.iterator(); while(e.hasNext()){ ((BasicSeismogramDisplay)e.next()).clear3CSelections(); } if(threeSelectionWindow != null){
public void remove3CSelectionDisplay(){ if(threeSelectionDisplay != null){ Iterator e = basicDisplays.iterator(); while(e.hasNext()){ ((BasicSeismogramDisplay)e.next()).clear3CSelections(); } threeSelectionWindow.dispose(); threeSelectionDisplay.parent = null; threeSelectionDisplay.removeAl...
threeSelectionDisplay.parent = null;
threeSelectionWindow = null;
public void remove3CSelectionDisplay(){ if(threeSelectionDisplay != null){ Iterator e = basicDisplays.iterator(); while(e.hasNext()){ ((BasicSeismogramDisplay)e.next()).clear3CSelections(); } threeSelectionWindow.dispose(); threeSelectionDisplay.parent = null; threeSelectionDisplay.removeAl...
protected void setUp() throws Exception { super.setUp(); short size = 40; intTestData = new int[size]; shortTestData = new short[size]; floatTestData = new float[size]; doubleTestData = new double[size]; for (short i=0; i<size; i++) { shortTestData[i] = 1; intTestData[i] = i; floatTestData[i] = i; doubleTestData[i] = ...
protected void setUp() throws Exception { super.setUp(); short size = 40; intTestData = new int[size]; shortTestData = new short[size]; floatTestData = new float[size]; doubleTestData = new double[size]; for (short i=0; i<size; i++) { shortTestData[i] = i; intTestData[i] = i; floatTestData[i] = i; doubleTestData[i] =...
protected void setUp() throws Exception { // JUnitDoclet begin method testcase.setUp super.setUp(); short size = 40; intTestData = new int[size]; shortTestData = new short[size]; floatTestData = new float[size]; doubleTestData = new double[size]; for (short i=0; i<size; i++) { ...
form.getMsg().emit("org.bedework.message.added.locations", 1);
form.getMsg().emit("org.bedework.client.message.added.locations", 1);
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } BwLocation l = form.getNewLocation(); if (l == null) { return "success"; } form.getCalSvcI().addLocation(l); form.getMsg().emit("...
return new Vector();
return new ArrayList();
public Collection getEventFormatters() throws Throwable { try { getEvents(); if (eventFormatters == null) { if (events == null) { return new Vector(); } eventFormatters = new Vector(); Iterator it = events.iterator(); while (it.hasNext()) { eventFormat...
eventFormatters = new Vector();
eventFormatters = new ArrayList();
public Collection getEventFormatters() throws Throwable { try { getEvents(); if (eventFormatters == null) { if (events == null) { return new Vector(); } eventFormatters = new Vector(); Iterator it = events.iterator(); while (it.hasNext()) { eventFormat...
dataSetIdCache = null; if (dataset instanceof XMLDataSet) {
if (dataset instanceof XMLDataSet) {
public void addDataSet(edu.sc.seis.fissuresUtil.xml.DataSet dataset, AuditInfo[] audit) { dataSetIdCache = null; if (dataset instanceof XMLDataSet) { XMLDataSet xds = (XMLDataSet)dataset; Element element = xds.getElement(); if (element.getOwnerDocument().eq...
parameterNameCache = null;
public void addParameter(String name, Object value, AuditInfo[] audit) { parameterNameCache = null; parameterCache.put(name, value); //if (value instanceof Element) { Element parameter = config.getOwnerDocument().createElement("parameter")...
parameterNameCache = null;
public void addParameterRef(URL paramURL, String name, AuditInfo[] audit) { parameterNameCache = null; String baseStr = base.toString(); String paramStr = paramURL.toString(); if (paramStr.startsWith(baseStr)) { // use r...
seismogramNameCache = null;
public void addSeismogram(LocalSeismogramImpl seis, AuditInfo[] audit) { seismogramNameCache = null; // Note this does not set the xlink, as the seis has not been saved anywhere yet. Document doc = config.getOwnerDocument(); Element localSeismogram = doc.createEleme...
seismogramNameCache = null;
public void addSeismogramRef(LocalSeismogramImpl seis, URL seisURL, String name, Property[] props, ParameterRef[] parm_ids, AuditInfo[] audit) { seismogramNameCache = null; S...
dataSetIdCache = null;
public DataSet createChildDataSet(String id, String name, String owner, AuditInfo[] audit) { dataSetIdCache = null; XMLDataSet dataset = new XMLDataSet(docBuilder, base, id, name, owner); addDataSet(dataset, audit); return dataset; }
channelId.station_code = channelId.station_code.toLowerCase();
public edu.iris.Fissures.IfNetwork.Channel getChannel(ChannelId channelId) { //System.out.println("-------- "+StdDataSetParamNames.CHANNEL+ChannelIdUtil.toString(channelId)); Object obj = getParameter(StdDataSetParamNames.CHANNEL+ChannelIdUtil.toString(channelId)); return (edu.iris.Fissures.IfNetwork.Channel)obj; ...
if (dataSetIdCache == null) { dataSetIdCache = getAllAsStrings("*/@datasetid"); } return dataSetIdCache;
return getAllAsStrings("*/@datasetid");
public String[] getDataSetIds() { if (dataSetIdCache == null) { dataSetIdCache = getAllAsStrings("*/@datasetid"); } // end of if (dataSetIdCache == null) return dataSetIdCache; }
boolean found;
/*boolean found;
public edu.sc.seis.fissuresUtil.cache.CacheEvent getEvent() { boolean found; NodeList paramList = evalNodeList(config, "parameter"); if(paramList != null && paramList.getLength() != 0) { for(int counter = 0; counter < paramList.getLength(); counter++) { Object object = XMLParameter.getParameter((Element)paramL...
return null;
return null;*/ return (edu.sc.seis.fissuresUtil.cache.CacheEvent)getParameter(StdDataSetParamNames.EVENT);
public edu.sc.seis.fissuresUtil.cache.CacheEvent getEvent() { boolean found; NodeList paramList = evalNodeList(config, "parameter"); if(paramList != null && paramList.getLength() != 0) { for(int counter = 0; counter < paramList.getLength(); counter++) { Object object = XMLParameter.getParameter((Element)paramL...
logger.debug("getting the parameter "+name);
System.out.println("getting the parameter");
public Object getParameter(String name) { //ChannelProxy channelProxy = new ChannelProxy(); //ChannelId[] channelIds = getChannelIds(); //channelProxy.retrieve_grouping(channelIds, channelIds[0]); ///************************************************ if (parameterCache.containsKey(name)) { return ...
logger.debug("THE NODE LIST IS NULL for parameter "+name);
System.out.println("THE NODELIST IS NULL");
public Object getParameter(String name) { //ChannelProxy channelProxy = new ChannelProxy(); //ChannelId[] channelIds = getChannelIds(); //channelProxy.retrieve_grouping(channelIds, channelIds[0]); ///************************************************ if (parameterCache.containsKey(name)) { return ...
logger.error("can't get paramterRef for "+name, e);
logger.error("can't get paramterRef", e);
public Object getParameter(String name) { //ChannelProxy channelProxy = new ChannelProxy(); //ChannelId[] channelIds = getChannelIds(); //channelProxy.retrieve_grouping(channelIds, channelIds[0]); ///************************************************ if (parameterCache.containsKey(name)) { return ...
logger.warn("can't find paramter for "+name);
public Object getParameter(String name) { //ChannelProxy channelProxy = new ChannelProxy(); //ChannelId[] channelIds = getChannelIds(); //channelProxy.retrieve_grouping(channelIds, channelIds[0]); ///************************************************ if (parameterCache.containsKey(name)) { return ...
if (parameterNameCache == null) { parameterNameCache = cacheParameterNames(); } return parameterNameCache;
String[] params = getAllAsStrings("parameter/name/text()"); String[] paramRefs = getAllAsStrings("parameterRef/text()"); String[] all = new String[params.length+paramRefs.length]; System.arraycopy(params, 0, all, 0, params.length); System.arraycopy(paramRefs, 0, all, params.length, paramRefs.length); return all;
public String[] getParameterNames() { if (parameterNameCache == null) { parameterNameCache = cacheParameterNames(); } // end of if (parameterNameCache == null) return parameterNameCache; }
NodeList seisAttrNode = XMLUtil.evalNodeList(e, "seismogramAttr"); if(seisAttrNode != null && seisAttrNode.getLength() != 0) { seis.setAttributes(XMLSeismogramAttr.getSeismogramAttr((Element)seisAttrNode.item(0))); }
public LocalSeismogramImpl getSeismogram(String name) { if (seismogramCache.containsKey(name)) { return (LocalSeismogramImpl)seismogramCache.get(name); } // end of if (seismogramCache.containsKey(name)) String urlString = "NONE"; NodeList nList = evalNodeList(conf...
if (seismogramNameCache == null) { seismogramNameCache = cacheSeismogramNames(); } return seismogramNameCache;
String[] names = getAllAsStrings("localSeismogram/seismogramAttr/property[name="+dquote+"Name"+dquote+ "]"+"/value/text()"); logger.debug("found "+names.length+" names in xml"); logger.debug("cache has "+seismogramCache.keySet().size()); String outNames[] = new String[names.length]; System.arraycopy(names, 0, outNames...
public String[] getSeismogramNames() { if (seismogramNameCache == null) { seismogramNameCache = cacheSeismogramNames(); } // end of if (seismogramNameCache == null) return seismogramNameCache; }
form.getMsg().emit("org.bedework.pubevents.message.category.referenced");
form.getErr().emit("org.bedework.client.error.category.referenced");
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } BwCategory key = form.getCategory(); int delResult = form.getCalSvc...
form.getErr().emit("org.bedework.pubevents.error.nosuchcategory", key);
form.getErr().emit("org.bedework.client.error.nosuchcategory", key);
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } BwCategory key = form.getCategory(); int delResult = form.getCalSvc...
form.getMsg().emit("org.bedework.pubevents.message.category.deleted");
form.getMsg().emit("org.bedework.client.message.category.deleted");
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } BwCategory key = form.getCategory(); int delResult = form.getCalSvc...
dataset.addDataSet(new URLDataSet(childElement.getAttribute("xlink:title)"), new URL(base, childElement.getAttribute("xlink:href"))),
dataset.addDataSet(new URLDataSet(childElement.getAttribute("xlink:title"), new URL(base, childElement.getAttribute("xlink:href"))),
public DataSet extract(URL base, Element element) throws MalformedURLException{ String name = ""; String owner = ""; String id = element.getAttribute("datasetid"); Node temp; NodeList children = element.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { ...
logger.debug("Not a 2.0 dsml. "+docElement.getTagName()+" "+docElement.getAttribute("xsi:schemaLocation"));
logger.warn("Not a 2.0 dsml. "+docElement.getTagName()+" "+docElement.getAttribute("xsi:schemaLocation"));
public static DataSet load(URL datasetURL) throws IOException, ParserConfigurationException, SAXException { DataSet dataset = null; DocumentBuilder docBuilder = XMLDataSet.getDocumentBuilder(); Document doc = docBuilder.parse(new BufferedInputStream(datasetURL.openStream())); Elem...
return seismogramNameCache;
public String[] getDataSetSeismogramNames() { if(dssNames.size() == 0) { // for(int counter = 0; counter < seismogramNameCache.length; counter++) {// dssNames.add(seismogramNameCache[counter]);// } } return ((String[])dssNames.toArray(new String[0])...
public static LocalSeismogramImpl steim1(LocalSeismogramImpl seis) throws SteimException, IOException { int[] data = seis.get_as_longs(); LinkedList allBlocks = new LinkedList(); SteimFrameBlock block = Steim1.encode(data, 63); allBlocks.addLast(block); while (block.getNumSamples() < data.length) { int[] tmpData = new...
public static LocalSeismogramImpl steim1(LocalSeismogramImpl seis) throws SteimException, IOException, CodecException, IOException { return steim1(seis, false);
public static LocalSeismogramImpl steim1(LocalSeismogramImpl seis) throws SteimException, IOException { int[] data = seis.get_as_longs(); LinkedList allBlocks = new LinkedList(); SteimFrameBlock block = Steim1.encode(data, 63); allBlocks.addLast(block); while (block.getNumSamples(...
throw new RuntimeException("Immutable");
if (!CalFacadeUtil.eqObjval(ref.getOwner(), val)) { ref.setOwner(val); setRefChanged(true); }
public void setOwner(BwUser val) { throw new RuntimeException("Immutable"); }
Column date = new Column(COLUMN_DATE); Column code = new Column(COLUMN_TRANSACTION_TYPE);
Column date = new Column(table, COLUMN_DATE); Column code = new Column(table, COLUMN_TRANSACTION_TYPE);
public Collection ejbFindRefunds(IWTimestamp from, IWTimestamp to) throws FinderException { to.addDays(1); Table table = new Table(this); Column date = new Column(COLUMN_DATE); Column code = new Column(COLUMN_TRANSACTION_TYPE); SelectQuery query = new SelectQuery(table); query.addColumn(new WildCardColumn(tabl...
query.addColumn(new WildCardColumn(table));
query.addColumn(new Column(table, getIDColumnName()));
public Collection ejbFindRefunds(IWTimestamp from, IWTimestamp to) throws FinderException { to.addDays(1); Table table = new Table(this); Column date = new Column(COLUMN_DATE); Column code = new Column(COLUMN_TRANSACTION_TYPE); SelectQuery query = new SelectQuery(table); query.addColumn(new WildCardColumn(tabl...
return getComponents(dataSet, rf);
Set componentSeismograms = new HashSet(); MicroSecondTimeRange tr = new MicroSecondTimeRange(rf); ChannelId chanId = rf.channel_id; String[] names = dataSet.getDataSetSeismogramNames(); for (int i = 0; i < names.length; i++ ) { DataSetSeismogram currentSeis = dataSet.getDataSetSeismogram(names[i]); RequestFilter curren...
public static DataSetSeismogram[] getComponents(DataSetSeismogram seismogram){ DataSet dataSet = seismogram.getDataSet(); RequestFilter rf = seismogram.getRequestFilter(); return getComponents(dataSet, rf); }
public boolean equals(MicroSecondTimeRange otherTime){ if(this == otherTime){ return true; } return false; }
public boolean equals(Object otherTime){ if(this == otherTime){ return true; } if(!(otherTime instanceof MicroSecondTimeRange)){ return false; } MicroSecondTimeRange mstrTime = (MicroSecondTimeRange)otherTime; if(beginTime.equals(mstrTime.getBeginTime()) && endTime.equals(mstrTime.getEndTime())){ return true; } return ...
public boolean equals(MicroSecondTimeRange otherTime){ if(this == otherTime){ return true; } return false; }
if(!clipTicks) { minTickValue = 0; maxTickValue = Double.MAX_VALUE; }
public void draw(UnitRangeImpl range, Graphics2D g2d) { Iterator it = titles.iterator(); int cumulativeTitleHeight = 0; while(it.hasNext()) { TitleProvider tp = (TitleProvider)it.next(); g2d.setFont(tp.getTitleFont()); FontMetrics fm ...
int width = 50 + labelTickLength + tpHeight;
int width = 6 * getMaxLengthFormattedString().length() + labelTickLength + tpHeight;
private void fixSize() { int tpHeight = 0; Iterator it = titles.iterator(); while(it.hasNext()) { //TODO - calculate based on actual string, font metrics TitleProvider tp = (TitleProvider)it.next(); tpHeight += tp.getTitleFont().getSize(); } if(dir...
for (int i = sb.length() - 1; i >= 0; i--) { if (sb.charAt(i) == 0) { sb.deleteCharAt(i); } }
public static String decode(String str) { char[] src = str.toCharArray(); int len = src.length; byte[] g = new byte[4]; StringBuffer sb = new StringBuffer(len * 3 / 4 + 5); for (int i = 0, j = 0; i < len; i += 4, j += 3) { g[0] = getTableIndex(src[i]); g[1] = (i+1 < len) ? getTableIndex(src[i+1]) : 0; g[2...
for (int i = sb.length() - 1; i >= 0; i--) { if (sb.charAt(i) == 0) { sb.deleteCharAt(i); } }
public static String encode(String str) { char[] src = str.toCharArray(); int len = src.length; byte[] g = new byte[3]; StringBuffer sb = new StringBuffer(len * 4 / 3 + 4); for (int i = 0, j = 0; i < len; i += 3, j += 4) { g[0] = (byte)src[i]; g[1] = (i+1 < len) ? (byte)src[i+1] : 0; g[2] = (i+2 < len) ? ...
if (cb.isDataFlavorAvailable(ideaFlavour)){
if (isIdea){
public void pasteIdea() { DataFlavor ideaFlavour = new DataFlavor(Idea.class, "Idea"); Clipboard cb = getToolkit().getSystemClipboard(); try { if (cb.isDataFlavorAvailable(ideaFlavour)){ Idea idea = (Idea)getToolkit().getSystemClipboard( ).getCon...
public IdeaReader read(File f) throws ReaderException {
public Idea read(File f) throws ReaderException {
public IdeaReader read(File f) throws ReaderException { try { if (f.getName().toLowerCase().endsWith(".opml")) { return new OPMLReader(new FileInputStream(f)); } } catch (Exception e) { throw new ReaderException("Unable to read file " + f, e); } ...
return new OPMLReader(new FileInputStream(f));
reader = new OPMLReader(new FileInputStream(f)); } if (reader != null) { return reader.getIdea();
public IdeaReader read(File f) throws ReaderException { try { if (f.getName().toLowerCase().endsWith(".opml")) { return new OPMLReader(new FileInputStream(f)); } } catch (Exception e) { throw new ReaderException("Unable to read file " + f, e); } ...
Arrival[] arrivals = timeCalc.calcTravelTimes(stationLoc, origin, new String[] {beginPhase, endPhase});
Arrival[] beginArrivals = timeCalc.calcTravelTimes(stationLoc, origin, new String[] {beginPhase}); Arrival[] endArrivals = timeCalc.calcTravelTimes(stationLoc, origin, new String[] {endPhase});
public LocalSeismogramImpl cut(Location stationLoc, Origin origin, LocalSeismogramImpl seis) throws TauModelException, PhaseNonExistent, FissuresException { Arrival[] arrivals = timeCalc.calcTravelTimes(stationLoc, origin, new String...
for (int i=0; i< arrivals.length; i++) { if (arrivals[i].getName().equals(beginPhase)) { beginTime = originTime.add(new TimeInterval(arrivals[i].getTime(), UnitImpl.SECOND)); break; } } if (beginTime == null) { DistAz distAz = new DistAz(stationLoc.latitude, stationLoc.longitude, origin.my_location.latitude, origin.my_...
if (beginArrivals.length != 0) { beginTime = originTime.add(new TimeInterval(beginArrivals[0].getTime(), UnitImpl.SECOND)); beginTime = beginTime.add(beginOffset); } else { DistAz distAz = timeCalc.calcDistAz(stationLoc, origin);
public LocalSeismogramImpl cut(Location stationLoc, Origin origin, LocalSeismogramImpl seis) throws TauModelException, PhaseNonExistent, FissuresException { Arrival[] arrivals = timeCalc.calcTravelTimes(stationLoc, origin, new String...
beginTime = beginTime.add(beginOffset);
public LocalSeismogramImpl cut(Location stationLoc, Origin origin, LocalSeismogramImpl seis) throws TauModelException, PhaseNonExistent, FissuresException { Arrival[] arrivals = timeCalc.calcTravelTimes(stationLoc, origin, new String...
for (int i=0; i< arrivals.length; i++) { if (arrivals[i].getName().equals(endPhase)) { endTime = originTime.add(new TimeInterval(arrivals[i].getTime(), UnitImpl.SECOND)); break; } } if (endTime == null) { DistAz distAz = new DistAz(stationLoc.latitude, stationLoc.longitude, origin.my_location.latitude, origin.my_locati...
if (endArrivals.length != 0) { endTime = originTime.add(new TimeInterval(endArrivals[0].getTime(), UnitImpl.SECOND)); endTime = endTime.add(endOffset); } else { DistAz distAz = timeCalc.calcDistAz(stationLoc, origin);
public LocalSeismogramImpl cut(Location stationLoc, Origin origin, LocalSeismogramImpl seis) throws TauModelException, PhaseNonExistent, FissuresException { Arrival[] arrivals = timeCalc.calcTravelTimes(stationLoc, origin, new String...
endTime = endTime.add(endOffset);
public LocalSeismogramImpl cut(Location stationLoc, Origin origin, LocalSeismogramImpl seis) throws TauModelException, PhaseNonExistent, FissuresException { Arrival[] arrivals = timeCalc.calcTravelTimes(stationLoc, origin, new String...
outSeis.begin_time = seis.getBeginTime().add((TimeInterval)sampPeriod.multiplyBy(beginIndex)).getFissuresTime();
public LocalSeismogramImpl apply(LocalSeismogramImpl seis) { if ( begin.after(seis.getEndTime()) || end.before(seis.getBeginTime())) { return null; } // end of if () TimeInterval sampPeriod = seis.getSampling().getPeriod(); QuantityImpl beginShift = begin.subtract(seis...
ATObject newhost = initargs.base_at(NATNumber.ONE); return new NATField(name_, (NATCallframe) newhost);
if (initargs.base_getLength() != NATNumber.ONE) { return super.meta_newInstance(initargs); } else { ATObject newhost = initargs.base_at(NATNumber.ONE); return new NATField(name_, (NATCallframe) newhost); }
public ATObject meta_newInstance(ATTable initargs) throws InterpreterException { ATObject newhost = initargs.base_at(NATNumber.ONE); return new NATField(name_, (NATCallframe) newhost); }
report.outputReport();
report.outputReport(null);
public void testMakeReportImage() { report.addMSeedSeismogram(); report.addMSeedSeismogram(); report.addMSeedSeismogram(); report.addSacSeismogram(); report.addSacSeismogram(); report.addSacSeismogram(); report.addFileFormatException("File location01", ...
report.outputReport();
report.outputReport(null);
public void testPrintReport() { report.addMSeedSeismogram(); report.addMSeedSeismogram(); report.addMSeedSeismogram(); report.addSacSeismogram(); report.addSacSeismogram(); report.addSacSeismogram(); report.addFileFormatException("File location01", ...
MockSite.createSite());
MockSite.createSite(), VERTICAL);
public static Channel createChannel() { return createChannel(MockChannelId.createVerticalChanId(), "Vertical Channel", MockSite.createSite()); }
MockSite.createOtherSite());
MockSite.createOtherSite(), VERTICAL);
public static Channel createOtherNetChan() { return createChannel(MockChannelId.createOtherNetChanId(), "Other Net Vertical Channel", MockSite.createOtherSite()); }
MockSite.createSite());
MockSite.createSite(), EAST);
public static Channel createEastChannel() { return createChannel(MockChannelId.createEastChanId(), "East Channel", MockSite.createSite()); }
public static Channel[] createMotionVector(Station station) { Channel[] channels = new Channel[3]; Site s = MockSite.createSite(station); String[] codes = {"BHZ", "BHN", "BHE"}; for(int i = 0; i < codes.length; i++) { channels[i] = createChannel(MockChannelId.createChanId(codes[i], s), "Motion Vector Channel " + codes[...
public static Channel[] createMotionVector() { return createMotionVector(MockStation.createStation());
public static Channel[] createMotionVector(Station station) { Channel[] channels = new Channel[3]; Site s = MockSite.createSite(station); String[] codes = {"BHZ", "BHN", "BHE"}; for(int i = 0; i < codes.length; i++) { channels[i] = createChannel(MockChannelId.createChanId(code...
MockSite.createSite());
MockSite.createSite(), NORTH);
public static Channel createNorthChannel() { return createChannel(MockChannelId.createNorthChanId(), "North Channel", MockSite.createSite()); }
for (int i = 0; i < 3; i++){ logger.info("run " + (i + 1) + " of " + repeats + " for " + r); r.run();
int i = 0; try { for (i = 0; i < repeats; i++){ logger.info("run " + (i + 1) + " of " + repeats + " for " + r); r.run(); logger.info("finished " + (i + 1) + " of " + repeats + " for " + r); } } catch (Throwable e) { logger.warn("fail " + (i + 1) + " of " + repeats + " for " + r, e);
public void run() { for (int i = 0; i < 3; i++){ logger.info("run " + (i + 1) + " of " + repeats + " for " + r); r.run(); } }
logger.info("leave thread for "+r);
public void run() { for (int i = 0; i < 3; i++){ logger.info("run " + (i + 1) + " of " + repeats + " for " + r); r.run(); } }
if (backgrounded.containsKey(events[row])) { return false; } if ( ! cachedEvents.containsKey(events[row])) { CacheEvent cache; if (events[row] instanceof CacheEvent){ cache = (CacheEvent)events[row]; } else{ cache = new CacheEvent(events[row]); } backgrounded.put(events[row], cache); System.out.println("ETM 173: event...
if (backgrounded.containsKey(events[row])) { return false; } if ( ! cachedEvents.containsKey(events[row])) { CacheEvent cache; if (events[row] instanceof CacheEvent){ cache = (CacheEvent)events[row]; } else{ cache = new CacheEvent(events[row]); } backgrounded.put(events[row], cache); rowNumber.put(events[row], new Int...
public boolean isRowCached(int row) { if (backgrounded.containsKey(events[row])) { return false; } if ( ! cachedEvents.containsKey(events[row])) { // load in background CacheEvent cache; if (events[row] instanceof CacheEvent){ cache = (CacheEvent)events[row]; } else{ cache = new CacheEvent(even...
if (geoNum > 0 && geoNum <= 729) { return feProps.getProperty("GeogRegion"+geoNum); }
String propValue = feProps.getProperty("GeogRegion"+geoNum); if (propValue != null && propValue.length > 1) { return propValue; }
public String getGeographicRegionName(int geoNum) { if (geoNum > 0 && geoNum <= 729) { return feProps.getProperty("GeogRegion"+geoNum); } // end of if (geoNum > 0 && geoNum <= 729) return "GeoRegion"+geoNum; }
System.out.println(query.toString());
public Collection ejbFindRefunds(IWTimestamp from, IWTimestamp to) throws FinderException { to.addDays(1); Table table = new Table(this); Column date = new Column(COLUMN_DATE); Column code = new Column(COLUMN_TRANSACTION_TYPE); SelectQuery query = new SelectQuery(table); query.addColumn(new WildCardColumn(tabl...
pj.setPrintable(new SeismogramPrinter(getDisplayArray(),1));
SeismogramPrinter printer = new SeismogramPrinter(getDisplayArray()); pj.setPrintable(printer);
public void print(){ PrinterJob pj = PrinterJob.getPrinterJob(); pj.setPrintable(new SeismogramPrinter(getDisplayArray(),1)); if(pj.printDialog()){ try { pj.print(); } catch(Exception e){ e.printStackTrace(); } } }
printer.restore(); revalidate();
public void print(){ PrinterJob pj = PrinterJob.getPrinterJob(); pj.setPrintable(new SeismogramPrinter(getDisplayArray(),1)); if(pj.printDialog()){ try { pj.print(); } catch(Exception e){ e.printStackTrace(); } } }
public SeismogramPrinter (BasicSeismogramDisplay[] displays, int seisPerPage){
public SeismogramPrinter(BasicSeismogramDisplay[] displays){
public SeismogramPrinter (BasicSeismogramDisplay[] displays, int seisPerPage){ this.displays = displays; System.out.println("number of displays: " + displays.length + " number of displays per page: " + seisPerPage); this.seisPerPage = seisPerPage; }
System.out.println("number of displays: " + displays.length + " number of displays per page: " + seisPerPage); this.seisPerPage = seisPerPage;
sizes = new Dimension[displays.length]; bottomBorder = new boolean[displays.length]; topBorder = new boolean[displays.length]; for(int i = 0; i < displays.length; i++){ disableDoubleBuffering(displays[i]); sizes[i] = displays[i].getSize(); bottomBorder[i] = displays[i].hasBottomTimeBorder(); topBorder[i] = displays[i]....
public SeismogramPrinter (BasicSeismogramDisplay[] displays, int seisPerPage){ this.displays = displays; System.out.println("number of displays: " + displays.length + " number of displays per page: " + seisPerPage); this.seisPerPage = seisPerPage; }
meta_invoke(this, AGSymbol.alloc("asBegin"), NATTable.EMPTY),
this.meta_invoke(this, AGSymbol.alloc("asBegin"), NATTable.EMPTY),
public ATBegin asBegin() throws XTypeMismatch { try { return (ATBegin) meta_respondsTo(AGSymbol.alloc("asBegin")).base_ifTrue_( new JavaClosure(null) { public ATObject meta_apply(NATTable arguments) throws NATException { return NATMirageFactory.createMirageForInterface( meta_invoke(this, AGSymbol....
meta_invoke(this, AGSymbol.alloc("asBegin"), NATTable.EMPTY),
this.meta_invoke(this, AGSymbol.alloc("asBegin"), NATTable.EMPTY),
public ATObject meta_apply(NATTable arguments) throws NATException { return NATMirageFactory.createMirageForInterface( meta_invoke(this, AGSymbol.alloc("asBegin"), NATTable.EMPTY), ATBegin.class); }
meta_invoke(this, AGSymbol.alloc("asBoolean"), NATTable.EMPTY),
this.meta_invoke(this, AGSymbol.alloc("asBoolean"), NATTable.EMPTY),
public ATBoolean asBoolean() throws XTypeMismatch { try { return (ATBoolean) meta_respondsTo(AGSymbol.alloc("asBoolean")).base_ifTrue_( new JavaClosure(null) { public ATObject meta_apply(NATTable arguments) throws NATException { return NATMirageFactory.createMirageForInterface( meta_invoke(this, A...
meta_invoke(this, AGSymbol.alloc("asBoolean"), NATTable.EMPTY),
this.meta_invoke(this, AGSymbol.alloc("asBoolean"), NATTable.EMPTY),
public ATObject meta_apply(NATTable arguments) throws NATException { return NATMirageFactory.createMirageForInterface( meta_invoke(this, AGSymbol.alloc("asBoolean"), NATTable.EMPTY), ATBegin.class); }
ATAbstractGrammar body = code.getMethod().getBody();
ATAbstractGrammar body = code.getMethod().getBodyExpression();
private ATObject createChild(ATClosure code, boolean parentPointerType) throws NATException { NATObject extension = new NATObject( /* dynamic parent */ this, /* lexical parent */ code.getContext().getLexicalScope(), /* parent porinter type */ parentPointerType); ATAbstractGrammar body = code.getM...
System.out.println("total paint(Graphics g) time: " + (paintTime/count) + " plotter iteration time: " + (plotTime/count) + " name paint time: " + (nameTime/count));
public void paint(Graphics g){ Date begin = new Date(); Graphics2D g2 = (Graphics2D)g; Dimension size = getSize(); TimeSnapshot timeState = timeRegistrar.takeSnapshot(); AmpSnapshot ampState = ampRegistrar.takeSnapshot(); Iterator e = plotters.iterator(); Date plotBegin = new Date(); wh...
if(!get3CSelections().contains(newSelection))
if(!get3CSelections().contains(newSelection)){
public void add3CSelection(Selection newSelection){ if(!get3CSelections().contains(newSelection)) get3CSelections().add(newSelection); repaint(); }
repaint();
selection3CCount++; repaint(); }
public void add3CSelection(Selection newSelection){ if(!get3CSelections().contains(newSelection)) get3CSelections().add(newSelection); repaint(); }
if(!getSelections().contains(newSelection))
if(!getSelections().contains(newSelection)){
public void addSelection(Selection newSelection){ if(!getSelections().contains(newSelection)) getSelections().add(newSelection); repaint(); }
repaint();
selectionCount++; repaint(); }
public void addSelection(Selection newSelection){ if(!getSelections().contains(newSelection)) getSelections().add(newSelection); repaint(); }
public LinkedList get3CSelections(){ return (LinkedList)plotters.subList(plotters.size() - selection3CCount, plotters.size());
public java.util.List get3CSelections(){ return plotters.subList(plotters.size() - selection3CCount, plotters.size());
public LinkedList get3CSelections(){ return (LinkedList)plotters.subList(plotters.size() - selection3CCount, plotters.size()); }
public LinkedList getAllSelections(){ return (LinkedList)plotters.subList(plotters.size() - selectionCount - selection3CCount, plotters.size());
public java.util.List getAllSelections(){ return plotters.subList(plotters.size() - selectionCount - selection3CCount, plotters.size());
public LinkedList getAllSelections(){ return (LinkedList)plotters.subList(plotters.size() - selectionCount - selection3CCount, plotters.size()); }
public LinkedList getSelections(){ return (LinkedList)plotters.subList(plotters.size() - selectionCount - selection3CCount, plotters.size());
public java.util.List getSelections(){ return plotters.subList(plotters.size() - selectionCount - selection3CCount, plotters.size() - selection3CCount);
public LinkedList getSelections(){ return (LinkedList)plotters.subList(plotters.size() - selectionCount - selection3CCount, plotters.size()); }
get3CSelections().remove(oldSelection); repaint();
if(get3CSelections().remove(oldSelection));{ selection3CCount--; repaint(); }
public void remove3CSelection(Selection oldSelection){ get3CSelections().remove(oldSelection); repaint(); }
getSelections().remove(oldSelection); repaint();
if(getSelections().remove(oldSelection)){ selectionCount--; repaint(); }
public void removeSelection(Selection oldSelection){ getSelections().remove(oldSelection); repaint(); }
JButton zoomIn = new JButton("zoomIn"); JButton zoomOut = new JButton("zoomOut");
JButton zoomIn = new JButton("Zoom In"); JButton zoomOut = new JButton("Zoom Out");
public void createParticleDisplay(BasicSeismogramDisplay creator, boolean advancedOption){ if(particleAllowed){ if(particleDisplay == null){ logger.debug("creating particle display"); particleWindow = new JFrame(particleWindowName); particleWindow.addWindowListener(new WindowAdapter() { public void windowC...
public UnitRangeImpl getAmpRange(){ return ampConfig.getAmpRange(); }
public UnitRangeImpl getAmpRange(DataSetSeismogram seis){ return ampConfig.getAmpRange(seis); }
public UnitRangeImpl getAmpRange(){ return ampConfig.getAmpRange(); }
System.out.println("set waiting"); mComponent.setSize(new Dimension(648, 468));
public ComponentPrintable (Component c){ mComponent = c; System.out.println("set waiting"); mComponent.setSize(new Dimension(648, 468)); }
selectionWindow.dispose();
if(selectionWindow != null){ selectionWindow.dispose(); }
public void removeAll(){ logger.debug("removing all displays"); if(parent != null){ parent.removeSelectionDisplay(this); } super.removeAll(); basicDisplays.clear(); sorter = new SeismogramSorter(); globalRegistrar = null; this.time.setText(" Time: "); this.amp.setText(" Amplitude: "); if(selectionDisplay !=...
threeSelectionDisplay.removeAll(); threeSelectionWindow.dispose(); selectionDisplay = null;
threeSelectionDisplay.removeAll(); if(threeSelectionWindow != null){ threeSelectionWindow.dispose(); } threeSelectionDisplay = null;
public void removeAll(){ logger.debug("removing all displays"); if(parent != null){ parent.removeSelectionDisplay(this); } super.removeAll(); basicDisplays.clear(); sorter = new SeismogramSorter(); globalRegistrar = null; this.time.setText(" Time: "); this.amp.setText(" Amplitude: "); if(selectionDisplay !=...
if(spz.constant != constant || spz.poles.length != poles.length
if((Math.abs(spz.constant - constant) / constant) > .001) { System.out.println("const not equal"); return false; } else if(spz.poles.length != poles.length
public boolean equals(Object obj) { if(super.equals(obj)) { return true; } if(obj instanceof SacPoleZero) { SacPoleZero spz = (SacPoleZero)obj; if(spz.constant != constant || spz.poles.length != poles.length || spz.zeros.length != zeros.length...
System.out.println("zero " + i + " not equal");
public boolean equals(Object obj) { if(super.equals(obj)) { return true; } if(obj instanceof SacPoleZero) { SacPoleZero spz = (SacPoleZero)obj; if(spz.constant != constant || spz.poles.length != poles.length || spz.zeros.length != zeros.length...
lines.add(s);
lines.add(s.trim());
public static SacPoleZero read(BufferedReader in) throws IOException { ArrayList lines = new ArrayList(); String s; while((s = in.readLine()) != null) { lines.add(s); } Cmplx[] poles = new Cmplx[0]; Cmplx[] zeros = new Cmplx[0]; float constant = 1; ...
while(it.hasNext()) { String line = (String)it.next();
String line = nextLine(it); while(!line.equals("")) {
public static SacPoleZero read(BufferedReader in) throws IOException { ArrayList lines = new ArrayList(); String s; while((s = in.readLine()) != null) { lines.add(s); } Cmplx[] poles = new Cmplx[0]; Cmplx[] zeros = new Cmplx[0]; float constant = 1; ...
line = (String)it.next(); if(line.matches("^-?\\d+\\.\\d+\\s+-?\\d+\\.\\d+\\s+")) {
if(line.matches("^-?\\d+\\.\\d+\\s+-?\\d+\\.\\d+")) {
public static SacPoleZero read(BufferedReader in) throws IOException { ArrayList lines = new ArrayList(); String s; while((s = in.readLine()) != null) { lines.add(s); } Cmplx[] poles = new Cmplx[0]; Cmplx[] zeros = new Cmplx[0]; float constant = 1; ...
line = nextLine(it); } else { throw new IOException("Unknown line in SAC polezero file: " + line);
public static SacPoleZero read(BufferedReader in) throws IOException { ArrayList lines = new ArrayList(); String s; while((s = in.readLine()) != null) { lines.add(s); } Cmplx[] poles = new Cmplx[0]; Cmplx[] zeros = new Cmplx[0]; float constant = 1; ...
public Cmplx(double re, double im)
Cmplx()
public Cmplx(double re, double im) { this.r = re; this.i = im; }
this.r = re; this.i = im;
public Cmplx(double re, double im) { this.r = re; this.i = im; }
public static final Cmplx sub(Cmplx a, Cmplx b)
public static final Cmplx sub(double a, Cmplx b)
public static final Cmplx sub(Cmplx a, Cmplx b) { Cmplx c = new Cmplx(); c.r = a.r - b.r; c.i = a.i - b.i; return c; }
Cmplx c = new Cmplx(); c.r = a.r - b.r; c.i = a.i - b.i; return c;
return Cmplx.sub(new Cmplx(a, 0), b);
public static final Cmplx sub(Cmplx a, Cmplx b) { Cmplx c = new Cmplx(); c.r = a.r - b.r; c.i = a.i - b.i; return c; }
public static final Cmplx mul(Cmplx a, Cmplx b)
public static final Cmplx mul(double a, Cmplx b)
public static final Cmplx mul(Cmplx a, Cmplx b) { Cmplx c = new Cmplx(); c.r = a.r * b.r - a.i * b.i; c.i = a.i * b.r + a.r * b.i; return c; }