rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
super(new GridLayout(0, 4));
super(new GridLayout(0, 3));
public ControlPanel(final AudioPlayer owner) { super(new GridLayout(0, 4)); this.owner = owner; prev.setBorderPainted(false); pause.setBorderPainted(false); play.setBorderPainted(false); next.setBorderPainted(false); prev.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) ...
pause.setBorderPainted(false);
prev.setFocusPainted(false);
public ControlPanel(final AudioPlayer owner) { super(new GridLayout(0, 4)); this.owner = owner; prev.setBorderPainted(false); pause.setBorderPainted(false); play.setBorderPainted(false); next.setBorderPainted(false); prev.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) ...
pause.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { MainPanel mainPanel = (MainPanel)owner.getPanelInstance(); mainPanel.pause(); } });
public ControlPanel(final AudioPlayer owner) { super(new GridLayout(0, 4)); this.owner = owner; prev.setBorderPainted(false); pause.setBorderPainted(false); play.setBorderPainted(false); next.setBorderPainted(false); prev.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) ...
mainPanel.play();
if (mainPanel.isPlaying()) { mainPanel.pause(); } else { mainPanel.play(); }
public ControlPanel(final AudioPlayer owner) { super(new GridLayout(0, 4)); this.owner = owner; prev.setBorderPainted(false); pause.setBorderPainted(false); play.setBorderPainted(false); next.setBorderPainted(false); prev.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) ...
add(pause);
public ControlPanel(final AudioPlayer owner) { super(new GridLayout(0, 4)); this.owner = owner; prev.setBorderPainted(false); pause.setBorderPainted(false); play.setBorderPainted(false); next.setBorderPainted(false); prev.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) ...
mainPanel.pause();
if (mainPanel.isPlaying()) { mainPanel.pause(); } else { mainPanel.play(); }
public void actionPerformed(ActionEvent e) { MainPanel mainPanel = (MainPanel)owner.getPanelInstance(); mainPanel.pause(); }
mainPanel.play();
mainPanel.next();
public void actionPerformed(ActionEvent e) { MainPanel mainPanel = (MainPanel)owner.getPanelInstance(); mainPanel.play(); }
(TimeInterval)update.multiplyBy(speed);
(TimeInterval)timeInterval.multiplyBy(speed); lastDate = now;
public void startTimer() { if (timer == null) { timer = new javax.swing.Timer((int)update.convertTo(UnitImpl.MILLISECOND).value, new ActionListener() { public void actionPerformed(ActionEvent e) { if (beginTime != null && speed != 0) { width = (TimeInterval)update.multiplyBy(spe...
(TimeInterval)update.multiplyBy(speed);
(TimeInterval)timeInterval.multiplyBy(speed); lastDate = now;
public void actionPerformed(ActionEvent e) { if (beginTime != null && speed != 0) { width = (TimeInterval)update.multiplyBy(speed); setAllBeginTime(beginTime.add(width)); getRegistrar().updateTimeSyncListeners(); System.out.println("Timer: updateTimeSyncListeners() speed="+speed); ...
if (form.getAutoDeleteSponsors() &&
if (form.retrieveConfig().getAutoDeleteSponsors() &&
public static void deleteEvent(BwActionFormBase form, BwEvent event) throws Throwable { CalSvcI svci = form.fetchSvci(); svci.deleteEvent(event, false); /* If we auto delete and if sponsor id no longer exists in events table then delete this sponsor. */ if (form.getAutoD...
if (form.getAutoDeleteLocations() &&
if (form.retrieveConfig().getAutoDeleteLocations() &&
public static void deleteEvent(BwActionFormBase form, BwEvent event) throws Throwable { CalSvcI svci = form.fetchSvci(); svci.deleteEvent(event, false); /* If we auto delete and if sponsor id no longer exists in events table then delete this sponsor. */ if (form.getAutoD...
iterator.setTotalShift(currentIterator.getTotalShift() + shift);
public void dragPlot(SeismogramShapeIterator iterator){ iterator.copyBasicInfo(currentIterator); double shiftPercentage = getShiftPercentage(currentIterator.getTime(), iterator.getTime()); double pixels = currentIterator.getSize().width * shiftPercentage + currentIterator.getLeftoverPixels(); //...
if(seisPoints[1] < 0 || seisPoints[0] > dss.getSeismogram().getNumPoints()){ displayPixels[0] = -1; displayPixels[1] = -1; iterator.setDrawnPixels(displayPixels); return displayPixels; }
public int[] getPixels(SeismogramShapeIterator iterator){ int[] displayPixels = new int[2]; int[] seisPoints = iterator.getSeisPoints(); double pointsPerPixel = iterator.getPointsPerPixel(); int displayWidth = iterator.getSize().width; double seisPointRange = seisPoints[1] - seisPoints[0]; if(seisPoints[0] >=...
if(newIterator.isDraggedFrom(currentIterator) && newIterator.hasSimilarAmp(currentIterator)){
if(lessThanOnePointPerPixel(newIterator)){ }else if(newIterator.isDraggedFrom(currentIterator) && newIterator.hasSimilarAmp(currentIterator)){
public void update(MicroSecondTimeRange time, UnitRangeImpl amp, Dimension size){ SeismogramShapeIterator newIterator = new SeismogramShapeIterator(time, amp, size); if(newIterator.isDraggedFrom(currentIterator) && newIterator.hasSimilarAmp(currentIterator))...
logger.debug("Iterator drawing on " + startIndex + ", " + endIndex);
public void setDrawnPixels(int[] drawnPixels){ this.drawnPixels = drawnPixels; startIndex = drawnPixels[0]; endIndex = drawnPixels[1]; currentIndex = startIndex; }
public SeismogramShapeIterator(MicroSecondTimeRange time, UnitRangeImpl amp, Dimension size){ this.time = time; this.amp = amp; this.size = size;
public SeismogramShapeIterator(SeismogramShapeIterator brother){ this(brother.getTime(), brother.getAmp(), brother.getSize());
public SeismogramShapeIterator(MicroSecondTimeRange time, UnitRangeImpl amp, Dimension size){ this.time = time; this.amp = amp; this.size = size; }
Iterator i = invocationStack_.iterator(); while (i.hasNext()) { InvocationFrame frame = (InvocationFrame) i.next(); s.println(Evaluator.toString(frame.invocation));
if(!invocationStack_.isEmpty()) { s.println("origin:"); ListIterator i = invocationStack_.listIterator(); while (i.hasNext()) { i.next(); } while(i.hasPrevious()) { InvocationFrame frame = (InvocationFrame) i.previous(); s.println("at "+Evaluator.toString(frame.invocation)); }
public void printStackTrace(PrintStream s) { Iterator i = invocationStack_.iterator(); while (i.hasNext()) { InvocationFrame frame = (InvocationFrame) i.next(); s.println(Evaluator.toString(frame.invocation)); } }
this.setDefaultAttributeName("uid");
public ComplexStubPersonAttributeDao() { this.setDefaultAttributeName("uid"); }
throw new IllegalArgumentException("The default attribute name must be null");
throw new IllegalArgumentException("The default attribute name may not be null");
public final void setDefaultAttributeName(final String name) { if (name == null) throw new IllegalArgumentException("The default attribute name must be null"); this.defaultAttribute = name; }
public void set(Text other) { set(other.bytes, other.length);
public void set(String string) throws CharacterCodingException { ByteBuffer bb = encode(string); bytes = bb.array(); length = bb.limit();
public void set(Text other) { set(other.bytes, other.length); }
public Interval(Object interval) { super(interval, null);
public Interval(long startInstant, long endInstant) { super(startInstant, endInstant, null);
public Interval(Object interval) { super(interval, null); }
public static UnitRangeImpl getBestForDisplay(UnitRangeImpl inRange) { UnitRangeImpl outRange = inRange; if (inRange.getUnit().isConvertableTo(UnitImpl.METER_PER_SECOND)) { inRange = inRange.convertTo(UnitImpl.METER_PER_SECOND); if (Math.abs(inRange.getMinValue()) < .000001 && Math.abs(inRange.getMaxValue()) < .0000...
public static QuantityImpl getBestForDisplay(QuantityImpl quantity) { UnitRangeImpl inRange = new UnitRangeImpl(quantity.getValue(), quantity.getValue(), quantity.getUnit()); inRange = getBestForDisplay(inRange); return new QuantityImpl(inRange.getMinValue(), inRange.getUnit());
public static UnitRangeImpl getBestForDisplay(UnitRangeImpl inRange) { // just in case we don't have a case for this unit UnitRangeImpl outRange = inRange; if (inRange.getUnit().isConvertableTo(UnitImpl.METER_PER_SECOND)) { // velocity inRange = inRange.convertTo(UnitImpl....
r.setForeground(new Color(192,192,255));
r.setForeground(new Color(128,128,255));
public Component prepareRenderer(TableCellRenderer renderer, int row, int column) { MessageTableModel dm = (MessageTableModel)getModel(); int tagColumn = getTagColumn( row, dm ); String value = dm.getValueAt( row, tagColumn ).toString(); if( tagColumn < 0 ) return super.prepareRenderer(renderer, row, column)...
r.setForeground(new Color(64,64,255));
r.setForeground(new Color(0,0,255));
public Component prepareRenderer(TableCellRenderer renderer, int row, int column) { MessageTableModel dm = (MessageTableModel)getModel(); int tagColumn = getTagColumn( row, dm ); String value = dm.getValueAt( row, tagColumn ).toString(); if( tagColumn < 0 ) return super.prepareRenderer(renderer, row, column)...
public static String getEventInfo(EventAccessOperations event, String format) { return getEventInfo(event, format, new SimpleDateFormat( "MM/dd/yyyy HH:mm:sss z"));
public static String getEventInfo(EventAccessOperations event) { return getEventInfo(event, NO_ARG_STRING);
public static String getEventInfo(EventAccessOperations event, String format) { return getEventInfo(event, format, new SimpleDateFormat( "MM/dd/yyyy HH:mm:sss z")); }
xml.addNs(CaldavUWDef.caldavNamespace); xml.addNs(CaldavUWDef.icalNamespace);
xml.addNs(CaldavDefs.caldavNamespace); xml.addNs(CaldavDefs.icalNamespace);
public void addNamespace() throws WebdavIntfException { try { xml.addNs(CaldavUWDef.caldavNamespace); xml.addNs(CaldavUWDef.icalNamespace); } catch (Throwable t) { throw new WebdavIntfException(t); } }
xml.openTag(WebdavTags.acl); if (aces != null) { Iterator it = aces.iterator(); while (it.hasNext()) { Ace ace = (Ace)it.next(); emitAce(ace, true); emitAce(ace, false); } } xml.closeTag(WebdavTags.acl); } catch (WebdavIntfException wi) { throw wi;
emitAccess.emitAces(aces);
public void emitAcl(WebdavNsNode node) throws WebdavIntfException { CaldavBwNode uwnode = getBwnode(node); CaldavURI cdUri = uwnode.getCDURI(); Collection aces = null; try { if (cdUri.isCalendar()) { aces = getSvci().getAces(cdUri.getCal()); } else { aces = getSvci().getAces(((Cald...
emitAccess = new EmitAccess(namespacePrefix, xml);
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.getS...
for (priv = 0; priv < privTags.length; priv++) { if (MethodBase.nodeMatches(el, privTags[priv])) {
for (priv = 0; priv < AccessUtil.privTags.length; priv++) { if (MethodBase.nodeMatches(el, AccessUtil.privTags[priv])) {
public void parsePrivilege(AclInfo ainfo, Node nd, boolean grant) throws WebdavIntfException { CdAclInfo info = (CdAclInfo)ainfo; if (!grant) { // There's probably a way to block this throw WebdavIntfException.badRequest(); } Element el = getOnlyChild(nd); int priv...
int rights,
public CalSvcIPars(String authUser, int rights, String user, String envPrefix, boolean publicAdmin, boolean caldav, String synchId, boolean debug) { this.authUser = authUser; ...
this.rights = rights;
public CalSvcIPars(String authUser, int rights, String user, String envPrefix, boolean publicAdmin, boolean caldav, String synchId, boolean debug) { this.authUser = authUser; ...
public IcalTranslator(IcalCallback cb, boolean debug) { this.cb = cb; this.debug = debug;
public IcalTranslator(IcalCallback cb) { this(cb, false);
public IcalTranslator(IcalCallback cb, boolean debug) { this.cb = cb; this.debug = debug; }
if (how.length == 0) { ca.accessAllowed = ca.privileges.getAnyAllowed(); return ca; }
public CurrentAccess evaluateAccess(AccessPrincipal who, String owner, Privilege[] how, char[] acl, PrivilegeSet filter) throws AccessException { boolean authenticated = !who.getUnauthenticated(); boolean isOwner = false; Curr...
public void decode(EncodedAcl acl, boolean getPrivileges) throws AccessException { decodeWhoType(acl); decodeHow(acl, getPrivileges);
public boolean decode(EncodedAcl acl, boolean getPrivileges, String name, int whoType) throws AccessException { acl.rewind(); while (acl.hasMore()) { decodeWhoType(acl); if ((whoType != getWhoType()) || !whoMatch(name)) { skipHow(acl); } else { decodeHow(acl, getPrivileges); return true; } } return false;
public void decode(EncodedAcl acl, boolean getPrivileges) throws AccessException { decodeWhoType(acl); decodeHow(acl, getPrivileges); }
return (Privilege)privs[privType].clone();
return privs[privType];
public static Privilege makePriv(int privType) { return (Privilege)privs[privType].clone(); }
sb.append("AclVO{");
sb.append("EncodedAcl{pos="); sb.append(pos);
public String toString() { StringBuffer sb = new StringBuffer(); sb.append("AclVO{");// sb.append(entityId); sb.append("}"); return sb.toString(); }
if (debug) { debugMsg("rewind"); }
public void rewind() { pos = 0; }
if (debug) { debugMsg("getChar='" + c + "'"); }
public char getChar() { if ((encoded == null) || (pos == encoded.length)) { return (char)-1; } char c = encoded[pos]; pos++; return c; }
sb.append("AceVO{who=");
sb.append("Ace{who=");
public String toString() { StringBuffer sb = new StringBuffer(); sb.append("AceVO{who="); sb.append(who); sb.append(", notWho="); sb.append(notWho); sb.append(", whoType="); sb.append(whoTypeNames[whoType]); sb.append("("); sb.append(whoType); sb.append(")"); if (how != null) { s...
start = ev.getDtend().getDate();
end = ev.getDtend().getDate();
void setEntity(Object o) throws CalFacadeException { entity = o; if (o instanceof EventInfo) { EventInfo ei = (EventInfo)o; BwEvent ev = ei.getEvent(); start = ev.getDtstart().getDate(); start = ev.getDtend().getDate(); return; } if (o instanceof EventPeriod) {...
start = String.valueOf(ep.getEnd());
end = String.valueOf(ep.getEnd());
void setEntity(Object o) throws CalFacadeException { entity = o; if (o instanceof EventInfo) { EventInfo ei = (EventInfo)o; BwEvent ev = ei.getEvent(); start = ev.getDtstart().getDate(); start = ev.getDtend().getDate(); return; } if (o instanceof EventPeriod) {...
start = String.valueOf(p.getEnd());
end = String.valueOf(p.getEnd());
void setEntity(Object o) throws CalFacadeException { entity = o; if (o instanceof EventInfo) { EventInfo ei = (EventInfo)o; BwEvent ev = ei.getEvent(); start = ev.getDtstart().getDate(); start = ev.getDtend().getDate(); return; } if (o instanceof EventPeriod) {...
public String getDefaultTimeZoneId() throws CalFacadeException;
public String getDefaultTimeZoneId() throws CalFacadeException { return defaultTimeZoneId; }
public String getDefaultTimeZoneId() throws CalFacadeException;
String name =seis.getProperty("name");
String name =seis.getProperty(seisNameKey);
public void addSeismogram(LocalSeismogramImpl seis, AuditInfo[] audit) { // Note this does not set the xlink, as the seis has not been saved anywhere yet. Document doc = config.getOwnerDocument(); Element sac = doc.createElement("SacSeismogram"); String name ...
if (props[i].name != "name") {
if (props[i].name != seisNameKey) {
public void addSeismogram(LocalSeismogramImpl seis, AuditInfo[] audit) { // Note this does not set the xlink, as the seis has not been saved anywhere yet. Document doc = config.getOwnerDocument(); Element sac = doc.createElement("SacSeismogram"); String name ...
if (props[i].name != "name") {
if (props[i].name != seisNameKey) {
public void addSeismogramRef(URL seisURL, String name, Property[] props, ParameterRef[] parm_ids, AuditInfo[] audit) { String baseStr = base.toString(); String seisStr = s...
newProps[newProps.length-1] = new Property("name",
newProps[newProps.length-1] = new Property(seisNameKey,
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...
TimeRange fileTimeWindow = new TimeRange(beginTime.getFissuresTime(), endTime.getFissuresTime());
MicroSecondTimeRange fileTimeWindow = new MicroSecondTimeRange(beginTime, endTime);
private TimeInterval processAllChannels(File file, String unitIdNumber) throws IOException { String fileName = file.getName(); String yearAndDay = file.getParentFile() .getParentFile() .getParentFile() .getName(); MicroSecondDate beginTime...
MicroSecondDate beginTime = getBeginTime(file, unitIdNumber);
public boolean scan(File file) throws IOException { if(file.getName().endsWith("00000000")) { return read(file); } String unitIdNumber = getUnitId(file); MicroSecondDate beginTime = getBeginTime(file, unitIdNumber); TimeInterval lengthOfData; try { len...
TimeRange fileTimeWindow = new TimeRange(beginTime.getFissuresTime(), nominalEndTime.getFissuresTime());
MicroSecondTimeRange fileTimeWindow = new MicroSecondTimeRange(beginTime, nominalEndTime);
public boolean scan(File file) throws IOException { if(file.getName().endsWith("00000000")) { return read(file); } String unitIdNumber = getUnitId(file); MicroSecondDate beginTime = getBeginTime(file, unitIdNumber); TimeInterval lengthOfData; try { len...
beginTime,
public boolean scan(File file) throws IOException { if(file.getName().endsWith("00000000")) { return read(file); } String unitIdNumber = getUnitId(file); MicroSecondDate beginTime = getBeginTime(file, unitIdNumber); TimeInterval lengthOfData; try { len...
System.err.println("The file is not 18 characters in length."); throw new RT130FormatException(); } else { String stringLengthOfData = fileName.substring(10, 18); long longLengthOfData = Long.parseLong(stringLengthOfData, 16); TimeInterval lengthOfData = new TimeInterval(longLengthOfData, UnitImpl.MILLISECOND); return ...
throw new RT130FormatException("The file '" + fileName + "'is not 18 characters in length.");
public static TimeInterval getLengthOfData(String fileName) throws RT130FormatException { if(fileName.length() != 18) { System.err.println("The file is not 18 characters in length."); throw new RT130FormatException(); } else { String stringLengthOfData = fil...
String stringLengthOfData = fileName.substring(10, 18); long longLengthOfData = Long.parseLong(stringLengthOfData, 16); TimeInterval lengthOfData = new TimeInterval(longLengthOfData, UnitImpl.MILLISECOND); return lengthOfData;
public static TimeInterval getLengthOfData(String fileName) throws RT130FormatException { if(fileName.length() != 18) { System.err.println("The file is not 18 characters in length."); throw new RT130FormatException(); } else { String stringLengthOfData = fil...
double mean = (basic.getMaxValue() - basic.getMinValue())/2; double offset = basic.getMaxValue() - mean;
double offset = (basic.getMaxValue() - basic.getMinValue())/2;
protected UnitRangeImpl calcGenericAmp(UnitRangeImpl inAmp, DataSetSeismogram seis) { UnitRangeImpl basic = super.calcGenericAmp(inAmp, seis); double mean = (basic.getMaxValue() - basic.getMinValue())/2; double offset = basic.getMaxValue() - mean; UnitRangeImpl out = new UnitRangeImpl(-1...
form.getMsg().emit("org.bedework.client.message.admingroup.updated");
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /* Check access */ if (!form.getUserAuth().isSuperUser()) { return "noAccess"; } String reqpar = request.getParameter("delete"); if (reqpar !...
this.color = color;
public ParticleMotion(DataSetSeismogram hSeis, DataSetSeismogram vSeis, TimeConfig tc, Color color, String key, boolean horizPlane) { horiz = new SeismogramContainer(this,hSeis); vert = new SeismogramContainer(this, vSeis); ...
public void add(NamedFilter filter){ if(!filterToParMo.containsKey(filter))
public void add(NamedFilter filter, Color color){ if(!filterToParMo.containsKey(filter)){
public void add(NamedFilter filter){ if(!filterToParMo.containsKey(filter)) filterToParMo.put(filter, new ParticleMotion(FilteredDataSetSeismogram.getFiltered(horiz.getDataSetSeismogram(), filter), FilteredDataSetSeismogram.ge...
SeismogramDisplay.COLORS[filterCount++ % SeismogramDisplay.COLORS.length],
color,
public void add(NamedFilter filter){ if(!filterToParMo.containsKey(filter)) filterToParMo.put(filter, new ParticleMotion(FilteredDataSetSeismogram.getFiltered(horiz.getDataSetSeismogram(), filter), FilteredDataSetSeismogram.ge...
if(statusTable != null) statusTable.setComponent(this, generateLabel()); }
public void add(NamedFilter filter){ if(!filterToParMo.containsKey(filter)) filterToParMo.put(filter, new ParticleMotion(FilteredDataSetSeismogram.getFiltered(horiz.getDataSetSeismogram(), filter), FilteredDataSetSeismogram.ge...
int[]hPixels = SimplePlotUtil.getPlottableSimple(horiz.getIterator(tr), ae.getAmp(horiz.getDataSetSeismogram()), size); int[] vPixels = SimplePlotUtil.getPlottableSimple(vert.getIterator(tr), ae.getAmp(vert.getDataSetSeismogram()), size); SimplePlotUtil.flipArray(hPixels, size.width); g2D.draw(getParticleMotionPath(hP...
GeneralPath generalPath = new GeneralPath(GeneralPath.WIND_EVEN_ODD); boolean prevPointBad = true; SeismogramIterator hIt = horiz.getIterator(tr); double hMin = ae.getAmp(horiz.getDataSetSeismogram()).getMinValue(); double hMax = ae.getAmp(horiz.getDataSetSeismogram()).getMaxValue(); SeismogramIterator vIt = vert.getIt...
public void draw(Graphics g, Dimension size) { if(visible){ Graphics2D g2D = (Graphics2D) g; if(horiz.getIterator(tr).numPointsLeft() <= 0 || vert.getIterator(tr).numPointsLeft() <= 0){ return; } g2D.setC...
if(statusTable != null) statusTable.setComponent(this, generateLabel());
public void remove(NamedFilter filter){ if(filterToParMo.containsKey(filter)){ ((ParticleMotion)filterToParMo.get(filter)).tearDownConfigs(); filterToParMo.remove(filter); } }
((ParticleMotion)it.next()).add(filter);
ParticleMotion cur = (ParticleMotion)it.next(); cur.add(filter, getColor(cur.getTimeConfig(), filter));
public void add(NamedFilter filter){ Iterator it = parMos.iterator(); while(it.hasNext()){ ((ParticleMotion)it.next()).add(filter); } repaint(); }
public synchronized void drawAzimuth(ParticleMotion particleMotion, Graphics2D graphics2D) {
public void drawAzimuth(ParticleMotion particleMotion, Graphics2D graphics2D) {
public synchronized void drawAzimuth(ParticleMotion particleMotion, Graphics2D graphics2D) { if(!particleMotion.isHorizontalPlane()) return; Shape sector = getSectorShape(); graphics2D.setPaint(Color.LIGHT_GRAY); graphics2D.fill(sector); graphics2D.draw(sector); drawAzimuth...
g2D.setColor(new Color(parMoCo.getRed(), parMoCo.getGreen(), parMoCo.getBlue(), 96)); GeneralPath generalPath = new GeneralPath(); double degrees = key.doubleValue(); int x = (int)(fmin * Math.cos(Math.toRadians(degrees))); int y = (int)(fmax * Math.sin(Math.toRadians(degrees))); generalPath.moveTo(newx+x, newy-y); gen...
if(parMoCo != null){ g2D.setColor(new Color(parMoCo.getRed(), parMoCo.getGreen(), parMoCo.getBlue(), 96)); GeneralPath generalPath = new GeneralPath(); double degrees = key.doubleValue(); int x = (int)(fmin * Math.cos(Math.toRadians(degrees))); int y = (int)(fmax * Math.sin(Math.toRadians(degrees))); generalPath.moveTo...
public void drawAzimuths(Graphics2D g2D) { Insets insets = getInsets(); double fmin = super.getSize().getWidth() - insets.left - insets.right; double fmax = super.getSize().getHeight() - insets.top - insets.bottom; int originx = (int)(fmin/2); int originy = (int)(fmax/2); ...
public SeismogramContainer(SeismogramContainerListener initialListener, DataSetSeismogram seismogram){ if(initialListener != null){ listeners.add(initialListener); } this.seismogram = seismogram; seismogram.addSeisDataChangeListener(this); seismogram.addRequestFilterChangeListener(this);
public SeismogramContainer(DataSetSeismogram seismogram){ this(null, seismogram);
public SeismogramContainer(SeismogramContainerListener initialListener, DataSetSeismogram seismogram){ if(initialListener != null){ listeners.add(initialListener); } this.seismogram = seismogram; seismogram.addSeisDataChangeListener(this); ...
public SeismogramIterator getIterator(MicroSecondTimeRange timeRange){ SoftReference iteratorReference = null; synchronized(threadToIterator){ iteratorReference = (SoftReference)threadToIterator.get(Thread.currentThread());
public SeismogramIterator getIterator(){ MicroSecondTimeRange fullTime = time; if(fullTime == null){ fullTime = DisplayUtils.getFullTime(getSeismograms()); time = fullTime;
public SeismogramIterator getIterator(MicroSecondTimeRange timeRange){ SoftReference iteratorReference = null; synchronized(threadToIterator){ iteratorReference = (SoftReference)threadToIterator.get(Thread.currentThread()); } if(iteratorReference != null){ Seismogra...
if(iteratorReference != null){ SeismogramIterator it = (SeismogramIterator)iteratorReference.get(); if(it != null && it.hasNext()){ if(it.getTimeRange().equals(timeRange)){ return it; }else if(timeRange != null){ it.setTimeRange(timeRange); return it; } } } SeismogramIterator it = new SeismogramIterator(seismogram.getN...
return getIterator(fullTime);
public SeismogramIterator getIterator(MicroSecondTimeRange timeRange){ SoftReference iteratorReference = null; synchronized(threadToIterator){ iteratorReference = (SoftReference)threadToIterator.get(Thread.currentThread()); } if(iteratorReference != null){ Seismogra...
System.out.println(" calendars: " + calendars);
public void stats() { System.out.println(" syspars: " + syspars); System.out.println(" users: " + users); System.out.println(" timezones: " + timezones); System.out.println(" subscribedUsers: " + subscribedUsers); System.out.println(" subscriptions: " + subscriptions); ...
logger.debug("---------------___----------> RETURNING THE CHANNELS");
public Channel[] retrieve_grouping( Channel[] channels, Channel channel) { ChannelId channelId = channel.get_id(); String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.lengt...
if(rtnchannels[counter] == null) System.out.println(" IS NULL "); else System.out.println(" IS NOT NULL ");
public Channel[] retrieve_grouping( Channel[] channels, Channel channel) { ChannelId channelId = channel.get_id(); String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.lengt...
public abstract int getMaximumValue(long instant);
public abstract int getMaximumValue();
public abstract int getMaximumValue(long instant);
ClassLoader cl = SeismogramDisplayConfigurationTest.class.getClassLoader();
ClassLoader cl = DOMHelper.class.getClassLoader();
public static Element createElement(String loc) throws Exception { ClassLoader cl = SeismogramDisplayConfigurationTest.class.getClassLoader(); InputStream source = cl.getResourceAsStream(loc); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAwar...
dss.setDataSet(this);
public void addDataSetSeismogram(DataSetSeismogram dss, AuditInfo[] audit) { String name; name = dss.getName(); if ( name == null || name.length() == 0) { name = ChannelIdUtil.toStringNoDates(dss.getRequestFilter().channel_id); } // end of if () name = XMLUtil.getUnique...
if(href.startsWith("file:")) { href = href.substring(href.indexOf("file:")+1); } href.replace(' ', '_');
public static void insertParameterRef(Element paramRef, String name, String href, Object value) { // write(href, value); //Element paramRef = doc.createElement("parameterRef"); paramRef.setAttribute("name", name); paramRef.setAttributeNS(xlinkNS,"xlink:type", "type/xml"); paramRef.setAttributeNS(xlinkNS, "xlink:hre...
return new NATAsyncMessage(ctx.base_getSelf(), this.getSelector(),
return new NATAsyncMessage(ctx.base_getSelf(), this.base_getSelector(),
public ATObject meta_eval(ATContext ctx) throws NATException { return new NATAsyncMessage(ctx.base_getSelf(), this.getSelector(), Evaluator.evaluateArguments(this.base_getArguments().asNativeTable(), ctx)); }
public String getAsShortText(int fieldValue, Locale locale) { return getAsText(fieldValue, locale);
public String getAsShortText(long instant, Locale locale) { return getAsShortText(get(instant), locale);
public String getAsShortText(int fieldValue, Locale locale) { return getAsText(fieldValue, locale); }
public String getAsText(int fieldValue, Locale locale) { return Integer.toString(fieldValue);
public String getAsText(long instant, Locale locale) { return getAsText(get(instant), locale);
public String getAsText(int fieldValue, Locale locale) { return Integer.toString(fieldValue); }
if( chanMap.containsKey(keyStr)) { System.out.println("Found the channelID: "); return (ChannelId)(chanMap.get(keyStr)); } else { System.out.println("The channelID is not Found"); return null;
System.out.println("### Passed channelID: " + keyStr);
public ChannelId getChannelId(String keyStr) { if( chanMap.containsKey(keyStr)) { System.out.println("Found the channelID: "); return (ChannelId)(chanMap.get(keyStr)); } else { System.out.println("The channelID is not Found"); return null; } }
}
ChannelId foundChannelId = null; Iterator it = chanIdMap.keySet().iterator(); while (it.hasNext()) { java.lang.Object key = it.next(); String stkey = (String)key; if(stkey.equals(keyStr)) { System.out.println("Found the channelID: "+stkey); foundChannelId = (ChannelId)(chanIdMap.get(keyStr)); } } if(foundChannel...
public ChannelId getChannelId(String keyStr) { if( chanMap.containsKey(keyStr)) { System.out.println("Found the channelID: "); return (ChannelId)(chanMap.get(keyStr)); } else { System.out.println("The channelID is not Found"); return null; } }
chanIdkey = netCode + "." + stationCode + "." + siteCode + "." + channelCode; chanIdMap.put(chanIdkey,thechannelid );
public void setChannels(String netCode, String stationCode) { NetworkAccess netAccess = (edu.iris.Fissures.IfNetwork.NetworkAccess) netMap.get(netCode); Station station = (edu.iris.Fissures.IfNetwork.Station) staMap.get(stationCode); Channel[] allChannels = netAccess.retrieve_for_station(station.get_id()); sitMap....
if (form.getGuest()) {
if (!form.getUserAuth().isSuperUser()) {
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } CalSvcI svc = form.getCa...
BwPreferences prefs; String str = request.getParameter("user"); if (str != null) { if (!form.getUserAuth().isSuperUser()) { return "noAccess"; } BwUser user = svc.findUser(str); if (user == null) { form.getErr().emit("org.bedework.client.error.nosuchuserid", str); return "notFound"; } prefs = svc.getUserPrefs(user); }...
String str = getReqPar(request, "user"); if (str == null) { return "success";
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } CalSvcI svc = form.getCa...
form.setUserPreferences(prefs);
BwUser user = svc.findUser(str); if (user == null) { form.getErr().emit("org.bedework.client.error.nosuchuserid", str); return "notFound"; } form.setUserPreferences(svc.getUserPrefs(user));
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } CalSvcI svc = form.getCa...
System.out.println("THEEE TIME TAKEN FOR getFISSURESTIME is *&&&&&&&&&&&&&&&&&&&********"+(endTime.getTime() - startTime.getTime()));
public static edu.iris.Fissures.Time getFissuresTime(Element element) { Date startTime = Calendar.getInstance().getTime(); NodeList nodeList = element.getChildNodes(); String date_time = ""; int leap_seconds_version = 0; for(int counter = 0; counter < nodeList.getLength(); counter++) { if(nodeList.item(counte...
Locale loc = scal.getCalInfo().getLocale(); scal = new MyCalendarVO(scal.getTime(), loc);
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { BwUser user; CalSvcI svci = form.fetchSvci(); gotoDateView(this, form, form.getDate(), form.getViewTypeI(), debug); String userId = getReqPar(req...
public abstract String doAction(HttpServletRequest request, BwActionForm form) throws Throwable;
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase frm) throws Throwable { BwActionForm form = (BwActionForm)frm; String forward = doAction(request, form); return forward; }
public abstract String doAction(HttpServletRequest request, BwActionForm form) throws Throwable;
firstDay.set(Calendar.HOUR_OF_DAY, 0); firstDay.set(Calendar.MINUTE, 0); firstDay.set(Calendar.SECOND, 0); firstDay.set(Calendar.MILLISECOND, 0);
public MyCalendarVO getFirstDayOfThisWeek() { Calendar firstDay = (Calendar)calendar.clone(); firstDay.set(Calendar.DAY_OF_WEEK, calInfo.getFirstDayOfWeek()); return new MyCalendarVO(firstDay, calInfo.getLocale()); }
if(it.next().toString().equals(seismogram.toString())){
DataSetSeismogram current = ((LayoutData)it.next()).getSeis(); if(current.equals(seismogram)){
public int sort(DataSetSeismogram seismogram){ DataSetSeismogram[] dss = {seismogram}; layoutConfig.add(dss); Iterator it = layoutConfig.generateLayoutEvent().iterator(); int i = 0; while(it.hasNext()){ if(it.next().toString().equals(seismogram.toString())){ ...
orderedSeis.add(0, seis[0]);
orderedSeis.add(seis[0]);
public synchronized LayoutEvent generateLayoutEvent(){ DataSetSeismogram[] seis = getSeismograms(); if(seis.length > 0){ List orderedSeis = new ArrayList(seis.length); orderedSeis.add(0, seis[0]); double minDistBetween = Double.POSITIVE_INFINITY; for (int i ...
while(orIt.hasNext()){
while(orIt.hasNext() && !added){
public synchronized LayoutEvent generateLayoutEvent(){ DataSetSeismogram[] seis = getSeismograms(); if(seis.length > 0){ List orderedSeis = new ArrayList(seis.length); orderedSeis.add(0, seis[0]); double minDistBetween = Double.POSITIVE_INFINITY; for (int i ...
if(curSeisDelt < orSeisDelt){
double distDiff = orSeisDelt - curSeisDelt; if(distDiff > 0){
public synchronized LayoutEvent generateLayoutEvent(){ DataSetSeismogram[] seis = getSeismograms(); if(seis.length > 0){ List orderedSeis = new ArrayList(seis.length); orderedSeis.add(0, seis[0]); double minDistBetween = Double.POSITIVE_INFINITY; for (int i ...
break;
public synchronized LayoutEvent generateLayoutEvent(){ DataSetSeismogram[] seis = getSeismograms(); if(seis.length > 0){ List orderedSeis = new ArrayList(seis.length); orderedSeis.add(0, seis[0]); double minDistBetween = Double.POSITIVE_INFINITY; for (int i ...
double distDiff = Math.abs(orSeisDelt - curSeisDelt); if(distDiff != 0 && distDiff < minDistBetween){ minDistBetween = distDiff;
if(distDiff != 0 && Math.abs(distDiff) < minDistBetween){ minDistBetween = Math.abs(distDiff);
public synchronized LayoutEvent generateLayoutEvent(){ DataSetSeismogram[] seis = getSeismograms(); if(seis.length > 0){ List orderedSeis = new ArrayList(seis.length); orderedSeis.add(0, seis[0]); double minDistBetween = Double.POSITIVE_INFINITY; for (int i ...
if(minDistBetween == Double.POSITIVE_INFINITY){ LayoutData[] data = { new LayoutData(seis[0], 0.0, 1.0)};
if(minDistBetween == Double.POSITIVE_INFINITY){ LayoutData[] data = new LayoutData[seis.length]; for (int i = 0; i < data.length; i++){ data[i] = new LayoutData(seis[i], 0.0, 1.0); }
public synchronized LayoutEvent generateLayoutEvent(){ DataSetSeismogram[] seis = getSeismograms(); if(seis.length > 0){ List orderedSeis = new ArrayList(seis.length); orderedSeis.add(0, seis[0]); double minDistBetween = Double.POSITIVE_INFINITY; for (int i ...
public BasicSeismogramDisplay(DataSetSeismogram[] seismos, String[] names, VerticalSeismogramDisplay parent)throws IllegalArgumentException{ this(seismos, new BasicTimeConfig(seismos), new RMeanAmpConfig(seismos), names, parent);
public BasicSeismogramDisplay(DataSetSeismogram[] seismos, VerticalSeismogramDisplay parent)throws IllegalArgumentException{ this(seismos, new BasicTimeConfig(seismos), new RMeanAmpConfig(seismos), parent);
public BasicSeismogramDisplay(DataSetSeismogram[] seismos, String[] names, VerticalSeismogramDisplay parent)throws IllegalArgumentException{ this(seismos, new BasicTimeConfig(seismos), new RMeanAmpConfig(seismos), names, parent); }
public void add(DataSetSeismogram[] seismos, String[] names){
public void add(DataSetSeismogram[] seismos){
public void add(DataSetSeismogram[] seismos, String[] names){ registrar.add(seismos); for(int i = 0; i < seismos.length; i++){ if(seismos[i] != null){ seismograms.add(seismos[i]); SeismogramShape newPlotter; if (autoColor) { newPlotter = new SeismogramShape(seismos[i], seisColors[seisCount%seisColors.l...
newPlotter = new SeismogramShape(seismos[i], seisColors[seisCount%seisColors.length], names[i]);
newPlotter = new SeismogramShape(seismos[i], seisColors[seisCount%seisColors.length]);
public void add(DataSetSeismogram[] seismos, String[] names){ registrar.add(seismos); for(int i = 0; i < seismos.length; i++){ if(seismos[i] != null){ seismograms.add(seismos[i]); SeismogramShape newPlotter; if (autoColor) { newPlotter = new SeismogramShape(seismos[i], seisColors[seisCount%seisColors.l...
newPlotter = new SeismogramShape(seismos[i], Color.blue, names[i]);
newPlotter = new SeismogramShape(seismos[i], Color.blue);
public void add(DataSetSeismogram[] seismos, String[] names){ registrar.add(seismos); for(int i = 0; i < seismos.length; i++){ if(seismos[i] != null){ seismograms.add(seismos[i]); SeismogramShape newPlotter; if (autoColor) { newPlotter = new SeismogramShape(seismos[i], seisColors[seisCount%seisColors.l...
this.arrivals = arrivals;
public void addFlags(Arrival[] arrivals) { try{ MicroSecondDate originTime = new MicroSecondDate(((XMLDataSet)((DataSetSeismogram)seismograms.getFirst()).getDataSet()). getEvent().get_preferred_origin().origin_time); for(int i = 0; i < arrivals.length; i++){ FlagPlotter current = new FlagPlotte...
arrivals = null;
public void removeAllFlags(){ plotters.subList(filterCount + seisCount, plotters.size()).clear(); flagCount = 0; repaint(); }