rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
seismos.add(i, seismo);
seismos.put(name, seismo); names.add(i, seismo);
public int sort(DataSetSeismogram seismo, String name){ int i = 0; while(i < seismos.size() && seismo.isFurtherThan((DataSetSeismogram)seismos.get(i))){ i++; } seismos.add(i, seismo); return i; }
label(getLabel(value), nextLabelPoint, g2d);
label(getLabel(value), nextLabelPoint, g2d, translation[1]);
public void draw(UnitRangeImpl r, Graphics2D g2d){ double numDivisions = (r.max_value - r.min_value)/divSize; double pixelsPerLabelTick = getLimitingSize()/numDivisions; double pixelsPerMinorTick = pixelsPerLabelTick/ticksPerDiv; int numLabelTicks = (int)Math.ceil(num...
private void label(String label, float[] nextLabelPoint, Graphics2D g2d) {
private void label(String label, float[] nextLabelPoint, Graphics2D g2d, double trans) {
private void label(String label, float[] nextLabelPoint, Graphics2D g2d) { Rectangle2D bounds = g2d.getFontMetrics().getStringBounds(label, g2d); float x, y; if(direction == VERTICAL){ y = nextLabelPoint[1] + (float)(bounds.getHeight()/(double)4); i...
g2d.drawString(label, x, y);
if(y + trans <= getSize().height && y - bounds.getHeight() + trans >= 0)g2d.drawString(label, x, y);
private void label(String label, float[] nextLabelPoint, Graphics2D g2d) { Rectangle2D bounds = g2d.getFontMetrics().getStringBounds(label, g2d); float x, y; if(direction == VERTICAL){ y = nextLabelPoint[1] + (float)(bounds.getHeight()/(double)4); i...
g.setColor(getBackground()); g2d.fillRect(0, 0, getSize().width, getSize().height);
public void paint(Graphics g){ Graphics2D g2d = (Graphics2D)g; g.setColor(Color.BLACK); Iterator it = borderFormats.iterator(); while(it.hasNext()){ BorderFormat cur = (BorderFormat)it.next(); if(cur.willFit(getRange(), g2d)){ cur.draw(getRange(), g2d...
if(coordinates[0] % 100 == 0){ logger.debug("x: " + coordinates[0] + " y: " + coordinates[1]); }
public int currentSegment(float[] coordinates){ int i = 0; if(min){ i = 1; currentIndex--; } min = !min; coordinates[0] = currentIndex; coordinates[1] = points[i][currentIndex]; if(coordinates[0] % 100 == 0){ logger.debug("x: " + coor...
logger.debug("calling getWindingRule");
public int getWindingRule(){ logger.debug("calling getWindingRule"); return WIND_NON_ZERO; }
if(currentIndex % 200 == 0){ logger.debug("calling isDone"); }
public boolean isDone(){ if(currentIndex % 200 == 0){ logger.debug("calling isDone"); } if(currentIndex == endIndex){ return true; } return false; }
currentIndex = startIndex; min = false;
public boolean isDone(){ if(currentIndex % 200 == 0){ logger.debug("calling isDone"); } if(currentIndex == endIndex){ return true; } return false; }
if(currentIndex % 200 == 0){ logger.debug("calling next()"); }
public void next(){ if(currentIndex % 200 == 0){ logger.debug("calling next()"); } currentIndex++; }
logger.debug("Iterator drawing on " + startIndex + ", " + endIndex);
public void setDrawnPixels(int[] drawnPixels){ this.drawnPixels = drawnPixels; startIndex = drawnPixels[0]; endIndex = drawnPixels[1]; currentIndex = startIndex; logger.debug("Iterator drawing on " + startIndex + ", " + endIndex); }
this.svci = svci;
public EventFormatter(CalSvcI svci, EventInfo eventInfo, TimeView view, CalendarInfo calInfo, CalTimezones ctz) { this.eventInfo = eventInfo; this.calInfo = calInfo; this.ctz= ctz; this.svci = svci; }
public DateTimeFormatter(CalendarInfo calInfo, BwDateTime date, CalTimezones ctz) throws CalFacadeException {
public DateTimeFormatter(CalendarInfo calInfo) {
public DateTimeFormatter(CalendarInfo calInfo, BwDateTime date, CalTimezones ctz) throws CalFacadeException { this.calInfo = calInfo; setDate(date, ctz); }
setDate(date, ctz);
public DateTimeFormatter(CalendarInfo calInfo, BwDateTime date, CalTimezones ctz) throws CalFacadeException { this.calInfo = calInfo; setDate(date, ctz); }
semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.profile.edit.parts.EnumerationLiteralEditPart.VISUAL_ID);
semanticHint = UMLVisualIDRegistry.getType(EnumerationLiteralEditPart.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.EnumerationLiteralEditPart.VISUAL_ID); view.setType(semanti...
logger.debug("Added the display to the ParticleMOTION VIEW");
public synchronized void addParticleMotionDisplay(DataSetSeismogram hseis, DataSetSeismogram vseis, TimeConfigRegistrar timeRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, Color color, String key, boolean horizPlane) { ParticleMotion pa...
public void drawAzimuth(ParticleMotion particleMotion, Graphics2D graphics2D) {
public synchronized void drawAzimuth(ParticleMotion particleMotion, Graphics2D graphics2D) {
public void drawAzimuth(ParticleMotion particleMotion, Graphics2D graphics2D) { logger.debug("IN DRAW AZIMUTH"); if(!particleMotion.isHorizontalPlane()) return; Shape sector = getSectorShape(); graphics2D.setColor(Color.blue); graphics2D.fill(sector); graphics2D.draw(sector); graphics2D.setStroke(new B...
public void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) {
public synchronized void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) {
public void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) { logger.debug("IN DRAW LABELS"); Color color = new Color(0, 0, 0, 128); graphics2D.setColor(color); java.awt.Dimension dimension = getSize(); float fontSize = dimension.width / 20; if(fontSize < 4) fontSize = 4; else if(fontSi...
public void drawParticleMotion(ParticleMotion particleMotion, Graphics g) {
public synchronized void drawParticleMotion(ParticleMotion particleMotion, Graphics g) {
public void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { if(!recalculateValues) { recalculateValues = false; System.out.println(" DRAWING THE PARTICLE MOTION WITHOUT RECALCULATING THE VALUES"); ((Graphics2D)g).draw(particleMotion.getShape()); return; } logger.debug("IN DRAW PARTIC...
public boolean findPoint(int count, int newx, int newy) {
public synchronized boolean findPoint(int count, int newx, int newy) {
public boolean findPoint(int count, int newx, int newy) { boolean rtn = false; int size = displays.size(); for(int counter = 0; counter < size; counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); Shape shape = particleMotion.getShape(); //for(int i = -4;...
logger.debug("^^^^^^^^^^^^^^^ The size of the displays in MIn is "+displayKeys.size()); if(displayKeys.size() != 0) logger.debug("****** The display key i s"+displayKeys.get(0));
public double getMinHorizontalAmplitude() { int size = displays.size(); double min = Double.POSITIVE_INFINITY; for(int counter = 0; counter < size; counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; AmpConfigR...
public Shape getParticleMotionPath(int[] x, int[] y) {
public synchronized Shape getParticleMotionPath(int[] x, int[] y) {
public Shape getParticleMotionPath(int[] x, int[] y) { int len = x.length; if(y.length < len) { len = y.length;} GeneralPath generalPath = new GeneralPath(GeneralPath.WIND_EVEN_ODD); if(len != 0) { generalPath.moveTo(x[0], y[0]); } for(int counter = 1; counter < len; counter++) { generalPath.lineTo(x[cou...
public Shape getSectorShape() {
public synchronized Shape getSectorShape() {
public Shape getSectorShape() { ParticleMotion particleMotion = (ParticleMotion)displays.get(0); AmpConfigRegistrar ampRangeConfig = particleMotion.vAmpConfigRegistrar; UnitRangeImpl unitRangeImpl = vunitRangeImpl;//ampRangeConfig.getAmpRange(particleMotion.vseis); double vmin = unitRangeImpl.getMinValue(); double ...
public void paintComponent(Graphics g) {
public synchronized void paintComponent(Graphics g) {
public void paintComponent(Graphics g) { // if(setSelected == 1) g.setColor(Color.red); //else if(setSelected == 2) g.setColor(getBackground()); Graphics2D graphics2D = (Graphics2D)g; logger.debug("IN PAINT COMPONENT"); if(startPoint != null && endPoint != null) { graphics2D.setColor(Color.yellow); //log...
public void resize() {
public synchronized void resize() {
public void resize() { setSize(super.getSize()); //particleMotionDisplay.resize(); recalculateValues = true; repaint(); }
public void updateTimeRange() {
public synchronized void updateTimeRange() {
public void updateTimeRange() { hunitRangeImpl = new UnitRangeImpl(getMinHorizontalAmplitude(), getMaxHorizontalAmplitude(), UnitImpl.COUNT); vunitRangeImpl = new UnitRangeImpl(getMinVerticalAmplitude(), getMaxVerticalAmplitude(), UnitImpl.COUNT); particleMotionDisplay.updateHorizontalAm...
public void zoomInParticleMotionDisplay(int clickCount, int mx, int my) {
public synchronized void zoomInParticleMotionDisplay(int clickCount, int mx, int my) {
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(", parent="); if (parent == null) { sb.append("null"); } else { sb.append(parent.getId()); }
public String toString() { StringBuffer sb = new StringBuffer(); sb.append("BwCategoryFilter{id="); sb.append(id); sb.append(", name="); sb.append(getName()); sb.append("}"); return sb.toString(); }
String name = request.getParameter("name");
String name = getReqPar(request, "name");
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.fetch...
return "error";
return "notAdded";
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.fetch...
String str = request.getParameter("makedefaultview");
String str = getReqPar(request, "makedefaultview");
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.fetch...
timeRegistrar.addSeismogram(newSeismogram); ampRegistrar.addSeismogram(newSeismogram);
public void addSeismogram(DataSetSeismogram newSeismogram){ seismos.add(newSeismogram); SeismogramPlotter newPlotter; if (autoColor) { newPlotter = new SeismogramPlotter(newSeismogram, seisColors[seisCount%seisColors.length]); }else { newPlotter = new SeismogramPlotter(newSeismogram, Color.blue); } // e...
privateThread = new Thread(r);
privateThread = new Thread(seisLoaderThreadGroup, r, "Seismogram Loader"+getThreadNum());
public SeismogramBackgroundLoader(SeismogramBackgroundLoaderPool pool) { this.pool = pool; Runnable r = new Runnable() { public void run() { try { runWork(); } catch (Exception e) { e.printStackTrace(); } } }; privateThread = new Thread(r); privateThread.start(); }
System.out.println("yMin = "+yMin+ " yMax = "+yMax+" height = "+size.height);
protected static void scaleYvalues(int[][] comp, LocalSeismogram seismogram, MicroSecondTimeRange tr, UnitRangeImpl ampRange, Dimension size) { LocalSeismogramImpl seis = (LocalSeismogramImpl)seismogram; double yMin = ampRange.getMinValue(); double yMax = ampRange.getMaxValue(); System.out.println("yM...
return createSpike(new MicroSecondDate());
return createSpike(ClockUtil.now());
public static LocalSeismogramImpl createSpike() { return createSpike(new MicroSecondDate()); }
ATObject result = getValue();
ATObject result = getFieldValue();
public ATObject setValue(ATObject newValue) throws NATException { ATObject result = getValue(); frame_.meta_assignField(name_, newValue); return result; }
this.setBackground(Color.white); this.setForeground(Color.white);
public ParticleMotionView (final DataSetSeismogram hseis, DataSetSeismogram vseis, TimeConfigRegistrar timeRegistrar, final AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, ParticleMotionDisplay particleMotionDisplay, Color color...
Color color = particleMotion.getColor(); if(color == null) color = COLORS[0];
Color color = new Color(0, 0, 0, 128);
public void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) { Color color = particleMotion.getColor(); if(color == null) color = COLORS[0]; graphics2D.setColor(color); java.awt.Dimension dimension = getSize(); float fontSize = dimension.width / 10; if(fontSize < 4) fontSize = 4; else ...
float fontSize = dimension.width / 10;
float fontSize = dimension.width / 20;
public void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) { Color color = particleMotion.getColor(); if(color == null) color = COLORS[0]; graphics2D.setColor(color); java.awt.Dimension dimension = getSize(); float fontSize = dimension.width / 10; if(fontSize < 4) fontSize = 4; else ...
int x = (dimension.width - font.getSize() * 3) / 2;
String labelStr = new String(); labelStr = particleMotion.hseis.getSeismogram().getName(); int x = (dimension.width - (int)(labelStr.length()*fontSize)) / 2 - getInsets().left - getInsets().right;
public void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) { Color color = particleMotion.getColor(); if(color == null) color = COLORS[0]; graphics2D.setColor(color); java.awt.Dimension dimension = getSize(); float fontSize = dimension.width / 10; if(fontSize < 4) fontSize = 4; else ...
graphics2D.drawString(particleMotion.key.substring(0, 3), x, y);
graphics2D.drawString(labelStr, x, y); labelStr = particleMotion.vseis.getSeismogram().getName();
public void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) { Color color = particleMotion.getColor(); if(color == null) color = COLORS[0]; graphics2D.setColor(color); java.awt.Dimension dimension = getSize(); float fontSize = dimension.width / 10; if(fontSize < 4) fontSize = 4; else ...
y = (dimension.height) / 2;
y = (dimension.height - (int)(labelStr.length()*fontSize)) / 2 - getInsets().top - getInsets().bottom;
public void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) { Color color = particleMotion.getColor(); if(color == null) color = COLORS[0]; graphics2D.setColor(color); java.awt.Dimension dimension = getSize(); float fontSize = dimension.width / 10; if(fontSize < 4) fontSize = 4; else ...
graphics2D.transform(AffineTransform.getRotateInstance((Math.PI/2)*3)); graphics2D.drawString(particleMotion.key.substring(4, particleMotion.key.length()), 0, 0);
graphics2D.transform(AffineTransform.getRotateInstance(Math.PI/2)); graphics2D.drawString(labelStr, 0, 0);
public void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) { Color color = particleMotion.getColor(); if(color == null) color = COLORS[0]; graphics2D.setColor(color); java.awt.Dimension dimension = getSize(); float fontSize = dimension.width / 10; if(fontSize < 4) fontSize = 4; else ...
form.getErr().emit("org.bedework.client.missingfield", "name");
form.getErr().emit("org.bedework.client.error.missingfield", "name");
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.getErr().emit("org.bedework.client.notfound", name);
form.getErr().emit("org.bedework.client.error.viewnotfound", name);
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...
setHorizontalTitle(view.getSelectedParticleMotion()[0].hseis.getSeismogram().getName()); setVerticalTitle(view.getSelectedParticleMotion()[0].vseis.getSeismogram().getName());
setHorizontalTitle(view.getSelectedParticleMotion()[0].hseis.getName()); setVerticalTitle(view.getSelectedParticleMotion()[0].vseis.getName());
public void itemStateChanged(ItemEvent ae) { if(ae.getStateChange() == ItemEvent.SELECTED) { view.addDisplayKey(((AbstractButton)ae.getItem()).getText()); setHorizontalTitle(view.getSelectedParticleMotion()[0].hseis.getSeismogram().getName()); setVerticalTitle(view.getSelectedParticleMotion()[0].vseis.getSeis...
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.notfound", str); return "notFound"; } prefs = svc.getUserPrefs(user); } else { pr...
String str = getReqPar(request, "user"); if (str == null) { form.getErr().emit("org.bedework.client.notfound", str); return "notFound";
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...
str = request.getParameter("view");
BwUser user = svc.findUser(str); if (user == null) { form.getErr().emit("org.bedework.client.notfound", str); return "notFound"; } BwPreferences prefs = svc.getUserPrefs(user); str = getReqPar(request, "view");
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...
str = request.getParameter("viewPeriod");
str = getReqPar(request, "viewPeriod");
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...
str = request.getParameter("skin");
str = getReqPar(request, "skin");
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...
str = request.getParameter("skinStyle");
str = getReqPar(request, "skinStyle");
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...
long overEndTime = overTimeRange.getEndTime().getMicroSecondTime(); long overBeginTime = overTimeRange.getBeginTime().getMicroSecondTime();
public void paint(Graphics g){ if(overSizedImage == null || overSizedImage.get() == null){ logger.debug("the image is null and is being recreated"); this.createImage(); return; } long endTime = timeConfig.getTimeRange().getEndTime().getMicroSecondTime(); long beginTime = timeConfig.getTimeRange().ge...
if(endTime >= overEndTime || beginTime <= overBeginTime){ logger.debug("the image has been dragged past its edge and is being recreated");
double offset = (beginTime - overBeginTime)/ (double)(overTimeInterval) * overSize.getWidth(); g2.drawImage(((Image)overSizedImage.get()), AffineTransform.getTranslateInstance(-offset, 0.0), null); if(redo)
public void paint(Graphics g){ if(overSizedImage == null || overSizedImage.get() == null){ logger.debug("the image is null and is being recreated"); this.createImage(); return; } long endTime = timeConfig.getTimeRange().getEndTime().getMicroSecondTime(); long beginTime = timeConfig.getTimeRange().ge...
return; } double offset = (beginTime - overBeginTime)/ (double)(overEndTime - overBeginTime) * overSize.getWidth(); AffineTransform tx = AffineTransform.getTranslateInstance(-offset, 0.0); g2.drawImage(((Image)overSizedImage.get()), tx, null);
redo = false;
public void paint(Graphics g){ if(overSizedImage == null || overSizedImage.get() == null){ logger.debug("the image is null and is being recreated"); this.createImage(); return; } long endTime = timeConfig.getTimeRange().getEndTime().getMicroSecondTime(); long beginTime = timeConfig.getTimeRange().ge...
double offset = (beginTime - overBeginTime)/ (double)(overEndTime - overBeginTime) * (overSize.getWidth() * scale);
double offset = (beginTime - overBeginTime)/ (double)(overTimeInterval) * (overSize.getWidth() * scale);
public void paint(Graphics g){ if(overSizedImage == null || overSizedImage.get() == null){ logger.debug("the image is null and is being recreated"); this.createImage(); return; } long endTime = timeConfig.getTimeRange().getEndTime().getMicroSecondTime(); long beginTime = timeConfig.getTimeRange().ge...
NetworkAccess[] storedNets = (NetworkAccess[])netDCToNetMap.get(netdc); if ( storedNets == null) { netDCToNetMap.put(netdc, nets); } else { NetworkAccess[] tmp = new NetworkAccess[storedNets.length+nets.length]; System.arraycopy(storedNets, 0, tmp, 0, storedNets.length); System.arraycopy(nets, 0, tmp, storedNets.length...
public void run() { setProgressOwner(this); CacheNetworkAccess cache; logger.debug("Before networks"); if(configuredNetworks == null || configuredNetworks.length == 0) { NetworkAccess[] nets = netdc.a_finder().retrieve_all(); netDCToNetMap.put(netdc, nets); setProgressMax(this, nets.length+1);...
logger.debug("after prune channels, length="+inChannels.length);
public Channel[] getSelectedChannels(MicroSecondDate when){ Channel[] inChannels = getChannels(); inChannels = BestChannelUtil.pruneChannels(inChannels, when); return getSelectedChannels(inChannels, when); }
traceString += getStackTrace(((WrappedException)exception).getCausalException());
WrappedException we = (WrappedException)exception; if (we.getCausalException() != null) { traceString += getStackTrace(we.getCausalException()); }
public static void handleException(Exception exception) { JTabbedPane tabbedPane = new JTabbedPane(); JFrame displayFrame = new JFrame("Exception Handler"); JPanel messagePanel = new JPanel(); JLabel exceptionMessageLabel = new JLabel(); JTextArea messageArea = new JTextArea(); messageArea.setLineWrap(true); mess...
return cache.get_preferred_origin().origin_time.date_time;
edu.iris.Fissures.Time fisDate = cache.get_preferred_origin().origin_time; MicroSecondDate msd = new MicroSecondDate(fisDate); return msd.toString();
public Object getValueAt(int row, int col) { if ( ! isRowCached(row)) { return "..."; } CacheEvent cache = getEventForRow(row); try { switch (col) { case NAME: if (cache.get_attributes() == null) { return ""; } return cache.get_attributes().name; case FEREGION: if (cache.get_attributes() ==...
return cache.get_preferred_origin().magnitudes[0].type;
String type = cache.get_preferred_origin().magnitudes[0].type; if (type.equals(edu.iris.Fissures.MB_MAG_TYPE.value)) { return "mb"; } if (type.equals(edu.iris.Fissures.ML_MAG_TYPE.value)) { return "ml"; } if (type.equals(edu.iris.Fissures.MBMLE_MAG_TYPE.value)) { return "mbmle"; } if (type.equals(edu.iris.Fissures.MO_...
public Object getValueAt(int row, int col) { if ( ! isRowCached(row)) { return "..."; } CacheEvent cache = getEventForRow(row); try { switch (col) { case NAME: if (cache.get_attributes() == null) { return ""; } return cache.get_attributes().name; case FEREGION: if (cache.get_attributes() ==...
public static JLabel getAmpLabel(){ return amp; }
public static JLabel getAmpLabel(){ return ampLabel; }
public static JLabel getAmpLabel(){ return amp; }
return time.getText() + amp.getText();
return timeLabel.getText() + ampLabel.getText();
public static String getLabelText(){ return time.getText() + amp.getText(); }
public static JLabel getTimeLabel(){ return time; }
public static JLabel getTimeLabel(){ return timeLabel; }
public static JLabel getTimeLabel(){ return time; }
time.setText(" Time: "); amp.setText(" Amp: ");
timeLabel.setText(" Time: "); ampLabel.setText(" Amp: ");
public void removeAll(){ logger.debug("removing all displays"); super.removeAll(); basicDisplays.clear(); sorter = new SeismogramSorter(); globalRegistrar = null; time.setText(" Time: "); amp.setText(" Amp: "); repaint(); }
public void setLabels(MicroSecondDate newTime, QuantityImpl newAmp){ calendar.setTime(newTime); if(output.format(calendar.getTime()).length() == 21) time.setText("Time: " + output.format(calendar.getTime()) + "00"); else if(output.format(calendar.getTime()).length() == 22) time.setText("Time: " + output.format(calendar...
public void setLabels(MicroSecondDate newTime, QuantityImpl newAmp, UnitRangeImpl ampRange){ if(curAmpRange != ampRange){ double absMax = Math.abs(ampRange.getMaxValue()); double absMin = Math.abs(ampRange.getMinValue()); double maxVal; if(absMax > absMin){ maxVal = absMax; }else{ maxVal = absMin; } if(maxVal < 1){ for...
public void setLabels(MicroSecondDate newTime, QuantityImpl newAmp){ calendar.setTime(newTime); if(output.format(calendar.getTime()).length() == 21) time.setText("Time: " + output.format(calendar.getTime()) + "00"); else if(output.format(calendar.getTime()).length() == 22) ...
if(Math.abs(newAmpVal) < .001) { ampString += ampFormatExp.format(newAmpVal); } else { ampString += ampFormat.format(newAmpVal);
ampString += formatter.format(newAmpVal); ampLabel.setText(ampString+" "+ unitDisplayUtil.getNameForUnit(newAmp.getUnit())); calendar.setTime(newTime); StringBuffer timeString = new StringBuffer(ampLabel.getText().length()); if(output.format(calendar.getTime()).length() == 21) timeString.append(output.format(calendar.g...
public void setLabels(MicroSecondDate newTime, QuantityImpl newAmp){ calendar.setTime(newTime); if(output.format(calendar.getTime()).length() == 21) time.setText("Time: " + output.format(calendar.getTime()) + "00"); else if(output.format(calendar.getTime()).length() == 22) ...
amp.setText(ampString+" "+ unitDisplayUtil.getNameForUnit(newAmp.getUnit()));
public void setLabels(MicroSecondDate newTime, QuantityImpl newAmp){ calendar.setTime(newTime); if(output.format(calendar.getTime()).length() == 21) time.setText("Time: " + output.format(calendar.getTime()) + "00"); else if(output.format(calendar.getTime()).length() == 22) ...
}else if(xPixels.length == 1){ GeneralPath currentShape = new GeneralPath(GeneralPath.WIND_EVEN_ODD, 2); currentShape.moveTo(0, yPixels[0]); currentShape.lineTo(size.width, yPixels[0]); return currentShape;
public Shape draw(Dimension size){ MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversizedTimeRange(3); try{ int[][] pixels = SimplePlotUtil.compressYvalues(seismogram, overTimeRange, ampConfig.getAmpRange(seismogram), size); SimplePlotUtil.scaleYvalues(pixels, seismogram, over...
GeneralPath currentShape = new GeneralPath(); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversizedTimeRange((scale -1)/2);
MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversizedTimeRange(3);
public Shape draw(Dimension size){ GeneralPath currentShape = new GeneralPath(); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversiz...
pixels = SeisPlotUtil.calculatePlottable(seismogram, ampConfig.getAmpRange(seismogram), overTimeRange, mySize); xPixels = pixels[0]; yPixels = pixels[1]; SeisPlotUtil.flipArray(yPixels, mySize.height);
int[][] pixels = SimplePlotUtil.compressYvalues(seismogram, overTimeRange, ampConfig.getAmpRange(seismogram), size); SimplePlotUtil.scaleYvalues(pixels, seismogram, overTimeRange, ampConfig.getAmpRange(seismogram), size); int[] xPixels = pixels[0]; int[] yPixels = pixels[1]; GeneralPath currentShape = new GeneralPath(G...
public Shape draw(Dimension size){ GeneralPath currentShape = new GeneralPath(); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversiz...
currentShape.lineTo(xPixels[i], yPixels[i]);
currentShape.lineTo(xPixels[i], yPixels[i]); return currentShape;
public Shape draw(Dimension size){ GeneralPath currentShape = new GeneralPath(); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversiz...
return currentShape;
return new GeneralPath();
public Shape draw(Dimension size){ GeneralPath currentShape = new GeneralPath(); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversiz...
form.getErr().emit("org.bedework.pubevents.error.nosuchlocation", id);
form.getErr().emit("org.bedework.client.error.nosuchlocation", id);
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } /** User requested a location from the list. Retrieve it, embed it in ...
playlist.stop();
playlist.setPlayAll(false);
public void dispose() { playlist.stop(); playlist.save(); }
else if(timeIntv <= 100)
else if(timeIntv <= 1000)
public void calculateTicks(){ timeIntv = (endTime.getMicroSecondTime() - beginTime.getMicroSecondTime())/ 1000; if(timeIntv <= 100) this.divCalculateTicks(10); else if(timeIntv <= 500) this.divCalculateTicks(50); else if(timeIntv <= 100) this.divCalculateTicks(100); else if(timeIntv <= 5000) this.d...
String viewName = request.getParameter("view");
String viewName = getReqPar(request, "view");
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = for...
String str = request.getParameter("addtodefaultview");
String str = getReqPar(request, "addtodefaultview");
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = for...
if (Util.checkNull(request.getParameter("addSubscription")) != null) {
if (getReqPar(request, "addSubscription") != null) {
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = for...
} else if (Util.checkNull(request.getParameter("updateSubscription")) != null) {
} else if (getReqPar(request, "updateSubscription") != null) {
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = for...
} else if (Util.checkNull(request.getParameter("delete")) != null) {
} else if (getReqPar(request, "delete") != null) {
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = for...
sub.setName(Util.checkNull(sub.getName()));
private boolean validateSub(BwSubscription sub, BwActionFormBase form) { if (sub.getName() == null) { form.getErr().emit("org.bedework.validation.error.missingfield", "name"); return false; } sub.setUri(Util.checkNull(sub.getUri())); if (!sub.getInternalSubscription(...
AGSymbol rcvnam = AGSymbol.alloc("o2");
AGSymbol rcvnam = AGSymbol.jAlloc("o2");
public void testDefExternalField() throws InterpreterException { ATObject rcvr = new NATObject(); AGSymbol rcvnam = AGSymbol.alloc("o2"); ctx_.base_getLexicalScope().meta_defineField(rcvnam, rcvr); evalAndCompareTo("def o2.x := 3", NATNil._INSTANCE_); try { assertEquals(atThree_, rcvr.meta_s...
AGSymbol rcvnam = AGSymbol.alloc("o");
AGSymbol rcvnam = AGSymbol.jAlloc("o");
public void testDefExternalMethod() throws InterpreterException { ATObject rcvr = new NATObject(); AGSymbol rcvnam = AGSymbol.alloc("o"); ctx_.base_getLexicalScope().meta_defineField(rcvnam, rcvr); evalAndCompareTo("def o.x() { self }", NATNil._INSTANCE_); try { ATClosure clo = rcvr.meta_loo...
TimezoneInfo tzinfo = (TimezoneInfo)timezones.get(tzid); TimeZone tz = new TimeZone(vtz); if (tzinfo == null) { tzinfo = new TimezoneInfo(tz); timezones.put(tzid, tzinfo); } else { tzinfo.init(tz); }
saveTimeZone(tzid, vtz, false);
public void saveTimeZone(String tzid, VTimeZone vtz) throws CalFacadeException { /* For a user update the map to avoid a refetch. For system timezones we will force a refresh when we're done. */ /* Don't use lookup - we might be called from lookup on init */ TimezoneInfo tzinfo = (TimezoneI...
if(majTickTime <= 30000000){
if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); if(majTickTime <= 1000){ majTickTime = 1000; }else if(majTickTime <= 10000){ majTickTime = 10000; }else if(majTickTime <= 100000){ majTickTime = 100000; } }else if(majTickTime <= 30000000){
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat...
timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 100000; }else if(majTickTime <= 1000000){
if(majTickTime <= 1000000){
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat...
timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 60000000){
if(majTickTime <= 60000000){
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat...
timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 300000000)
if(majTickTime <= 300000000)
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat...
timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 3600000000l){
if(majTickTime <= 3600000000l){
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat...
timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 86400000000l;
majTickTime = 86400000000l;
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat...
timeFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat...
public Collection fromIcal(BwCalendar cal, Reader rdr) throws CalFacadeException {
public Collection fromIcal(BwCalendar cal, String val) throws CalFacadeException {
public Collection fromIcal(BwCalendar cal, Reader rdr) throws CalFacadeException { try { //System.setProperty("ical4j.unfolding.relaxed", "true"); CalendarBuilder bldr = new CalendarBuilder(new CalendarParserImpl()); //return fromIcal(cal, bldr.build(new UnfoldingReader(rdr))); return fromIcal(...
return fromIcal(cal, bldr.build(rdr, true));
UnfoldingReader ufrdr = new UnfoldingReader(new StringReader(val), true); return fromIcal(cal, bldr.build(ufrdr));
public Collection fromIcal(BwCalendar cal, Reader rdr) throws CalFacadeException { try { //System.setProperty("ical4j.unfolding.relaxed", "true"); CalendarBuilder bldr = new CalendarBuilder(new CalendarParserImpl()); //return fromIcal(cal, bldr.build(new UnfoldingReader(rdr))); return fromIcal(...
if (iHandler != null && !isHidden) {
if (iHandler != null) {
private void generateDataSource(IWContext iwc) throws XMLException, Exception { Locale currentLocale = iwc.getCurrentLocale(); if(_queryPK != null) { QueryService service = (QueryService)(IBOLookup.getServiceInstance(iwc,QueryService.class)); _dataSource = service.generateQueryResult(_queryPK, iwc); } else if ...
if (displayNameOfValue != null) {
if (displayNameOfValue != null && !isHidden) {
private void generateDataSource(IWContext iwc) throws XMLException, Exception { Locale currentLocale = iwc.getCurrentLocale(); if(_queryPK != null) { QueryService service = (QueryService)(IBOLookup.getServiceInstance(iwc,QueryService.class)); _dataSource = service.generateQueryResult(_queryPK, iwc); } else if ...
else if (!isHidden){
else {
private void generateDataSource(IWContext iwc) throws XMLException, Exception { Locale currentLocale = iwc.getCurrentLocale(); if(_queryPK != null) { QueryService service = (QueryService)(IBOLookup.getServiceInstance(iwc,QueryService.class)); _dataSource = service.generateQueryResult(_queryPK, iwc); } else if ...
_parameterMap.put(clDesc.getName(), prm);
if (!isHidden) { _parameterMap.put(clDesc.getName(), prm); }
private void generateDataSource(IWContext iwc) throws XMLException, Exception { Locale currentLocale = iwc.getCurrentLocale(); if(_queryPK != null) { QueryService service = (QueryService)(IBOLookup.getServiceInstance(iwc,QueryService.class)); _dataSource = service.generateQueryResult(_queryPK, iwc); } else if ...
String pwd = System.getProperty("user.dir");
String pwd = System.getProperty("launch4j.exedir"); if ((pwd == null) || (pwd.length() == 0)) { pwd = System.getProperty("user.dir"); }
public void helpManual() { if (Main.isMac()) { try { Class HelpBook = Class.forName("dg.hipster.HelpBook"); Method launchHelpViewer = HelpBook.getMethod( "launchHelpViewer"); launchHelpViewer.invoke(new Integer(10)); } ...
if(endTime >= overEndTime || beginTime <= overBeginTime){ logger.debug("the image has been dragged past its edge and is being recreated"); this.createImage(); return; }
public void paint(Graphics g){ if(overSizedImage == null || overSizedImage.get() == null){ logger.debug("the image is null and is being recreated"); this.createImage(); return; } long endTime = timeConfig.getTimeRange().getEndTime().getMicroSecondTime(); long beginTime = timeConfig.getTimeRange().ge...