bugged
stringlengths 6
599k
| fixed
stringlengths 10
599k
| __index_level_0__
int64 0
1.13M
|
|---|---|---|
public static String[] getSeismogramNames(DataSetSeismogram[] dss){ String[] names = new String[dss.length]; for(int i = 0; i < dss.length; i++){ names[i] = "" + dss[i]; } return names; }
|
public static String[] getSeismogramNames(DataSetSeismogram[] dss){ String[] names = new String[dss.length]; for(int i = 0; i < dss.length; i++){ names[i] = "" + dss[i]; } return names; }
| 1,117,764
|
public static String[] getSeismogramNames(DataSetSeismogram[] dss){ String[] names = new String[dss.length]; for(int i = 0; i < dss.length; i++){ names[i] = "" + dss[i]; } return names; }
|
public static String[] getSeismogramNames(DataSetSeismogram[] dss){ String[] names = new String[dss.length]; for(int i = 0; i < dss.length; i++){ names[i] = "" + dss[i]; } String[] rtnValues = new String[arrayList.size()]; rtnValues = (String[]) arrayList.toArray(rtnValues); return rtnValues; }
| 1,117,765
|
public ComponentSortedSeismogramDisplay(MouseForwarder mouseForwarder, MouseMotionForwarder motionForwarder, VerticalSeismogramDisplay parent){ super(mouseForwarder, motionForwarder, parent); }
|
public ComponentSortedSeismogramDisplay(MouseForwarder mouseForwarder, MouseMotionForwarder motionForwarder, VerticalSeismogramDisplay parent){ super(mouseForwarder, motionForwarder, parent); }
| 1,117,766
|
public int print(Graphics g, PageFormat pageFormat, int pageIndex){ System.out.println(pageIndex); if (pageIndex >= displays.length/seisPerPage) return NO_SUCH_PAGE; Graphics2D g2 = (Graphics2D)g; g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY()); Paper page = pageFormat.getPaper(); double height = page.getHeight(); int displayStart = pageIndex * seisPerPage; boolean[] wasBuffered = new boolean[seisPerPage]; Dimension[] currentSizes = new Dimension[seisPerPage]; for(int i = 0; i < seisPerPage; i++){ System.out.println("adding display " + displays[i + displayStart].getName() + " to the printout"); wasBuffered[i] = disableDoubleBuffering(displays[i + displayStart]); currentSizes[i] = displays[i + displayStart].getSize(); displays[i+displayStart].setSize(new Dimension((int)page.getWidth(),(int)(height/seisPerPage))); displays[i+displayStart].paint(g2); g2.translate(0, (int)(height/seisPerPage)); } for(int i = 0; i < wasBuffered.length; i++){ restoreDoubleBuffering(displays[i+ displayStart], wasBuffered[i]); displays[i+displayStart].setSize(currentSizes[i]); } return PAGE_EXISTS; }
|
public int print(Graphics g, PageFormat pageFormat, int pageIndex){ System.out.println(pageIndex); if (pageIndex >= displays.length/seisPerPage) return NO_SUCH_PAGE; Graphics2D g2 = (Graphics2D)g; g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY()); Paper page = pageFormat.getPaper(); double height = page.getHeight(); int displayStart = pageIndex * seisPerPage; boolean[] wasBuffered = new boolean[seisPerPage]; Dimension[] currentSizes = new Dimension[seisPerPage]; for(int i = 0; i < seisPerPage; i++){ System.out.println("adding display " + displays[i + displayStart].getName() + " to the printout"); wasBuffered[i] = disableDoubleBuffering(displays[i + displayStart]); currentSizes[i] = displays[i + displayStart].getSize(); displays[i+displayStart].setSize(new Dimension((int)page.getWidth(),(int)(height/seisPerPage))); displays[i+displayStart].paint(g2); g2.translate(0, (int)(height/seisPerPage)); } for(int i = 0; i < wasBuffered.length; i++){ restoreDoubleBuffering(displays[i+ displayStart], wasBuffered[i]); displays[i+displayStart].setSize(currentSizes[i]); } return PAGE_EXISTS; }
| 1,117,767
|
public int print(Graphics g, PageFormat pageFormat, int pageIndex){ System.out.println(pageIndex); if (pageIndex >= displays.length/seisPerPage) return NO_SUCH_PAGE; Graphics2D g2 = (Graphics2D)g; g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY()); Paper page = pageFormat.getPaper(); double height = page.getHeight(); int displayStart = pageIndex * seisPerPage; boolean[] wasBuffered = new boolean[seisPerPage]; Dimension[] currentSizes = new Dimension[seisPerPage]; for(int i = 0; i < seisPerPage; i++){ System.out.println("adding display " + displays[i + displayStart].getName() + " to the printout"); wasBuffered[i] = disableDoubleBuffering(displays[i + displayStart]); currentSizes[i] = displays[i + displayStart].getSize(); displays[i+displayStart].setSize(new Dimension((int)page.getWidth(),(int)(height/seisPerPage))); displays[i+displayStart].paint(g2); g2.translate(0, (int)(height/seisPerPage)); } for(int i = 0; i < wasBuffered.length; i++){ restoreDoubleBuffering(displays[i+ displayStart], wasBuffered[i]); displays[i+displayStart].setSize(currentSizes[i]); } return PAGE_EXISTS; }
|
public int print(Graphics g, PageFormat pageFormat, int pageIndex){ System.out.println(pageIndex); if (pageIndex >= displays.length/seisPerPage) return NO_SUCH_PAGE; Graphics2D g2 = (Graphics2D)g; g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY()); Paper page = pageFormat.getPaper(); double height = page.getHeight(); int displayStart = pageIndex * seisPerPage; boolean[] wasBuffered = new boolean[seisPerPage]; Dimension[] currentSizes = new Dimension[seisPerPage]; for(int i = 0; i < seisPerPage; i++){ System.out.println("adding display " + displays[i + displayStart].getName() + " to the printout"); wasBuffered[i] = disableDoubleBuffering(displays[i + displayStart]); currentSizes[i] = displays[i + displayStart].getSize(); displays[i+displayStart].setSize(new Dimension((int)page.getWidth(),(int)(height/seisPerPage))); displays[i+displayStart].paint(g2); g2.translate(0, (int)(height/seisPerPage)); } for(int i = 0; i < wasBuffered.length; i++){ restoreDoubleBuffering(displays[i+ displayStart], wasBuffered[i]); displays[i+displayStart].setSize(currentSizes[i]); } return PAGE_EXISTS; }
| 1,117,768
|
public Channel[] create(String unitIdNumber, MicroSecondDate beginTime, String fileLoc, TimeRange fileTimeWindow) { int sampleRate; try { sampleRate = sf.find(fileLoc, fileTimeWindow); } catch(RT130FormatException e) { throw new RT130FormatError(e); } catch(IOException e) { throw new RT130FormatError(e); } return create(unitIdNumber, beginTime, new File(fileLoc).getParentFile().getName(), sampleRate); }
|
public Channel[] create(String unitIdNumber, String fileLoc, TimeRange fileTimeWindow) { int sampleRate; try { sampleRate = sf.find(fileLoc, fileTimeWindow); } catch(RT130FormatException e) { throw new RT130FormatError(e); } catch(IOException e) { throw new RT130FormatError(e); } return create(unitIdNumber, beginTime, new File(fileLoc).getParentFile().getName(), sampleRate); }
| 1,117,769
|
public Channel[] create(String unitIdNumber, MicroSecondDate beginTime, String fileLoc, TimeRange fileTimeWindow) { int sampleRate; try { sampleRate = sf.find(fileLoc, fileTimeWindow); } catch(RT130FormatException e) { throw new RT130FormatError(e); } catch(IOException e) { throw new RT130FormatError(e); } return create(unitIdNumber, beginTime, new File(fileLoc).getParentFile().getName(), sampleRate); }
|
public Channel[] create(String unitIdNumber, MicroSecondDate beginTime, String fileLoc, MicroSecondTimeRange fileTimeWindow) { int sampleRate; try { sampleRate = sf.find(fileLoc, fileTimeWindow); } catch(RT130FormatException e) { throw new RT130FormatError(e); } catch(IOException e) { throw new RT130FormatError(e); } return create(unitIdNumber, beginTime, new File(fileLoc).getParentFile().getName(), sampleRate); }
| 1,117,770
|
public Channel[] create(String unitIdNumber, MicroSecondDate beginTime, String fileLoc, TimeRange fileTimeWindow) { int sampleRate; try { sampleRate = sf.find(fileLoc, fileTimeWindow); } catch(RT130FormatException e) { throw new RT130FormatError(e); } catch(IOException e) { throw new RT130FormatError(e); } return create(unitIdNumber, beginTime, new File(fileLoc).getParentFile().getName(), sampleRate); }
|
public Channel[] create(String unitIdNumber, MicroSecondDate fileTimeWindow.getBeginTime(), String fileLoc, TimeRange fileTimeWindow) { int sampleRate; try { sampleRate = sf.find(fileLoc, fileTimeWindow); } catch(RT130FormatException e) { throw new RT130FormatError(e); } catch(IOException e) { throw new RT130FormatError(e); } return create(unitIdNumber, fileTimeWindow.getBeginTime(), new File(fileLoc).getParentFile().getName(), sampleRate); }
| 1,117,771
|
public static DataSetSeismogram[] getComponents(DataSetSeismogram seismogram){ List componentSeismograms = new ArrayList(); RequestFilter rf = seismogram.getRequestFilter(); MicroSecondDate startDate = new MicroSecondDate(rf.start_time); MicroSecondDate endDate = new MicroSecondDate(rf.end_time); ChannelId chanId = rf.channel_id; DataSet dataSet = seismogram.getDataSet(); String[] names = dataSet.getDataSetSeismogramNames(); for (int i = 0; i < names.length; i++ ) { System.out.println("Attempting to match on " + names[i]); DataSetSeismogram currentSeis = dataSet.getDataSetSeismogram(names[i]); RequestFilter currentRF = currentSeis.getRequestFilter(); MicroSecondDate currentBegin = new MicroSecondDate(currentRF.start_time); MicroSecondDate currentEnd = new MicroSecondDate(currentRF.end_time); System.out.println("ID: " + ChannelIdUtil.toString(currentRF.channel_id) + "\nSITE CODE: " + currentRF.channel_id.site_code + " NETWORK ID: " + currentRF.channel_id.network_id + " CHANNEL CODE: " + currentRF.channel_id.channel_code + " STATION CODE: " + currentRF.channel_id.station_code); if(ChannelIdUtil.areEqual(chanId,currentRF.channel_id)){ System.out.println("the channel ids are equal"); if((currentBegin.equals(startDate) || currentBegin.before(startDate)) && (currentEnd.equals(endDate) || currentBegin.after(endDate))){ System.out.println("Found matching component"); componentSeismograms.add(currentSeis); } } } DataSetSeismogram[] components = new DataSetSeismogram[componentSeismograms.size()]; componentSeismograms.toArray(components); return components; }
|
public static DataSetSeismogram[] getComponents(DataSetSeismogram seismogram){ List componentSeismograms = new ArrayList(); RequestFilter rf = seismogram.getRequestFilter(); MicroSecondDate startDate = new MicroSecondDate(rf.start_time); MicroSecondDate endDate = new MicroSecondDate(rf.end_time); ChannelId chanId = rf.channel_id; DataSet dataSet = seismogram.getDataSet(); String[] names = dataSet.getDataSetSeismogramNames(); for (int i = 0; i < names.length; i++ ) { System.out.println("Attempting to match on " + names[i]); DataSetSeismogram currentSeis = dataSet.getDataSetSeismogram(names[i]); RequestFilter currentRF = currentSeis.getRequestFilter(); MicroSecondDate currentBegin = new MicroSecondDate(currentRF.start_time); MicroSecondDate currentEnd = new MicroSecondDate(currentRF.end_time); System.out.println("ID: " + ChannelIdUtil.toString(currentRF.channel_id) + "\nSITE CODE: " + currentRF.channel_id.site_code + " NETWORK ID: " + currentRF.channel_id.network_id + " CHANNEL CODE: " + currentRF.channel_id.channel_code + " STATION CODE: " + currentRF.channel_id.station_code); if(ChannelIdUtil.areEqual(chanId,currentRF.channel_id)){ System.out.println("the channel ids are equal"); if((currentBegin.equals(startDate) || currentBegin.before(startDate)) && (currentEnd.equals(endDate) || currentBegin.after(endDate))){ System.out.println("Found matching component"); componentSeismograms.add(currentSeis); } } } DataSetSeismogram[] components = new DataSetSeismogram[componentSeismograms.size()]; componentSeismograms.toArray(components); return components; }
| 1,117,773
|
public synchronized String getUtc(String time, String tzid, TimeZone tz) throws CalFacadeException { /* XXX We probably need the ownerid to determine exactly which timezone */ //if (debug) { // trace("Get utc for " + time + " tzid=" + tzid + " tz =" + tz); //} if (CalFacadeUtil.isISODateTimeUTC(time)) { // Already UTC return time; } if (CalFacadeUtil.isISODateTime(time)) { try { boolean tzchanged = false; if (tz == null) { if (tzid == null) { if ((lasttzid != null) || (lasttz == null)) { lasttz = TimeZone.getDefault(); tzchanged = true; } } else { if ((lasttzid == null) || (!lasttzid.equals(tzid))) { lasttz = getTimeZone(tzid); if (lasttz == null) { lasttzid = null; throw new CalFacadeBadDateException(); } tzchanged = true; } } } else { // tz supplied if (tz != lasttz) { /* Yes, that's a !=. I'm looking for it being the same object. * If I were sure that equals were correct and fast I'd use * that. */ tzchanged = true; tzid = tz.getID(); lasttz = tz; } } if (tzchanged) { if (debug) { trace("**********tzchanged"); } formatTd.setTimeZone(lasttz); lasttzid = tzid; } cal.setTimeZone(utctz); cal.setTime(formatTd.parse(time)); StringBuffer sb = new StringBuffer(); digit4(sb, cal.get(Calendar.YEAR)); digit2(sb, cal.get(Calendar.MONTH) + 1); // Month starts at 0 digit2(sb, cal.get(Calendar.DAY_OF_MONTH)); sb.append('T'); digit2(sb, cal.get(Calendar.HOUR_OF_DAY)); digit2(sb, cal.get(Calendar.MINUTE)); digit2(sb, cal.get(Calendar.SECOND)); sb.append('Z'); return sb.toString(); } catch (Throwable t) { t.printStackTrace(); throw new CalFacadeBadDateException(); } } if (CalFacadeUtil.isISODate(time)) { return time + "T000000Z"; } throw new CalFacadeBadDateException(); }
|
public synchronized String getUtc(String time, String tzid, TimeZone tz) throws CalFacadeException { /* XXX We probably need the ownerid to determine exactly which timezone */ //if (debug) { // trace("Get utc for " + time + " tzid=" + tzid + " tz =" + tz); //} if (CalFacadeUtil.isISODateTimeUTC(time)) { // Already UTC return time; } if (CalFacadeUtil.isISODateTime(time)) { try { boolean tzchanged = false; if (tz == null) { if (tzid == null) { if ((lasttzid != null) || (lasttz == null)) { lasttz = TimeZone.getDefault(); tzchanged = true; } } else { if ((lasttzid == null) || (!lasttzid.equals(tzid))) { lasttz = getTimeZone(tzid); if (lasttz == null) { lasttzid = null; throw new CalFacadeBadDateException(); } tzchanged = true; } } } else { // tz supplied if (tz != lasttz) { /* Yes, that's a !=. I'm looking for it being the same object. * If I were sure that equals were correct and fast I'd use * that. */ tzchanged = true; tzid = tz.getID(); lasttz = tz; } } if (tzchanged) { if (debug) { trace("**********tzchanged"); } formatTd.setTimeZone(lasttz); lasttzid = tzid; } cal.setTime(formatTd.parse(time)); StringBuffer sb = new StringBuffer(); digit4(sb, cal.get(Calendar.YEAR)); digit2(sb, cal.get(Calendar.MONTH) + 1); // Month starts at 0 digit2(sb, cal.get(Calendar.DAY_OF_MONTH)); sb.append('T'); digit2(sb, cal.get(Calendar.HOUR_OF_DAY)); digit2(sb, cal.get(Calendar.MINUTE)); digit2(sb, cal.get(Calendar.SECOND)); sb.append('Z'); return sb.toString(); } catch (Throwable t) { t.printStackTrace(); throw new CalFacadeBadDateException(); } } if (CalFacadeUtil.isISODate(time)) { return time + "T000000Z"; } throw new CalFacadeBadDateException(); }
| 1,117,774
|
public void setDefaultTimeZoneId(String id) throws CalFacadeException;
|
public void setDefaultTimeZoneId(String id) throws CalFacadeException { defaultTimeZone = null; defaultTimeZoneId = id; }
| 1,117,775
|
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.hasNext()){ OMStation current = (OMStation)it.next(); if(current.contains(e.getX(), e.getY())){ stationsUnderMouse.add(current.getStation()); } } if (stationsUnderMouse.size() > 0){ if (stationsUnderMouse.size() == 1){ chooser.toggleStationSelected((Station)stationsUnderMouse.get(0)); } 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 e) { chooser.toggleStationSelected(current); popup.setVisible(false); } }); menuItem.addMouseListener(new MouseAdapter(){ public void mouseEntered(MouseEvent e) { menuItem.setArmed(true); } public void mouseExited(MouseEvent e) { menuItem.setArmed(false); } }); popup.add(menuItem); } 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; } return true; } } return false; }
|
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.hasNext()){ OMStation current = (OMStation)it.next(); if(current.contains(e.getX(), e.getY())){ stationsUnderMouse.add(current.getStation()); } } if (stationsUnderMouse.size() > 0){ if (stationsUnderMouse.size() == 1){ synchronized(chooser){ chooser.toggleStationSelected((Station)stationsUnderMouse.get(0)); } } 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 e) { chooser.toggleStationSelected(current); popup.setVisible(false); } }); menuItem.addMouseListener(new MouseAdapter(){ public void mouseEntered(MouseEvent e) { menuItem.setArmed(true); } public void mouseExited(MouseEvent e) { menuItem.setArmed(false); } }); popup.add(menuItem); } 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; } return true; } } return false; }
| 1,117,777
|
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.hasNext()){ OMStation current = (OMStation)it.next(); if(current.contains(e.getX(), e.getY())){ stationsUnderMouse.add(current.getStation()); } } if (stationsUnderMouse.size() > 0){ if (stationsUnderMouse.size() == 1){ chooser.toggleStationSelected((Station)stationsUnderMouse.get(0)); } 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 e) { chooser.toggleStationSelected(current); popup.setVisible(false); } }); menuItem.addMouseListener(new MouseAdapter(){ public void mouseEntered(MouseEvent e) { menuItem.setArmed(true); } public void mouseExited(MouseEvent e) { menuItem.setArmed(false); } }); popup.add(menuItem); } 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; } return true; } } return false; }
|
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.hasNext()){ OMStation current = (OMStation)it.next(); if(current.contains(e.getX(), e.getY())){ stationsUnderMouse.add(current.getStation()); } } if (stationsUnderMouse.size() > 0){ if (stationsUnderMouse.size() == 1){ chooser.toggleStationSelected((Station)stationsUnderMouse.get(0)); } 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 e) { synchronized(chooser){ chooser.toggleStationSelected(current); } popup.setVisible(false); } }); menuItem.addMouseListener(new MouseAdapter(){ public void mouseEntered(MouseEvent e) { menuItem.setArmed(true); } public void mouseExited(MouseEvent e) { menuItem.setArmed(false); } }); popup.add(menuItem); } 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; } return true; } } return false; }
| 1,117,778
|
public void actionPerformed(ActionEvent e) { chooser.toggleStationSelected(current); popup.setVisible(false); }
|
public void actionPerformed(ActionEvent e) { synchronized(chooser){ chooser.toggleStationSelected(current); } popup.setVisible(false); }
| 1,117,779
|
protected Command getCreateCommand(CreateElementRequest req) { if (UMLElementTypes.OutputPin_3002 == req.getElementType()) { CreateObjectAction container = (CreateObjectAction) (req.getContainer() instanceof View ? ((View) req.getContainer()).getElement() : req.getContainer()); if (container.getResult() != null) { return super.getCreateCommand(req); } if (req.getContainmentFeature() == null) { req.setContainmentFeature(UMLPackage.eINSTANCE.getCreateObjectAction_Result()); } return getMSLWrapper(new CreateOutputPin_3002Command(req)); } return super.getCreateCommand(req); }
|
protected Command getCreateCommand(CreateElementRequest req) { if (UMLElementTypes.OutputPin_3002 == req.getElementType()) { CreateObjectAction container = (CreateObjectAction) (req.getContainer() instanceof View ? ((View) req.getContainer()).getElement() : req.getContainer()); if (container.getResult() != null) { return super.getCreateCommand(req); } if (req.getContainmentFeature() == null) { req.setContainmentFeature(UMLPackage.eINSTANCE.getCreateObjectAction_Result()); } return getMSLWrapper(new CreateOutputPin_3002Command(req)); } return super.getCreateCommand(req); }
| 1,117,780
|
protected Command getCreateCommand(CreateElementRequest req) { if (UMLElementTypes.OutputPin_3002 == req.getElementType()) { CreateObjectAction container = (CreateObjectAction) (req.getContainer() instanceof View ? ((View) req.getContainer()).getElement() : req.getContainer()); if (container.getResult() != null) { return super.getCreateCommand(req); } if (req.getContainmentFeature() == null) { req.setContainmentFeature(UMLPackage.eINSTANCE.getCreateObjectAction_Result()); } return getMSLWrapper(new CreateOutputPin_3002Command(req)); } return super.getCreateCommand(req); }
|
protected Command getCreateCommand(CreateElementRequest req) { if (UMLElementTypes.OutputPin_3002 == req.getElementType()) { CreateObjectAction container = (CreateObjectAction) (req.getContainer() instanceof View ? ((View) req.getContainer()).getElement() : req.getContainer()); if (container.getResult() != null) { return super.getCreateCommand(req); } if (req.getContainmentFeature() == null) { req.setContainmentFeature(UMLPackage.eINSTANCE.getCreateObjectAction_Result()); } return getMSLWrapper(new OutputPin2CreateCommand(req)); } return super.getCreateCommand(req); }
| 1,117,781
|
public static TimeInterval getServerTimeOffset() throws IOException { if ( timeURL == null) { setTimeURL(SEIS_SC_EDU_URL); } // end of if () URL url = timeURL; InputStream is = url.openStream(); InputStreamReader isReader = new InputStreamReader(is); BufferedReader bufferedReader = new BufferedReader(isReader); String str; String timeStr = null; while((str = bufferedReader.readLine()) != null) { timeStr = str; } MicroSecondDate localTime = new MicroSecondDate(); edu.iris.Fissures.Time serverTime = new edu.iris.Fissures.Time(); if(timeStr != null) { serverTime = new edu.iris.Fissures.Time(timeStr, -1); } MicroSecondDate serverDate = new MicroSecondDate(serverTime); //System.out.println("server Date is "+serverDate); //System.out.println("the lastDate is "+this.lastDate); TimeInterval offset = new TimeInterval(localTime, serverDate); // assume small time if(java.lang.Math.abs(offset.value) < 2000000) offset = new TimeInterval(serverDate, serverDate); //System.out.println("The offset is "+offset.value); return offset; }
|
public static TimeInterval getServerTimeOffset() throws IOException { if ( timeURL == null) { setTimeURL(SEIS_SC_EDU_URL); } // end of if () URL url = timeURL; InputStream is = url.openStream(); InputStreamReader isReader = new InputStreamReader(is); BufferedReader bufferedReader = new BufferedReader(isReader); String str; String timeStr = null; while((str = bufferedReader.readLine()) != null) { timeStr = str; } MicroSecondDate localTime = new MicroSecondDate(); edu.iris.Fissures.Time serverTime = new edu.iris.Fissures.Time(); if(timeStr != null) { serverTime = new edu.iris.Fissures.Time(timeStr, -1); } MicroSecondDate serverDate = new MicroSecondDate(serverTime); //System.out.println("server Date is "+serverDate); //System.out.println("the lastDate is "+this.lastDate); TimeInterval offset = new TimeInterval(localTime, serverDate); // assume small time //System.out.println("The offset is "+offset.value); return offset; }
| 1,117,782
|
public MP3Player(File f) throws PlayerException { try { file = f; stream = new FileInputStream(file); player = new AdvancedPlayer(stream); } catch (Exception exc) { throw new PlayerException(exc); } }
|
public MP3Player(File f) throws PlayerException { try { file = f; stream = new FileInputStream(file); player = new AdvancedPlayer(stream) { public void close() { System.out.print("AdvancedPlayer.close()"); super.close(); System.out.println(" done"); } }; } catch (Exception exc) { throw new PlayerException(exc); } }
| 1,117,783
|
public synchronized boolean isCompleted() { return completed; }
|
public boolean isCompleted() { return completed; }
| 1,117,784
|
public synchronized boolean isPlaying() { return player != null; }
|
public boolean isPlaying() { return player != null; }
| 1,117,785
|
public void pause() { System.err.println("Not yet implemented"); }
|
public synchronized void pause() { System.err.println("Not yet implemented"); }
| 1,117,786
|
public boolean isCompleted();
|
public abstract boolean isCompleted();
| 1,117,788
|
public void pause();
|
public abstract void pause();
| 1,117,789
|
public ATObject meta_select(ATObject receiver, ATSymbol selector) throws NATException { String jSelector = null; try { jSelector = Reflection.upBaseFieldAccessSelector(selector); return Reflection.downObject(Reflection.upFieldSelection(this, receiver, jSelector)); } catch (XTypeMismatch e) { jSelector = Reflection.upBaseLevelSelector(selector); return Reflection.downObject(Reflection.upMethodSelection(this, receiver, jSelector)); } }
|
public ATObject meta_select(ATObject receiver, ATSymbol selector) throws NATException { String jSelector = null; try { jSelector = Reflection.upBaseFieldAccessSelector(selector); return Reflection.downObject(Reflection.upFieldSelection(this, receiver, jSelector)); } catch (XSelectorNotFound e) { jSelector = Reflection.upBaseLevelSelector(selector); return Reflection.downObject(Reflection.upMethodSelection(this, receiver, jSelector)); } }
| 1,117,790
|
public SoundPlay(SeismogramDisplay display, SeismogramContainer container){ this.display = display; this.container = container; isPlaying = false; seisWAV = new FissuresToWAV(container, 1200); seisWAV.addPlayEventListener(this); SeismogramDisplay.getMouseForwarder().addPermMouseListener(this); SeismogramDisplay.getMouseMotionForwarder().addMouseMotionListener(this); }
|
public SoundPlay(SeismogramDisplay display, SeismogramContainer container){ this.display = display; this.container = container; seisWAV = new FissuresToWAV(container, 1200); seisWAV.addPlayEventListener(this); SeismogramDisplay.getMouseForwarder().addPermMouseListener(this); SeismogramDisplay.getMouseMotionForwarder().addMouseMotionListener(this); }
| 1,117,791
|
public void draw(Graphics2D canvas, Dimension size, TimeEvent currentTime, AmpEvent currentAmp) { if(visible && !BasicSeismogramDisplay.PRINTING){ double sizeOfDisplay = size.getWidth(); x0 = (int)sizeOfDisplay - 20; x1 = (int)sizeOfDisplay - 15; x2 = (int)sizeOfDisplay - 11; x3 = (int)sizeOfDisplay - 7; timeEvent = currentTime; canvas.setColor(drawColor); canvas.setStroke(DisplayUtils.TWO_PIXEL_STROKE); int yMid = (yMinA + yMaxA + yMinB + yMaxB)/4; canvas.drawLine(x0, yMinA, x0, yMaxA); canvas.drawLine(x0, yMaxA, x1, yMaxB); canvas.drawLine(x1, yMaxB, x1, yMinB); canvas.drawLine(x1, yMinB, x0, yMinA); canvas.drawLine(x2, yMinB, x2 + 1, yMid); canvas.drawLine(x2 + 1, yMid, x2, yMaxB); canvas.drawLine(x3, yMinB, x3 + 1, yMid); canvas.drawLine(x3 + 1, yMid, x3, yMaxB); if (isPlaying){ long elapsedTime = playEvent.getClip().getMicrosecondPosition(); canvas.setColor(Color.RED); canvas.setStroke(DisplayUtils.TWO_PIXEL_STROKE); playCursor = (int)((elapsedTime/timeInterval.convertTo(UnitImpl.MICROSECOND).get_value())*sizeOfDisplay); canvas.drawLine(playCursor, 0, playCursor, display.getHeight()); display.repaint(); if (playCursor >= sizeOfDisplay){ isPlaying = false; } } } }
|
public void draw(Graphics2D canvas, Dimension size, TimeEvent currentTime, AmpEvent currentAmp) { if(visible && !BasicSeismogramDisplay.PRINTING){ double sizeOfDisplay = size.getWidth(); x0 = (int)sizeOfDisplay - 20; x1 = (int)sizeOfDisplay - 15; x2 = (int)sizeOfDisplay - 11; x3 = (int)sizeOfDisplay - 7; timeEvent = currentTime; canvas.setColor(drawColor); canvas.setStroke(DisplayUtils.TWO_PIXEL_STROKE); int yMid = (yMinA + yMaxA + yMinB + yMaxB)/4; canvas.drawLine(x0, yMinA, x0, yMaxA); canvas.drawLine(x0, yMaxA, x1, yMaxB); canvas.drawLine(x1, yMaxB, x1, yMinB); canvas.drawLine(x1, yMinB, x0, yMinA); canvas.drawLine(x2, yMinB, x2 + 1, yMid); canvas.drawLine(x2 + 1, yMid, x2, yMaxB); canvas.drawLine(x3, yMinB, x3 + 1, yMid); canvas.drawLine(x3 + 1, yMid, x3, yMaxB); if (playEvent != null && playEvent.getClip().isRunning()){ long elapsedTime = playEvent.getClip().getMicrosecondPosition(); canvas.setColor(Color.RED); canvas.setStroke(DisplayUtils.TWO_PIXEL_STROKE); playCursor = (int)((elapsedTime/timeInterval.convertTo(UnitImpl.MICROSECOND).get_value())*sizeOfDisplay); canvas.drawLine(playCursor, 0, playCursor, display.getHeight()); display.repaint(); if (playCursor >= sizeOfDisplay){ isPlaying = false; } } } }
| 1,117,792
|
public void draw(Graphics2D canvas, Dimension size, TimeEvent currentTime, AmpEvent currentAmp) { if(visible && !BasicSeismogramDisplay.PRINTING){ double sizeOfDisplay = size.getWidth(); x0 = (int)sizeOfDisplay - 20; x1 = (int)sizeOfDisplay - 15; x2 = (int)sizeOfDisplay - 11; x3 = (int)sizeOfDisplay - 7; timeEvent = currentTime; canvas.setColor(drawColor); canvas.setStroke(DisplayUtils.TWO_PIXEL_STROKE); int yMid = (yMinA + yMaxA + yMinB + yMaxB)/4; canvas.drawLine(x0, yMinA, x0, yMaxA); canvas.drawLine(x0, yMaxA, x1, yMaxB); canvas.drawLine(x1, yMaxB, x1, yMinB); canvas.drawLine(x1, yMinB, x0, yMinA); canvas.drawLine(x2, yMinB, x2 + 1, yMid); canvas.drawLine(x2 + 1, yMid, x2, yMaxB); canvas.drawLine(x3, yMinB, x3 + 1, yMid); canvas.drawLine(x3 + 1, yMid, x3, yMaxB); if (isPlaying){ long elapsedTime = playEvent.getClip().getMicrosecondPosition(); canvas.setColor(Color.RED); canvas.setStroke(DisplayUtils.TWO_PIXEL_STROKE); playCursor = (int)((elapsedTime/timeInterval.convertTo(UnitImpl.MICROSECOND).get_value())*sizeOfDisplay); canvas.drawLine(playCursor, 0, playCursor, display.getHeight()); display.repaint(); if (playCursor >= sizeOfDisplay){ isPlaying = false; } } } }
|
public void draw(Graphics2D canvas, Dimension size, TimeEvent currentTime, AmpEvent currentAmp) { if(visible && !BasicSeismogramDisplay.PRINTING){ double sizeOfDisplay = size.getWidth(); x0 = (int)sizeOfDisplay - 20; x1 = (int)sizeOfDisplay - 15; x2 = (int)sizeOfDisplay - 11; x3 = (int)sizeOfDisplay - 7; timeEvent = currentTime; canvas.setColor(drawColor); canvas.setStroke(DisplayUtils.TWO_PIXEL_STROKE); int yMid = (yMinA + yMaxA + yMinB + yMaxB)/4; canvas.drawLine(x0, yMinA, x0, yMaxA); canvas.drawLine(x0, yMaxA, x1, yMaxB); canvas.drawLine(x1, yMaxB, x1, yMinB); canvas.drawLine(x1, yMinB, x0, yMinA); canvas.drawLine(x2, yMinB, x2 + 1, yMid); canvas.drawLine(x2 + 1, yMid, x2, yMaxB); canvas.drawLine(x3, yMinB, x3 + 1, yMid); canvas.drawLine(x3 + 1, yMid, x3, yMaxB); if (isPlaying){ long elapsedTime = playEvent.getClip().getMicrosecondPosition(); canvas.setColor(Color.RED); canvas.setStroke(DisplayUtils.TWO_PIXEL_STROKE); playCursor = (int)(((double)elapsedTime/(double)clipLength)*sizeOfDisplay); canvas.drawLine(playCursor, 0, playCursor, display.getHeight()); display.repaint(); if (playCursor >= sizeOfDisplay){ isPlaying = false; } } } }
| 1,117,793
|
public void draw(Graphics2D canvas, Dimension size, TimeEvent currentTime, AmpEvent currentAmp) { if(visible && !BasicSeismogramDisplay.PRINTING){ double sizeOfDisplay = size.getWidth(); x0 = (int)sizeOfDisplay - 20; x1 = (int)sizeOfDisplay - 15; x2 = (int)sizeOfDisplay - 11; x3 = (int)sizeOfDisplay - 7; timeEvent = currentTime; canvas.setColor(drawColor); canvas.setStroke(DisplayUtils.TWO_PIXEL_STROKE); int yMid = (yMinA + yMaxA + yMinB + yMaxB)/4; canvas.drawLine(x0, yMinA, x0, yMaxA); canvas.drawLine(x0, yMaxA, x1, yMaxB); canvas.drawLine(x1, yMaxB, x1, yMinB); canvas.drawLine(x1, yMinB, x0, yMinA); canvas.drawLine(x2, yMinB, x2 + 1, yMid); canvas.drawLine(x2 + 1, yMid, x2, yMaxB); canvas.drawLine(x3, yMinB, x3 + 1, yMid); canvas.drawLine(x3 + 1, yMid, x3, yMaxB); if (isPlaying){ long elapsedTime = playEvent.getClip().getMicrosecondPosition(); canvas.setColor(Color.RED); canvas.setStroke(DisplayUtils.TWO_PIXEL_STROKE); playCursor = (int)((elapsedTime/timeInterval.convertTo(UnitImpl.MICROSECOND).get_value())*sizeOfDisplay); canvas.drawLine(playCursor, 0, playCursor, display.getHeight()); display.repaint(); if (playCursor >= sizeOfDisplay){ isPlaying = false; } } } }
|
public void draw(Graphics2D canvas, Dimension size, TimeEvent currentTime, AmpEvent currentAmp) { if(visible && !BasicSeismogramDisplay.PRINTING){ double sizeOfDisplay = size.getWidth(); x0 = (int)sizeOfDisplay - 20; x1 = (int)sizeOfDisplay - 15; x2 = (int)sizeOfDisplay - 11; x3 = (int)sizeOfDisplay - 7; timeEvent = currentTime; canvas.setColor(drawColor); canvas.setStroke(DisplayUtils.TWO_PIXEL_STROKE); int yMid = (yMinA + yMaxA + yMinB + yMaxB)/4; canvas.drawLine(x0, yMinA, x0, yMaxA); canvas.drawLine(x0, yMaxA, x1, yMaxB); canvas.drawLine(x1, yMaxB, x1, yMinB); canvas.drawLine(x1, yMinB, x0, yMinA); canvas.drawLine(x2, yMinB, x2 + 1, yMid); canvas.drawLine(x2 + 1, yMid, x2, yMaxB); canvas.drawLine(x3, yMinB, x3 + 1, yMid); canvas.drawLine(x3 + 1, yMid, x3, yMaxB); if (isPlaying){ long elapsedTime = playEvent.getClip().getMicrosecondPosition(); canvas.setColor(Color.RED); canvas.setStroke(DisplayUtils.TWO_PIXEL_STROKE); playCursor = (int)((elapsedTime/timeInterval.convertTo(UnitImpl.MICROSECOND).get_value())*sizeOfDisplay); canvas.drawLine(playCursor, 0, playCursor, display.getHeight()); display.repaint(); if (playCursor >= sizeOfDisplay){ isPlaying = false; } } } }
| 1,117,794
|
public void eventPlayed(PlayEvent e){ playEvent = e; timeInterval = e.getTimeInterval(); isPlaying = true; display.repaint(); }
|
public void eventPlayed(PlayEvent e){ playEvent = e; timeInterval = e.getTimeInterval(); display.repaint(); }
| 1,117,795
|
public PlottableChunk[] get(MicroSecondTimeRange requestRange, ChannelId id, int pixelsPerDay) throws SQLException, IOException { int chanDbId; try { chanDbId = chanTable.getDBId(id); } catch(NotFound e) { logger.info("Channel " + ChannelIdUtil.toStringNoDates(id) + " not found"); return new PlottableChunk[0]; } int index = 1; get.setTimestamp(index++, requestRange.getEndTime().getTimestamp()); get.setTimestamp(index++, requestRange.getBeginTime().getTimestamp()); get.setInt(index++, chanDbId); get.setInt(index++, pixelsPerDay); ResultSet rs = get.executeQuery(); List chunks = new ArrayList(); int requestPixels = getPixels(pixelsPerDay, requestRange); logger.debug("Request made for " + requestPixels + " from " + requestRange + " at " + pixelsPerDay + "ppd"); while(rs.next()) { Timestamp ts = rs.getTimestamp("start_time"); MicroSecondDate rowBeginTime = new MicroSecondDate(ts); logger.debug("rowBeginTime: " + rowBeginTime); int offsetIntoRequestPixels = SimplePlotUtil.getPixel(requestPixels, requestRange, rowBeginTime); logger.debug("offetIntoRequestPixels: " + offsetIntoRequestPixels); int numPixels = rs.getInt("pixel_count"); logger.debug("numPixels: " + numPixels); int firstPixelForRequest = 0; if(offsetIntoRequestPixels < 0) { //This db row has data starting before the request, start at // pertinent point firstPixelForRequest = -1 * offsetIntoRequestPixels; } logger.debug("firstPixelForRequest: " + firstPixelForRequest); int lastPixelForRequest = numPixels; if(offsetIntoRequestPixels + numPixels > requestPixels) { //This row has more data than was requested in it, only get // enough to fill the request lastPixelForRequest = requestPixels - offsetIntoRequestPixels; } logger.debug("lastPixleForRequest: " + lastPixelForRequest); int pixelsUsed = lastPixelForRequest - firstPixelForRequest; logger.debug("pixelsUsed: " + pixelsUsed); int[] x = new int[pixelsUsed * 2]; int[] y = new int[pixelsUsed * 2]; byte[] dataBytes = rs.getBytes("data"); DataInputStream dis = new DataInputStream(new ByteArrayInputStream(dataBytes)); for(int i = 0; i < firstPixelForRequest; i++) { dis.readInt(); dis.readInt(); } for(int i = 0; i < pixelsUsed * 2; i++) { //x[i] = firstPixelForRequest + i / 2; x[i] = firstPixelForRequest + offsetIntoRequestPixels + i/2; y[i] = dis.readInt(); } logger.debug("x[0]: " + x[0]); Plottable p = new Plottable(x, y); PlottableChunk pc = new PlottableChunk(p, PlottableChunk.getPixel(rowBeginTime, pixelsPerDay) + firstPixelForRequest, PlottableChunk.getJDay(rowBeginTime), PlottableChunk.getYear(rowBeginTime), pixelsPerDay, id); chunks.add(pc); logger.debug("Returning " + pc + " from chunk starting at " + rowBeginTime); } return (PlottableChunk[])chunks.toArray(new PlottableChunk[chunks.size()]); }
|
public PlottableChunk[] get(MicroSecondTimeRange requestRange, ChannelId id, int pixelsPerDay) throws SQLException, IOException { int chanDbId; try { chanDbId = chanTable.getDBId(id); } catch(NotFound e) { logger.info("Channel " + ChannelIdUtil.toStringNoDates(id) + " not found"); return new PlottableChunk[0]; } int index = 1; get.setTimestamp(index++, requestRange.getEndTime().getTimestamp()); get.setTimestamp(index++, requestRange.getBeginTime().getTimestamp()); get.setInt(index++, chanDbId); get.setInt(index++, pixelsPerDay); ResultSet rs = get.executeQuery(); List chunks = new ArrayList(); int requestPixels = getPixels(pixelsPerDay, requestRange); logger.debug("Request made for " + requestPixels + " from " + requestRange + " at " + pixelsPerDay + "ppd"); while(rs.next()) { Timestamp ts = rs.getTimestamp("start_time"); MicroSecondDate rowBeginTime = new MicroSecondDate(ts); logger.debug("rowBeginTime: " + rowBeginTime); int offsetIntoRequestPixels = SimplePlotUtil.getPixel(requestPixels, requestRange, rowBeginTime); logger.debug("offetIntoRequestPixels: " + offsetIntoRequestPixels); int numPixels = rs.getInt("pixel_count"); logger.debug("numPixels: " + numPixels); int firstPixelForRequest = 0; if(offsetIntoRequestPixels < 0) { //This db row has data starting before the request, start at // pertinent point firstPixelForRequest = -1 * offsetIntoRequestPixels; } logger.debug("firstPixelForRequest: " + firstPixelForRequest); int lastPixelForRequest = numPixels; if(offsetIntoRequestPixels + numPixels > requestPixels) { //This row has more data than was requested in it, only get // enough to fill the request lastPixelForRequest = requestPixels - offsetIntoRequestPixels; } logger.debug("lastPixleForRequest: " + lastPixelForRequest); int pixelsUsed = lastPixelForRequest - firstPixelForRequest; logger.debug("pixelsUsed: " + pixelsUsed); int[] x = new int[pixelsUsed * 2]; int[] y = new int[pixelsUsed * 2]; byte[] dataBytes = rs.getBytes("data"); DataInputStream dis = new DataInputStream(new ByteArrayInputStream(dataBytes)); for(int i = 0; i < firstPixelForRequest; i++) { dis.readInt(); dis.readInt(); } for(int i = 0; i < pixelsUsed * 2; i++) { //x[i] = firstPixelForRequest + i / 2; x[i] = firstPixelForRequest + offsetIntoRequestPixels + i/2; y[i] = dis.readInt(); } if (x.length > 0){ logger.debug("x[0]: " + x[0]); } else { logger.debug("ZERO LENGTH ARRAY!!!"); } Plottable p = new Plottable(x, y); PlottableChunk pc = new PlottableChunk(p, PlottableChunk.getPixel(rowBeginTime, pixelsPerDay) + firstPixelForRequest, PlottableChunk.getJDay(rowBeginTime), PlottableChunk.getYear(rowBeginTime), pixelsPerDay, id); chunks.add(pc); logger.debug("Returning " + pc + " from chunk starting at " + rowBeginTime); } return (PlottableChunk[])chunks.toArray(new PlottableChunk[chunks.size()]); }
| 1,117,796
|
public ParticleMotion(final DataSetSeismogram hseis, DataSetSeismogram vseis, TimeConfig tc, Color color, String key, boolean horizPlane) { DataSetSeismogram[] seis = { hseis, vseis}; this.tc = tc; ac = new RMeanAmpConfig(seis); tc.addListener(ac); tc.add(seis); tc.addListener(this); ac.addListener(this); this.hseis = hseis; hseis.addSeisDataChangeListener(this); hseis.retrieveData(this); this.vseis = vseis; vseis.addSeisDataChangeListener(this); vseis.retrieveData(this); this.key = key; this.horizPlane = horizPlane; setColor(color); tc.shaleTime(0, 1); }
|
public ParticleMotion(final DataSetSeismogram hseis, DataSetSeismogram vseis, TimeConfig tc, Color color, String key, boolean horizPlane) { DataSetSeismogram[] seis = { (DataSetSeismogram)hseis.clone(), (DataSetSeismogram)vseis.clone()}; seis[0].setName(hseis.getName() + i++); seis[1].setName(vseis.getName() + i++); this.tc = tc; ac = new RMeanAmpConfig(seis); tc.addListener(ac); tc.add(seis); tc.addListener(this); ac.addListener(this); this.hseis = hseis; hseis.addSeisDataChangeListener(this); hseis.retrieveData(this); this.vseis = vseis; vseis.addSeisDataChangeListener(this); vseis.retrieveData(this); this.key = key; this.horizPlane = horizPlane; setColor(color); tc.shaleTime(0, 1); }
| 1,117,797
|
public ParticleMotion(final DataSetSeismogram hseis, DataSetSeismogram vseis, TimeConfig tc, Color color, String key, boolean horizPlane) { DataSetSeismogram[] seis = { hseis, vseis}; this.tc = tc; ac = new RMeanAmpConfig(seis); tc.addListener(ac); tc.add(seis); tc.addListener(this); ac.addListener(this); this.hseis = hseis; hseis.addSeisDataChangeListener(this); hseis.retrieveData(this); this.vseis = vseis; vseis.addSeisDataChangeListener(this); vseis.retrieveData(this); this.key = key; this.horizPlane = horizPlane; setColor(color); tc.shaleTime(0, 1); }
|
public ParticleMotion(final DataSetSeismogram hseis, DataSetSeismogram vseis, TimeConfig tc, Color color, String key, boolean horizPlane) { DataSetSeismogram[] seis = { hseis, vseis}; this.tc = tc; AmpConfig ac = (AmpConfig)keysToAmpConfigs.get(key); if(ac == null){ ac = new RMeanAmpConfig(); keysToAmpConfigs.put(key, ac); } ac.add(seis); ac.addListener(this); tc.addListener(ac); tc.add(seis); tc.addListener(this); ac.addListener(this); this.hseis = hseis; hseis.addSeisDataChangeListener(this); hseis.retrieveData(this); this.vseis = vseis; vseis.addSeisDataChangeListener(this); vseis.retrieveData(this); this.key = key; this.horizPlane = horizPlane; setColor(color); tc.shaleTime(0, 1); }
| 1,117,798
|
public ParticleMotion(final DataSetSeismogram hseis, DataSetSeismogram vseis, TimeConfig tc, Color color, String key, boolean horizPlane) { DataSetSeismogram[] seis = { hseis, vseis}; this.tc = tc; ac = new RMeanAmpConfig(seis); tc.addListener(ac); tc.add(seis); tc.addListener(this); ac.addListener(this); this.hseis = hseis; hseis.addSeisDataChangeListener(this); hseis.retrieveData(this); this.vseis = vseis; vseis.addSeisDataChangeListener(this); vseis.retrieveData(this); this.key = key; this.horizPlane = horizPlane; setColor(color); tc.shaleTime(0, 1); }
|
public ParticleMotion(final DataSetSeismogram hseis, DataSetSeismogram vseis, TimeConfig tc, Color color, String key, boolean horizPlane) { DataSetSeismogram[] seis = { hseis, vseis}; this.tc = tc; ac = new RMeanAmpConfig(seis); tc.addListener(ac); tc.add(seis); tc.addListener(this); ac.addListener(this); this.hseis = hseis; hseis.addSeisDataChangeListener(this); hseis.retrieveData(this); this.vseis = vseis; vseis.addSeisDataChangeListener(this); vseis.retrieveData(this); this.key = key; this.horizPlane = horizPlane; setColor(color); tc.shaleTime(0, 1); }
| 1,117,799
|
public ParticleMotion(final DataSetSeismogram hseis, DataSetSeismogram vseis, TimeConfig tc, Color color, String key, boolean horizPlane) { DataSetSeismogram[] seis = { hseis, vseis}; this.tc = tc; ac = new RMeanAmpConfig(seis); tc.addListener(ac); tc.add(seis); tc.addListener(this); ac.addListener(this); this.hseis = hseis; hseis.addSeisDataChangeListener(this); hseis.retrieveData(this); this.vseis = vseis; vseis.addSeisDataChangeListener(this); vseis.retrieveData(this); this.key = key; this.horizPlane = horizPlane; setColor(color); tc.shaleTime(0, 1); }
|
public ParticleMotion(final DataSetSeismogram hseis, DataSetSeismogram vseis, TimeConfig tc, Color color, String key, boolean horizPlane) { DataSetSeismogram[] seis = { hseis, vseis}; this.tc = tc; ac = new RMeanAmpConfig(seis); tc.addListener(ac); tc.add(seis); tc.addListener(this); ac.addListener(this); this.hseis = hseis; hseis.addSeisDataChangeListener(this); hseis.retrieveData(this); this.vseis = vseis; vseis.addSeisDataChangeListener(this); vseis.retrieveData(this); this.key = key; this.horizPlane = horizPlane; setColor(color); tc.fireTimeEvent(); }
| 1,117,800
|
public void updateAmp(AmpEvent ampEvent){ this.ampEvent = ampEvent; }
|
public void updateAmp(AmpEvent ampEvent){ this.ampEvent = ampEvent; }
| 1,117,801
|
public ParticleMotionView(ParticleMotionDisplay particleMotionDisplay) { this.particleMotionDisplay = particleMotionDisplay; addListeners(); }
|
public ParticleMotionView(ParticleMotionDisplay particleMotionDisplay) { this.particleMotionDisplay = particleMotionDisplay; addListeners(); }
| 1,117,802
|
public void addAzimuthLine(double degrees) { azimuths.add(new Double(degrees)); }
|
public void addAzimuthLine(double degrees) { azimuths.add(new Double(degrees)); }
| 1,117,803
|
public synchronized void addParticleMotionDisplay(DataSetSeismogram hseis, DataSetSeismogram vseis, TimeConfig tc, Color color, String key, boolean horizPlane) { ParticleMotion particleMotion = new ParticleMotion(hseis, vseis, tc, color, key, horizPlane); displays.add(particleMotion); hunitRangeImpl = new UnitRangeImpl(getMinHorizontalAmplitude(), getMaxHorizontalAmplitude(), UnitImpl.COUNT); vunitRangeImpl = new UnitRangeImpl(getMinVerticalAmplitude(), getMaxVerticalAmplitude(), UnitImpl.COUNT); particleMotionDisplay.updateHorizontalAmpScale(hunitRangeImpl); particleMotionDisplay.updateVerticalAmpScale(vunitRangeImpl); }
|
public synchronized void addParticleMotionDisplay(DataSetSeismogram hseis, DataSetSeismogram vseis, TimeConfig tc, Color color, String key, boolean horizPlane) { ParticleMotion particleMotion = new ParticleMotion(hseis, vseis, tc, color, key, horizPlane); displays.add(particleMotion); hunitRangeImpl = new UnitRangeImpl(getMinHorizontalAmplitude(), getMaxHorizontalAmplitude(), UnitImpl.COUNT); vunitRangeImpl = new UnitRangeImpl(getMinVerticalAmplitude(), getMaxVerticalAmplitude(), UnitImpl.COUNT); particleMotionDisplay.updateHorizontalAmpScale(hunitRangeImpl); particleMotionDisplay.updateVerticalAmpScale(vunitRangeImpl); }
| 1,117,804
|
public synchronized void drawAzimuth(ParticleMotion particleMotion, Graphics2D graphics2D) { if(!particleMotion.isHorizontalPlane()) return; Shape sector = getSectorShape(); graphics2D.setColor(new Color(100, 160, 140)); graphics2D.fill(sector); graphics2D.draw(sector); graphics2D.setStroke(DisplayUtils.TWO_PIXEL_STROKE); graphics2D.setColor(Color.green); Shape azimuth = getAzimuthPath(); graphics2D.draw(azimuth); graphics2D.setStroke(DisplayUtils.ONE_PIXEL_STROKE); }
|
public synchronized void drawAzimuth(ParticleMotion particleMotion, Graphics2D graphics2D) { if(!particleMotion.isHorizontalPlane()) return; Shape sector = getSectorShape(); graphics2D.setPaint(Color.gray); graphics2D.fill(sector); graphics2D.draw(sector); graphics2D.setStroke(DisplayUtils.TWO_PIXEL_STROKE); graphics2D.setColor(Color.green); Shape azimuth = getAzimuthPath(); graphics2D.draw(azimuth); graphics2D.setStroke(DisplayUtils.ONE_PIXEL_STROKE); }
| 1,117,805
|
public synchronized void drawAzimuth(ParticleMotion particleMotion, Graphics2D graphics2D) { if(!particleMotion.isHorizontalPlane()) return; Shape sector = getSectorShape(); graphics2D.setColor(new Color(100, 160, 140)); graphics2D.fill(sector); graphics2D.draw(sector); graphics2D.setStroke(DisplayUtils.TWO_PIXEL_STROKE); graphics2D.setColor(Color.green); Shape azimuth = getAzimuthPath(); graphics2D.draw(azimuth); graphics2D.setStroke(DisplayUtils.ONE_PIXEL_STROKE); }
|
public synchronized void drawAzimuth(ParticleMotion particleMotion, Graphics2D graphics2D) { if(!particleMotion.isHorizontalPlane()) return; Shape sector = getSectorShape(); graphics2D.setColor(new Color(100, 160, 140)); graphics2D.fill(sector); graphics2D.draw(sector); graphics2D.setStroke(DisplayUtils.TWO_PIXEL_STROKE); graphics2D.setColor(Color.green); Shape azimuth = getAzimuthPath(); graphics2D.draw(azimuth); graphics2D.setStroke(DisplayUtils.ONE_PIXEL_STROKE); }
| 1,117,806
|
public synchronized void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; if(!recalculateValues) { recalculateValues = false; graphics2D.draw(particleMotion.getShape()); return; } Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.getLocalHSeis(); LocalSeismogramImpl vseis = particleMotion.getLocalVSeis(); if(hseis == null || vseis == null){ return; } Color color = particleMotion.getColor(); if(color == null) { color = COLORS[RGBCOLOR]; particleMotion.setColor(color); RGBCOLOR++; if(RGBCOLOR == COLORS.length) RGBCOLOR = 0; } graphics2D.setColor(color); try { MicroSecondTimeRange microSecondTimeRange = null; if(particleMotion.tc == null) { microSecondTimeRange = new MicroSecondTimeRange(new MicroSecondDate(hseis.getBeginTime()), new MicroSecondDate(hseis.getEndTime())); } else { microSecondTimeRange = particleMotion.getTimeRange(); } int[][] hPixels = SimplePlotUtil.getPlottableSimple(hseis, hunitRangeImpl, microSecondTimeRange, dimension); int[][] vPixels = SimplePlotUtil.getPlottableSimple(vseis, vunitRangeImpl, microSecondTimeRange, dimension); SimplePlotUtil.flipArray(vPixels[1], dimension.height); Shape shape = getParticleMotionPath(hPixels[1], vPixels[1]); particleMotion.setShape(shape); if(shape == null) logger.debug("The shape is null"); graphics2D.draw(shape); } catch(Exception e) { e.printStackTrace(); } }
|
public synchronized void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; if(!recalculateValues) { recalculateValues = false; graphics2D.draw(particleMotion.getShape()); return; } Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.getLocalHSeis(); LocalSeismogramImpl vseis = particleMotion.getLocalVSeis(); if(hseis == null || vseis == null){ return; } Color color = particleMotion.getColor(); if(color == null) { color = COLORS[RGBCOLOR]; particleMotion.setColor(color); RGBCOLOR++; if(RGBCOLOR == COLORS.length) RGBCOLOR = 0; } graphics2D.setColor(color); try { MicroSecondTimeRange microSecondTimeRange = null; if(particleMotion.tc == null) { microSecondTimeRange = new MicroSecondTimeRange(new MicroSecondDate(hseis.getBeginTime()), new MicroSecondDate(hseis.getEndTime())); } else { microSecondTimeRange = particleMotion.getTimeRange(); } int[][] hPixels = SimplePlotUtil.getPlottableSimple(hseis, hunitRangeImpl, microSecondTimeRange, dimension); int[][] vPixels = SimplePlotUtil.getPlottableSimple(vseis, vunitRangeImpl, microSecondTimeRange, dimension); SimplePlotUtil.flipArray(vPixels[1], dimension.height); Shape shape = getParticleMotionPath(hPixels[1], vPixels[1]); particleMotion.setShape(shape); if(shape == null) logger.debug("The shape is null"); graphics2D.draw(shape); } catch(Exception e) { e.printStackTrace(); } }
| 1,117,807
|
public synchronized void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; if(!recalculateValues) { recalculateValues = false; graphics2D.draw(particleMotion.getShape()); return; } Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.getLocalHSeis(); LocalSeismogramImpl vseis = particleMotion.getLocalVSeis(); if(hseis == null || vseis == null){ return; } Color color = particleMotion.getColor(); if(color == null) { color = COLORS[RGBCOLOR]; particleMotion.setColor(color); RGBCOLOR++; if(RGBCOLOR == COLORS.length) RGBCOLOR = 0; } graphics2D.setColor(color); try { MicroSecondTimeRange microSecondTimeRange = null; if(particleMotion.tc == null) { microSecondTimeRange = new MicroSecondTimeRange(new MicroSecondDate(hseis.getBeginTime()), new MicroSecondDate(hseis.getEndTime())); } else { microSecondTimeRange = particleMotion.getTimeRange(); } int[][] hPixels = SimplePlotUtil.getPlottableSimple(hseis, hunitRangeImpl, microSecondTimeRange, dimension); int[][] vPixels = SimplePlotUtil.getPlottableSimple(vseis, vunitRangeImpl, microSecondTimeRange, dimension); SimplePlotUtil.flipArray(vPixels[1], dimension.height); Shape shape = getParticleMotionPath(hPixels[1], vPixels[1]); particleMotion.setShape(shape); if(shape == null) logger.debug("The shape is null"); graphics2D.draw(shape); } catch(Exception e) { e.printStackTrace(); } }
|
public synchronized void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; if(!recalculateValues) { recalculateValues = false; graphics2D.draw(particleMotion.getShape()); return; } Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.getLocalHSeis(); LocalSeismogramImpl vseis = particleMotion.getLocalVSeis(); if(hseis == null || vseis == null){ return; } Color color = particleMotion.getColor(); if(color == null) { color = COLORS[RGBCOLOR]; particleMotion.setColor(color); RGBCOLOR++; if(RGBCOLOR == COLORS.length) RGBCOLOR = 0; } graphics2D.setColor(color); try { MicroSecondTimeRange microSecondTimeRange = null; if(particleMotion.tc == null) { microSecondTimeRange = new MicroSecondTimeRange(new MicroSecondDate(hseis.getBeginTime()), new MicroSecondDate(hseis.getEndTime())); } else { microSecondTimeRange = particleMotion.getTimeRange(); } int[][] hPixels = SimplePlotUtil.getPlottableSimple(hseis, hunitRangeImpl, microSecondTimeRange, dimension); int[][] vPixels = SimplePlotUtil.getPlottableSimple(vseis, vunitRangeImpl, microSecondTimeRange, dimension); SimplePlotUtil.flipArray(vPixels[1], dimension.height); Shape shape = getParticleMotionPath(hPixels[1], vPixels[1]); particleMotion.setShape(shape); if(shape == null) logger.debug("The shape is null"); graphics2D.draw(shape); } catch(Exception e) { e.printStackTrace(); } }
| 1,117,808
|
public synchronized void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; if(!recalculateValues) { recalculateValues = false; graphics2D.draw(particleMotion.getShape()); return; } Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.getLocalHSeis(); LocalSeismogramImpl vseis = particleMotion.getLocalVSeis(); if(hseis == null || vseis == null){ return; } Color color = particleMotion.getColor(); if(color == null) { color = COLORS[RGBCOLOR]; particleMotion.setColor(color); RGBCOLOR++; if(RGBCOLOR == COLORS.length) RGBCOLOR = 0; } graphics2D.setColor(color); try { MicroSecondTimeRange microSecondTimeRange = null; if(particleMotion.tc == null) { microSecondTimeRange = new MicroSecondTimeRange(new MicroSecondDate(hseis.getBeginTime()), new MicroSecondDate(hseis.getEndTime())); } else { microSecondTimeRange = particleMotion.getTimeRange(); } int[][] hPixels = SimplePlotUtil.getPlottableSimple(hseis, hunitRangeImpl, microSecondTimeRange, dimension); int[][] vPixels = SimplePlotUtil.getPlottableSimple(vseis, vunitRangeImpl, microSecondTimeRange, dimension); SimplePlotUtil.flipArray(vPixels[1], dimension.height); Shape shape = getParticleMotionPath(hPixels[1], vPixels[1]); particleMotion.setShape(shape); if(shape == null) logger.debug("The shape is null"); graphics2D.draw(shape); } catch(Exception e) { e.printStackTrace(); } }
|
public synchronized void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; if(!recalculateValues) { recalculateValues = false; graphics2D.draw(particleMotion.getShape()); return; } Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.getLocalHSeis(); LocalSeismogramImpl vseis = particleMotion.getLocalVSeis(); if(hseis == null || vseis == null){ return; } Color color = particleMotion.getColor(); if(color == null) { color = COLORS[RGBCOLOR]; particleMotion.setColor(color); RGBCOLOR++; if(RGBCOLOR == COLORS.length) RGBCOLOR = 0; } graphics2D.setColor(color); try { MicroSecondTimeRange microSecondTimeRange = null; if(particleMotion.tc == null) { microSecondTimeRange = new MicroSecondTimeRange(new MicroSecondDate(hseis.getBeginTime()), new MicroSecondDate(hseis.getEndTime())); } else { microSecondTimeRange = particleMotion.getTimeRange(); } int[][] hPixels = SimplePlotUtil.getPlottableSimple(hseis, hunitRangeImpl, microSecondTimeRange, dimension); int[][] vPixels = SimplePlotUtil.getPlottableSimple(vseis, vunitRangeImpl, microSecondTimeRange, dimension); SimplePlotUtil.flipArray(vPixels[1], dimension.height); Shape shape = getParticleMotionPath(hPixels[1], vPixels[1]); particleMotion.setShape(shape); if(shape == null) logger.debug("The shape is null"); graphics2D.draw(shape); } catch(Exception e) { e.printStackTrace(); } }
| 1,117,809
|
public synchronized void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; if(!recalculateValues) { recalculateValues = false; graphics2D.draw(particleMotion.getShape()); return; } Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.getLocalHSeis(); LocalSeismogramImpl vseis = particleMotion.getLocalVSeis(); if(hseis == null || vseis == null){ return; } Color color = particleMotion.getColor(); if(color == null) { color = COLORS[RGBCOLOR]; particleMotion.setColor(color); RGBCOLOR++; if(RGBCOLOR == COLORS.length) RGBCOLOR = 0; } graphics2D.setColor(color); try { MicroSecondTimeRange microSecondTimeRange = null; if(particleMotion.tc == null) { microSecondTimeRange = new MicroSecondTimeRange(new MicroSecondDate(hseis.getBeginTime()), new MicroSecondDate(hseis.getEndTime())); } else { microSecondTimeRange = particleMotion.getTimeRange(); } int[][] hPixels = SimplePlotUtil.getPlottableSimple(hseis, hunitRangeImpl, microSecondTimeRange, dimension); int[][] vPixels = SimplePlotUtil.getPlottableSimple(vseis, vunitRangeImpl, microSecondTimeRange, dimension); SimplePlotUtil.flipArray(vPixels[1], dimension.height); Shape shape = getParticleMotionPath(hPixels[1], vPixels[1]); particleMotion.setShape(shape); if(shape == null) logger.debug("The shape is null"); graphics2D.draw(shape); } catch(Exception e) { e.printStackTrace(); } }
|
public synchronized void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; if(!recalculateValues) { recalculateValues = false; graphics2D.draw(particleMotion.getShape()); return; } Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.getLocalHSeis(); LocalSeismogramImpl vseis = particleMotion.getLocalVSeis(); if(hseis == null || vseis == null){ return; } Color color = particleMotion.getColor(); if(color == null) { color = COLORS[RGBCOLOR]; particleMotion.setColor(color); RGBCOLOR++; if(RGBCOLOR == COLORS.length) RGBCOLOR = 0; } graphics2D.setColor(color); try { MicroSecondTimeRange microSecondTimeRange = null; if(particleMotion.tc == null) { microSecondTimeRange = new MicroSecondTimeRange(new MicroSecondDate(hseis.getBeginTime()), new MicroSecondDate(hseis.getEndTime())); } else { microSecondTimeRange = particleMotion.getTimeRange(); } int[][] hPixels = SimplePlotUtil.getPlottableSimple(hseis, hunitRangeImpl, microSecondTimeRange, dimension); int[][] vPixels = SimplePlotUtil.getPlottableSimple(vseis, vunitRangeImpl, microSecondTimeRange, dimension); SimplePlotUtil.flipArray(vPixels[1], dimension.height); Shape shape = getParticleMotionPath(hPixels[1], vPixels[1]); particleMotion.setShape(shape); if(shape == null) logger.debug("The shape is null"); graphics2D.draw(shape); } catch(Exception e) { e.printStackTrace(); } }
| 1,117,810
|
public synchronized void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; if(!recalculateValues) { recalculateValues = false; graphics2D.draw(particleMotion.getShape()); return; } Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.getLocalHSeis(); LocalSeismogramImpl vseis = particleMotion.getLocalVSeis(); if(hseis == null || vseis == null){ return; } Color color = particleMotion.getColor(); if(color == null) { color = COLORS[RGBCOLOR]; particleMotion.setColor(color); RGBCOLOR++; if(RGBCOLOR == COLORS.length) RGBCOLOR = 0; } graphics2D.setColor(color); try { MicroSecondTimeRange microSecondTimeRange = null; if(particleMotion.tc == null) { microSecondTimeRange = new MicroSecondTimeRange(new MicroSecondDate(hseis.getBeginTime()), new MicroSecondDate(hseis.getEndTime())); } else { microSecondTimeRange = particleMotion.getTimeRange(); } int[][] hPixels = SimplePlotUtil.getPlottableSimple(hseis, hunitRangeImpl, microSecondTimeRange, dimension); int[][] vPixels = SimplePlotUtil.getPlottableSimple(vseis, vunitRangeImpl, microSecondTimeRange, dimension); SimplePlotUtil.flipArray(vPixels[1], dimension.height); Shape shape = getParticleMotionPath(hPixels[1], vPixels[1]); particleMotion.setShape(shape); if(shape == null) logger.debug("The shape is null"); graphics2D.draw(shape); } catch(Exception e) { e.printStackTrace(); } }
|
public synchronized void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; if(!recalculateValues) { recalculateValues = false; graphics2D.draw(particleMotion.getShape()); return; } Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.getLocalHSeis(); LocalSeismogramImpl vseis = particleMotion.getLocalVSeis(); if(hseis == null || vseis == null){ return; } Color color = particleMotion.getColor(); if(color == null) { color = COLORS[RGBCOLOR]; particleMotion.setColor(color); RGBCOLOR++; if(RGBCOLOR == COLORS.length) RGBCOLOR = 0; } graphics2D.setColor(color); try { MicroSecondTimeRange microSecondTimeRange = null; if(particleMotion.tc == null) { microSecondTimeRange = new MicroSecondTimeRange(new MicroSecondDate(hseis.getBeginTime()), new MicroSecondDate(hseis.getEndTime())); } else { microSecondTimeRange = particleMotion.getTimeRange(); } int[][] hPixels = SimplePlotUtil.getPlottableSimple(hseis, hunitRangeImpl, microSecondTimeRange, dimension); int[][] vPixels = SimplePlotUtil.getPlottableSimple(vseis, vunitRangeImpl, microSecondTimeRange, dimension); SimplePlotUtil.flipArray(vPixels[1], dimension.height); Shape shape = getParticleMotionPath(hPixels[1], vPixels[1]); particleMotion.setShape(shape); if(shape == null) logger.debug("The shape is null"); graphics2D.draw(shape); } catch(Exception e) { e.printStackTrace(); } }
| 1,117,811
|
public synchronized void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; if(!recalculateValues) { recalculateValues = false; graphics2D.draw(particleMotion.getShape()); return; } Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.getLocalHSeis(); LocalSeismogramImpl vseis = particleMotion.getLocalVSeis(); if(hseis == null || vseis == null){ return; } Color color = particleMotion.getColor(); if(color == null) { color = COLORS[RGBCOLOR]; particleMotion.setColor(color); RGBCOLOR++; if(RGBCOLOR == COLORS.length) RGBCOLOR = 0; } graphics2D.setColor(color); try { MicroSecondTimeRange microSecondTimeRange = null; if(particleMotion.tc == null) { microSecondTimeRange = new MicroSecondTimeRange(new MicroSecondDate(hseis.getBeginTime()), new MicroSecondDate(hseis.getEndTime())); } else { microSecondTimeRange = particleMotion.getTimeRange(); } int[][] hPixels = SimplePlotUtil.getPlottableSimple(hseis, hunitRangeImpl, microSecondTimeRange, dimension); int[][] vPixels = SimplePlotUtil.getPlottableSimple(vseis, vunitRangeImpl, microSecondTimeRange, dimension); SimplePlotUtil.flipArray(vPixels[1], dimension.height); Shape shape = getParticleMotionPath(hPixels[1], vPixels[1]); particleMotion.setShape(shape); if(shape == null) logger.debug("The shape is null"); graphics2D.draw(shape); } catch(Exception e) { e.printStackTrace(); } }
|
public synchronized void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; if(!recalculateValues) { recalculateValues = false; graphics2D.draw(particleMotion.getShape()); return; } Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.getLocalHSeis(); LocalSeismogramImpl vseis = particleMotion.getLocalVSeis(); if(hseis == null || vseis == null){ return; } Color color = particleMotion.getColor(); if(color == null) { color = COLORS[RGBCOLOR]; particleMotion.setColor(color); RGBCOLOR++; if(RGBCOLOR == COLORS.length) RGBCOLOR = 0; } graphics2D.setColor(color); try { MicroSecondTimeRange microSecondTimeRange = null; if(particleMotion.tc == null) { microSecondTimeRange = new MicroSecondTimeRange(new MicroSecondDate(hseis.getBeginTime()), new MicroSecondDate(hseis.getEndTime())); } else { microSecondTimeRange = particleMotion.getTimeRange(); } int[][] hPixels = SimplePlotUtil.getPlottableSimple(hseis, hunitRangeImpl, microSecondTimeRange, dimension); int[][] vPixels = SimplePlotUtil.getPlottableSimple(vseis, vunitRangeImpl, microSecondTimeRange, dimension); SimplePlotUtil.flipArray(vPixels[1], dimension.height); Shape shape = getParticleMotionPath(hPixels[1], vPixels[1]); particleMotion.setShape(shape); if(shape == null) logger.debug("The shape is null"); graphics2D.draw(shape); } catch(Exception e) { e.printStackTrace(); } }
| 1,117,812
|
public void drawTitles(LocalSeismogramImpl hseis, LocalSeismogramImpl vseis) { particleMotionDisplay.setHorizontalTitle(hseis.getName()); particleMotionDisplay.setVerticalTitle(vseis.getName()); }
|
public void drawTitles(LocalSeismogramImpl hseis, LocalSeismogramImpl vseis) { particleMotionDisplay.setHorizontalTitle(hseis.getName()); particleMotionDisplay.setVerticalTitle(vseis.getName()); }
| 1,117,813
|
public ParticleMotion[] getSelectedParticleMotion() { ArrayList arrayList = new ArrayList(); for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(displayKeys.contains(particleMotion.key)) { arrayList.add(particleMotion); } }//end of for ParticleMotion[] rtnValues = new ParticleMotion[arrayList.size()]; rtnValues = (ParticleMotion[])arrayList.toArray(rtnValues); return rtnValues; }
|
public ParticleMotion[] getSelectedParticleMotion() { ArrayList arrayList = new ArrayList(); for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(displayKeys.contains(particleMotion.key)) { arrayList.add(particleMotion); } }//end of for ParticleMotion[] rtnValues = new ParticleMotion[arrayList.size()]; rtnValues = (ParticleMotion[])arrayList.toArray(rtnValues); return rtnValues; }
| 1,117,814
|
public synchronized void paintComponent(Graphics g) { if(displayKeys.size() == 0) return; Graphics2D graphics2D = (Graphics2D)g; vunitRangeImpl = new UnitRangeImpl(getMinVerticalAmplitude(), getMaxVerticalAmplitude(), UnitImpl.COUNT); hunitRangeImpl = new UnitRangeImpl(getMinHorizontalAmplitude(), getMaxHorizontalAmplitude(), UnitImpl.COUNT); //first draw the azimuth if one of the display is horizontal plane for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isHorizontalPlane()){ drawAzimuth(particleMotion, graphics2D); break; } } for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isSelected()) continue; drawParticleMotion(particleMotion, graphics2D); }//end of for for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isSelected()) { particleMotion.setSelected(false); drawParticleMotion(particleMotion, g); } } }
|
public synchronized void paintComponent(Graphics g) { if(displayKey == null) return; Graphics2D graphics2D = (Graphics2D)g; vunitRangeImpl = new UnitRangeImpl(getMinVerticalAmplitude(), getMaxVerticalAmplitude(), UnitImpl.COUNT); hunitRangeImpl = new UnitRangeImpl(getMinHorizontalAmplitude(), getMaxHorizontalAmplitude(), UnitImpl.COUNT); //first draw the azimuth if one of the display is horizontal plane for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isHorizontalPlane()){ drawAzimuth(particleMotion, graphics2D); break; } } for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isSelected()) continue; drawParticleMotion(particleMotion, graphics2D); }//end of for for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isSelected()) { particleMotion.setSelected(false); drawParticleMotion(particleMotion, g); } } }
| 1,117,815
|
public synchronized void paintComponent(Graphics g) { if(displayKeys.size() == 0) return; Graphics2D graphics2D = (Graphics2D)g; vunitRangeImpl = new UnitRangeImpl(getMinVerticalAmplitude(), getMaxVerticalAmplitude(), UnitImpl.COUNT); hunitRangeImpl = new UnitRangeImpl(getMinHorizontalAmplitude(), getMaxHorizontalAmplitude(), UnitImpl.COUNT); //first draw the azimuth if one of the display is horizontal plane for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isHorizontalPlane()){ drawAzimuth(particleMotion, graphics2D); break; } } for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isSelected()) continue; drawParticleMotion(particleMotion, graphics2D); }//end of for for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isSelected()) { particleMotion.setSelected(false); drawParticleMotion(particleMotion, g); } } }
|
public synchronized void paintComponent(Graphics g) { if(displayKeys.size() == 0) return; Graphics2D graphics2D = (Graphics2D)g; vunitRangeImpl = new UnitRangeImpl(getMinVerticalAmplitude(), getMaxVerticalAmplitude(), UnitImpl.COUNT); hunitRangeImpl = new UnitRangeImpl(getMinHorizontalAmplitude(), getMaxHorizontalAmplitude(), UnitImpl.COUNT); //first draw the azimuth if one of the display is horizontal plane for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isHorizontalPlane()){ drawAzimuth(particleMotion, graphics2D); break; } } for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isSelected()) continue; drawParticleMotion(particleMotion, graphics2D); }//end of for for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isSelected()) { particleMotion.setSelected(false); drawParticleMotion(particleMotion, g); } } }
| 1,117,816
|
public synchronized void paintComponent(Graphics g) { if(displayKeys.size() == 0) return; Graphics2D graphics2D = (Graphics2D)g; vunitRangeImpl = new UnitRangeImpl(getMinVerticalAmplitude(), getMaxVerticalAmplitude(), UnitImpl.COUNT); hunitRangeImpl = new UnitRangeImpl(getMinHorizontalAmplitude(), getMaxHorizontalAmplitude(), UnitImpl.COUNT); //first draw the azimuth if one of the display is horizontal plane for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isHorizontalPlane()){ drawAzimuth(particleMotion, graphics2D); break; } } for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isSelected()) continue; drawParticleMotion(particleMotion, graphics2D); }//end of for for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isSelected()) { particleMotion.setSelected(false); drawParticleMotion(particleMotion, g); } } }
|
public synchronized void paintComponent(Graphics g) { if(displayKeys.size() == 0) return; Graphics2D graphics2D = (Graphics2D)g; vunitRangeImpl = new UnitRangeImpl(getMinVerticalAmplitude(), getMaxVerticalAmplitude(), UnitImpl.COUNT); hunitRangeImpl = new UnitRangeImpl(getMinHorizontalAmplitude(), getMaxHorizontalAmplitude(), UnitImpl.COUNT); //first draw the azimuth if one of the display is horizontal plane for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isHorizontalPlane()){ drawAzimuth(particleMotion, graphics2D); break; } } for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isSelected()) continue; drawParticleMotion(particleMotion, graphics2D); }//end of for for(int counter = 0; counter < displays.size(); counter++) { ParticleMotion particleMotion = (ParticleMotion)displays.get(counter); if(!displayKeys.contains(particleMotion.key)) continue; if(particleMotion.isSelected()) { particleMotion.setSelected(false); drawParticleMotion(particleMotion, g); } } }
| 1,117,817
|
public synchronized void resize() { setSize(super.getSize()); recalculateValues = true; repaint(); }
|
public synchronized void resize() { setSize(super.getSize()); repaint(); }
| 1,117,818
|
public void setDisplayKey(String key) { this.displayKey = key; }
|
public void setDisplayKey(String key) { displayKey = key; }
| 1,117,819
|
public synchronized void updateTime() { hunitRangeImpl = new UnitRangeImpl(getMinHorizontalAmplitude(), getMaxHorizontalAmplitude(), UnitImpl.COUNT); vunitRangeImpl = new UnitRangeImpl(getMinVerticalAmplitude(), getMaxVerticalAmplitude(), UnitImpl.COUNT); particleMotionDisplay.updateHorizontalAmpScale(hunitRangeImpl); particleMotionDisplay.updateVerticalAmpScale(vunitRangeImpl); }
|
public synchronized void updateTime() { hunitRangeImpl = new UnitRangeImpl(getMinHorizontalAmplitude(), getMaxHorizontalAmplitude(), UnitImpl.COUNT); vunitRangeImpl = new UnitRangeImpl(getMinVerticalAmplitude(), getMaxVerticalAmplitude(), UnitImpl.COUNT); particleMotionDisplay.updateHorizontalAmpScale(hunitRangeImpl); particleMotionDisplay.updateVerticalAmpScale(vunitRangeImpl); }
| 1,117,820
|
public void addSeisDataChangeListener(SeisDataChangeListener dataListener) { dssDataListeners.add(dataListener); }
|
public void addSeisDataChangeListener(SeisDataChangeListener dataListener) { synchronized(dssDataListeners){ dssDataListeners.add(dataListener); } }
| 1,117,821
|
public boolean mouseClicked(MouseEvent e){ if (currentPopup != null){ currentPopup.setVisible(false); currentPopup = null; } synchronized(circles){ Iterator it = circles.iterator(); List eventsUnderMouse = new ArrayList(); while(it.hasNext()){ OMEvent current = (OMEvent)it.next(); if(current.getBigCircle().contains(e.getX(), e.getY())){ eventsUnderMouse.add(current.getEvent()); } } if (eventsUnderMouse.size() > 0){ if (eventsUnderMouse.size() == 1){ selectEvent((EventAccessOperations)eventsUnderMouse.get(0)); } else{ final JPopupMenu popup = new JPopupMenu(); it = eventsUnderMouse.iterator(); while (it.hasNext()){ final EventAccessOperations current = (EventAccessOperations)it.next(); final JMenuItem menuItem = new JMenuItem(CacheEvent.getEventInfo(current)); menuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { selectEvent(current); popup.setVisible(false); } }); menuItem.addMouseListener(new MouseAdapter(){ public void mouseEntered(MouseEvent e) { menuItem.setArmed(true); } public void mouseExited(MouseEvent e) { menuItem.setArmed(false); } }); popup.add(menuItem); } 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; } return true; } } return false; }
|
public boolean mouseClicked(MouseEvent e){ if (currentPopup != null){ currentPopup.setVisible(false); currentPopup = null; } synchronized(circles){ Iterator it = circles.iterator(); List eventsUnderMouse = new ArrayList(); while(it.hasNext()){ OMEvent current = (OMEvent)it.next(); if(current.getBigCircle().contains(e.getX(), e.getY())){ eventsUnderMouse.add(current.getEvent()); } } if (eventsUnderMouse.size() > 0){ if (eventsUnderMouse.size() == 1){ selectEvent((EventAccessOperations)eventsUnderMouse.get(0)); } else{ final JPopupMenu popup = new JPopupMenu(); it = eventsUnderMouse.iterator(); while (it.hasNext()){ final EventAccessOperations current = (EventAccessOperations)it.next(); final JMenuItem menuItem = new JMenuItem(CacheEvent.getEventInfo(current)); menuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { selectEvent(current); popup.setVisible(false); } }); menuItem.addMouseListener(new MouseAdapter(){ public void mouseEntered(MouseEvent e) { menuItem.setArmed(true); } public void mouseExited(MouseEvent e) { menuItem.setArmed(false); } }); popup.add(menuItem); } 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; } return true; } } return false; }
| 1,117,822
|
public static StationId getStationId(Element base) { //get the network_id NodeList network_id_node = XMLUtil.evalNodeList(base, "network_id"); NetworkId network_id = null; if(network_id_node != null && network_id_node.getLength() != 0) { network_id = XMLNetworkId.getNetworkId((Element)network_id_node.item(0)); } //get the station_code String station_code = XMLUtil.evalString(base, "network_code"); //get the begin_time NodeList begin_time_node = XMLUtil.evalNodeList(base, "begin_time"); edu.iris.Fissures.Time begin_time = new edu.iris.Fissures.Time(); if(begin_time_node != null && begin_time_node.getLength() != 0) { begin_time = XMLTime.getFissuresTime((Element)begin_time_node.item(0)); } return new StationId(network_id, station_code, begin_time); }
|
public static StationId getStationId(Element base) { //get the network_id NodeList network_id_node = XMLUtil.evalNodeList(base, "network_id"); NetworkId network_id = null; if(network_id_node != null && network_id_node.getLength() != 0) { network_id = XMLNetworkId.getNetworkId((Element)network_id_node.item(0)); } //get the station_code String station_code = XMLUtil.evalString(base, "station_code"); //get the begin_time NodeList begin_time_node = XMLUtil.evalNodeList(base, "begin_time"); edu.iris.Fissures.Time begin_time = new edu.iris.Fissures.Time(); if(begin_time_node != null && begin_time_node.getLength() != 0) { begin_time = XMLTime.getFissuresTime((Element)begin_time_node.item(0)); } return new StationId(network_id, station_code, begin_time); }
| 1,117,825
|
public abstract void fireAmpRangeEvent(AmpSyncEvent event);
|
public void fireAmpRangeEvent(AmpSyncEvent event){ double begin = event.getBegin(); double end = event.getEnd(); if(this.ampRange == null) { this.ampRange = new UnitRangeImpl(begin, end, UnitImpl.COUNT); } else { this.ampRange = new UnitRangeImpl(begin, end, UnitImpl.COUNT); } this.updateAmpSyncListeners(); }
| 1,117,826
|
public void addTab(IPanel panel) { int index = getTabCount(); String title = panel.getTitle(); Icon icon = panel.getIcon(); Component component = panel.getPanelInstance(); table.put(component, panel); if (title == null || title.length() == 0) { title = Messages.getString("TabBar.UNTITLED"); //$NON-NLS-1$ } super.insertTab(title, icon, component, title, index); setSelectedComponent(component); forwardFocusInWindow(); }
|
public void addTab(IPanel panel) { int index = getTabCount(); String title = panel.getTitle(); Icon icon = panel.getIcon(); Component component = panel.getPanelInstance(); if (title == null || title.length() == 0) { title = Messages.getString("TabBar.UNTITLED"); //$NON-NLS-1$ } super.insertTab(title, icon, component, title, index); setSelectedComponent(component); forwardFocusInWindow(); }
| 1,117,827
|
private String executeQueries(SQLQuery query, int numberOfRows, QueryToSQLBridge bridge, List executedSQLStatements, IWResourceBundle resourceBundle, IWContext iwc) throws RemoteException { QueryResult queryResult = bridge.executeQueries(query, numberOfRows, executedSQLStatements); // check if everything is fine if (queryResult == null || queryResult.isEmpty()) { // nothing to do return resourceBundle.getLocalizedString("ro_result_of_query_is_empty", "Result of query is empty"); } resultNumberOfRows = queryResult.getNumberOfRows(); // that means: if the user has set number of rows to 12 000 and the result contains 11 000 rows // nothing happens even if MAX_NUMBER_OF_ROWS_IN_RESULT is only set to 500 if (resultNumberOfRows > numberOfRows && resultNumberOfRows > QueryConstants.MAX_NUMBER_OF_ROWS_IN_RESULT) { String error = resourceBundle.getLocalizedString("ro_number_of_rows_in result _might_be_too_large", "Number of rows might be too large"); String rows = resourceBundle.getLocalizedString("ro_rows","rows"); StringBuffer buffer = new StringBuffer(error); buffer.append(": ").append(resultNumberOfRows).append(" ").append(rows); return buffer.toString(); } else { resultNumberOfRows = -1; } // get design JasperReportBusiness reportBusiness = getReportBusiness(); DesignBox designBox = getDesignBox(query, reportBusiness, resourceBundle, iwc); // synchronize design and result Map designParameters = new HashMap(); designParameters.put(REPORT_HEADLINE_KEY, query.getName()); JasperPrint print = reportBusiness.printSynchronizedReport(queryResult, designParameters, designBox); if (print == null) { return resourceBundle.getLocalizedString("ro_could_not_use_layout", "Layout can't be used"); } // create html report String uri; if (PDF_KEY.equals(outputFormat)) { uri = reportBusiness.getPdfReport(print, "report"); } else if (EXCEL_KEY.equals(outputFormat)) { uri = reportBusiness.getExcelReport(print, "report"); } else { uri = reportBusiness.getHtmlReport(print, "report"); } Page parentPage = getParentPage(); if("true".equals(getBundle(iwc).getProperty(ADD_QUERY_SQL_FOR_DEBUG,"false"))){ addExecutedSQLQueries(executedSQLStatements); add(new Text("ADD_QUERY_SQL_FOR_DEBUG is true, result is shown in pop up window!")); parentPage.setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); } else { parentPage.setToRedirect(uri); } // open an extra window with scrollbars //getParentPage().setOnLoad("window.open('" + uri + "' , 'newWin', 'width=600,height=400,scrollbars=yes')"); //openwindow(Address,Name,ToolBar,Location,Directories,Status,Menubar,Titlebar,Scrollbars,Resizable,Width,Height) //getParentPage().setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); return null; }
|
private String executeQueries(SQLQuery query, int numberOfRows, QueryToSQLBridge bridge, List executedSQLStatements, IWResourceBundle resourceBundle, IWContext iwc) throws RemoteException { QueryResult queryResult = bridge.executeQueries(query, numberOfRows, executedSQLStatements); // check if everything is fine if (queryResult == null || queryResult.isEmpty()) { // nothing to do return resourceBundle.getLocalizedString("ro_result_of_query_is_empty", "Result of query is empty"); } resultNumberOfRows = queryResult.getNumberOfRows(); // that means: if the user has set number of rows to 12 000 and the result contains 11 000 rows // nothing happens even if MAX_NUMBER_OF_ROWS_IN_RESULT is only set to 500 if (resultNumberOfRows > numberOfRows && resultNumberOfRows > QueryConstants.MAX_NUMBER_OF_ROWS_IN_RESULT) { String error = resourceBundle.getLocalizedString("ro_number_of_rows_in result _might_be_too_large", "Number of rows might be too large"); String rows = resourceBundle.getLocalizedString("ro_rows","rows"); StringBuffer buffer = new StringBuffer(error); buffer.append(": ").append(resultNumberOfRows).append(" ").append(rows); return buffer.toString(); } else { resultNumberOfRows = -1; } // get design JasperReportBusiness reportBusiness = getReportBusiness(); DesignBox designBox = getDesignBox(query, reportBusiness, resourceBundle, iwc); // synchronize design and result Map designParameters = new HashMap(); designParameters.put(REPORT_HEADLINE_KEY, query.getName()); JasperPrint print = reportBusiness.printSynchronizedReport(queryResult, designParameters, designBox); if (print == null) { return resourceBundle.getLocalizedString("ro_could_not_use_layout", "Layout can't be used"); } // create html report String uri; if (PDF_KEY.equals(outputFormat)) { uri = reportBusiness.getPdfReport(print, "report"); } else if (EXCEL_KEY.equals(outputFormat)) { uri = reportBusiness.getExcelReport(print, "report"); } else { uri = reportBusiness.getHtmlReport(print, "report"); } Page parentPage = getParentPage(); if("true".equals(getBundle(iwc).getProperty(ADD_QUERY_SQL_FOR_DEBUG,"false"))){ addExecutedSQLQueries(executedSQLStatements); add(new Text("ADD_QUERY_SQL_FOR_DEBUG is true, result is shown in pop up window!")); parentPage.setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); } else { parentPage.setToRedirect(uri); } // open an extra window with scrollbars //getParentPage().setOnLoad("window.open('" + uri + "' , 'newWin', 'width=600,height=400,scrollbars=yes')"); //openwindow(Address,Name,ToolBar,Location,Directories,Status,Menubar,Titlebar,Scrollbars,Resizable,Width,Height) //getParentPage().setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); return null; }
| 1,117,830
|
private String executeQueries(SQLQuery query, int numberOfRows, QueryToSQLBridge bridge, List executedSQLStatements, IWResourceBundle resourceBundle, IWContext iwc) throws RemoteException { QueryResult queryResult = bridge.executeQueries(query, numberOfRows, executedSQLStatements); // check if everything is fine if (queryResult == null || queryResult.isEmpty()) { // nothing to do return resourceBundle.getLocalizedString("ro_result_of_query_is_empty", "Result of query is empty"); } resultNumberOfRows = queryResult.getNumberOfRows(); // that means: if the user has set number of rows to 12 000 and the result contains 11 000 rows // nothing happens even if MAX_NUMBER_OF_ROWS_IN_RESULT is only set to 500 if (resultNumberOfRows > numberOfRows && resultNumberOfRows > QueryConstants.MAX_NUMBER_OF_ROWS_IN_RESULT) { String error = resourceBundle.getLocalizedString("ro_number_of_rows_in result _might_be_too_large", "Number of rows might be too large"); String rows = resourceBundle.getLocalizedString("ro_rows","rows"); StringBuffer buffer = new StringBuffer(error); buffer.append(": ").append(resultNumberOfRows).append(" ").append(rows); return buffer.toString(); } else { resultNumberOfRows = -1; } // get design JasperReportBusiness reportBusiness = getReportBusiness(); DesignBox designBox = getDesignBox(query, reportBusiness, resourceBundle, iwc); // synchronize design and result Map designParameters = new HashMap(); designParameters.put(REPORT_HEADLINE_KEY, query.getName()); JasperPrint print = reportBusiness.printSynchronizedReport(queryResult, designParameters, designBox); if (print == null) { return resourceBundle.getLocalizedString("ro_could_not_use_layout", "Layout can't be used"); } // create html report String uri; if (PDF_KEY.equals(outputFormat)) { uri = reportBusiness.getPdfReport(print, "report"); } else if (EXCEL_KEY.equals(outputFormat)) { uri = reportBusiness.getExcelReport(print, "report"); } else { uri = reportBusiness.getHtmlReport(print, "report"); } Page parentPage = getParentPage(); if("true".equals(getBundle(iwc).getProperty(ADD_QUERY_SQL_FOR_DEBUG,"false"))){ addExecutedSQLQueries(executedSQLStatements); add(new Text("ADD_QUERY_SQL_FOR_DEBUG is true, result is shown in pop up window!")); parentPage.setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); } else { parentPage.setToRedirect(uri); } // open an extra window with scrollbars //getParentPage().setOnLoad("window.open('" + uri + "' , 'newWin', 'width=600,height=400,scrollbars=yes')"); //openwindow(Address,Name,ToolBar,Location,Directories,Status,Menubar,Titlebar,Scrollbars,Resizable,Width,Height) //getParentPage().setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); return null; }
|
private String executeQueries(SQLQuery query, int numberOfRows, QueryToSQLBridge bridge, List executedSQLStatements, IWResourceBundle resourceBundle, IWContext iwc) throws RemoteException { QueryResult queryResult = bridge.executeQueries(query, numberOfRows, executedSQLStatements); // check if everything is fine if (queryResult == null || queryResult.isEmpty()) { // nothing to do return resourceBundle.getLocalizedString("ro_result_of_query_is_empty", "Result of query is empty"); } resultNumberOfRows = queryResult.getNumberOfRows(); // that means: if the user has set number of rows to 12 000 and the result contains 11 000 rows // nothing happens even if MAX_NUMBER_OF_ROWS_IN_RESULT is only set to 500 if (resultNumberOfRows > numberOfRows && resultNumberOfRows > QueryConstants.MAX_NUMBER_OF_ROWS_IN_RESULT) { String error = resourceBundle.getLocalizedString("ro_number_of_rows_in result _might_be_too_large", "Number of rows might be too large"); String rows = resourceBundle.getLocalizedString("ro_rows","rows"); StringBuffer buffer = new StringBuffer(error); buffer.append(": ").append(resultNumberOfRows).append(" ").append(rows); return buffer.toString(); } else { resultNumberOfRows = -1; } // get design JasperReportBusiness reportBusiness = getReportBusiness(); DesignBox designBox = getDesignBox(query, reportBusiness, resourceBundle, iwc); // synchronize design and result Map designParameters = new HashMap(); designParameters.put(REPORT_HEADLINE_KEY, query.getName()); JasperPrint print = reportBusiness.printSynchronizedReport(queryResult, designParameters, designBox); if (print == null) { return resourceBundle.getLocalizedString("ro_could_not_use_layout", "Layout can't be used"); } // create html report String uri; if (PDF_KEY.equals(outputFormat)) { uri = reportBusiness.getPdfReport(print, "report"); } else if (EXCEL_KEY.equals(outputFormat)) { uri = reportBusiness.getExcelReport(print, "report"); } else { uri = reportBusiness.getHtmlReport(print, "report"); } Page parentPage = getParentPage(); if("true".equals(getBundle(iwc).getProperty(ADD_QUERY_SQL_FOR_DEBUG,"false"))){ addExecutedSQLQueries(executedSQLStatements); add(new Text("ADD_QUERY_SQL_FOR_DEBUG is true, result is shown in pop up window!")); parentPage.setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); } else { parentPage.setToRedirect(uri); } // open an extra window with scrollbars //getParentPage().setOnLoad("window.open('" + uri + "' , 'newWin', 'width=600,height=400,scrollbars=yes')"); //openwindow(Address,Name,ToolBar,Location,Directories,Status,Menubar,Titlebar,Scrollbars,Resizable,Width,Height) //getParentPage().setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); return null; }
| 1,117,831
|
private String executeQueries(SQLQuery query, int numberOfRows, QueryToSQLBridge bridge, List executedSQLStatements, IWResourceBundle resourceBundle, IWContext iwc) throws RemoteException { QueryResult queryResult = bridge.executeQueries(query, numberOfRows, executedSQLStatements); // check if everything is fine if (queryResult == null || queryResult.isEmpty()) { // nothing to do return resourceBundle.getLocalizedString("ro_result_of_query_is_empty", "Result of query is empty"); } resultNumberOfRows = queryResult.getNumberOfRows(); // that means: if the user has set number of rows to 12 000 and the result contains 11 000 rows // nothing happens even if MAX_NUMBER_OF_ROWS_IN_RESULT is only set to 500 if (resultNumberOfRows > numberOfRows && resultNumberOfRows > QueryConstants.MAX_NUMBER_OF_ROWS_IN_RESULT) { String error = resourceBundle.getLocalizedString("ro_number_of_rows_in result _might_be_too_large", "Number of rows might be too large"); String rows = resourceBundle.getLocalizedString("ro_rows","rows"); StringBuffer buffer = new StringBuffer(error); buffer.append(": ").append(resultNumberOfRows).append(" ").append(rows); return buffer.toString(); } else { resultNumberOfRows = -1; } // get design JasperReportBusiness reportBusiness = getReportBusiness(); DesignBox designBox = getDesignBox(query, reportBusiness, resourceBundle, iwc); // synchronize design and result Map designParameters = new HashMap(); designParameters.put(REPORT_HEADLINE_KEY, query.getName()); JasperPrint print = reportBusiness.printSynchronizedReport(queryResult, designParameters, designBox); if (print == null) { return resourceBundle.getLocalizedString("ro_could_not_use_layout", "Layout can't be used"); } // create html report String uri; if (PDF_KEY.equals(outputFormat)) { uri = reportBusiness.getPdfReport(print, "report"); } else if (EXCEL_KEY.equals(outputFormat)) { uri = reportBusiness.getExcelReport(print, "report"); } else { uri = reportBusiness.getHtmlReport(print, "report"); } Page parentPage = getParentPage(); if("true".equals(getBundle(iwc).getProperty(ADD_QUERY_SQL_FOR_DEBUG,"false"))){ addExecutedSQLQueries(executedSQLStatements); add(new Text("ADD_QUERY_SQL_FOR_DEBUG is true, result is shown in pop up window!")); parentPage.setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); } else { parentPage.setToRedirect(uri); } // open an extra window with scrollbars //getParentPage().setOnLoad("window.open('" + uri + "' , 'newWin', 'width=600,height=400,scrollbars=yes')"); //openwindow(Address,Name,ToolBar,Location,Directories,Status,Menubar,Titlebar,Scrollbars,Resizable,Width,Height) //getParentPage().setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); return null; }
|
private String executeQueries(SQLQuery query, int numberOfRows, QueryToSQLBridge bridge, List executedSQLStatements, IWResourceBundle resourceBundle, IWContext iwc) throws RemoteException { QueryResult queryResult = bridge.executeQueries(query, numberOfRows, executedSQLStatements); // check if everything is fine if (queryResult == null || queryResult.isEmpty()) { // nothing to do return resourceBundle.getLocalizedString("ro_result_of_query_is_empty", "Result of query is empty"); } resultNumberOfRows = queryResult.getNumberOfRows(); // that means: if the user has set number of rows to 12 000 and the result contains 11 000 rows // nothing happens even if MAX_NUMBER_OF_ROWS_IN_RESULT is only set to 500 if (resultNumberOfRows > numberOfRows && resultNumberOfRows > QueryConstants.MAX_NUMBER_OF_ROWS_IN_RESULT) { String error = resourceBundle.getLocalizedString("ro_number_of_rows_in result _might_be_too_large", "Number of rows might be too large"); String rows = resourceBundle.getLocalizedString("ro_rows","rows"); StringBuffer buffer = new StringBuffer(error); buffer.append(": ").append(resultNumberOfRows).append(" ").append(rows); return buffer.toString(); } else { resultNumberOfRows = -1; } // get design JasperReportBusiness reportBusiness = getReportBusiness(); DesignBox designBox = getDesignBox(query, reportBusiness, resourceBundle, iwc); // synchronize design and result Map designParameters = new HashMap(); designParameters.put(REPORT_HEADLINE_KEY, query.getName()); JasperPrint print = reportBusiness.printSynchronizedReport(queryResult, designParameters, designBox); if (print == null) { return resourceBundle.getLocalizedString("ro_could_not_use_layout", "Layout can't be used"); } // create html report String uri; if (PDF_KEY.equals(outputFormat)) { uri = reportBusiness.getPdfReport(print, "report"); } else if (EXCEL_KEY.equals(outputFormat)) { uri = reportBusiness.getExcelReport(print, "report"); } else { uri = reportBusiness.getHtmlReport(print, "report"); } Page parentPage = getParentPage(); if("true".equals(getBundle(iwc).getProperty(ADD_QUERY_SQL_FOR_DEBUG,"false"))){ addExecutedSQLQueries(executedSQLStatements); add(new Text("ADD_QUERY_SQL_FOR_DEBUG is true, result is shown in pop up window!")); parentPage.setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); } else { parentPage.setToRedirect(uri); } // open an extra window with scrollbars //getParentPage().setOnLoad("window.open('" + uri + "' , 'newWin', 'width=600,height=400,scrollbars=yes')"); //openwindow(Address,Name,ToolBar,Location,Directories,Status,Menubar,Titlebar,Scrollbars,Resizable,Width,Height) //getParentPage().setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); return null; }
| 1,117,832
|
private DesignBox getDesignBox(SQLQuery query, JasperReportBusiness reportBusiness, IWResourceBundle resourceBundle, IWContext iwc) { DesignBox design = null; try { if (designId > 0) { design = reportBusiness.getDesignBox(designId); } else { design = reportBusiness.getDynamicDesignBox(query, resourceBundle, iwc); } } catch (IOException ioEx) { logError("[ReportQueryOverview] Couldn't retrieve design."); log(ioEx); } catch (JRException jrEx) { logError("[ReportQueryOverview] Couldn't retrieve design."); log(jrEx); } return design; }
|
private DesignBox getDesignBox(SQLQuery sqlQuery, JasperReportBusiness reportBusiness, IWResourceBundle resourceBundle, IWContext iwc) { DesignBox design = null; try { if (designId > 0) { design = reportBusiness.getDesignBox(designId); } else { design = reportBusiness.getDynamicDesignBox(query, resourceBundle, iwc); } } catch (IOException ioEx) { logError("[ReportQueryOverview] Couldn't retrieve design."); log(ioEx); } catch (JRException jrEx) { logError("[ReportQueryOverview] Couldn't retrieve design."); log(jrEx); } return design; }
| 1,117,833
|
private DesignBox getDesignBox(SQLQuery query, JasperReportBusiness reportBusiness, IWResourceBundle resourceBundle, IWContext iwc) { DesignBox design = null; try { if (designId > 0) { design = reportBusiness.getDesignBox(designId); } else { design = reportBusiness.getDynamicDesignBox(query, resourceBundle, iwc); } } catch (IOException ioEx) { logError("[ReportQueryOverview] Couldn't retrieve design."); log(ioEx); } catch (JRException jrEx) { logError("[ReportQueryOverview] Couldn't retrieve design."); log(jrEx); } return design; }
|
private DesignBox getDesignBox(SQLQuery query, JasperReportBusiness reportBusiness, IWResourceBundle resourceBundle, IWContext iwc) { DesignBox design = null; try { if (designId > 0) { design = reportBusiness.getDesignBox(designId); } else { design = reportBusiness.getDynamicDesignBox(sqlQuery, resourceBundle, iwc); } } catch (IOException ioEx) { logError("[ReportQueryOverview] Couldn't retrieve design."); log(ioEx); } catch (JRException jrEx) { logError("[ReportQueryOverview] Couldn't retrieve design."); log(jrEx); } return design; }
| 1,117,834
|
private Map getModifiedIdentiferValueMapByParsingRequest(Map identifierValueMap, IWContext iwc) { Map result = new HashMap(); Iterator iterator = identifierValueMap.keySet().iterator(); while (iterator.hasNext()) { String key = (String) iterator.next(); if (iwc.isParameterSet(key)) { String[] value = iwc.getParameterValues(key); // change to collection-based API result.put(key, Arrays.asList(value)); } else { result.put(key, ""); } } return result; }
|
private Map getModifiedIdentiferValueMapByParsingRequest(Map identifierValueMap, IWContext iwc) { Map result = new HashMap(); Iterator iterator = identifierValueMap.keySet().iterator(); while (iterator.hasNext()) { String key = (String) iterator.next(); if (iwc.isParameterSet(key)) { String[] value = iwc.getParameterValues(key); // change to collection-based API result.put(key, Arrays.asList(value)); } else { result.put(key, ""); } } return result; }
| 1,117,835
|
private void showInputFields(SQLQuery query, Map identifierValueMap, Map identifierInputDescriptionMap, IWResourceBundle resourceBundle, IWContext iwc) { String name = query.getName(); String description = query.getQueryDescription(); PresentationObject presentationObject = getInputFields(name, description, identifierValueMap, identifierInputDescriptionMap, resourceBundle, iwc); Form form = new Form(); form.addParameter(QUERY_ID_KEY, Integer.toString(queryId)); form.addParameter(DESIGN_ID_KEY, Integer.toString(designId)); form.addParameter(OUTPUT_FORMAT_KEY, outputFormat); form.add(presentationObject); add(form); }
|
private void showInputFields(SQLQuery query, Map identifierValueMap, Map identifierInputDescriptionMap, IWResourceBundle resourceBundle, IWContext iwc) { String name = query.getName(); String description = query.getQueryDescription(); PresentationObject presentationObject = getInputFields(name, description, identifierValueMap, identifierInputDescriptionMap, resourceBundle, iwc); Form form = new Form(); form.addParameter(QUERY_ID_KEY, Integer.toString(queryId)); form.addParameter(DESIGN_ID_KEY, Integer.toString(designId)); form.addParameter(OUTPUT_FORMAT_KEY, outputFormat); form.add(presentationObject); add(form); }
| 1,117,836
|
public ParticleMotionDisplay(DataSetSeismogram hseis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, Color color, boolean advancedOption) { JFrame displayFrame = new JFrame(); JPanel informationPanel = new JPanel(); String message = " Please Wait ....For the Particle Motion Window"; JLabel jLabel = new JLabel(message); JTextArea textArea = new JTextArea(); informationPanel.setLayout(new BorderLayout()); informationPanel.add(textArea, BorderLayout.CENTER); informationPanel.setSize(new java.awt.Dimension(500, 300)); displayFrame.getContentPane().add(informationPanel); displayFrame.setSize(new java.awt.Dimension(500, 300)); displayFrame.pack(); displayFrame.show(); try { Thread.sleep(5000); }catch(Exception e) {} createGUI(timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar); ParticleMotionDisplayThread t = new ParticleMotionDisplayThread(hseis, timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar, advancedOption, true, this); t.execute(); displayFrame.dispose(); }
|
public ParticleMotionDisplay(DataSetSeismogram hseis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, Color color, boolean advancedOption) { JFrame displayFrame = new JFrame(); JPanel informationPanel = new JPanel(); String message = " Please Wait ....For the Particle Motion Window"; JLabel jLabel = new JLabel(message); JTextArea textArea = new JTextArea("LKJDLKJFDJFLKDJFLKDJFKLDJFLKDJFKLDJLKJDFL", 80,40); textArea.setVisible(true); informationPanel.setLayout(new BorderLayout()); informationPanel.add(textArea, BorderLayout.CENTER); informationPanel.setSize(new java.awt.Dimension(500, 300)); displayFrame.getContentPane().add(informationPanel); displayFrame.setSize(new java.awt.Dimension(500, 300)); displayFrame.pack(); displayFrame.show(); try { Thread.sleep(5000); }catch(Exception e) {} createGUI(timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar); ParticleMotionDisplayThread t = new ParticleMotionDisplayThread(hseis, timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar, advancedOption, true, this); t.execute(); displayFrame.dispose(); }
| 1,117,837
|
public ParticleMotionDisplay(DataSetSeismogram hseis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, Color color, boolean advancedOption) { JFrame displayFrame = new JFrame(); JPanel informationPanel = new JPanel(); String message = " Please Wait ....For the Particle Motion Window"; JLabel jLabel = new JLabel(message); JTextArea textArea = new JTextArea(); informationPanel.setLayout(new BorderLayout()); informationPanel.add(textArea, BorderLayout.CENTER); informationPanel.setSize(new java.awt.Dimension(500, 300)); displayFrame.getContentPane().add(informationPanel); displayFrame.setSize(new java.awt.Dimension(500, 300)); displayFrame.pack(); displayFrame.show(); try { Thread.sleep(5000); }catch(Exception e) {} createGUI(timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar); ParticleMotionDisplayThread t = new ParticleMotionDisplayThread(hseis, timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar, advancedOption, true, this); t.execute(); displayFrame.dispose(); }
|
public ParticleMotionDisplay(DataSetSeismogram hseis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, Color color, boolean advancedOption) { JFrame displayFrame = new JFrame(); JPanel informationPanel = new JPanel(); String message = " Please Wait ....For the Particle Motion Window"; JLabel jLabel = new JLabel(message); JTextArea textArea = new JTextArea(); informationPanel.setLayout(new BorderLayout()); informationPanel.add(textArea, BorderLayout.CENTER); informationPanel.setSize(new java.awt.Dimension(500, 300)); displayFrame.getContentPane().setLayout(new BorderLayout()); displayFrame.getContentPane().add(jLabel, BorderLayout.CENTER); displayFrame.setSize(new java.awt.Dimension(500, 300)); displayFrame.pack(); displayFrame.show(); try { Thread.sleep(5000); }catch(Exception e) {} createGUI(timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar); ParticleMotionDisplayThread t = new ParticleMotionDisplayThread(hseis, timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar, advancedOption, true, this); t.execute(); displayFrame.dispose(); }
| 1,117,838
|
public ParticleMotionDisplay(DataSetSeismogram hseis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, Color color, boolean advancedOption) { JFrame displayFrame = new JFrame(); JPanel informationPanel = new JPanel(); String message = " Please Wait ....For the Particle Motion Window"; JLabel jLabel = new JLabel(message); JTextArea textArea = new JTextArea(); informationPanel.setLayout(new BorderLayout()); informationPanel.add(textArea, BorderLayout.CENTER); informationPanel.setSize(new java.awt.Dimension(500, 300)); displayFrame.getContentPane().add(informationPanel); displayFrame.setSize(new java.awt.Dimension(500, 300)); displayFrame.pack(); displayFrame.show(); try { Thread.sleep(5000); }catch(Exception e) {} createGUI(timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar); ParticleMotionDisplayThread t = new ParticleMotionDisplayThread(hseis, timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar, advancedOption, true, this); t.execute(); displayFrame.dispose(); }
|
public ParticleMotionDisplay(DataSetSeismogram hseis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, Color color, boolean advancedOption) { JFrame displayFrame = new JFrame(); JPanel informationPanel = new JPanel(); String message = " Please Wait ....For the Particle Motion Window"; JLabel jLabel = new JLabel(message); JTextArea textArea = new JTextArea(); informationPanel.setLayout(new BorderLayout()); informationPanel.add(textArea, BorderLayout.CENTER); informationPanel.setSize(new java.awt.Dimension(500, 300)); displayFrame.getContentPane().add(informationPanel); displayFrame.setSize(new java.awt.Dimension(500, 300)); displayFrame.pack(); displayFrame.show(); try { Thread.sleep(5000); }catch(Exception e) {} createGUI(timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar); ParticleMotionDisplayThread t = new ParticleMotionDisplayThread(hseis, timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar, advancedOption, true, this); t.execute(); displayFrame.dispose(); }
| 1,117,839
|
public void initializeAttributes() { addAttribute(getIDColumnName()); addAttribute(getAuthorisationAmountColumnName(), "", true, true, java.lang.String.class, 20); addAttribute(getAuthorisationCurrencyColumnName(), "", true, true, java.lang.String.class, 6); addAttribute(getAuthorisationCodeColumnName(), "", true, true, java.lang.String.class, 3); addAttribute(getAuthorisationIdRspColumnName(), "", true, true, java.lang.String.class, 10); addAttribute(getAuthorisationPathReasonCodeColumnName(), "", true, true, java.lang.String.class, 5); addAttribute(getBatchNumberColumnName(), "", true, true, java.lang.String.class, 5); addAttribute(getBrandIdColumnName(), "", true, true, java.lang.String.class, 20); addAttribute(getBrandNameColumnName(), "", true, true, java.lang.String.class, 20); addAttribute(getCardCharacteristicsColumnName(), "", true, true, java.lang.String.class, 5); addAttribute(getCardTypeColumnName(), "", true, true, java.lang.String.class, 10); addAttribute(getCardNameColumnName(), "", true, true, java.lang.String.class, 20); addAttribute(getEntryDateColumnName(), "", true, true, java.lang.String.class, 6); addAttribute(getDetailExpectedColumnName(), "", true, true, java.lang.String.class); addAttribute(getErrorNoColumnName(), "", true, true, java.lang.String.class, 10); addAttribute(getErrorTextColumnName(), "", true, true, java.lang.String.class); addAttribute(getCardExpiresColumnName(), "", true, true, java.lang.String.class, 4); addAttribute(getLocationNrColumnName(), "", true, true, java.lang.String.class, 10); addAttribute(getMerchantNrAuthorisationColumnName(), "", true, true, java.lang.String.class, 10); addAttribute(getMerchantNrOtherServicesColumnName(), "", true, true, java.lang.String.class, 10); addAttribute(getMerchantNrSubmissionColumnName(), "", true, true, java.lang.String.class, 20); addAttribute(getAttachmentCountColumnName(), "", true, true, java.lang.String.class); addAttribute(getPanColumnName(), "", true, true, java.lang.String.class); addAttribute(getPosNrColumnName(), "", true, true, java.lang.String.class, 20); addAttribute(getPosSerialNrColumnName(), "", true, true, java.lang.String.class, 20); addAttribute(getPrintDataColumnName(), "", true, true, java.lang.String.class); addAttribute(getSubmissionAmountColumnName(), "", true, true, java.lang.String.class, 10); addAttribute(getSubmissionCurrencyColumnName(), "", true, true, java.lang.String.class, 5); addAttribute(getEntryTimeColumnName(), "", true, true, java.lang.String.class, 6); addAttribute(getTotalResponseCodeColumnName(), "", true, true, java.lang.String.class, 6); addAttribute(getTransactionNrColumnName(), "", true, true, java.lang.String.class, 6); addAttribute(getVoidedAuthorisationIdResponseColumnName(), "", true, true, java.lang.String.class); addAttribute(getVoidedTransactionNrColumnName(), "", true, true, java.lang.String.class); addAttribute(getXMLAttachmentColumnName(), "", true, true, java.lang.String.class); addAttribute(CARD_NUMBER, "card_number", true, true, String.class, 50); this.addOneToOneRelationship(PARENT_ID, TPosAuthorisationEntriesBean.class); }
|
public void initializeAttributes() { addAttribute(getIDColumnName()); addAttribute(getAuthorisationAmountColumnName(), "", true, true, java.lang.String.class, 20); addAttribute(getAuthorisationCurrencyColumnName(), "", true, true, java.lang.String.class, 6); addAttribute(getAuthorisationCodeColumnName(), "", true, true, java.lang.String.class, 3); addAttribute(getAuthorisationIdRspColumnName(), "", true, true, java.lang.String.class, 10); addAttribute(getAuthorisationPathReasonCodeColumnName(), "", true, true, java.lang.String.class, 5); addAttribute(getBatchNumberColumnName(), "", true, true, java.lang.String.class, 5); addAttribute(getBrandIdColumnName(), "", true, true, java.lang.String.class, 20); addAttribute(getBrandNameColumnName(), "", true, true, java.lang.String.class, 20); addAttribute(getCardCharacteristicsColumnName(), "", true, true, java.lang.String.class, 5); addAttribute(getCardTypeColumnName(), "", true, true, java.lang.String.class, 10); addAttribute(getCardNameColumnName(), "", true, true, java.lang.String.class, 20); addAttribute(getEntryDateColumnName(), "", true, true, java.lang.String.class, 8); addAttribute(getDetailExpectedColumnName(), "", true, true, java.lang.String.class); addAttribute(getErrorNoColumnName(), "", true, true, java.lang.String.class, 10); addAttribute(getErrorTextColumnName(), "", true, true, java.lang.String.class); addAttribute(getCardExpiresColumnName(), "", true, true, java.lang.String.class, 4); addAttribute(getLocationNrColumnName(), "", true, true, java.lang.String.class, 10); addAttribute(getMerchantNrAuthorisationColumnName(), "", true, true, java.lang.String.class, 10); addAttribute(getMerchantNrOtherServicesColumnName(), "", true, true, java.lang.String.class, 10); addAttribute(getMerchantNrSubmissionColumnName(), "", true, true, java.lang.String.class, 20); addAttribute(getAttachmentCountColumnName(), "", true, true, java.lang.String.class); addAttribute(getPanColumnName(), "", true, true, java.lang.String.class); addAttribute(getPosNrColumnName(), "", true, true, java.lang.String.class, 20); addAttribute(getPosSerialNrColumnName(), "", true, true, java.lang.String.class, 20); addAttribute(getPrintDataColumnName(), "", true, true, java.lang.String.class); addAttribute(getSubmissionAmountColumnName(), "", true, true, java.lang.String.class, 10); addAttribute(getSubmissionCurrencyColumnName(), "", true, true, java.lang.String.class, 5); addAttribute(getEntryTimeColumnName(), "", true, true, java.lang.String.class, 6); addAttribute(getTotalResponseCodeColumnName(), "", true, true, java.lang.String.class, 6); addAttribute(getTransactionNrColumnName(), "", true, true, java.lang.String.class, 6); addAttribute(getVoidedAuthorisationIdResponseColumnName(), "", true, true, java.lang.String.class); addAttribute(getVoidedTransactionNrColumnName(), "", true, true, java.lang.String.class); addAttribute(getXMLAttachmentColumnName(), "", true, true, java.lang.String.class); addAttribute(CARD_NUMBER, "card_number", true, true, String.class, 50); this.addOneToOneRelationship(PARENT_ID, TPosAuthorisationEntriesBean.class); }
| 1,117,842
|
public synchronized void resize() { if(getSize().width == 0 || getSize().height == 0) return; Dimension dim = view.getSize(); logger.debug("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! IN RESIZE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); logger.debug("view coordinates before width = "+view.getSize().width+" height = "+view.getSize().height); Insets insets = view.getInsets(); int width = particleDisplayPanel.getSize().width; int height = particleDisplayPanel.getSize().height; width = width - particleDisplayPanel.getInsets().left - particleDisplayPanel.getInsets().right; height = height - particleDisplayPanel.getInsets().top - particleDisplayPanel.getInsets().bottom; if(width < height) { logger.debug("Before particleDisplayPanel.setSize() "); //particleDisplayPanel = null; //particleDisplayPanel.getSize(); particleDisplayPanel.setSize(new Dimension(particleDisplayPanel.getSize().width, width + particleDisplayPanel.getInsets().top + particleDisplayPanel.getInsets().bottom)); logger.debug("After particleDisplayPanel. setSize()"); } else { logger.debug("Before particleDisplayPanel.setSize() "); particleDisplayPanel.setSize(new Dimension(height + particleDisplayPanel.getInsets().left + particleDisplayPanel.getInsets().right, particleDisplayPanel.getSize().height)); logger.debug("After particleDiplayPanel. setSize()"); } logger.debug("Before view .resize()##############################"); view.resize(); logger.debug("view coordinates are width = "+view.getSize().width+" height = "+view.getSize().height); logger.debug("view insets left = "+insets.left+" right = "+insets.right); logger.debug("view insets top = "+insets.top+" bottom = "+insets.bottom); logger.debug("display after width = "+getSize().width+" height = "+getSize().height); if(hAmpScaleMap != null) { hAmpScaleMap.setTotalPixels(dim.width - insets.left - insets.right); vAmpScaleMap.setTotalPixels(dim.height - insets.top - insets.bottom); } repaint(); }//
|
public synchronized void resize() { if(getSize().width == 0 || getSize().height == 0) return; Dimension dim = view.getSize(); logger.debug("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! IN RESIZE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); logger.debug("view coordinates before width = "+view.getSize().width+" height = "+view.getSize().height); Insets insets = view.getInsets(); int width = particleDisplayPanel.getSize().width; int height = particleDisplayPanel.getSize().height; width = width - particleDisplayPanel.getInsets().left - particleDisplayPanel.getInsets().right; height = height - particleDisplayPanel.getInsets().top - particleDisplayPanel.getInsets().bottom; if(width < height) { logger.debug("Before particleDisplayPanel.setSize() "); //particleDisplayPanel = null; //particleDisplayPanel.getSize(); particleDisplayPanel.setSize(new Dimension(particleDisplayPanel.getSize().width, width + particleDisplayPanel.getInsets().top + particleDisplayPanel.getInsets().bottom)); logger.debug("After particleDisplayPanel. setSize()"); } else { logger.debug("Before particleDisplayPanel.setSize() "); particleDisplayPanel.setSize(new Dimension(height + particleDisplayPanel.getInsets().left + particleDisplayPanel.getInsets().right, particleDisplayPanel.getSize().height)); logger.debug("After particleDiplayPanel. setSize()"); } logger.debug("Before view .resize()##############################"); view.resize(); logger.debug("view coordinates are width = "+view.getSize().width+" height = "+view.getSize().height); logger.debug("view insets left = "+insets.left+" right = "+insets.right); logger.debug("view insets top = "+insets.top+" bottom = "+insets.bottom); logger.debug("display after width = "+getSize().width+" height = "+getSize().height); if(hAmpScaleMap != null) { hAmpScaleMap.setTotalPixels(dim.width - insets.left - insets.right); vAmpScaleMap.setTotalPixels(dim.height - insets.top - insets.bottom); } repaint(); }//
| 1,117,843
|
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { CalSvcI svci = form.fetchSvci(); boolean alerts = form.getAlertEvent(); /** Check access and set request parameters */ if (alerts) { if (!form.getUserAuth().isAlertUser()) { return "noAccess"; } } else { if (!form.getAuthorisedUser()) { return "noAccess"; } } int eventid = form.getEventId(); if (debug) { log.debug("About to delete event " + eventid); } BwWebUtil.deleteEvent(form, svci.getEvent(eventid).getEvent()); form.getMsg().emit("org.bedework.client.message.event.deleted"); return "continue"; }
|
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { CalSvcI svci = form.fetchSvci(); boolean alerts = form.getAlertEvent(); /** Check access and set request parameters */ if (alerts) { if (!form.getUserAuth().isAlertUser()) { return "noAccess"; } } else { if (!form.getAuthorisedUser()) { return "noAccess"; } } int eventid = form.getEventId(); if (debug) { log.debug("About to delete event " + eventid); } BwEvent event = form.getEditEvent(); BwWebUtil.deleteEvent(form, event); form.getMsg().emit("org.bedework.client.message.event.deleted"); return "continue"; }
| 1,117,844
|
public Channel findCloseChannel(Channel newChannel, QuantityImpl distance) throws SQLException, NotFound { Channel[] channel = chanTable.getAllChannels(); for(int i = 0; i < channel.length; i++) { Location locationFromDatabase = channel[i].my_site.my_location; DistAz da = new DistAz(locationFromDatabase, newChannel.my_site.my_location); QuantityImpl siteDistance = new QuantityImpl(DistAz.degreesToKilometers(da.getDelta()), UnitImpl.KILOMETER); if(ChannelIdUtil.areEqualExceptForBeginTime(newChannel.get_id(), channel[i].get_id()) && siteDistance.lessThan(distance)) { return channel[i]; } } return null; }
|
public Channel findCloseChannel(Channel newChannel, QuantityImpl distance) throws SQLException, NotFound { Channel[] channel = chanTable.getAllChannels(); for(int i = 0; i < channel.length; i++) { Location locationFromDatabase = channel[i].my_site.my_location; DistAz da = new DistAz(locationFromDatabase, newChannel.my_site.my_location); QuantityImpl siteDistance = new QuantityImpl(DistAz.degreesToKilometers(da.getDelta()), UnitImpl.KILOMETER); if(ChannelIdUtil.areEqualExceptForBeginTime(newChannel.get_id(), channel[i].get_id()) && siteDistance.lessThan(distance)) { return channel[i]; } } return null; }
| 1,117,845
|
public void setChannelBeginTimeToEarliest(Channel channelFromDatabase, Channel newChannel) throws SQLException, NotFound{ MicroSecondDate newChannelBeginTime = new MicroSecondDate(newChannel.get_id().begin_time); MicroSecondDate channelFromDatabaseBeginTime = new MicroSecondDate(channelFromDatabase.get_id().begin_time); if(newChannelBeginTime.before(channelFromDatabaseBeginTime)){ updateChannelBeginTime.setInt(1, timeTable.put(newChannel.get_id().begin_time)); updateChannelBeginTime.setInt(2, chanTable.getDBId(channelFromDatabase.get_id())); updateChannelBeginTime.executeUpdate(); // Set the begin time of the channel ID from the database // to the earlier begin time, so when the channel is put // into the database, it matches the updated channel, and // does not create a new channel. channelFromDatabase.get_id().begin_time = newChannel.get_id().begin_time; } }
|
public void setChannelBeginTimeToEarliest(Channel channelFromDatabase, Channel newChannel) throws SQLException, NotFound{ MicroSecondDate newChannelBeginTime = new MicroSecondDate(newChannel.get_id().begin_time); MicroSecondDate channelFromDatabaseBeginTime = new MicroSecondDate(channelFromDatabase.get_id().begin_time); if(newChannelBeginTime.before(channelFromDatabaseBeginTime)){ updateChannelBeginTime.setInt(1, timeTable.put(newChannel.get_id().begin_time)); updateChannelBeginTime.setInt(2, chanTable.getDBId(channelFromDatabase.get_id())); updateChannelBeginTime.executeUpdate(); // Set the begin time of the channel ID from the database // to the earlier begin time, so when the channel is put // into the database, it matches the updated channel, and // does not create a new channel. channelFromDatabase.get_id().begin_time = newChannel.get_id().begin_time; } }
| 1,117,846
|
public OpenMap(ChannelChooser chooser, EventTableModel etm, ListSelectionModel lsm){ try{ Environment.set(Environment.BackgroundColor,"36B3DD"); MapHandler mapHandler = new MapHandler(); mapHandler.add(this); // Create a MapBean MapBean mapBean = new MapBean(); // Set the map's scale 1:120 million mapBean.setScale(120000000f); mapHandler.add(mapBean); // Create and add a LayerHandler to the MapHandler. The // LayerHandler manages Layers, whether they are part of the // map or not. layer.setVisible(true) will add it to the map. // The LayerHandler has methods to do this, too. The // LayerHandler will find the MapBean in the MapHandler. LayerHandler lh = new LayerHandler(); mapHandler.add(lh); if(etm != null){ EventLayer el = new EventLayer(etm, lsm, mapBean); mapHandler.add(el); lh.addLayer(el, 1); } if(chooser != null){ StationLayer sl = new StationLayer(chooser); mapHandler.add(sl); lh.addLayer(sl,0); } // Create a ShapeLayer to show world political boundaries. ShapeLayer shapeLayer = new ShapeLayer(); //Create shape layer properties Properties shapeLayerProps = new Properties(); shapeLayerProps.put("prettyName", "Political Solid"); shapeLayerProps.put("lineColor", "000000"); shapeLayerProps.put("fillColor", "39DA87"); shapeLayerProps.put("shapeFile", "edu/sc/seis/fissuresUtil/data/maps/dcwpo-browse.shp"); shapeLayerProps.put("spatialIndex", "edu/sc/seis/fissuresUtil/data/maps/dcwpo-browse.ssx"); shapeLayer.setProperties(shapeLayerProps); shapeLayer.setVisible(true); mapHandler.add(shapeLayer); // Create the directional and zoom control tool OMToolSet omts = new OMToolSet(); // Create an OpenMap toolbar ToolPanel toolBar = new ToolPanel(); // Add the ToolPanel and the OMToolSet to the MapHandler. The // OpenMapFrame will find the ToolPanel and attach it to the // top part of its content pane, and the ToolPanel will find // the OMToolSet and add it to itself. mapHandler.add(omts); mapHandler.add(toolBar); mapHandler.add(new MouseDelegator()); mapHandler.add(new SelectMouseMode()); } catch (MultipleSoloMapComponentException msmce) { // The MapHandler is only allowed to have one of certain // items. These items implement the SoloMapComponent // interface. The MapHandler can have a policy that // determines what to do when duplicate instances of the // same type of object are added - replace or ignore. // In this class, this will never happen, since we are // controlling that one MapBean, LayerHandler, // MouseDelegator, etc is being added to the MapHandler. } }
|
public OpenMap(ChannelChooser chooser, EventTableModel etm, ListSelectionModel lsm){ try{ MapHandler mapHandler = new MapHandler(); mapHandler.add(this); // Create a MapBean MapBean mapBean = new MapBean(); // Set the map's scale 1:120 million mapBean.setScale(120000000f); mapHandler.add(mapBean); // Create and add a LayerHandler to the MapHandler. The // LayerHandler manages Layers, whether they are part of the // map or not. layer.setVisible(true) will add it to the map. // The LayerHandler has methods to do this, too. The // LayerHandler will find the MapBean in the MapHandler. LayerHandler lh = new LayerHandler(); mapHandler.add(lh); if(etm != null){ EventLayer el = new EventLayer(etm, lsm, mapBean); mapHandler.add(el); lh.addLayer(el, 1); } if(chooser != null){ StationLayer sl = new StationLayer(chooser); mapHandler.add(sl); lh.addLayer(sl,0); } // Create a ShapeLayer to show world political boundaries. ShapeLayer shapeLayer = new ShapeLayer(); //Create shape layer properties Properties shapeLayerProps = new Properties(); shapeLayerProps.put("prettyName", "Political Solid"); shapeLayerProps.put("lineColor", "000000"); shapeLayerProps.put("fillColor", "39DA87"); shapeLayerProps.put("shapeFile", "edu/sc/seis/fissuresUtil/data/maps/dcwpo-browse.shp"); shapeLayerProps.put("spatialIndex", "edu/sc/seis/fissuresUtil/data/maps/dcwpo-browse.ssx"); shapeLayer.setProperties(shapeLayerProps); shapeLayer.setVisible(true); mapHandler.add(shapeLayer); // Create the directional and zoom control tool OMToolSet omts = new OMToolSet(); // Create an OpenMap toolbar ToolPanel toolBar = new ToolPanel(); // Add the ToolPanel and the OMToolSet to the MapHandler. The // OpenMapFrame will find the ToolPanel and attach it to the // top part of its content pane, and the ToolPanel will find // the OMToolSet and add it to itself. mapHandler.add(omts); mapHandler.add(toolBar); mapHandler.add(new MouseDelegator()); mapHandler.add(new SelectMouseMode()); } catch (MultipleSoloMapComponentException msmce) { // The MapHandler is only allowed to have one of certain // items. These items implement the SoloMapComponent // interface. The MapHandler can have a policy that // determines what to do when duplicate instances of the // same type of object are added - replace or ignore. // In this class, this will never happen, since we are // controlling that one MapBean, LayerHandler, // MouseDelegator, etc is being added to the MapHandler. } }
| 1,117,847
|
public OpenMap(ChannelChooser chooser, EventTableModel etm, ListSelectionModel lsm){ try{ Environment.set(Environment.BackgroundColor,"36B3DD"); MapHandler mapHandler = new MapHandler(); mapHandler.add(this); // Create a MapBean MapBean mapBean = new MapBean(); // Set the map's scale 1:120 million mapBean.setScale(120000000f); mapHandler.add(mapBean); // Create and add a LayerHandler to the MapHandler. The // LayerHandler manages Layers, whether they are part of the // map or not. layer.setVisible(true) will add it to the map. // The LayerHandler has methods to do this, too. The // LayerHandler will find the MapBean in the MapHandler. LayerHandler lh = new LayerHandler(); mapHandler.add(lh); if(etm != null){ EventLayer el = new EventLayer(etm, lsm, mapBean); mapHandler.add(el); lh.addLayer(el, 1); } if(chooser != null){ StationLayer sl = new StationLayer(chooser); mapHandler.add(sl); lh.addLayer(sl,0); } // Create a ShapeLayer to show world political boundaries. ShapeLayer shapeLayer = new ShapeLayer(); //Create shape layer properties Properties shapeLayerProps = new Properties(); shapeLayerProps.put("prettyName", "Political Solid"); shapeLayerProps.put("lineColor", "000000"); shapeLayerProps.put("fillColor", "39DA87"); shapeLayerProps.put("shapeFile", "edu/sc/seis/fissuresUtil/data/maps/dcwpo-browse.shp"); shapeLayerProps.put("spatialIndex", "edu/sc/seis/fissuresUtil/data/maps/dcwpo-browse.ssx"); shapeLayer.setProperties(shapeLayerProps); shapeLayer.setVisible(true); mapHandler.add(shapeLayer); // Create the directional and zoom control tool OMToolSet omts = new OMToolSet(); // Create an OpenMap toolbar ToolPanel toolBar = new ToolPanel(); // Add the ToolPanel and the OMToolSet to the MapHandler. The // OpenMapFrame will find the ToolPanel and attach it to the // top part of its content pane, and the ToolPanel will find // the OMToolSet and add it to itself. mapHandler.add(omts); mapHandler.add(toolBar); mapHandler.add(new MouseDelegator()); mapHandler.add(new SelectMouseMode()); } catch (MultipleSoloMapComponentException msmce) { // The MapHandler is only allowed to have one of certain // items. These items implement the SoloMapComponent // interface. The MapHandler can have a policy that // determines what to do when duplicate instances of the // same type of object are added - replace or ignore. // In this class, this will never happen, since we are // controlling that one MapBean, LayerHandler, // MouseDelegator, etc is being added to the MapHandler. } }
|
public OpenMap(ChannelChooser chooser, EventTableModel etm, ListSelectionModel lsm){ try{ Environment.set(Environment.BackgroundColor,"36B3DD"); MapHandler mapHandler = new MapHandler(); mapHandler.add(this); // Create a MapBean MapBean mapBean = new MapBean(); // Set the map's scale 1:120 million Proj proj = (Proj)mapBean.getProjection(); proj.setBackgroundColor(WATER); proj.setCenter(20, 180); mapHandler.add(mapBean); // Create and add a LayerHandler to the MapHandler. The // LayerHandler manages Layers, whether they are part of the // map or not. layer.setVisible(true) will add it to the map. // The LayerHandler has methods to do this, too. The // LayerHandler will find the MapBean in the MapHandler. LayerHandler lh = new LayerHandler(); mapHandler.add(lh); if(etm != null){ EventLayer el = new EventLayer(etm, lsm, mapBean); mapHandler.add(el); lh.addLayer(el, 1); } if(chooser != null){ StationLayer sl = new StationLayer(chooser); mapHandler.add(sl); lh.addLayer(sl,0); } // Create a ShapeLayer to show world political boundaries. ShapeLayer shapeLayer = new ShapeLayer(); //Create shape layer properties Properties shapeLayerProps = new Properties(); shapeLayerProps.put("prettyName", "Political Solid"); shapeLayerProps.put("lineColor", "000000"); shapeLayerProps.put("fillColor", "39DA87"); shapeLayerProps.put("shapeFile", "edu/sc/seis/fissuresUtil/data/maps/dcwpo-browse.shp"); shapeLayerProps.put("spatialIndex", "edu/sc/seis/fissuresUtil/data/maps/dcwpo-browse.ssx"); shapeLayer.setProperties(shapeLayerProps); shapeLayer.setVisible(true); mapHandler.add(shapeLayer); // Create the directional and zoom control tool OMToolSet omts = new OMToolSet(); // Create an OpenMap toolbar ToolPanel toolBar = new ToolPanel(); // Add the ToolPanel and the OMToolSet to the MapHandler. The // OpenMapFrame will find the ToolPanel and attach it to the // top part of its content pane, and the ToolPanel will find // the OMToolSet and add it to itself. mapHandler.add(omts); mapHandler.add(toolBar); mapHandler.add(new MouseDelegator()); mapHandler.add(new SelectMouseMode()); } catch (MultipleSoloMapComponentException msmce) { // The MapHandler is only allowed to have one of certain // items. These items implement the SoloMapComponent // interface. The MapHandler can have a policy that // determines what to do when duplicate instances of the // same type of object are added - replace or ignore. // In this class, this will never happen, since we are // controlling that one MapBean, LayerHandler, // MouseDelegator, etc is being added to the MapHandler. } }
| 1,117,848
|
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.getCalSvcI(); String name = request.getParameter("name"); if (name == null) { // Assume no access form.getErr().emit("org.bedework.client.missingfield", "name"); return "error"; } BwSubscription sub = svc.findSubscription(name); if (sub == null) { form.getErr().emit("org.bedework.client.notfound", name); return "notFound"; } svc.removeSubscription(sub); 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.getCalSvcI(); String name = request.getParameter("name"); if (name == null) { // Assume no access form.getErr().emit("org.bedework.client.error.missingfield", "name"); return "error"; } BwSubscription sub = svc.findSubscription(name); if (sub == null) { form.getErr().emit("org.bedework.client.notfound", name); return "notFound"; } svc.removeSubscription(sub); return "success"; }
| 1,117,849
|
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.getCalSvcI(); String name = request.getParameter("name"); if (name == null) { // Assume no access form.getErr().emit("org.bedework.client.missingfield", "name"); return "error"; } BwSubscription sub = svc.findSubscription(name); if (sub == null) { form.getErr().emit("org.bedework.client.notfound", name); return "notFound"; } svc.removeSubscription(sub); 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.getCalSvcI(); String name = request.getParameter("name"); if (name == null) { // Assume no access form.getErr().emit("org.bedework.client.missingfield", "name"); return "error"; } BwSubscription sub = svc.findSubscription(name); if (sub == null) { form.getErr().emit("org.bedework.client.error.nosuchsubscription", name); return "notFound"; } svc.removeSubscription(sub); return "success"; }
| 1,117,850
|
private String executeQueries(SQLQuery query, QueryToSQLBridge bridge, List executedSQLStatements, IWResourceBundle resourceBundle, IWContext iwc) throws RemoteException { QueryResult queryResult = bridge.executeQueries(query, executedSQLStatements); // check if everything is fine if (queryResult == null || queryResult.isEmpty()) { // nothing to do return resourceBundle.getLocalizedString("ro_result_of_query_is_empty", "Result of query is empty"); } // get design JasperReportBusiness reportBusiness = getReportBusiness(); DesignBox designBox = getDesignBox(query, reportBusiness, resourceBundle, iwc); // synchronize design and result Map designParameters = new HashMap(); designParameters.put(REPORT_HEADLINE_KEY, query.getName()); JasperPrint print = reportBusiness.printSynchronizedReport(queryResult, designParameters, designBox); if (print == null) { return resourceBundle.getLocalizedString("ro_could_not_use_layout", "Layout can't be used"); } // create html report String uri; if (PDF_KEY.equals(outputFormat)) { uri = reportBusiness.getPdfReport(print, "report"); } else if (EXCEL_KEY.equals(outputFormat)) { uri = reportBusiness.getExcelReport(print, "report"); } else { uri = reportBusiness.getHtmlReport(print, "report"); } Page parentPage = getParentPage(); parentPage.setToRedirect(uri); // open an extra window with scrollbars //getParentPage().setOnLoad("window.open('" + uri + "' , 'newWin', 'width=600,height=400,scrollbars=yes')"); //openwindow(Address,Name,ToolBar,Location,Directories,Status,Menubar,Titlebar,Scrollbars,Resizable,Width,Height) //getParentPage().setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); return null; }
|
private String executeQueries(SQLQuery query, QueryToSQLBridge bridge, List executedSQLStatements, IWResourceBundle resourceBundle, IWContext iwc) throws RemoteException { QueryResult queryResult = bridge.executeQueries(query, executedSQLStatements); // check if everything is fine if (queryResult == null || queryResult.isEmpty()) { // nothing to do return resourceBundle.getLocalizedString("ro_result_of_query_is_empty", "Result of query is empty"); } // get design JasperReportBusiness reportBusiness = getReportBusiness(); DesignBox designBox = getDesignBox(query, reportBusiness, resourceBundle, iwc); // synchronize design and result Map designParameters = new HashMap(); designParameters.put(REPORT_HEADLINE_KEY, query.getName()); JasperPrint print = reportBusiness.printSynchronizedReport(queryResult, designParameters, designBox); if (print == null) { return resourceBundle.getLocalizedString("ro_could_not_use_layout", "Layout can't be used"); } // create html report String uri; if (PDF_KEY.equals(outputFormat)) { uri = reportBusiness.getPdfReport(print, "report"); } else if (EXCEL_KEY.equals(outputFormat)) { uri = reportBusiness.getExcelReport(print, "report"); } else { uri = reportBusiness.getHtmlReport(print, "report"); } Page parentPage = getParentPage(); if("true".equals(getBundle(iwc).getProperty(ADD_QUERY_SQL_FOR_DEBUG,"false"))){ addExecutedSQLQueries(executedSQLStatements); add(new Text("ADD_QUERY_SQL_FOR_DEBUG is true, result is shown in pop up window!")); parentPage.setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); } else { parentPage.setToRedirect(uri); } // open an extra window with scrollbars //getParentPage().setOnLoad("window.open('" + uri + "' , 'newWin', 'width=600,height=400,scrollbars=yes')"); //openwindow(Address,Name,ToolBar,Location,Directories,Status,Menubar,Titlebar,Scrollbars,Resizable,Width,Height) //getParentPage().setOnLoad(" openwindow('" + uri + "','IdegaWeb Generated Report','0','0','0','0','0','1','1','1','800','600') "); return null; }
| 1,117,851
|
public CalSvcI getSvci() throws WebdavIntfException { boolean publicMode = (account == null); if (svci != null) { if (!svci.isOpen()) { try { svci.open(); svci.beginTransaction(); } catch (Throwable t) { throw new WebdavIntfException(t); } } return svci; } try { svci = new CalSvc(); /* account is what we authenticated with. * user, if non-null, is the user calendar we want to access. */ CalSvcIPars pars = new CalSvcIPars(account, account, envPrefix, publicMode, true, // caldav null, // synchId debug); svci.init(pars); svci.open(); svci.beginTransaction(); trans = new IcalTranslator(svci.getIcalCallback(), debug); } catch (Throwable t) { throw new WebdavIntfException(t); } return svci; }
|
public CalSvcI getSvci() throws WebdavIntfException { if (svci != null) { if (!svci.isOpen()) { try { svci.open(); svci.beginTransaction(); } catch (Throwable t) { throw new WebdavIntfException(t); } } return svci; } try { svci = new CalSvc(); /* account is what we authenticated with. * user, if non-null, is the user calendar we want to access. */ CalSvcIPars pars = new CalSvcIPars(account, account, envPrefix, publicMode, true, // caldav null, // synchId debug); svci.init(pars); svci.open(); svci.beginTransaction(); trans = new IcalTranslator(svci.getIcalCallback(), debug); } catch (Throwable t) { throw new WebdavIntfException(t); } return svci; }
| 1,117,854
|
public CalSvcI getSvci() throws WebdavIntfException { boolean publicMode = (account == null); if (svci != null) { if (!svci.isOpen()) { try { svci.open(); svci.beginTransaction(); } catch (Throwable t) { throw new WebdavIntfException(t); } } return svci; } try { svci = new CalSvc(); /* account is what we authenticated with. * user, if non-null, is the user calendar we want to access. */ CalSvcIPars pars = new CalSvcIPars(account, account, envPrefix, publicMode, true, // caldav null, // synchId debug); svci.init(pars); svci.open(); svci.beginTransaction(); trans = new IcalTranslator(svci.getIcalCallback(), debug); } catch (Throwable t) { throw new WebdavIntfException(t); } return svci; }
|
public CalSvcI getSvci() throws WebdavIntfException { boolean publicMode = (account == null); if (svci != null) { if (!svci.isOpen()) { try { svci.open(); svci.beginTransaction(); } catch (Throwable t) { throw new WebdavIntfException(t); } } return svci; } try { svci = new CalSvc(); /* account is what we authenticated with. * user, if non-null, is the user calendar we want to access. */ CalSvcIPars pars = new CalSvcIPars(account, account, envPrefix, false, true, // caldav null, // synchId debug); svci.init(pars); svci.open(); svci.beginTransaction(); trans = new IcalTranslator(svci.getIcalCallback(), debug); } catch (Throwable t) { throw new WebdavIntfException(t); } return svci; }
| 1,117,855
|
public boolean init(String url, String authenticatedUser, String user, boolean publicAdmin, Groups groups, String synchId, boolean debug) throws CalFacadeException { this.url = url; this.debug = debug; boolean userCreated = false; try { objTimestamp = new Timestamp(System.currentTimeMillis()); this.synchId = synchId; if ((synchId != null) && publicAdmin) { throw new CalFacadeException("synch only valid for non admin"); } } catch (Throwable t) { throw new CalFacadeException(t); } if (user == null) { user = authenticatedUser; } return userCreated; }
|
public boolean init(String systemName, String url, String authenticatedUser, String user, boolean publicAdmin, Groups groups, String synchId, boolean debug) throws CalFacadeException { this.url = url; this.debug = debug; boolean userCreated = false; try { objTimestamp = new Timestamp(System.currentTimeMillis()); this.synchId = synchId; if ((synchId != null) && publicAdmin) { throw new CalFacadeException("synch only valid for non admin"); } } catch (Throwable t) { throw new CalFacadeException(t); } if (user == null) { user = authenticatedUser; } return userCreated; }
| 1,117,856
|
public void setAmpConfig(AmpConfig ac){ if(ampConfig != null) ampConfig.removeListener(this); ampConfig = ac; ac.addListener(this); }
|
public void setAmpConfig(AmpConfig ac){ if(ampConfig != null) ampConfig.removeListener(this); ampConfig = ac; ac.addListener(this); }
| 1,117,858
|
public static Date fromISODate(String val) throws CalFacadeException { try { return isoDateFormat.parse(val); } catch (Throwable t) { throw new CalFacadeBadDateException(); } }
|
public static Date fromISODate(String val) throws CalFacadeException { try { synchronized (isoDateFormat) { return isoDateFormat.parse(val); } } catch (Throwable t) { throw new CalFacadeBadDateException(); } }
| 1,117,859
|
public static Date fromISODateTime(String val) throws CalFacadeException { try { return isoDateTimeFormat.parse(val); } catch (Throwable t) { throw new CalFacadeBadDateException(); } }
|
public static Date fromISODateTime(String val) throws CalFacadeException { try { synchronized (isoDateTimeFormat) { return isoDateTimeFormat.parse(val); } } catch (Throwable t) { throw new CalFacadeBadDateException(); } }
| 1,117,860
|
public static Date getDate(BwDateTime val) throws CalFacadeException { String dtval = val.getDtval(); try { if (val.getDateType()) { return isoDateFormat.parse(dtval); } if (dtval.endsWith("Z")) { return isoDateTimeUTCFormat.parse(dtval); } return isoDateTimeFormat.parse(dtval); } catch (Throwable t) { throw new CalFacadeBadDateException(); } }
|
public static Date getDate(BwDateTime val) throws CalFacadeException { String dtval = val.getDtval(); try { if (val.getDateType()) { return fromISODate(dtval); } if (dtval.endsWith("Z")) { return isoDateTimeUTCFormat.parse(dtval); } return isoDateTimeFormat.parse(dtval); } catch (Throwable t) { throw new CalFacadeBadDateException(); } }
| 1,117,861
|
public static Date getDate(BwDateTime val) throws CalFacadeException { String dtval = val.getDtval(); try { if (val.getDateType()) { return isoDateFormat.parse(dtval); } if (dtval.endsWith("Z")) { return isoDateTimeUTCFormat.parse(dtval); } return isoDateTimeFormat.parse(dtval); } catch (Throwable t) { throw new CalFacadeBadDateException(); } }
|
public static Date getDate(BwDateTime val) throws CalFacadeException { String dtval = val.getDtval(); try { if (val.getDateType()) { return isoDateFormat.parse(dtval); } if (dtval.endsWith("Z")) { return fromISODateTimeUTC(dtval); } return isoDateTimeFormat.parse(dtval); } catch (Throwable t) { throw new CalFacadeBadDateException(); } }
| 1,117,862
|
public static Date getDate(BwDateTime val) throws CalFacadeException { String dtval = val.getDtval(); try { if (val.getDateType()) { return isoDateFormat.parse(dtval); } if (dtval.endsWith("Z")) { return isoDateTimeUTCFormat.parse(dtval); } return isoDateTimeFormat.parse(dtval); } catch (Throwable t) { throw new CalFacadeBadDateException(); } }
|
public static Date getDate(BwDateTime val) throws CalFacadeException { String dtval = val.getDtval(); try { if (val.getDateType()) { return isoDateFormat.parse(dtval); } if (dtval.endsWith("Z")) { return isoDateTimeUTCFormat.parse(dtval); } return fromISODateTime(dtval); } catch (Throwable t) { throw new CalFacadeBadDateException(); } }
| 1,117,863
|
public static boolean isISODate(String val) throws CalFacadeException { try { isoDateFormat.parse(val); return true; } catch (Throwable t) { return false; } }
|
public static boolean isISODate(String val) throws CalFacadeException { try { fromISODate(val); return true; } catch (Throwable t) { return false; } }
| 1,117,864
|
public static boolean isISODateTime(String val) throws CalFacadeException { try { isoDateTimeFormat.parse(val); return true; } catch (Throwable t) { return false; } }
|
public static boolean isISODateTime(String val) throws CalFacadeException { try { fromISODateTime(val); return true; } catch (Throwable t) { return false; } }
| 1,117,865
|
public static boolean isISODateTimeUTC(String val) throws CalFacadeException { try { isoDateTimeUTCFormat.parse(val); return true; } catch (Throwable t) { return false; } }
|
public static boolean isISODateTimeUTC(String val) throws CalFacadeException { try { fromISODateTimeUTC(val); return true; } catch (Throwable t) { return false; } }
| 1,117,866
|
public static String isoDate(Date val) { return isoDateFormat.format(val); }
|
public static String isoDate(Date val) { synchronized (isoDateFormat) { return isoDateFormat.format(val); } }
| 1,117,867
|
public static String isoDateTime(Date val) { return isoDateTimeFormat.format(val); }
|
public static String isoDateTime(Date val) { synchronized (isoDateTimeFormat) { return isoDateTimeFormat.format(val); } }
| 1,117,868
|
public static String isoDateTimeUTC(Date val) { return isoDateTimeUTCFormat.format(val); }
|
public static String isoDateTimeUTC(Date val) { synchronized (isoDateTimeUTCFormat) { return isoDateTimeUTCFormat.format(val); } }
| 1,117,869
|
public static void gotoDateView(BwCalAbstractAction action, BwActionForm form, String date, int newViewTypeI, boolean debug) throws Throwable { /* We get a new view if either the date changed or the view changed. */ boolean newView = false; if (debug) { action.logIt("ViewTypeI=" + newViewTypeI); } MyCalendarVO dt; TimeView tv = form.getCurTimeView(); Locale loc = Locale.getDefault(); // XXX Locale if (newViewTypeI == BedeworkDefs.todayView) { // dt = new MyCalendarVO(new Date(System.currentTimeMillis())); Date jdt = new Date(System.currentTimeMillis()); dt = new MyCalendarVO(jdt, loc); newView = true; newViewTypeI = BedeworkDefs.dayView; } else if (date == null) { if (newViewTypeI == BedeworkDefs.dayView) { // selected specific day to display from personal event entry screen. Date jdt = CalFacadeUtil.getDate(form.getViewStartDate().getDateTime()); dt = new MyCalendarVO(jdt, loc); newView = true; } else { if (debug) { action.logIt("No date supplied: go with current date"); } // Just stay here dt = tv.getCurDay(); } } else { if (debug) { action.logIt("Date=" + date + ": go with that"); } Date jdt = CalFacadeUtil.fromISODate(date); dt = new MyCalendarVO(jdt, loc); newView = true; } if ((newViewTypeI >= 0) && (newViewTypeI != form.getCurViewPeriod())) { // Change of view newView = true; } if (newView && (newViewTypeI < 0)) { newViewTypeI = form.getCurViewPeriod(); if (newViewTypeI < 0) { newViewTypeI = BedeworkDefs.defaultView; } } TimeDateComponents viewStart = form.getViewStartDate(); if (!newView) { /* See if we were given an explicit date as view start date components. If so we'll set a new view of the same period as the current. */ String vsdate = viewStart.getDateTime().getDtval().substring(0, 8); if (debug) { action.logIt("vsdate=" + vsdate); } if (!(vsdate.equals(form.getCurTimeView().getFirstDay().getDateDigits()))) { newView = true; newViewTypeI = form.getCurViewPeriod(); Date jdt = CalFacadeUtil.fromISODate(vsdate); dt = new MyCalendarVO(jdt, loc); } } if (newView) { form.setCurViewPeriod(newViewTypeI); form.setViewMcDate(dt); form.refreshIsNeeded(); } tv = form.getCurTimeView(); // dt = tv.getCurDay(); /** Set first day, month and year */ MyCalendarVO firstDay = tv.getFirstDay(); viewStart.setDay(firstDay.getTwoDigitDay()); viewStart.setMonth(firstDay.getTwoDigitMonth()); viewStart.setYear(firstDay.getFourDigitYear()); form.getEventStartDate().setDateTime(tv.getCurDay().getTime()); form.getEventEndDate().setDateTime(tv.getCurDay().getTime()); }
|
public static void gotoDateView(BwCalAbstractAction action, BwActionForm form, String date, int newViewTypeI, boolean debug) throws Throwable { /* We get a new view if either the date changed or the view changed. */ boolean newView = false; if (debug) { action.logIt("ViewTypeI=" + newViewTypeI); } MyCalendarVO dt; TimeView tv = form.getCurTimeView(); Locale loc = Locale.getDefault(); // XXX Locale if (newViewTypeI == BedeworkDefs.todayView) { // dt = new MyCalendarVO(new Date(System.currentTimeMillis())); Date jdt = new Date(System.currentTimeMillis()); dt = new MyCalendarVO(jdt, loc); newView = true; newViewTypeI = BedeworkDefs.dayView; } else if (date == null) { if (newViewTypeI == BedeworkDefs.dayView) { // selected specific day to display from personal event entry screen. Date jdt = CalFacadeUtil.getDate(form.getViewStartDate().getDateTime()); dt = new MyCalendarVO(jdt, loc); newView = true; } else { if (debug) { action.logIt("No date supplied: go with current date"); } // Just stay here dt = tv.getCurDay(); } } else { if (debug) { action.logIt("Date=" + date + ": go with that"); } Date jdt = CalFacadeUtil.fromISODate(date); dt = new MyCalendarVO(jdt, loc); newView = true; } if ((newViewTypeI >= 0) && (newViewTypeI != form.getCurViewPeriod())) { // Change of view newView = true; } if (newView && (newViewTypeI < 0)) { newViewTypeI = form.getCurViewPeriod(); if (newViewTypeI < 0) { newViewTypeI = BedeworkDefs.defaultView; } } TimeDateComponents viewStart = form.getViewStartDate(); if (!newView) { /* See if we were given an explicit date as view start date components. If so we'll set a new view of the same period as the current. */ String vsdate = viewStart.getDateTime().getDtval().substring(0, 8); if (debug) { action.logIt("vsdate=" + vsdate); } if (!(vsdate.equals(form.getCurTimeView().getFirstDay().getDateDigits()))) { newView = true; newViewTypeI = form.getCurViewPeriod(); Date jdt = CalFacadeUtil.fromISODate(vsdate); dt = new MyCalendarVO(jdt, loc); } } if (newView) { form.setCurViewPeriod(newViewTypeI); form.setViewMcDate(dt); form.refreshIsNeeded(); } tv = form.getCurTimeView(); // dt = tv.getCurDay(); /** Set first day, month and year */ MyCalendarVO firstDay = tv.getFirstDay(); viewStart.setDay(firstDay.getTwoDigitDay()); viewStart.setMonth(firstDay.getTwoDigitMonth()); viewStart.setYear(firstDay.getFourDigitYear()); form.getEventStartDate().setDateTime(tv.getCurDay().getTime()); form.getEventEndDate().setDateTime(tv.getCurDay().getTime()); }
| 1,117,870
|
protected void setUp() throws Exception { map_ = new FieldMap(); assertTrue(map_.put(AGSymbol.alloc("x"))); map_.put(AGSymbol.alloc("y")); map_.put(AGSymbol.alloc("z")); map_.put(AGSymbol.alloc("u")); assertTrue(map_.put(AGSymbol.alloc("v"))); map_.put(AGSymbol.alloc("w")); map_.put(AGSymbol.alloc("a")); map_.put(AGSymbol.alloc("b")); assertFalse(map_.put(AGSymbol.alloc("x"))); }
|
protected void setUp() throws Exception { map_ = new FieldMap(); assertTrue(map_.put(AGSymbol.alloc("x"))); map_.put(AGSymbol.alloc("y")); map_.put(AGSymbol.alloc("z")); map_.put(AGSymbol.alloc("u")); assertTrue(map_.put(AGSymbol.alloc("v"))); map_.put(AGSymbol.alloc("w")); map_.put(AGSymbol.alloc("a")); map_.put(AGSymbol.alloc("b")); assertFalse(map_.put(AGSymbol.alloc("x"))); }
| 1,117,871
|
public void testMap() { assertEquals(0, map_.get(AGSymbol.alloc("x"))); assertEquals(1, map_.get(AGSymbol.alloc("y"))); assertEquals(2, map_.get(AGSymbol.alloc("z"))); assertEquals(3, map_.get(AGSymbol.alloc("u"))); assertEquals(4, map_.get(AGSymbol.alloc("v"))); assertEquals(5, map_.get(AGSymbol.alloc("w"))); assertEquals(6, map_.get(AGSymbol.alloc("a"))); assertEquals(7, map_.get(AGSymbol.alloc("b"))); assertEquals(-1, map_.get(AGSymbol.alloc("c"))); }
|
public void testMap() { assertEquals(0, map_.get(AGSymbol.alloc("x"))); assertEquals(1, map_.get(AGSymbol.alloc("y"))); assertEquals(2, map_.get(AGSymbol.alloc("z"))); assertEquals(3, map_.get(AGSymbol.alloc("u"))); assertEquals(4, map_.get(AGSymbol.alloc("v"))); assertEquals(5, map_.get(AGSymbol.alloc("w"))); assertEquals(6, map_.get(AGSymbol.alloc("a"))); assertEquals(7, map_.get(AGSymbol.alloc("b"))); assertEquals(-1, map_.get(AGSymbol.alloc("c"))); }
| 1,117,872
|
protected void setUp() throws Exception { ATObject root = new NATObject(NATNil._INSTANCE_); // object with no dyn or lex parent ATObject supr = new NATObject(root); // supr has root as lex parent ATObject self = new NATObject(supr, root, NATObject._SHARES_A_); // self has root as lex parent and supr as dyn parent ATObject scope = new NATObject(self); // scope has no dyn parent and is nested within self self.meta_defineField(AGSymbol.alloc("unittest:"), unittest_); self.meta_defineField(AGSymbol.alloc("unit"), OBJUnit._INSTANCE_); ctx_ = new NATContext(scope, self, supr); }
|
protected void setUp() throws Exception { ATObject root = new NATObject(NATNil._INSTANCE_); // object with no dyn or lex parent ATObject supr = new NATObject(root); // supr has root as lex parent ATObject self = new NATObject(supr, root, NATObject._SHARES_A_); // self has root as lex parent and supr as dyn parent ATObject scope = new NATObject(self); // scope has no dyn parent and is nested within self self.meta_defineField(AGSymbol.jAlloc("unittest:"), unittest_); self.meta_defineField(AGSymbol.alloc("unit"), OBJUnit._INSTANCE_); ctx_ = new NATContext(scope, self, supr); }
| 1,117,873
|
protected void setUp() throws Exception { ATObject root = new NATObject(NATNil._INSTANCE_); // object with no dyn or lex parent ATObject supr = new NATObject(root); // supr has root as lex parent ATObject self = new NATObject(supr, root, NATObject._SHARES_A_); // self has root as lex parent and supr as dyn parent ATObject scope = new NATObject(self); // scope has no dyn parent and is nested within self self.meta_defineField(AGSymbol.alloc("unittest:"), unittest_); self.meta_defineField(AGSymbol.alloc("unit"), OBJUnit._INSTANCE_); ctx_ = new NATContext(scope, self, supr); }
|
protected void setUp() throws Exception { ATObject root = new NATObject(NATNil._INSTANCE_); // object with no dyn or lex parent ATObject supr = new NATObject(root); // supr has root as lex parent ATObject self = new NATObject(supr, root, NATObject._SHARES_A_); // self has root as lex parent and supr as dyn parent ATObject scope = new NATObject(self); // scope has no dyn parent and is nested within self self.meta_defineField(AGSymbol.alloc("unittest:"), unittest_); self.meta_defineField(AGSymbol.jAlloc("unit"), OBJUnit._INSTANCE_); ctx_ = new NATContext(scope, self, supr); }
| 1,117,874
|
NATIntrospectiveMirror(ATObject representation) { principal_ = representation; }
|
private NATIntrospectiveMirror(ATObject representation) { principal_ = representation; }
| 1,117,875
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.