rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
myParent.setRecipe(imp.handler.getRecipe());
try { Recipe recipe = imp.handler.getRecipe(); if (recipe != null) { myParent.setRecipe(recipe); } else { System.out.println("Recipe is null for some reason."); } } catch(Exception e) { System.out.print("Problem loading "); System.out.println(myContents.getOpenFilename()); }
public void execute() { if (myContents.getQuitItem().isSelected()) { myContents.quit(); } if (myContents.getOpenItem().isSelected()) { ImportXml imp = new ImportXml(myContents.getOpenFilename()); myParent.setRecipe(imp.handler.getRecipe()); } }
if (NewSwingApp.DEBUG){
/* if (NewSwingApp.DEBUG){
public void setValueAt(Object value, int row, int col) { Fermentable m = (Fermentable) data.get(row); try { switch (col) { case 0 : m.setName(value.toString()); if (NewSwingApp.DEBUG){ System.out.println("value is:" + value); } case 1 : m.setAmount(Double.parseDouble(value.toString())); ...
}
}*/
public void setValueAt(Object value, int row, int col) { Fermentable m = (Fermentable) data.get(row); try { switch (col) { case 0 : m.setName(value.toString()); if (NewSwingApp.DEBUG){ System.out.println("value is:" + value); } case 1 : m.setAmount(Double.parseDouble(value.toString())); ...
return new SQETestResultPublisher(req.getParameter("sqetest_includes"));
return new SQETestResultPublisher(req.getParameter("sqetest_includes"),(req.getParameter("sqetest_testobject")!=null));
public Publisher newInstance(StaplerRequest req) { return new SQETestResultPublisher(req.getParameter("sqetest_includes")); }
public SQETestResultPublisher(String includes) {
public SQETestResultPublisher(String includes, boolean considerTestAsTestObject) {
public SQETestResultPublisher(String includes) { this.includes = includes; }
this.considerTestAsTestObject = considerTestAsTestObject;
public SQETestResultPublisher(String includes) { this.includes = includes; }
SQETestAction action = new SQETestAction(build, ds, listener);
SQETestAction action = new SQETestAction(build, ds, listener, considerTestAsTestObject);
public boolean perform(Build build, Launcher launcher, BuildListener listener) { FileSet fs = new FileSet(); org.apache.tools.ant.Project p = new org.apache.tools.ant.Project(); fs.setProject(p); fs.setDir(build.getProject().getWorkspace().getLocal()); fs.setIncludes(includes); ...
case 2 : return data.getNoteNote(row);
public Object getValueAt(int row, int col) { try { switch (col) { case 0 : return SBStringUtils.dateFormatShort.format(data.getNoteDate(row)); case 1 : return data.getNoteType(row); case 2 : return data.getNoteNote(row); } } catch (Exception e) { }; return ""; }
case 2 : data.setNoteNote(row, value.toString()); break;
public void setValueAt(Object value, int row, int col) { try { switch (col) { case 0 : try { Date d = SBStringUtils.dateFormatShort.parse(value.toString()); data.setNoteDate(row, d); } catch (ParseException e) { System.out.println("Unable to parse " + value.toString()); ...
noteColumn.setCellEditor(new DefaultCellEditor(typeComboBox)); notesTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { int i = notesTable.getSelectedRow(); noteTextArea.setText(myRecipe.getNoteNote(i)); } });
noteColumn.setCellEditor(new DefaultCellEditor(typeComboBox));
private void initGUI() { try { BoxLayout thisLayout = new BoxLayout(this, javax.swing.BoxLayout.X_AXIS); this.setLayout(thisLayout); setPreferredSize(new Dimension(400, 300)); { tablePanel = new JPanel(); BoxLayout tablePanelLayout = new BoxLayout(tablePanel, javax.swing.BoxLayout.Y_AXIS); tablePanel...
if (selectedRow > -1 && !noteTextArea.getText().equals( myRecipe.getNoteNote(selectedRow))) {
selectedRow = notesTable.getSelectedRow(); if (selectedRow > -1) {
private void initGUI() { try { BoxLayout thisLayout = new BoxLayout(this, javax.swing.BoxLayout.X_AXIS); this.setLayout(thisLayout); setPreferredSize(new Dimension(400, 300)); { tablePanel = new JPanel(); BoxLayout tablePanelLayout = new BoxLayout(tablePanel, javax.swing.BoxLayout.Y_AXIS); tablePanel...
}); noteTextArea.addFocusListener(new FocusAdapter() { public void focusGained(FocusEvent evt) { selectedRow = notesTable.getSelectedRow(); } });
});
private void initGUI() { try { BoxLayout thisLayout = new BoxLayout(this, javax.swing.BoxLayout.X_AXIS); this.setLayout(thisLayout); setPreferredSize(new Dimension(400, 300)); { tablePanel = new JPanel(); BoxLayout tablePanelLayout = new BoxLayout(tablePanel, javax.swing.BoxLayout.Y_AXIS); tablePanel...
if (selectedRow > -1 && !noteTextArea.getText().equals( myRecipe.getNoteNote(selectedRow))) {
selectedRow = notesTable.getSelectedRow(); if (selectedRow > -1) {
public void focusLost(FocusEvent evt) { if (selectedRow > -1 && !noteTextArea.getText().equals( myRecipe.getNoteNote(selectedRow))) { myRecipe.setNoteNote(selectedRow, noteTextArea.getText()); } }
internalTimeConfig.setDisplayInterval(new TimeInterval(selectionBegin, currentInternal.getEndTime())); internalTimeConfig.setAllBeginTime(selectionBegin);
System.out.println(selectionBegin + " " + currentInternal.getEndTime()); internalTimeConfig.set(selectionBegin, new TimeInterval(selectionBegin, currentInternal.getEndTime()));
public void adjustRange(MicroSecondDate selectionBegin, MicroSecondDate selectionEnd){ MicroSecondTimeRange currentInternal = internalTimeConfig.getTimeRange(); double timeWidth = externalTimeConfig.getTimeRange().getInterval().getValue(); if(released == true){ double beginDistance = Math.abs(currentInternal.ge...
println("'group Z'\tintegers (arbitary precision)");
println("'group Z'\tintegers (arbitrary precision)");
public void printHelp() { super.printHelp(); println("'group'\tprints the current group"); println("'group G'\tchanges underlying group to G"); println("'group Z'\tintegers (arbitary precision)"); println("'group Q'\trationals"); println("'group R'\treals, represented as Doubles."); println("'group R 3'\treals ...
println("'group R 3'\treals reprecented as BigDecimals with 3 decimal places");
println("'group R 3'\treals represented as BigDecimals with 3 decimal places");
public void printHelp() { super.printHelp(); println("'group'\tprints the current group"); println("'group G'\tchanges underlying group to G"); println("'group Z'\tintegers (arbitary precision)"); println("'group Q'\trationals"); println("'group R'\treals, represented as Doubles."); println("'group R 3'\treals ...
println("'group Qu'\tQuartonians");
println("'group Qu'\tQuarternions");
public void printHelp() { super.printHelp(); println("'group'\tprints the current group"); println("'group G'\tchanges underlying group to G"); println("'group Z'\tintegers (arbitary precision)"); println("'group Q'\trationals"); println("'group R'\treals, represented as Doubles."); println("'group R 3'\treals ...
initialise(new Quartonians());
initialise(new Quaternions());
public boolean testSpecialCommands(String command) { GroupJep gj = (GroupJep) j; if(!super.testSpecialCommands(command)) return false; String words[] = split(command); if(words.length==0) return true; if(words[0].equals("group")) { if(words.length == 1) { } else if(words[1].equals("Z")) { initialise(new I...
nextUpdate = System.currentTimeMillis()+1000; reload();
if(!reloadingInProgress) { reloadingInProgress = true; synchronized(reloadQueue) { reloadQueue.add(this); reloadQueue.notify(); } }
protected synchronized SortedMap<String,ExternalRun> _getRuns() { if(nextUpdate<System.currentTimeMillis()) { nextUpdate = System.currentTimeMillis()+1000; reload(); } return runs; }
runs = new TreeMap<String,ExternalRun>(reverseComparator);
TreeMap<String,ExternalRun> runs = new TreeMap<String,ExternalRun>(reverseComparator);
private void reload() { runs = new TreeMap<String,ExternalRun>(reverseComparator); File[] subdirs = getBuildDir().listFiles(new FileFilter() { public boolean accept(File subdir) { return subdir.isDirectory(); } }); Arrays.sort(subdirs,fileComparator);...
synchronized(this) { this.runs = runs; reloadingInProgress = false; nextUpdate = System.currentTimeMillis()+1000; }
private void reload() { runs = new TreeMap<String,ExternalRun>(reverseComparator); File[] subdirs = getBuildDir().listFiles(new FileFilter() { public boolean accept(File subdir) { return subdir.isDirectory(); } }); Arrays.sort(subdirs,fileComparator);...
ImportXml imp = new ImportXml(myContents.getOpenFilename()); try {
String myFile = myContents.getOpenFilename(); if (myFile != "/") { ImportXml imp = new ImportXml(myFile);
public void execute() { if (myContents.getQuitItem().isSelected()) { myContents.quit(); } if (myContents.getOpenItem().isSelected()) { ImportXml imp = new ImportXml(myContents.getOpenFilename()); try { Recipe recipe = imp.handler.getRecipe(); if (recipe != null) { myParent.setRecipe(recip...
if (recipe != null) { myParent.setRecipe(recipe); } else { System.out.println("Recipe is null for some reason."); } } catch(Exception e) { System.out.print("Problem loading "); System.out.println(myContents.getOpenFilename());
myParent.setRecipe(recipe);
public void execute() { if (myContents.getQuitItem().isSelected()) { myContents.quit(); } if (myContents.getOpenItem().isSelected()) { ImportXml imp = new ImportXml(myContents.getOpenFilename()); try { Recipe recipe = imp.handler.getRecipe(); if (recipe != null) { myParent.setRecipe(recip...
task.setBranch(branch);
private boolean calcChangeLog(Build build, List<String> changedFiles, File changelogFile, final BuildListener listener) { if(build.getPreviousBuild()==null || (changedFiles!=null && changedFiles.isEmpty())) { // nothing to compare against, or no changes // (note that changedFiles==null ...
plottDb = new JDBCPlottable();
plottDb = new JDBCPlottable(new ConnectionCreator(new String[] {}).createConnection(), "HSQL");
public void setUp() throws SQLException { data = createFullDayPlottable(); plottDb = new JDBCPlottable(); }
seisIterator = container.getIterator(); seisWAV = new FissuresToWAV(seisIterator, 200);
seisWAV = new FissuresToWAV(container, 200);
public SoundPlay(SeismogramDisplay display, SeismogramContainer container){ this.display = display; this.container = container; seisIterator = container.getIterator(); seisWAV = new FissuresToWAV(seisIterator, 200); SeismogramDisplay.getMouseForwarder().addPermMouseListener(this); SeismogramDisplay.getMouseMotio...
seisIterator.setTimeRange(timeEvent.getTime(container.getDataSetSeismogram()));
container.getIterator().setTimeRange(timeEvent.getTime(container.getDataSetSeismogram()));
public void mouseClicked(MouseEvent e){ if(intersects(e)){ System.out.println("This should be playing something..."); sendToWAV(); seisIterator.setTimeRange(timeEvent.getTime(container.getDataSetSeismogram())); seisWAV.play(); } }
public static List<Resource> createAndPersistResourceList(HibernateTemplate hibernateTemplate, int i, int e, int p) { List<Resource> resourceList = createResourceList(i, e, p);
public static List<ResourceGroup> createAndPersistResourceList(HibernateTemplate hibernateTemplate, int i, int e, int p) { List<ResourceGroup> resourceList = createResourceList(i, e, p);
public static List<Resource> createAndPersistResourceList(HibernateTemplate hibernateTemplate, int i, int e, int p) { List<Resource> resourceList = createResourceList(i, e, p); hibernateTemplate.saveOrUpdateAll(resourceList); hibernateTemplate.flush(); hibernateTemplate.clear(); r...
public static List<Resource> createResourceList(int size, int entityListSize, int parentListSize) {
public static List<ResourceGroup> createResourceList(int size, int entityListSize, int parentListSize) {
public static List<Resource> createResourceList(int size, int entityListSize, int parentListSize) { List<ResourceGroup> resourceGroupList = createResourceGroupList(size, entityListSize, parentListSize); List<Resource> resourceList = new ArrayList<Resource>(); for (ResourceGroup g: resourceGrou...
List<Resource> resourceList = new ArrayList<Resource>();
List<ResourceGroup> resourceList = new ArrayList<ResourceGroup>();
public static List<Resource> createResourceList(int size, int entityListSize, int parentListSize) { List<ResourceGroup> resourceGroupList = createResourceGroupList(size, entityListSize, parentListSize); List<Resource> resourceList = new ArrayList<Resource>(); for (ResourceGroup g: resourceGrou...
resourceList.add(ResourceCreatorImpl.resourceFactory(g, generateKey(20, i), null));
resourceList.add(ResourceCreatorImpl.resourceFactory(g, generateKey(20, intValue++), null));
public static List<Resource> createResourceList(int size, int entityListSize, int parentListSize) { List<ResourceGroup> resourceGroupList = createResourceGroupList(size, entityListSize, parentListSize); List<Resource> resourceList = new ArrayList<Resource>(); for (ResourceGroup g: resourceGrou...
securityMgr.createIPAccessRule( Localizer.getString( "UserBanned" ), true, IPAccessRule.SINGLE_ADDRESS, ip.getHostIP(), null, false, expiryDate, true );
byte res = securityMgr.controlHostIPAccess( ip.getHostIP() ); if (res == PhexSecurityManager.ACCESS_GRANTED) { securityMgr.createIPAccessRule( Localizer.getString( "UserBanned" ), true, IPAccessRule.SINGLE_ADDRESS, ip.getHostIP(), null, false, expiryDate, true ); }
private static void banHosts( DestAddress[] addresses, ExpiryDate expiryDate ) { PhexSecurityManager securityMgr = PhexSecurityManager.getInstance(); for ( int i = 0; i < addresses.length; i++ ) { IpAddress ip = addresses[i].getIpAddress(); if ( ip == null ) ...
else throw new ParseException("Too many children "+nchild+" for "+node+"\n");
throw new ParseException("Too many children "+nchild+" for "+node+"\n");
public Node differentiate(ASTFunNode node,String var,Node [] children,Node [] dchildren,DJep djep) throws ParseException { XOperatorSet op = (XOperatorSet) djep.getOperatorSet(); NodeFactory nf = djep.getNodeFactory(); int nchild = node.jjtGetNumChildren(); if(nchild==2) return nf.buildOperatorNode(op.ge...
if(line.startsWith(cvsroot))
int portIndex = line.indexOf(":2401/"); String line2 = ""; if(portIndex>=0) line2 = line.substring(0,portIndex+1)+line.substring(portIndex+5); if(line.startsWith(cvsroot) || line.startsWith(cvsroot2) || line2.startsWith(cvsroot2))
private boolean scanCvsPassFile(File passfile, String cvsroot) throws IOException { cvsroot += ' '; BufferedReader in = new BufferedReader(new FileReader(passfile)); try { String line; while((line=in.readLine())!=null) { if(line.s...
myRecipe.setPostBoilVolUnits(q);
private void initGUI() { try { this.setSize(520, 532); this.addWindowListener(new WindowAdapter() { public void windowClosed(WindowEvent evt) { System.exit(1); } }); { pnlMain = new JPanel(); GridBagLayout jPanel2Layout = new GridBagLayout(); jPanel2Layout.columnWeights = new double[]{0.1};...
maltTable.setAutoCreateColumnsFromModel(false);
private void initGUI() { try { this.setSize(520, 532); this.addWindowListener(new WindowAdapter() { public void windowClosed(WindowEvent evt) { System.exit(1); } }); { pnlMain = new JPanel(); GridBagLayout jPanel2Layout = new GridBagLayout(); jPanel2Layout.columnWeights = new double[]{0.1};...
myRecipe.setPostBoilVolUnits(q);
public void actionPerformed(ActionEvent evt) { String q = (String) cmbSizeUnits.getSelectedItem(); if (myRecipe != null && q != myRecipe.getVolUnits()) { myRecipe.setPostBoilVolUnits(q); myRecipe.setPreBoilVolUnits(q); displayRecipe(); } }
view.init();
public static void main(String[] args) { Recipe myRecipe = new Recipe(); if (args.length != 1) { System.err.println("Usage: filename or --gui"); System.exit(1); } else if (args[0].equals("--gui")) { MainView view = new SWTMainView(); view.init(); MainController controller = new MainController(view, myReci...
if ( !isSearching )
switch ( browseHostStatus )
public int getProgress() { if ( !isSearching ) { return 100; } else { return 0; } }
else { return 0; }
public int getProgress() { if ( !isSearching ) { return 100; } else { return 0; } }
browseHostError = BROWSE_HOST_ERROR;
browseHostStatus = BROWSE_HOST_ERROR;
public void run() { BrowseHostConnection connection = new BrowseHostConnection( destAddress, hostGUID, BrowseHostResults.this ); try { connection.sendBrowseHostRequest(); } catch ( Bro...
browseHostError = CONNECTION_ERROR;
browseHostStatus = CONNECTION_ERROR;
public void run() { BrowseHostConnection connection = new BrowseHostConnection( destAddress, hostGUID, BrowseHostResults.this ); try { connection.sendBrowseHostRequest(); } catch ( Bro...
shapeTypes.addElement(new ShapeType(shapeType.getID(), shapeType.getPluralNaming(), false));
shapeTypes.addElement(new ShapeType(shapeType.getID(), shapeType.getPluralNaming(), as.getTopicProperty(shapeType, PROPERTY_COLOR), false));
private void initShapeTypes(Session session) { Vector st = ((CityMapTopic) as.getLiveTopic(getCityMap(session))).getShapeTypes(); // ### ugly System.out.println(">>> there are " + st.size() + " shape types:"); Vector shapeTypes = new Vector(); for (int i = 0; i < st.size(); i++) { TypeTopic shapeType = (TypeTopi...
System.out.println(">>> shape size: " + width + "x" + height);
Dimension size = new Dimension(width, height);
private void updateShapes(Session session) { try { Vector shapes = new Vector(); Vector shapeTypes = getShapeTypes(session); String mapID = getCityMap(session).getID(); // for all shape types ... Enumeration e = shapeTypes.elements(); while (e.hasMoreElements()) { ShapeType shapeType = (ShapeType) e.ne...
shapes.addElement(new Shape(url, point));
shapes.addElement(new Shape(url, point, size));
private void updateShapes(Session session) { try { Vector shapes = new Vector(); Vector shapeTypes = getShapeTypes(session); String mapID = getCityMap(session).getID(); // for all shape types ... Enumeration e = shapeTypes.elements(); while (e.hasMoreElements()) { ShapeType shapeType = (ShapeType) e.ne...
return "job/"+name+'/';
try { return "job/"+ URLEncoder.encode(name,"UTF-8")+'/'; } catch (UnsupportedEncodingException e) { throw new Error(e); }
public String getUrl() { return "job/"+name+'/'; }
creator.getCurrentSelection().setDisplay(selectionDisplay.addDisplay(first, tr, first.getName() + " " +
creator.getCurrentSelection().setDisplay(selectionDisplay.addDisplay(first, tr, creator.getName() + "." +
public void createSelectionDisplay(BasicSeismogramDisplay creator){ if(selectionDisplay == null){ logger.debug("creating selection display"); selectionWindow = new JDialog(); //selectionWindow.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); selectionWindow.setSize(400, 220); JToolBar infoBar ...
assertEquals(str, sym.getText().asNativeText().javaValue);
assertEquals(str, sym.base_getText().asNativeText().javaValue);
private void compareSymbol(String str, ATSymbol sym) { try { assertEquals(str, sym.getText().asNativeText().javaValue); } catch (XTypeMismatch e) { fail(e.getMessage()); } }
public static final AGSymbol alloc(String javaRepresentation) { return alloc(NATText.atValue(javaRepresentation));
public static final AGSymbol alloc(ATText txt) { AGSymbol existing = (AGSymbol) _STRINGPOOL_.get(txt); if (existing == null) { existing = new AGSymbol(txt); _STRINGPOOL_.put(txt, existing); } return existing;
public static final AGSymbol alloc(String javaRepresentation) { return alloc(NATText.atValue(javaRepresentation)); }
if (!(candidate instanceof DateProperty)) { return false; }
public boolean matches(Property candidate) { // XXX later return true; }
guard = op.getOperationGuard();
guard = "["+op.getOperationGuard()+"]";
private NFA<Object, String> createNFA(Protocol protocol){ EList states = protocol.getStates(); provervisual.State initState = null; HashSet <Object>finalStates = new HashSet<Object>(); HashSet <Object>actionStates = new HashSet<Object>(); for(Iterator i = states.iterator(); i.hasNext();){ Object element = i.n...
"["+guard+"]>", op.getEndState() );
guard+">", op.getEndState() );
private NFA<Object, String> createNFA(Protocol protocol){ EList states = protocol.getStates(); provervisual.State initState = null; HashSet <Object>finalStates = new HashSet<Object>(); HashSet <Object>actionStates = new HashSet<Object>(); for(Iterator i = states.iterator(); i.hasNext();){ Object element = i.n...
if(args.length > 0) {
if(args.length > 2) {
public static void main(String[] args) { BasicConfigurator.configure(); OpenMap om; if(args.length > 0) { om = new OpenMap("edu/sc/seis/fissuresUtil/data/maps/dcwpo-browse", "edu/sc/seis/mapData", args[0]); } else { om = new OpenM...
"edu/sc/seis/mapData", args[0]);
"edu/sc/seis/mapData", args[2]);
public static void main(String[] args) { BasicConfigurator.configure(); OpenMap om; if(args.length > 0) { om = new OpenMap("edu/sc/seis/fissuresUtil/data/maps/dcwpo-browse", "edu/sc/seis/mapData", args[0]); } else { om = new OpenM...
handle("An uncaught exception has occured. Please report this to geebugs@seis.sc.edu", thrown);
handle("An uncaught exception has occured.", thrown);
public static void handle(Throwable thrown) { handle("An uncaught exception has occured. Please report this to geebugs@seis.sc.edu", thrown); }
System.out.println("ZoomListener: " + zl);
public void addZoomListener(ZoomListener zl){ System.out.println("ZoomListener: " + zl); listenerList.add(ZoomListener.class, zl); }
public char asChar() throws XIllegalArgument {
public char asChar() throws XTypeMismatch {
public char asChar() throws XIllegalArgument { if (javaValue.length() == 1) { return javaValue.charAt(0); } else { throw new XIllegalArgument("Expected a character, given a string: " + javaValue); } }
throw new XIllegalArgument("Expected a character, given a string: " + javaValue);
throw new XTypeMismatch(Character.class, this);
public char asChar() throws XIllegalArgument { if (javaValue.length() == 1) { return javaValue.charAt(0); } else { throw new XIllegalArgument("Expected a character, given a string: " + javaValue); } }
setFillPaint(Color.BLUE);
setFillPaint(STATION);
public OMStation(Station stat){ super(stat.my_location.latitude, stat.my_location.longitude, xPoints, yPoints, OMPoly.COORDMODE_ORIGIN); station = stat; setFillPaint(Color.BLUE); setLinePaint(Color.BLACK); generate(getProje...
setFillPaint(Color.BLUE);
setFillPaint(STATION);
public void deselect(){ setFillPaint(Color.BLUE); selected = false; }
events = svci.findEventsByName(cdURI.getCal(), entityName);
events = getSvci().findEventsByName(cdURI.getCal(), entityName);
public void init(boolean content) throws WebdavIntfException { if (!content) { return; } try { if ((eventInfo == null) && exists) { String entityName = cdURI.getEntityName(); if (entityName == null) { return; } if (debug) { debugMsg("SEARCH: compNode re...
public EventInfo(BwEvent event) { setEvent(event);
public EventInfo() {
public EventInfo(BwEvent event) { setEvent(event); }
fisName = new FissuresNamingServiceImpl(orb);
fisName = new FissuresNamingService(orb);
public static void init(String[] args) { Properties props = initProperties(args); /* Check for properties on the command line and load them if they exist. */ /** Configure log4j, not required for DHI, but is useful. */ BasicConfigurator.configure(); logger.info("Logging configured...
public FissuresNamingServiceImpl(org.omg.CORBA_2_3.ORB orb) throws InvalidName { org.omg.CORBA.Object obj = null; obj = orb.resolve_initial_references("NameService"); namingContext = NamingContextExtHelper.narrow(obj);
public FissuresNamingServiceImpl (java.util.Properties props) throws InvalidName { this.props = props; String[] args = new String[0]; orb = (org.omg.CORBA_2_3.ORB)org.omg.CORBA.ORB.init(args, props); AllVTFactory vt = new AllVTFactory(); vt.register(orb); org.omg.CORBA.Object rootObj = orb.resolve_initial_referenc...
public FissuresNamingServiceImpl(org.omg.CORBA_2_3.ORB orb) throws InvalidName { org.omg.CORBA.Object obj = null; obj = orb.resolve_initial_references("NameService"); namingContext = NamingContextExtHelper.narrow(obj); }
PlottableDC plottabledc = PlottableDCHelper.narrow(getPlottableDC(dns, objectname));
PlottableDC plottabledc = PlottableDCHelper.narrow(getPlottableDCObject(dns, objectname));
public PlottableDC getPlottableDC(String dns, String objectname) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName { PlottableDC plottabledc = PlottableDCHelper.narrow(getPlottableDC(dns, objectname)); re...
int maxTry = 2; for(int i = 0; i < 2; i++) {
int maxTry = 1; for(int i = 0; i <= maxTry; i++) {
public org.omg.CORBA.Object resolve(String dns, String interfacename, String objectname) throws NotFound, CannotProceed, InvalidName, org.omg.CORBA.ORBPackage.InvalidName { dns = appendKindNames(dns); if(interface...
Iterator e = seismos.keySet().iterator(); while(e.hasNext()){ timeConfig.setBeginTime((DataSetSeismogram)e.next(), b); }
timeConfig.setAllBeginTime(b);
public void setAllBeginTime(MicroSecondDate b){ Iterator e = seismos.keySet().iterator(); while(e.hasNext()){ timeConfig.setBeginTime((DataSetSeismogram)e.next(), b); } }
semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.profile.edit.parts.Profile2EditPart.VISUAL_ID);
semanticHint = UMLVisualIDRegistry.getType(Profile2EditPart.VISUAL_ID);
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { if (semanticHint == null) { semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.profile.edit.parts.Profile2EditPart.VISUAL_ID); view.setType(semanticHint); }...
if(meanDiff == this.ampRange.getMaxValue())
if(meanDiff >= this.ampRange.getMaxValue() - 1)
public void removeSeismogram(LocalSeismogram aSeis){ MicroSecondTimeRange calcIntv; if(this.timeConfig == null) calcIntv = new MicroSecondTimeRange(((LocalSeismogramImpl)aSeis).getBeginTime(), ((LocalSeismogramImpl)aSeis).getEndTime()); else calcIntv = timeConfig.getTimeRange(aSeis); if(seismos.contains(aS...
logger.debug("recalculating amp range as defining seismogram was removed");
public void removeSeismogram(LocalSeismogram aSeis){ MicroSecondTimeRange calcIntv; if(this.timeConfig == null) calcIntv = new MicroSecondTimeRange(((LocalSeismogramImpl)aSeis).getBeginTime(), ((LocalSeismogramImpl)aSeis).getEndTime()); else calcIntv = timeConfig.getTimeRange(aSeis); if(seismos.contains(aS...
public DateTime(Object instant, DateTimeZone zone) { super(instant, zone);
public DateTime() { super();
public DateTime(Object instant, DateTimeZone zone) { super(instant, zone); }
return super.meta_select(receiver, selector);
Method[] choices = Symbiosis.getMethods(wrappedObject_.getClass(), jSelector, false); if (choices.length > 0) { return new JavaMethod(this, wrappedObject_, choices); } else { return super.meta_select(receiver, selector); }
public ATObject meta_select(ATObject receiver, ATSymbol selector) throws InterpreterException { String jSelector = Reflection.upSelector(selector); try { return Symbiosis.readField(wrappedObject_, wrappedObject_.getClass(), jSelector); } catch (XUndefinedField e) { return ...
return super.meta_select(receiver, selector);
Method[] choices = Symbiosis.getMethods(wrappedClass_, jSelector, true); if (choices.length > 0) { return new JavaMethod(this, null, choices); } else { return super.meta_select(receiver, selector); }
public ATObject meta_select(ATObject receiver, ATSymbol selector) throws InterpreterException { String jSelector = Reflection.upSelector(selector); try { return Symbiosis.readField(null, wrappedClass_, jSelector); } catch (XUndefinedField e) { return super.meta_select(rece...
sorter.remove(display.getName());
sorter.remove(display.getSeismograms()[0].toString());
public boolean removeDisplay(BasicSeismogramDisplay display){ if(basicDisplays.contains(display)){ if(basicDisplays.size() == 1){ this.removeAll(); return true; } super.remove(display); basicDisplays.remove(display); sorter.remove(display.getName()); ((BasicSeismogramDisplay)basicDisplays....
href = href.substring(href.indexOf("file:")+1);
href = href.substring(href.indexOf("file:")+5);
public static void insertParameterRef(Element paramRef, String name, String href, Object value) { // write(href, value); //Element paramRef = doc.createElement("parameterRef"); paramRef.setAttribute("name", name); paramRef.setAttributeNS(xlinkNS,"xlink:type", "type/xml"); if(href.startsWith("file:")) { href = h...
href.replace(' ', '_');
href = href.replace(' ', '_');
public static void insertParameterRef(Element paramRef, String name, String href, Object value) { // write(href, value); //Element paramRef = doc.createElement("parameterRef"); paramRef.setAttribute("name", name); paramRef.setAttributeNS(xlinkNS,"xlink:type", "type/xml"); if(href.startsWith("file:")) { href = h...
public static void insert(Element element, Channel channel) {
public static void insert(XMLStreamWriter writer, Channel channel) throws XMLStreamException{ writer.writeStartElement("id"); XMLChannelId.insert(writer, channel.get_id()); XMLUtil.writeEndElementWithNewLine(writer);
public static void insert(Element element, Channel channel) { Document doc = element.getOwnerDocument(); Element id = doc.createElement("id"); XMLChannelId.insert(id, channel.get_id()); element.appendChild(id); element.appendChild(XMLUtil.createTextElement(doc, ...
Document doc = element.getOwnerDocument();
XMLUtil.writeTextElement(writer, "name", channel.name);
public static void insert(Element element, Channel channel) { Document doc = element.getOwnerDocument(); Element id = doc.createElement("id"); XMLChannelId.insert(id, channel.get_id()); element.appendChild(id); element.appendChild(XMLUtil.createTextElement(doc, ...
Element id = doc.createElement("id"); XMLChannelId.insert(id, channel.get_id()); element.appendChild(id);
writer.writeStartElement("an_orientation"); XMLOrientation.insert(writer, channel.an_orientation); XMLUtil.writeEndElementWithNewLine(writer);
public static void insert(Element element, Channel channel) { Document doc = element.getOwnerDocument(); Element id = doc.createElement("id"); XMLChannelId.insert(id, channel.get_id()); element.appendChild(id); element.appendChild(XMLUtil.createTextElement(doc, ...
element.appendChild(XMLUtil.createTextElement(doc, "name", channel.name));
writer.writeStartElement("sampling_info"); XMLSampling.insert(writer, channel.sampling_info); XMLUtil.writeEndElementWithNewLine(writer);
public static void insert(Element element, Channel channel) { Document doc = element.getOwnerDocument(); Element id = doc.createElement("id"); XMLChannelId.insert(id, channel.get_id()); element.appendChild(id); element.appendChild(XMLUtil.createTextElement(doc, ...
Element an_orientation = doc.createElement("an_orientation"); XMLOrientation.insert(an_orientation, channel.an_orientation); element.appendChild(an_orientation);
writer.writeStartElement("effective_time"); XMLTimeRange.insert(writer, channel.effective_time); XMLUtil.writeEndElementWithNewLine(writer);
public static void insert(Element element, Channel channel) { Document doc = element.getOwnerDocument(); Element id = doc.createElement("id"); XMLChannelId.insert(id, channel.get_id()); element.appendChild(id); element.appendChild(XMLUtil.createTextElement(doc, ...
Element sampling_info = doc.createElement("sampling_info"); XMLSampling.insert(sampling_info, channel.sampling_info); element.appendChild(sampling_info); Element effective_time = doc.createElement("effective_time"); XMLTimeRange.insert(effective_time, channel.effective_time); element.appendChild(effective_time); Elem...
writer.writeStartElement("my_site"); XMLSite.insert(writer, channel.my_site); XMLUtil.writeEndElementWithNewLine(writer);
public static void insert(Element element, Channel channel) { Document doc = element.getOwnerDocument(); Element id = doc.createElement("id"); XMLChannelId.insert(id, channel.get_id()); element.appendChild(id); element.appendChild(XMLUtil.createTextElement(doc, ...
GenericCommandExecute.execute(command);
FileOutputStream fos = new FileOutputStream(psFilename, true); try { GenericCommandExecute.execute(command, new StringReader(""), fos, System.err); } finally { fos.close(); }
public static void close(String psFilename, String projection, String region) throws InterruptedException, IOException { String command = "psxy /dev/null -V -J" + projection + " -R" + region + " -O"; GenericCommandExecute.execute(command); }
addPoints("/Volumes/heff/oliverpa/gmtTest/world.ps",
addPoints("world.ps",
public static void main(String[] args) { try { double[][] points = { {-180, 90}, {-135, 67.5}, {-90, 45}, {-45, 22.5}, {0, 0}}; addPoints("/Volumes/heff/oliver...
close("world.ps", "Kf166/10i", "-14/346/-90/90");
public static void main(String[] args) { try { double[][] points = { {-180, 90}, {-135, 67.5}, {-90, 45}, {-45, 22.5}, {0, 0}}; addPoints("/Volumes/heff/oliver...
public static int execute(String command, Reader stdin, OutputStream stdout, OutputStream stderr) throws InterruptedException,
public static int execute(String command) throws InterruptedException,
public static int execute(String command, Reader stdin, OutputStream stdout, OutputStream stderr) throws InterruptedException, IOException { Runtime rt = Runtime.getRuntime(); System.out.println("executin...
Runtime rt = Runtime.getRuntime(); System.out.println("executing command: " + command); Process proc = rt.exec(command); BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream())); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stdout)); BufferedWriter inWriter = new Buf...
return execute(command, new StringReader(""), System.out, System.err);
public static int execute(String command, Reader stdin, OutputStream stdout, OutputStream stderr) throws InterruptedException, IOException { Runtime rt = Runtime.getRuntime(); System.out.println("executin...
public JDBCQuantity(Connection conn) throws SQLException{ this(new JDBCUnit(conn), conn);
public JDBCQuantity()throws SQLException{ this(ConnMgr.createConnection());
public JDBCQuantity(Connection conn) throws SQLException{ this(new JDBCUnit(conn), conn); }
if (cal.getChildren().size() > 0) { form.getErr().emit("org.bedework.client.error.calendar.referenced"); return "inUse"; }
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwCalendar cal = form.ge...
Main.getMainFrame().scoreSheet.resetUsedRowsHack();
public void setMode(int mode) { if (mode <= Main.MODE_IN_LOBBY) { gameBoardData.init(); scoreSheetCaptionData.init(); scoreSheetHoteltypeData.init(); Main.getMainFrame().scoreSheet.resetUsedRowsHack(); } if (mode < Main.MODE_IN_LOBBY) { userListPresenter.init(); } }
Main.getMainFrame().setComponentsBounds();
public void sync(ScoreSheetCaptionData sscd, ScoreSheetHoteltypeData sshtd) { makeOnlyUsedRowsVisible(sscd); for (int y=0; y<10; ++y) { for (int x=0; x<10; ++x) { boolean repaint = false; Object caption = sscd.getCaption(x, y); if (scoreSheetCaptionData.getCaption(x, y) != caption) { ...
graphics2d.drawString(string, xc - offsetX, yc - offsetY);
AttributedString as = new AttributedString(string); as.addAttribute(TextAttribute.FONT, graphics2d.getFont()); boolean isHyperlink = (this.getIdea().getUrl().length() > 0); if (isHyperlink) { as.addAttribute(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); } graphics2d.drawString(as.getIterator(), xc - offsetX, yc...
void drawString(Graphics2D graphics2d, String string, Point p, int alignment, double orientation, boolean editing, IdeaMap map) { double orient = orientation % Math.PI; if (orient > (Math.PI / 2.0)) { orient -= Math.PI; } if (orient < (-Math.PI / 2.0)) { ...
public BranchView(Idea anIdea) { super(anIdea);
public BranchView() { this(null);
public BranchView(Idea anIdea) { super(anIdea); }
public MutablePeriod(Object period, PeriodType type) { super(period, type, null);
public MutablePeriod() { super(0L, null, null);
public MutablePeriod(Object period, PeriodType type) { super(period, type, null); }
public int sort(LocalSeismogramImpl seismo){ String name = seismo.getName(); int i = 0; while(i < names.size() && ((String)names.get(i)).compareToIgnoreCase(name) < 0){ i++; } names.add(i, seismo.getName()); return i;
public int sort(LocalSeismogramImpl seismo, String name){ names.add(name); return names.size();
public int sort(LocalSeismogramImpl seismo){ String name = seismo.getName(); int i = 0; while(i < names.size() && ((String)names.get(i)).compareToIgnoreCase(name) < 0){ i++; } names.add(i, seismo.getName()); return i; }
public DataSetSeismogram(RequestFilter rf, DataCenterOperations dco) { this(rf, dco, null);
public DataSetSeismogram() { this.dssDataListeners = new LinkedList(); this.rfChangeListeners = new LinkedList();
public DataSetSeismogram(RequestFilter rf, DataCenterOperations dco) { this(rf, dco, null); }
Vector headers = null; Vector cont = null;
Collection headers = null; Collection cont = null;
Req(String user, String pw, String testFileName) throws Throwable { this.user = user; this.pw = pw; FileReader frdr = null; try { File testFile = new File(testFileName); frdr = new FileReader(testFile); LineNumberReader lnr = new LineNumberReader(frdr); Vector headers = null; Vect...
headers = new Vector();
headers = new ArrayList();
Req(String user, String pw, String testFileName) throws Throwable { this.user = user; this.pw = pw; FileReader frdr = null; try { File testFile = new File(testFileName); frdr = new FileReader(testFile); LineNumberReader lnr = new LineNumberReader(frdr); Vector headers = null; Vect...
cont = new Vector();
cont = new ArrayList();
Req(String user, String pw, String testFileName) throws Throwable { this.user = user; this.pw = pw; FileReader frdr = null; try { File testFile = new File(testFileName); frdr = new FileReader(testFile); LineNumberReader lnr = new LineNumberReader(frdr); Vector headers = null; Vect...
public int sendRequest(String method, String url, String user, String pw, Header[] hdrs, String contentType, int contentLen, byte[] content) throws Throwable { client.setMethodName(method, url); HttpMethod meth = client.getMethod(); if (user != null) { String upw = user + ":" + pw; meth.setRequestHeader("Authorizati...
public int sendRequest(String method, String url, Header[] hdrs, String contentType, int contentLen, byte[] content) throws Throwable { return sendRequest(method, url, null, null, hdrs, contentType, contentLen, content);
public int sendRequest(String method, String url, String user, String pw, Header[] hdrs, String contentType, int contentLen, byte[] content) throws Throwable { client.setMethodName(method, url); HttpMethod meth = client.getMethod(); if (user != null) { S...