rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
selectionDisplay.removeAll();
removeSelectionDisplay();
public void createSelectionDisplay(Selection creator){ if(selectionDisplay == null){ logger.debug("creating selection display"); selectionDisplay = new MultiSeismogramWindowDisplay(mouseForwarder, motionForwarder, this); addSelection(creator, selectionDisplay); selectionWindow = new JFrame(tagWindow...
null,
private CalSvcI getSvci() throws CalFacadeException { boolean publicMode = true; if (svci != null) { if (!svci.isOpen()) { svci.open(); svci.beginTransaction(); } return svci; } svci = new CalSvc(); /* account is what we authenticated with. * user, if non-null, is the u...
if (isDefined) { log.debug(indent + " " + "<is-defined/>");
if (isNotDefined) { log.debug(indent + " " + "<is-not-defined/>");
public void dump(Logger log, String indent) { StringBuffer sb = new StringBuffer(indent); sb.append("<comp-filter name=\""); sb.append(name); sb.append("\">"); log.debug(sb.toString()); if (isDefined) { log.debug(indent + " " + "<is-defined/>"); } else if (timeRange != null) { timeRang...
EtoolsProxyCommand c = (EtoolsProxyCommand) super
ICommandProxy c = (ICommandProxy) super
protected Command getConnectionWithReorientedViewCompleteCommand( CreateConnectionRequest request) { EtoolsProxyCommand c = (EtoolsProxyCommand) super .getConnectionCompleteCommand(request); CompositeCommand cc = (CompositeCommand) c.getICommand(); TransactionalEditingDomain editingDomain = ((IGraphicalEditPar...
if (getNsIntf().getAccessControl()) { resp.addHeader("DAV", "1, 2, access-control"); } else { resp.addHeader("DAV", "1, 2"); }
addDavHeader(resp);
public void doMethod(HttpServletRequest req, HttpServletResponse resp) throws WebdavException { if (debug) { trace("GetMethod: doMethod"); } try { WebdavNsNode node = getNsIntf().getNode(getResourceUri(req)); /* Apparently if the node doesn't exist we're supposed to resp...
this.ideaMap.addMouseMotionListener(this);
public IdeaMapController(IdeaMap newIdeaMap) { this.ideaMap = newIdeaMap; this.ideaMap.setFocusTraversalKeysEnabled(false); this.ideaMap.setFocusable(true); this.ideaMap.addFocusListener(this); this.ideaMap.addKeyListener(this); this.ideaMap.addMouseListener(this); }
Dimension size = this.ideaMap.getSize(); Point2D p = new Point2D.Double(evt.getX() - (size.width / 2), evt.getY() - (size.height / 2)); IdeaView hit = this.ideaMap.getRootView().getViewAt(p); if (hit != null) { this.ideaMap.setSelectedView(hit); }
public void mouseClicked(MouseEvent evt) { Dimension size = this.ideaMap.getSize(); Point2D p = new Point2D.Double(evt.getX() - (size.width / 2), evt.getY() - (size.height / 2)); IdeaView hit = this.ideaMap.getRootView().getViewAt(p); if (hit != null) { this.ide...
Dimension size = this.ideaMap.getSize(); Point2D p = new Point2D.Double(evt.getX() - (size.width / 2), evt.getY() - (size.height / 2)); IdeaView hit = this.ideaMap.getRootView().getViewAt(p); if (hit != null) { this.ideaMap.setSelectedView(hit); }
public void mousePressed(MouseEvent evt) { }
if(zoomIn) clickCount = 1; if(zoomOut) clickCount = 2;
if(zoomIn) { clickCount = 1; } if(zoomOut) { clickCount = 2; }
public ParticleMotionView (final LocalSeismogramImpl hseis, LocalSeismogramImpl vseis, TimeRangeConfig timeRangeConfig, final AmpRangeConfig hAmpRangeConfig, AmpRangeConfig vAmpRangeConfig, ParticleMotionDisplay particleMotionDisplay){ this.particleMotionDisplay = particleMotio...
if(zoomIn) clickCount = 1; if(zoomOut) clickCount = 2;
if(zoomIn) { clickCount = 1; } if(zoomOut) { clickCount = 2; }
public void mouseClicked(MouseEvent me) { //UnitRangeImpl unitRangeImpl = hAmpRangeConfig.getAmpRange(hseis); //double min = unitRangeImpl.getMinValue(); //double max = unitRangeImpl.getMaxValue(); ///Insets insets = getInsets(); //double fmin = getSize().getWidth() - insets.left - insets.ri...
particleMotionDisplay.fireAmpRangeEvent(new AmpSyncEvent(ya, ys, true));
public void zoomInParticleMotionDisplay(int clickCount, int mx, int my) { double hmin = hunitRangeImpl.getMinValue(); double hmax = hunitRangeImpl.getMaxValue(); double vmin = vunitRangeImpl.getMinValue(); double vmax = vunitRangeImpl.getMaxValue(); if(hmin > hmax) { double temp = hmax; hmax = hmin; hmin = temp;} ...
sb.append(", rights="); sb.append(getRights());
public String toString() { StringBuffer sb = new StringBuffer("CalSvcIPars{"); sb.append("authUser="); sb.append(getAuthUser()); sb.append(", rights="); sb.append(getRights()); sb.append(", user="); sb.append(getUser()); sb.append(", publicAdmin="); sb.append(getPublicAdmin()); sb.append...
for (int i = 0; i < size; i++) {
for (int i = 0, j = 0; i < size; i++) {
public int indexOf(URL url) { int size = list.size(); for (int i = 0; i < size; i++) { ItemWrapper iw = (ItemWrapper)list.get(i); if (iw.isVisible() && iw.getURL().equals(url)) { return i; } } return -1; }
if (iw.isVisible() && iw.getURL().equals(url)) { return i;
if (iw.isVisible()) { if (iw.getURL().equals(url)) { return j; } j++;
public int indexOf(URL url) { int size = list.size(); for (int i = 0; i < size; i++) { ItemWrapper iw = (ItemWrapper)list.get(i); if (iw.isVisible() && iw.getURL().equals(url)) { return i; } } return -1; }
String label;
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g.create(); if (copy != null) { copy.t...
if(topScaleMap.isMajorTick(i))
if(topScaleMap.isMajorTick(i)){
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g.create(); if (copy != null) { copy.t...
else copy.draw(new Line2D.Float(pixelLoc, top, pixelLoc, top - minorTickLength)); label = topScaleMap.getLabel(i); if (label != null && label.length() != 0 ) { int labelWidth = (int)fm.getStringBounds(label, copy).getWidth(); if(pixelLoc + labelWidth < width){
String label = topScaleMap.getLabel(i); if (label != null && label.length() != 0 ) { int labelWidth = (int)fm.getStringBounds(label, copy).getWidth();
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g.create(); if (copy != null) { copy.t...
copy.draw(new Line2D.Float(insets.left -majorTickLength - insets.right,
copy.draw(new Line2D.Float(left,
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g.create(); if (copy != null) { copy.t...
insets.left - insets.right,
left - majorTickLength,
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g.create(); if (copy != null) { copy.t...
copy.draw(new Line2D.Float(insets.left - insets.right - minorTickLength,
copy.draw(new Line2D.Float(left - minorTickLength,
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g.create(); if (copy != null) { copy.t...
insets.left - insets.right,
left,
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g.create(); if (copy != null) { copy.t...
} label = leftScaleMap.getLabel(i); if (label != null && label.length() != 0) { if(i == 0) copy.drawString(label, insets.left - insets.right - 45, pixelLoc + 5); else if(i == numTicks - 1) copy.drawString(label, insets.left - insets.right - 45, pixelLoc + 5); else copy.drawString(label, insets.left - insets.right - 45,...
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g.create(); if (copy != null) { copy.t...
double yTranslate = height - (height - leftAxisLabelBounds.getWidth())/2;
double yTranslate = height - bottom + top - (height - bottom + top - leftAxisLabelBounds.getWidth())/2;
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g.create(); if (copy != null) { copy.t...
label = bottomScaleMap.getLabel(i); int labelWidth = (int)fm.getStringBounds(label, copy).getWidth(); if (label != null && label.length() != 0 && pixelLoc + labelWidth < width) { copy.drawString(label, pixelLoc - labelWidth/2, height-fm.getLeading()); }
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g.create(); if (copy != null) { copy.t...
label = rightScaleMap.getLabel(i);
String label = rightScaleMap.getLabel(i);
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g.create(); if (copy != null) { copy.t...
bottom = 20;
if(scaleMap.getAxisLabel() != null && !scaleMap.getAxisLabel().equals("")){ bottom = 20 + getFontHeight(scaleMap.getAxisLabel()); }else{ bottom = 20; }
public void setBottomScaleMapper(ScaleMapper scaleMap) { this.bottomScaleMap = scaleMap; bottom = 20; }
LineMetrics lm = DisplayUtils.BORDER_FONT.getLineMetrics(scaleMap.getAxisLabel(), new FontRenderContext(IDENTITY_AFFINE, false, false)); fontHeight = (int)lm.getAscent(); left = 50 + fontHeight;
left = 50 + getFontHeight(scaleMap.getAxisLabel());
public void setLeftScaleMapper(ScaleMapper scaleMap) { this.leftScaleMap = scaleMap; if(scaleMap.getAxisLabel() != null && !scaleMap.getAxisLabel().equals("")){ LineMetrics lm = DisplayUtils.BORDER_FONT.getLineMetrics(scaleMap.getAxisLabel(), ...
LineMetrics lm = DisplayUtils.BORDER_FONT.getLineMetrics(scaleMap.getAxisLabel(), new FontRenderContext(IDENTITY_AFFINE, false, false)); fontHeight = (int)lm.getAscent(); top = 20 + fontHeight;
top = 20 + getFontHeight(scaleMap.getAxisLabel());
public void setTopScaleMapper(ScaleMapper scaleMap) { this.topScaleMap = scaleMap; if(scaleMap.getAxisLabel() != null && !scaleMap.getAxisLabel().equals("")){ LineMetrics lm = DisplayUtils.BORDER_FONT.getLineMetrics(scaleMap.getAxisLabel(), ...
BwUser user, int currentMode, boolean ignoreCreator,
int currentMode, boolean ignoreCreator,
public CalintfHelper(Calintf cal, AccessUtil access, BwUser user, int currentMode, boolean ignoreCreator, boolean debug) { this.cal = cal; this.access = access; this.user = user; this.currentMode = currentMode; this.ignoreCreator = ignoreCreator; this.deb...
this.user = user;
public CalintfHelper(Calintf cal, AccessUtil access, BwUser user, int currentMode, boolean ignoreCreator, boolean debug) { this.cal = cal; this.access = access; this.user = user; this.currentMode = currentMode; this.ignoreCreator = ignoreCreator; this.deb...
throws SQLException {
throws SQLException, IOException { int channel_id = chanTable.put(channelId); int begin_time_id = timeTable.put(seis.getBeginTime().getFissuresTime()); int end_time_id = timeTable.put(seis.getEndTime().getFissuresTime());
public void saveSeismogramToDatabase(ChannelId channelId, LocalSeismogramImpl seis, String fileLocation, SeismogramFileTypes filetype) throws SQLException { // Get absolute file ...
String absoluteFilePath = seismogramFile.getPath(); insert.setInt(1, chanTable.put(channelId)); insert.setInt(2, timeTable.put(seis.getBeginTime().getFissuresTime())); insert.setInt(3, timeTable.put(seis.getEndTime().getFissuresTime())); insert.setString(4, absoluteFilePath); insert.setInt(5, filetype.getIntValue()); i...
String absoluteFilePath = seismogramFile.getCanonicalPath(); int fileTypeInt = filetype.getIntValue(); selectSeismogram.setInt(1, channel_id); selectSeismogram.setString(2, absoluteFilePath); ResultSet results = selectSeismogram.executeQuery(); if(results.next()) { } else { insert.setInt(1, channel_id); insert.setInt(...
public void saveSeismogramToDatabase(ChannelId channelId, LocalSeismogramImpl seis, String fileLocation, SeismogramFileTypes filetype) throws SQLException { // Get absolute file ...
public RT130ToLocalSeismogram() { this.ncFile = null; this.stationLocations = null; }
public RT130ToLocalSeismogram() {}
public RT130ToLocalSeismogram() { this.ncFile = null; this.stationLocations = null; }
Iterator e = ampData.keySet().iterator(); while(e.hasNext()){ ((AmpConfigData)e.next()).reset(); } fireAmpEvent();
reset(getSeismograms());
public void reset(){ Iterator e = ampData.keySet().iterator(); while(e.hasNext()){ ((AmpConfigData)e.next()).reset(); } fireAmpEvent(); }
player.stop();
player.close(); player = null;
public synchronized void stop() { if (player != null) { player.stop(); } }
int addedyear = todaycalendar.get(Calendar.YEAR); String[] yearst = new String[numberofyears]; for(int i=0; i<numberofyears ; i++) { yearst[i]= ""+addedyear; addedyear--; } yearbox.setModel(new DefaultComboBoxModel(yearst));
public void setNumberOfYears(int totalyears){ numberofyears = totalyears; }
if (newSelection == null || newSelection.length() == 0) { return; }
private void yearOption(){ int todayyear = todaycalendar.get(Calendar.YEAR); //String[] yearst = {"2001","2000","1999","1998"}; int addedyear=2000; if(pastyears == true) { addedyear=todayyear; } String[] yearst = new String[numberofyears]; for(int i=0; i<numberofyears ; i++) { ...
if (newSelection == null || newSelection.length() == 0) { return; }
public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox)e.getSource(); String newSelection = (String)cb.getSelectedItem(); year= Integer.parseInt(newSelection); calendar.set(Calendar.YEAR, year); dateChanged(); }
form.initFields();
initFields(form);
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } /** Set the objects to null so we get new ones. */ form.initFie...
BwCalendar cal = (BwCalendar)subroot.clone();
BwCalendar cal = (BwCalendar)subroot.shallowClone();
private BwCalendar cloneAndCheckOne(BwCalendar subroot, int desiredAccess, boolean nullForNoAccess) throws CalFacadeException { CurrentAccess ca = access.checkAccess(subroot, desiredAccess, nullForNoAccess); if (!ca.accessAllowed) { re...
if(time.before(anotherTime){
if(time.before(anotherTime)){
public MicroSecondTimeRange(MicroSecondDate time, MicroSecondDate anotherTime){ if(time.before(anotherTime){ this.beginTime = time; this.endTime = anotherTime; }else{
this.beginTime = anotherTime; this.endTime = time; } this.interval = new TimeInterval(beginTime, endTime); }
public MicroSecondTimeRange(MicroSecondDate time, MicroSecondDate anotherTime){ if(time.before(anotherTime){ this.beginTime = time; this.endTime = anotherTime; }else{
CalSvcIPars pars = new CalSvcIPars(user, access, user, publicEvents,
CalSvcIPars pars = new CalSvcIPars(user, access, user, envPrefix, publicEvents,
public CalSvcTestWrapper(String user, int access, boolean publicEvents, boolean debug) throws Throwable { super(); //this.debug = debug; isPublic = publicEvents; this.user = user; CalSvcIPars pars = new CalSvcIPars(user, acce...
val.setCalendar((BwCalendar)getCalendar().clone());
val.setCalendar((BwCalendar)getCalendar().shallowClone());
public void copyTo(BwShareableContainedDbentity val) { super.copyTo(val); val.setCalendar((BwCalendar)getCalendar().clone()); }
if (columnsWidth > DynamicReportDesign.PAGE_WIDTH_WITHOUT_MARGINS_PORTRAIT_A4) { designTemplate.setOrientationLandscape(); int landscapeWidth = (columnsWidth > DynamicReportDesign.PAGE_WIDTH_WITHOUT_MARGINS_LANDSCAPE_A4) ? columnsWidth + DynamicReportDesign.PAGE_LEFT_MARGIN + DynamicReportDesign.PAGE_RIGHT_MARGIN : D...
private void generateLayoutAndAddParameters(IWContext iwc, boolean isMethodInvocation) throws IOException, JRException { int columnWidth = 120; int prmLableWidth = 95; int prmValueWidth = 55; DynamicReportDesign designTemplate = new DynamicReportDesign("GeneratedReport"); if (_dynamicFields != null && _dynamicFie...
public static IslamicChronology getInstance(DateTimeZone zone) { return getInstance(zone, LEAP_YEAR_16_BASED);
public static IslamicChronology getInstance() { return getInstance(DateTimeZone.getDefault(), LEAP_YEAR_16_BASED);
public static IslamicChronology getInstance(DateTimeZone zone) { return getInstance(zone, LEAP_YEAR_16_BASED); }
Collection c = new Vector();
Collection c = new ArrayList();
private String tryCal(HttpServletRequest request, BwActionFormBase form) throws Throwable { CalSvcI svci = form.fetchSvci(); String url = getReqPar(request, "calUrl"); if (url == null) { return null; } BwCalendar cal = findCalendar(url, form); if (cal == null) { form...
Collection c = new Vector();
Collection c = new ArrayList();
private String trySub(HttpServletRequest request, BwActionFormBase form) throws Throwable { CalSvcI svci = form.fetchSvci(); String name = getReqPar(request, "subname"); if (name == null) { return null; } BwSubscription sub = svci.findSubscription(name); if (sub == null) ...
xvalue = 0; for(i = 0, j = 0; i < uncomp[0].length; i++) {
if(uncomp[0].length != 0) xvalue = umcomp[0][0];; for(i = 1, j = 0; i < uncomp[0].length; i++) {
protected static int[][] compressYvalues(LocalSeismogram seismogram, TimePlotConfig config, Dimension size)throws UnsupportedDataEncoding { int[][] uncomp = scaleXvalues(seismogram, config, size); // enough points to take the extra time to compress the line int[][] comp = new int[...
comp[0][j] = uncomp[0][i]; comp[0][j+1] = uncomp[0][i];
comp[0][j] = uncomp[0][endIndex]; comp[0][j+1] = uncomp[0][endIndex];
protected static int[][] compressYvalues(LocalSeismogram seismogram, TimePlotConfig config, Dimension size)throws UnsupportedDataEncoding { int[][] uncomp = scaleXvalues(seismogram, config, size); // enough points to take the extra time to compress the line int[][] comp = new int[...
form.getMsg().emit("org.bedework.message.cancelled");
form.getMsg().emit("org.bedework.client.message.cancelled");
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase frm) throws Throwable { PEActionForm form = (PEActionForm)frm; /* CalEnv env = getEnv(frm); / * Set some options from th...
logger.debug("Loading next mseed file: "+files[currentIndex].getName());
public DataRecord getNextRecord() throws SeedFormatException, IOException { if (current == null) { throw new EOFException("Cannot read past end of file list"); } try { DataRecord d = current.getNextRecord(); numReadTotal++; return d; } c...
logger.debug("Last load");
protected void initNextFile() throws IOException { if (currentIndex < files.length) { if (current != null) { current.close(); current = null; } current = new MiniSeedRead(new DataInputStream(new BufferedInputStream(new FileInputStream(files[curre...
semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.profile.edit.parts.Stereotype2EditPart.VISUAL_ID);
semanticHint = UMLVisualIDRegistry.getType(Stereotype2EditPart.VISUAL_ID);
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.Stereotype2EditPart.VISUAL_ID); view.setType(semanticHint);...
Class dispTimeConfigClass = parent.getTimeConfig().getClass(); if(parent.getTimeConfig() instanceof RTTimeRangeConfig){ dispTimeConfigClass = ((RTTimeRangeConfig)parent.getTimeConfig()).getInternalConfig().getClass();
TimeConfig parentConfig = parent.getTimeConfig(); if(parentConfig instanceof RTTimeRangeConfig){ parentConfig = ((RTTimeRangeConfig)parentConfig).getInternalConfig();
public Selection (MicroSecondTimeRange range, SeismogramDisplay parent, Color color){ // tc needs to be the same class as the parents time config incase it is a relative time config Class dispTimeConfigClass = parent.getTimeConfig().getClass(); if(parent.getTimeConfig() instanceof RTTim...
if(parentConfig instanceof PhaseAlignedTimeConfig){ ((PhaseAlignedTimeConfig)tc).setTauP(((PhaseAlignedTimeConfig)parentConfig).getTauP()); }
public Selection (MicroSecondTimeRange range, SeismogramDisplay parent, Color color){ // tc needs to be the same class as the parents time config incase it is a relative time config Class dispTimeConfigClass = parent.getTimeConfig().getClass(); if(parent.getTimeConfig() instanceof RTTim...
form.getErr().emit("org.bedework.pubevents.error.nosuchevent", id);
form.getErr().emit("org.bedework.client.error.nosuchevent", id);
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { CalSvcI svci = form.getCalSvcI(); boolean alerts = form.getAlertEvent(); /** Check access and set request parameters */ if (alerts) { if (!form....
((CacheEvent)o).getEventAccess() != null) { return getEventAccess().equals(((CacheEvent)o).getEventAccess());
((CacheEvent)o).getEventAccess() != null && getEventAccess().equals(((CacheEvent)o).getEventAccess())) { return true;
public boolean equals(Object o){ if(o == this){ return true; } else if (getEventAccess() != null && o instanceof CacheEvent && ((CacheEvent)o).getEventAccess() != null) { return getEventAccess().equals(((CacheEvent)o).getEventAccess()); }else if(o ...
public Collection getFreeBusy(InputStreamReader in) throws Throwable {
public Collection getFreeBusy(Reader in) throws Throwable {
public Collection getFreeBusy(InputStreamReader in) throws Throwable { return trans.fromIcal(null, in); }
public void decode(char[] val) throws AccessException { TreeSet ts = new TreeSet(); setEncoded(val); if (empty()) { defaultAccess(); } else { while (hasMore()) { Ace ace = new Ace(); ace.decode(this, true); ts.add(ace); } aces = ts; }
public void decode(String val) throws AccessException { decode(val.toCharArray());
public void decode(char[] val) throws AccessException { TreeSet ts = new TreeSet(); setEncoded(val); if (empty()) { defaultAccess(); } else { while (hasMore()) { Ace ace = new Ace(); ace.decode(this, true); ts.add(ace); } aces = ts; } }
form.getErr().emit("org.bedework.error.noaccess", "for that action");
form.getErr().emit("org.bedework.client.error.noaccess", "for that action");
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { // Just ignore this return "doNothing"; } String reqpar = request.getParameter("updateLocation"); if (reqpar != null) { return updateLocation(request, form...
if(seisIndex[0] == seisIndex[1]) {
if(seisIndex[1] < 0 || seisIndex[0] >= seis.getNumPoints()) {
private boolean setAmpRange(DataSetSeismogram seismo){ AmpConfigData data = (AmpConfigData)ampData.get(seismo); LocalSeismogramImpl seis = (LocalSeismogramImpl)seismo.getSeismogram(); int[] seisIndex = DisplayUtils.getSeisPoints(seis, data.getTime()); if(seisIndex[0] == seisIndex[1]) { ...
double[] minMaxMean = ((Statistics)DisplayUtils.statCache.get(seismo)).minMaxMean(seisIndex[0], seisIndex[1]); double meanDiff = (Math.abs(minMaxMean[2] - minMaxMean[0]) > Math.abs(minMaxMean[2] - minMaxMean[1]) ? Math.abs(minMaxMean[2] - minMaxMean[0]) : Math.abs(minMaxMean[2] - minMaxMean[1]));
double[] minMaxMean = ((Statistics)DisplayUtils.statCache.get(seismo)).minMaxMean(seisIndex[0], seisIndex[1]); double meanDiff; double maxToMeanDiff = Math.abs(minMaxMean[2] - minMaxMean[1]); double minToMeanDiff = Math.abs(minMaxMean[2] - minMaxMean[0]); if(maxToMeanDiff > minToMeanDiff){ meanDiff = maxToMeanDiff; }el...
private boolean setAmpRange(DataSetSeismogram seismo){ AmpConfigData data = (AmpConfigData)ampData.get(seismo); LocalSeismogramImpl seis = (LocalSeismogramImpl)seismo.getSeismogram(); int[] seisIndex = DisplayUtils.getSeisPoints(seis, data.getTime()); if(seisIndex[0] == seisIndex[1]) { ...
return data.setCleanRange(new UnitRangeImpl(minMaxMean[2] - meanDiff, minMaxMean[2] + meanDiff, UnitImpl.COUNT));
double min = minMaxMean[2] - meanDiff; double max = minMaxMean[2] + meanDiff; System.out.println(seismo + " amp range: " + min + ", " + max + " Points: " + seisIndex[0] + ", " + seisIndex[1]); return data.setCleanRange(new UnitRangeImpl(min, max, UnitImpl.COUNT));
private boolean setAmpRange(DataSetSeismogram seismo){ AmpConfigData data = (AmpConfigData)ampData.get(seismo); LocalSeismogramImpl seis = (LocalSeismogramImpl)seismo.getSeismogram(); int[] seisIndex = DisplayUtils.getSeisPoints(seis, data.getTime()); if(seisIndex[0] == seisIndex[1]) { ...
ATObject result = base_getFieldValue();
ATObject result = base_getValue();
public ATObject base_setValue(ATObject newValue) throws NATException { ATObject result = base_getFieldValue(); frame_.meta_assignField(name_, newValue); return result; }
String showClass=(String) getSessionObject(request, UMLBrowserFormConstants.CLASS_VIEW);
Object classView = getSessionObject(request, UMLBrowserFormConstants.CLASS_VIEW); String showClass = null; if (classView != null) showClass=classView.toString();
public ActionForward resetSubProjPkgOptions( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { DynaActionForm dynaForm = (DynaActionForm) form; String projectId = ((String) dynaForm.get(UMLBrowser...
List stationsUnderMouse = new ArrayList();
public boolean mouseClicked(MouseEvent e){ if (currentPopup != null){ currentPopup.setVisible(false); currentPopup = null; } synchronized(omgraphics){ Iterator it = omgraphics.iterator(); List stationsUnderMouse = new ArrayList(); while(it....
if (stationsUnderMouse.size() > 0){ if (stationsUnderMouse.size() == 1){ synchronized(chooser){ chooser.toggleStationSelected((Station)stationsUnderMouse.get(0)); }
} if (stationsUnderMouse.size() > 0){ if (stationsUnderMouse.size() > 1){ final JPopupMenu popup = new JPopupMenu(); Iterator it = stationsUnderMouse.iterator(); while (it.hasNext()){ final Station current = (Station)it.next(); final JMenuItem menuItem = new JMenuItem(getStationInfo(current, currentEvent)); menuItem.ad...
public boolean mouseClicked(MouseEvent e){ if (currentPopup != null){ currentPopup.setVisible(false); currentPopup = null; } synchronized(omgraphics){ Iterator it = omgraphics.iterator(); List stationsUnderMouse = new ArrayList(); while(it....
else{ final JPopupMenu popup = new JPopupMenu(); it = stationsUnderMouse.iterator(); while (it.hasNext()){ final Station current = (Station)it.next(); final JMenuItem menuItem = new JMenuItem(getStationInfo(current, currentEvent)); menuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent...
Point compLocation = e.getComponent().getLocationOnScreen(); double[] popupLoc = {compLocation.getX(), compLocation.getY()}; popup.setLocation((int)popupLoc[0] + e.getX(), (int)popupLoc[1] + e.getY()); popup.setVisible(true); currentPopup = popup;
public boolean mouseClicked(MouseEvent e){ if (currentPopup != null){ currentPopup.setVisible(false); currentPopup = null; } synchronized(omgraphics){ Iterator it = omgraphics.iterator(); List stationsUnderMouse = new ArrayList(); while(it....
else{ chooser.toggleStationSelected((Station)stationsUnderMouse.get(0)); } return true;
public boolean mouseClicked(MouseEvent e){ if (currentPopup != null){ currentPopup.setVisible(false); currentPopup = null; } synchronized(omgraphics){ Iterator it = omgraphics.iterator(); List stationsUnderMouse = new ArrayList(); while(it....
synchronized(chooser){ chooser.toggleStationSelected(current); } popup.setVisible(false); }
chooser.toggleStationSelected(current); popup.setVisible(false); }
public void actionPerformed(ActionEvent e) { synchronized(chooser){ chooser.toggleStationSelected(current); } popup.setVisib...
form.getMsg().emit("org.bedework.message.added.events", 1);
form.getMsg().emit("org.bedework.client.message.added.events", 1);
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { // Just ignore this return "doNothing"; } BwEvent ev = form.getNewEvent(); if (ev == null) { return "doNothing"; } CalSvcI svci = form.fetchSvci(); ...
} catch (XTypeMismatch e) {
} catch (XSelectorNotFound e) {
public ATNil meta_assignField(ATSymbol name, ATObject value) throws NATException { String jSelector = null; try{ jSelector = Reflection.upMetaFieldMutationSelector(name); JavaInterfaceAdaptor.invokeJavaMethod( principal_.getClass(), principal_, jSelector, new ATObject[] { value.asMirror().base_...
} catch (XTypeMismatch e) {
} catch (XSelectorNotFound e) {
public ATObject meta_invoke(ATObject receiver, ATSymbol atSelector, ATTable arguments) throws NATException { String jSelector = Reflection.upMetaLevelSelector(atSelector); try { return NATMirrorFactory._INSTANCE_.base_createMirror( Reflection.downObject( Reflection.upInvocation( principal_, // ...
} catch (XTypeMismatch e) {
} catch (XSelectorNotFound e) {
public ATObject meta_select(ATObject receiver, ATSymbol atSelector) throws NATException { String jSelector = null; try { jSelector = Reflection.upMetaFieldAccessSelector(atSelector); return NATMirrorFactory._INSTANCE_.base_createMirror( Reflection.downObject( Reflection.upFieldSelection( prin...
err.emit("org.bedework.config.badvalue", getName(), getValue());
err.emit("org.bedework.config.error.badvalue", getName(), getValue());
public boolean validate(MessageEmit err) { goodValue = true; if (!getShow()) { return true; } String val = getValue(); if (val != null) { // set as string val = val.toLowerCase(); if (val.equals("false") || val.equals("no")) { booleanVal = false; } else if (val.equals("t...
evalAndCompareTo("`(3)", atThree_); evalAndCompareTo("`(x)", atX_); evalAndCompareTo("`(def x := 3)", "def x := 3"); evalAndCompareTo("`(def x := `(3))", "def x := `(3)"); evalAndCompareTo("`(def x := #(3))", "def x := 3"); evalAndCompareTo("`(def foo(a) { #([1,2,3]) })", "def foo(a) { [1, 2, 3] }"); evalAndCompareTo("...
evalAndCompareTo("`3", atThree_); evalAndCompareTo("`x", atX_); evalAndCompareTo("`{def x := 3}", "def x := 3"); evalAndCompareTo("`{def x := `3}", "def x := `(3)"); evalAndCompareTo("`{def x := #3}", "def x := 3"); evalAndCompareTo("`{def foo(a) { #([1,2,3]) }}", "def foo(a) { [1, 2, 3] }"); evalAndCompareTo("`{def fo...
public void testQuotation() throws NATException { evalAndCompareTo("`(3)", atThree_); evalAndCompareTo("`(x)", atX_); evalAndCompareTo("`(def x := 3)", "def x := 3"); evalAndCompareTo("`(def x := `(3))", "def x := `(3)"); evalAndCompareTo("`(def x := #(3))", "def x := 3"); evalAndCompareTo("`(def foo(a) { #([1,2...
(TimeConfigRegistrar)creator.getTimeConfig(),
new TimeConfigRegistrar((TimeConfigRegistrar)creator.getTimeConfig()),
public void createParticleDisplay(BasicSeismogramDisplay creator, boolean advancedOption){ if(particleDisplay == null){ logger.debug("creating particle display"); particleWindow = new JFrame(particleWindowName); particleDisplay = new ParticleMotionDisplay((DataSetSeismogram)creator.getSeismograms().getF...
particleWindow.dispose(); particleDisplay = null;
particleDisplay.removeAll(); particleDisplays--;
public void windowClosing(WindowEvent e) { particleWindow.dispose(); particleDisplay = null; }
threeSelectionDisplay.removeAll();
selectionDisplay.removeAll();
public void windowClosing(WindowEvent e) { threeSelectionDisplay.removeAll(); }
particleDisplay.removeAll();
public void removeAll(){ logger.debug("removing all displays"); if(parent != null){ parent.removeSelectionDisplay(this); } this.stopImageCreation(); seismograms.removeAll(); remove(seismograms); basicDisplays.clear(); sorter = new AlphaSeisSorter(); globalTimeRegistrar = new TimeConfigRegistrar(); globalAmpRegi...
CalSvcIPars pars = new CalSvcIPars(account, UserAuth.noPrivileges,
CalSvcIPars pars = new CalSvcIPars(account,
public Synchml(String account, String deviceId, URIgen uriGen, boolean debug) throws CalFacadeException { svci = new CalSvc(); this.deviceId = deviceId; this.debug = debug; CalSvcIPars pars = new CalSvcIPars(account, UserAuth.noPrivileges, ...
close(svci);
trans.close();
public void close() { try { close(svci); } catch (Throwable t) { } }
Iterator it = uiList.iterator();
Iterator it = infoset.getAll().iterator(); CalDavClient cd = new CalDavClient(debug);
private Collection getFreeBusy(Date start, Date end) throws Throwable { ArrayList responses = new ArrayList(); Iterator it = uiList.iterator(); while (it.hasNext()) { UserInfo ui = (UserInfo)it.next(); Req r = makeFreeBusyRequest(start, end, ui); CaldavClientIo cio = getCio(ui.host, ui.port); ...
UserInfo ui = (UserInfo)it.next();
FBUserInfo ui = (FBUserInfo)it.next();
private Collection getFreeBusy(Date start, Date end) throws Throwable { ArrayList responses = new ArrayList(); Iterator it = uiList.iterator(); while (it.hasNext()) { UserInfo ui = (UserInfo)it.next(); Req r = makeFreeBusyRequest(start, end, ui); CaldavClientIo cio = getCio(ui.host, ui.port); ...
CaldavClientIo cio = getCio(ui.host, ui.port); Response resp = new Response(); resp.ui = ui;
CalDavClient.Response resp = cd.send(r, ui);
private Collection getFreeBusy(Date start, Date end) throws Throwable { ArrayList responses = new ArrayList(); Iterator it = uiList.iterator(); while (it.hasNext()) { UserInfo ui = (UserInfo)it.next(); Req r = makeFreeBusyRequest(start, end, ui); CaldavClientIo cio = getCio(ui.host, ui.port); ...
if (r.getAuth()) { resp.responseCode = cio.sendRequest(r.getMethod(), r.getUrl(), r.getUser(), r.getPw(), r.getHeaders(), 0, r.getContentType(), r.getContentLength(), r.getContentBytes()); } else { resp.responseCode = cio.sendRequest(r.getMethod(), r.getUrl(), r.getHeaders(), 0, r.getContentType(), r.getContentLength()...
private Collection getFreeBusy(Date start, Date end) throws Throwable { ArrayList responses = new ArrayList(); Iterator it = uiList.iterator(); while (it.hasNext()) { UserInfo ui = (UserInfo)it.next(); Req r = makeFreeBusyRequest(start, end, ui); CaldavClientIo cio = getCio(ui.host, ui.port); ...
error("Got response " + resp.responseCode + " for account " + ui.account + ", host " + ui.host + " and url " + ui.url);
private Collection getFreeBusy(Date start, Date end) throws Throwable { ArrayList responses = new ArrayList(); Iterator it = uiList.iterator(); while (it.hasNext()) { UserInfo ui = (UserInfo)it.next(); Req r = makeFreeBusyRequest(start, end, ui); CaldavClientIo cio = getCio(ui.host, ui.port); ...
CaldavResp cdresp = cio.getResponse();
private Collection getFreeBusy(Date start, Date end) throws Throwable { ArrayList responses = new ArrayList(); Iterator it = uiList.iterator(); while (it.hasNext()) { UserInfo ui = (UserInfo)it.next(); Req r = makeFreeBusyRequest(start, end, ui); CaldavClientIo cio = getCio(ui.host, ui.port); ...
InputStream in = cdresp.getContentStream();
InputStream in = resp.cdresp.getContentStream();
private Collection getFreeBusy(Date start, Date end) throws Throwable { ArrayList responses = new ArrayList(); Iterator it = uiList.iterator(); while (it.hasNext()) { UserInfo ui = (UserInfo)it.next(); Req r = makeFreeBusyRequest(start, end, ui); CaldavClientIo cio = getCio(ui.host, ui.port); ...
Collection fbs = trans.fromIcal(null, new InputStreamReader(in));
Collection fbs = trans.getFreeBusy(new InputStreamReader(in));
private Collection getFreeBusy(Date start, Date end) throws Throwable { ArrayList responses = new ArrayList(); Iterator it = uiList.iterator(); while (it.hasNext()) { UserInfo ui = (UserInfo)it.next(); Req r = makeFreeBusyRequest(start, end, ui); CaldavClientIo cio = getCio(ui.host, ui.port); ...
fb.setWho(new BwUser(ui.account));
fb.setWho(new BwUser(ui.getAccount()));
private Collection getFreeBusy(Date start, Date end) throws Throwable { ArrayList responses = new ArrayList(); Iterator it = uiList.iterator(); while (it.hasNext()) { UserInfo ui = (UserInfo)it.next(); Req r = makeFreeBusyRequest(start, end, ui); CaldavClientIo cio = getCio(ui.host, ui.port); ...
addUser(new UserInfo("douglm", "bedework", "douglm", "localhost", 8080, false, "/ucaldav/user/douglm")); getSvci();
infoset = new FBInfoSet(); trans = new IcalTrans(debug);
private void init() throws Throwable { /* addUser(new UserInfo("testuser01", "bedework", "douglm", "localhost", 8080, false, "/ucaldav/user/douglm")); addUser(new UserInfo("testuser01", "bedework", "johnsa", "localhost", 8080, false, ...
Response resp = (Response)it.next();
CalDavClient.Response resp = (CalDavClient.Response)it.next();
public static void main(String[] args) { FreeBusyAggregator fba = new FreeBusyAggregator(); try { fba.init(); Calendar cal = Calendar.getInstance(); cal.add(Calendar.WEEK_OF_YEAR, 1); Collection responses = fba.getFreeBusy(new Date(), cal.getTime()); fba.close(); Iterator it = resp...
out("Response code for " + resp.ui.account + " = " + resp.responseCode);
out("Response code for " + resp.ui.getAccount() + " = " + resp.responseCode);
public static void main(String[] args) { FreeBusyAggregator fba = new FreeBusyAggregator(); try { fba.init(); Calendar cal = Calendar.getInstance(); cal.add(Calendar.WEEK_OF_YEAR, 1); Collection responses = fba.getFreeBusy(new Date(), cal.getTime()); fba.close(); Iterator it = resp...
private Req makeFreeBusyRequest(Date start, Date end, UserInfo ui) throws Throwable {
private Req makeFreeBusyRequest(Date start, Date end, FBUserInfo ui) throws Throwable {
private Req makeFreeBusyRequest(Date start, Date end, UserInfo ui) throws Throwable { Req req; if (ui.authUser == null) { req = new Req(); } else { req = new Req(ui.authUser, ui.authPw); } req.setUrl(ui.url); req.setContentType("text/xml"); req.setMethod("REPORT"); req.addHeader("Dep...
if (ui.authUser == null) {
if (ui.getAuthUser() == null) {
private Req makeFreeBusyRequest(Date start, Date end, UserInfo ui) throws Throwable { Req req; if (ui.authUser == null) { req = new Req(); } else { req = new Req(ui.authUser, ui.authPw); } req.setUrl(ui.url); req.setContentType("text/xml"); req.setMethod("REPORT"); req.addHeader("Dep...
req = new Req(ui.authUser, ui.authPw);
req = new Req(ui.getAuthUser(), ui.getAuthPw());
private Req makeFreeBusyRequest(Date start, Date end, UserInfo ui) throws Throwable { Req req; if (ui.authUser == null) { req = new Req(); } else { req = new Req(ui.authUser, ui.authPw); } req.setUrl(ui.url); req.setContentType("text/xml"); req.setMethod("REPORT"); req.addHeader("Dep...
req.setUrl(ui.url);
req.setUrl(ui.getUrl());
private Req makeFreeBusyRequest(Date start, Date end, UserInfo ui) throws Throwable { Req req; if (ui.authUser == null) { req = new Req(); } else { req = new Req(ui.authUser, ui.authPw); } req.setUrl(ui.url); req.setContentType("text/xml"); req.setMethod("REPORT"); req.addHeader("Dep...
logger.debug("NOAMP seis units are " + outSeis.y_unit);
public static LocalSeismogramImpl apply(LocalSeismogramImpl seis, Instrumentation inst) throws FissuresException { if(!isValid(inst)) { throw new IllegalArgumentException("Invalid instrumentation for " + ChannelIdUtil.toStrin...