rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
layout ();
public void doLayout() { // nothing to do unless we're a container }
setEnabled(true);
this.enabled = true; if (peer != null) peer.setEnabled (true);
public void enable() { setEnabled(true); }
return new Rectangle(x, y, width, height);
return bounds ();
public Rectangle getBounds() { return new Rectangle(x, y, width, height); }
return contains(x, y) ? this : null;
return locate (x, y);
public Component getComponentAt(int x, int y) { return contains(x, y) ? this : null; }
return new Point(x, y);
return location ();
public Point getLocation() { return new Point(x, y); }
return new Dimension(width, height);
return size ();
public Dimension getSize() { return new Dimension(width, height); }
return contains(x, y);
return x >= 0 && y >= 0 && x < width && y < height;
public boolean inside(int x, int y) { return contains(x, y); }
doLayout();
public void layout() { doLayout(); }
return getComponentAt(x, y);
return contains (x, y) ? this : null;
public Component locate(int x, int y) { return getComponentAt(x, y); }
return getLocation();
return new Point (x, y);
public Point location() { return getLocation(); }
setLocation(x, y);
if (this.x == x && this.y == y) return; invalidate (); this.x = x; this.y = y; if (peer != null) peer.setBounds (x, y, width, height);
public void move(int x, int y) { setLocation(x, y); }
setBounds(x, y, width, height);
if (this.x == x && this.y == y && this.width == width && this.height == height) return; invalidate (); this.x = x; this.y = y; this.width = width; this.height = height; if (peer != null) peer.setBounds (x, y, width, height);
public void reshape(int x, int y, int width, int height) { setBounds(x, y, width, height); }
setSize(width, height);
if (this.width == width && this.height == height) return; invalidate (); this.width = width; this.height = height; if (peer != null) peer.setBounds (x, y, width, height);
public void resize(int width, int height) { setSize(width, height); }
if (this.x == x && this.y == y && width == w && height == h) return; invalidate(); this.x = x; this.y = y; width = w; height = h; if (peer != null) peer.setBounds(x, y, w, h);
reshape (x, y, w, h);
public void setBounds(int x, int y, int w, int h) { if (this.x == x && this.y == y && width == w && height == h) return; invalidate(); this.x = x; this.y = y; width = w; height = h; if (peer != null) peer.setBounds(x, y, w, h); }
this.enabled = b; if (peer != null) peer.setEnabled(b);
enable (b);
public void setEnabled(boolean b) { this.enabled = b; if (peer != null) peer.setEnabled(b); }
if (this.x == x && this.y == y) return; invalidate(); this.x = x; this.y = y; if (peer != null) peer.setBounds(x, y, width, height);
move (x, y);
public void setLocation(int x, int y) { if (this.x == x && this.y == y) return; invalidate(); this.x = x; this.y = y; if (peer != null) peer.setBounds(x, y, width, height); }
if (this.width == width && this.height == height) return; invalidate(); this.width = width; this.height = height; if (peer != null) peer.setBounds(x, y, width, height);
resize (width, height);
public void setSize(int width, int height) { if (this.width == width && this.height == height) return; invalidate(); this.width = width; this.height = height; if (peer != null) peer.setBounds(x, y, width, height); }
if (b) show(); else hide();
show (b);
public void setVisible(boolean b) { // Inspection by subclassing shows that Sun's implementation calls // show(boolean) which then calls show() or hide(). It is the show() // method that is overriden in subclasses like Window. if (b) show(); else hide(); }
return getSize();
return new Dimension (width, height);
public Dimension size() { return getSize(); }
_evicted.put(rootModuleConf, new EvictionData(rootModuleConf, node, conflictManager, resolved)); if (!_rootModuleConfs.keySet().contains(rootModuleConf)) { _rootModuleConfs.put(rootModuleConf, null); } if (resolved != null) { for (Iterator iter = resolved.iterator(); iter.hasNext();) { IvyNode selected = (IvyNode)ite...
EvictionData evictionData = new EvictionData(rootModuleConf, node, conflictManager, resolved); markEvicted(evictionData);
public void markEvicted(String rootModuleConf, IvyNode node, ConflictManager conflictManager, Collection resolved) { _evicted.put(rootModuleConf, new EvictionData(rootModuleConf, node, conflictManager, resolved)); if (!_rootModuleConfs.keySet().contains(rootModuleConf)) { _rootModuleConfs.p...
public abstract void shutdownInput () throws IOException;
protected abstract void shutdownInput () throws IOException;
public abstract void shutdownInput () throws IOException;
public abstract void shutdownOutput () throws IOException;
protected abstract void shutdownOutput () throws IOException;
public abstract void shutdownOutput () throws IOException;
while (count > 0)
while (count > 0 || converter.havePendingBytes())
private void writeChars(char[] buf, int offset, int count) throws IOException { while (count > 0) { // We must flush if out.count == out.buf.length. // It is probably a good idea to flush if out.buf is almost full. // This test is an approximation for "almost full". if (out.count + count >= out.buf.length...
if (converted == 0 && out.count == converter.count) { out.flush(); if (out.count != 0) throw new IOException("unable to flush output byte buffer"); }
private void writeChars(char[] buf, int offset, int count) throws IOException { while (count > 0) { // We must flush if out.count == out.buf.length. // It is probably a good idea to flush if out.buf is almost full. // This test is an approximation for "almost full". if (out.count + count >= out.buf.length...
component.addPropertiesListener(myPropertiesListener); for (Iterator i = component.getProperties(); i.hasNext(); ) { Property p = (Property) i.next(); p.addPropertyListener(myPropertyListener); }
private void installListeners(ModifiableConfigurableComponent component) { component.addModificationListener(myModificationListener); component.addPropertiesListener(myPropertiesListener); for (Iterator i = component.getProperties(); i.hasNext(); ) { Property p = (Property) i.next(); p.addPropertyL...
component.removePropertiesListener(myPropertiesListener); for (Iterator i = component.getProperties(); i.hasNext(); ) { Property p = (Property) i.next(); p.removePropertyListener(myPropertyListener); }
private void removeListeners(ModifiableConfigurableComponent component) { component.removeModificationListener(myModificationListener); component.removePropertiesListener(myPropertiesListener); for (Iterator i = component.getProperties(); i.hasNext(); ) { Property p = (Property) i.next(); p.removeP...
return line;
if (line == null) throw new EOFException("EOF"); return (line.length() == 0) ? null : line;
public static String readline(String prompt) throws EOFException, IOException, UnsupportedEncodingException { if (iLib != ReadlineLibrary.PureJava) return readlineImpl(prompt); else { System.out.print(prompt); if (iReader == null) iReader = new BufferedReader(n...
return (KeyFactory)super.create(keyInterface);
return (KeyFactory)super.create(keyInterface.getName());
public KeyFactory create() { setNamePrefix(keyInterface.getName()); return (KeyFactory)super.create(keyInterface); }
if (context != null && context.request() != null) { if (ERXApplication.requestHandlingLog.isInfoEnabled()) { ERXApplication.requestHandlingLog.info(context.request()); } }
public void appendToResponse(WOResponse response, WOContext context) { if (context != null && context.request() != null) { if (ERXApplication.requestHandlingLog.isInfoEnabled()) { ERXApplication.requestHandlingLog.info(context.request()); } } super.appendToR...
} WOContext context = (WOContext)ERXThreadStorage.valueForKey("wocontext"); if (context != null && context.request() != null) { if (ERXApplication.requestHandlingLog.isInfoEnabled()) { ERXApplication.requestHandlingLog.info(context.request()); }
public WOResponse dispatchRequest(WORequest request) { WOResponse response = null; try { if(useComponentActionRedirection()) { ERXComponentActionRedirector redirector = ERXComponentActionRedirector.redirectorForRequest(request); if(redirector == null) { ...
public static Element[] getChildren(Element element, String namespaceUri) { return getChildren(element, namespaceUri, "*");
public static Element[] getChildren(Element element) { List childElements = new ArrayList(); NodeList children = element.getElementsByTagName("*"); for (int i = 0; i < children.getLength(); i++) { if (children.item(i).getParentNode() == element) { childElements.add(children.item(i)); } } return (Element[]) childEleme...
public static Element[] getChildren(Element element, String namespaceUri) { return getChildren(element, namespaceUri, "*"); }
public static Element getFirstChild(Element element, String namespaceUri, String localName) { Element[] children = getChildren(element, namespaceUri, localName); if (children.length > 0) { return children[0]; } return null;
public static Element getFirstChild(Element element, String namespaceUri) { return getFirstChild(element, namespaceUri, "*");
public static Element getFirstChild(Element element, String namespaceUri, String localName) { Element[] children = getChildren(element, namespaceUri, localName); if (children.length > 0) { return children[0]; } return null; }
public static Element[] getNextSiblings(Element element, String namespaceUri, String localName) { List childElements = new ArrayList(); Element parent = (Element) element.getParentNode(); Element[] children = getChildren(parent, namespaceUri, localName); int l = children.length; for (int i = 0; i < children.length; i+...
public static Element[] getNextSiblings(Element element, String namespaceUri) { return getNextSiblings(element, namespaceUri, "*");
public static Element[] getNextSiblings(Element element, String namespaceUri, String localName) { List childElements = new ArrayList(); Element parent = (Element) element.getParentNode(); Element[] children = getChildren(parent, namespaceUri, localName); int l = children.length; f...
public static Element[] getPrecedingSiblings(Element element, String namespaceUri, String localName) { List childElements = new ArrayList(); Element parent = (Element) element.getParentNode(); Element[] children = getChildren(parent, namespaceUri, localName); int i = 0; while (children[i] != element && i < children.le...
public static Element[] getPrecedingSiblings(Element element, String namespaceUri) { return getPrecedingSiblings(element, namespaceUri, "*");
public static Element[] getPrecedingSiblings(Element element, String namespaceUri, String localName) { List childElements = new ArrayList(); Element parent = (Element) element.getParentNode(); Element[] children = getChildren(parent, namespaceUri, localName); int i = 0; ...
return (released || !channel.isOpen ());
return (released || !channel ().isOpen ());
public boolean isValid () { return (released || !channel.isOpen ()); }
String listConfigurationName=(String)d2wContext().valueForKey("listConfigurationName"); if(listConfigurationName!=null){ ListPageInterface listpageinterface = (ListPageInterface)D2W.factory().pageForConfigurationNamed(listConfigurationName, this.session()); listpageinterface.setDataSource(queryDataSource()); listpagein...
if(nextPageDelegate() == null) { String listConfigurationName=(String)d2wContext().valueForKey("listConfigurationName"); if(listConfigurationName!=null){ ListPageInterface listpageinterface = (ListPageInterface)D2W.factory().pageForConfigurationNamed(listConfigurationName, this.session()); listpageinterface.setDataSour...
public WOComponent queryAction() { String listConfigurationName=(String)d2wContext().valueForKey("listConfigurationName"); if(listConfigurationName!=null){ ListPageInterface listpageinterface = (ListPageInterface)D2W.factory().pageForConfigurationNamed(listConfigurationName, this.session())...
t.setTarget(v, t);
t.setTarget(v);
public void generateClass(ClassVisitor v) throws Exception { t.setTarget(v, t); gen.generateClass(t); }
char result = bb.getChar ((position () >> 1) + offset);
char result = bb.getChar ((position () << 1) + offset);
public char get () { char result = bb.getChar ((position () >> 1) + offset); position (position () + 1); return result; }
bb.putChar ((position () >> 1) + offset, value);
bb.putChar ((position () << 1) + offset, value); position (position () + 1);
public CharBuffer put (char value) { bb.putChar ((position () >> 1) + offset, value); return this; }
public int addChild(ConfigurableComponent c);
int addChild(ConfigurableComponent c);
public int addChild(ConfigurableComponent c);
public ConfigurableComponent getChild(int childIndex);
ConfigurableComponent getChild(int childIndex);
public ConfigurableComponent getChild(int childIndex);
public Collection getDescendentsOfClass(Class cls, Collection c);
Collection getDescendentsOfClass(Class cls, Collection c);
public Collection getDescendentsOfClass(Class cls, Collection c);
public ConfigurableComponent getParent();
ConfigurableComponent getParent();
public ConfigurableComponent getParent();
public void removeAllChildren();
void removeAllChildren();
public void removeAllChildren();
public void removeChild(int childIndex);
void removeChild(int childIndex);
public void removeChild(int childIndex);
public void setParent(ConfigurableComponent newParent);
void setParent(ConfigurableComponent newParent);
public void setParent(ConfigurableComponent newParent);
return null;
throw new IllegalArgumentException("Not a DefaultMutableTreeNode or DMTNArray");
public Transferable makeDraggableObject(Object o) { if (o instanceof DefaultMutableTreeNode) { return new ConsoleTreeObjectTransferable((DefaultMutableTreeNode) o); } else if (o instanceof DMTNArray) { return new CTOArrayTransferable((DMTNArray) o); } return null; }
msg.append((char)(rest & 0x7f));
msg.append(fromGsmCharset((byte)(rest & 0x7f)));
public static String readSeptets(InputStream theIs, int theLength) throws IOException { StringBuffer msg = new StringBuffer(160); int rest = 0; int restBits = 0; while(msg.length() < theLength) { int data = theIs.read(); if (data == -1) {...
case '1': bcd |= 0x01; break; case '2': bcd |= 0x02; break; case '3': bcd |= 0x03; break; case '4': bcd |= 0x04; break; case '5': bcd |= 0x05; break; case '6': bcd |= 0x06; break; case '7': bcd |= 0x07; break; case '8': bcd |= 0x08; break; case '9': bcd |= 0x09; break; case '*': bcd |= 0x0A; break; case '#': bcd |= 0x0...
case '1': bcd |= 0x10; break; case '2': bcd |= 0x20; break; case '3': bcd |= 0x30; break; case '4': bcd |= 0x40; break; case '5': bcd |= 0x50; break; case '6': bcd |= 0x60; break; case '7': bcd |= 0x70; break; case '8': bcd |= 0x80; break; case '9': bcd |= 0x90; break; case '*': bcd |= 0xA0; break; case '#': bcd |= 0xB...
public static void writeBcdNumber(OutputStream theOs, String theNumber) throws IOException { int bcd = 0x00; int n = 0; // First convert to a "half octet" value for(int i=0; i < theNumber.length(); i++) { switch(theNumber.charAt(i)) { cas...
bcd <<= 4;
bcd >>= 4;
public static void writeBcdNumber(OutputStream theOs, String theNumber) throws IOException { int bcd = 0x00; int n = 0; // First convert to a "half octet" value for(int i=0; i < theNumber.length(); i++) { switch(theNumber.charAt(i)) { cas...
char ch = (char)(theMsg.charAt(i) & 0x7f);
byte gsmChar = toGsmCharset(theMsg.charAt(i));
public static void writeSeptets(OutputStream theOs, String theMsg) throws IOException { int data = 0; int nBits = 0; for(int i=0; i < theMsg.length(); i++) { char ch = (char)(theMsg.charAt(i) & 0x7f); data |= (ch << nBits); nBits += 7; ...
data |= (ch << nBits);
data |= (gsmChar << nBits);
public static void writeSeptets(OutputStream theOs, String theMsg) throws IOException { int data = 0; int nBits = 0; for(int i=0; i < theMsg.length(); i++) { char ch = (char)(theMsg.charAt(i) & 0x7f); data |= (ch << nBits); nBits += 7; ...
String entityName = d2wcontext.entity().name(); EOEnterpriseObject newObject = _newObjectWithEntityNamed(entityName, peerContext);
EOEnterpriseObject newObject = _newObjectWithEntity(d2wcontext.entity(), peerContext);
public EditPageInterface editPageForNewObjectWithConfigurationNamed(String configurationName, WOSession session) { EditPageInterface epi = (EditPageInterface) pageForConfigurationNamed(configurationName, session); EOEditingContext peerContext = ERXExtensions.newEditingContext(session.defaultEditingContext() ...
EOEnterpriseObject newObject = _newObjectWithEntityNamed(entityName, peerContext);
EOEnterpriseObject newObject = _newObjectWithEntity(_entityNamed(entityName, session), peerContext);
public EditPageInterface editPageForNewObjectWithEntityNamed(String entityName, WOSession session) { EditPageInterface epi = editPageForEntityNamed(entityName, session); EOEditingContext peerContext = ERXExtensions.newEditingContext(session.defaultEditingContext().parentObjectStore()); EOEnterpriseObj...
EOEntity newEntity=entityName!=null ? EOModelGroup.defaultGroup().entityNamed(entityName) : null;
EOEntity newEntity = _entityNamed(entityName,session);
public WOComponent pageForTaskAndEntityNamed(String task, String entityName, WOSession session) { myCheckRules(); D2WContext newContext=new D2WContext(session); newContext.setTask(task); EOEntity newEntity=entityName!=null ? EOModelGroup.defaultGroup().entityNamed(entityName) : null; ...
if (experiment.getSocietyComponentCount() != 0) societyComponent = experiment.getSocietyComponent(0); else societyComponent = null;
societyComponent = experiment.getSocietyComponent();
public void update() { if (experiment.getSocietyComponentCount() != 0) societyComponent = experiment.getSocietyComponent(0); else societyComponent = null; hostTree.getModel().removeTreeModelListener(this); nodeTree.getModel().removeTreeModelListener(this); agentTree.getModel().removeTreeModel...
edges.add( getInbound( vertex ) ); edges.add( getOutbound( vertex ) );
edges.addAll( getInbound( vertex ) ); edges.addAll( getOutbound( vertex ) );
public Set getEdges(Vertex vertex) { Set edges = new HashSet(); edges.add( getInbound( vertex ) ); edges.add( getOutbound( vertex ) ); return edges; }
if (log.isDebugEnabled ()) log.debug ("Initializing Framework.");
public void finishInitialization () { if (log.isDebugEnabled ()) log.debug ("Initializing Framework."); Perl5Compiler compiler = new Perl5Compiler (); _matcher = new Perl5Matcher (); try { _pattern = compiler.compile (EMAIL_VALIDATION_PATTERN); } catch (MalformedPat...
this.initializeFrameworkFromSystemProperties (); log.info ("ERJavaMail: finished initialization");
public void finishInitialization () { if (log.isDebugEnabled ()) log.debug ("Initializing Framework."); Perl5Compiler compiler = new Perl5Compiler (); _matcher = new Perl5Matcher (); try { _pattern = compiler.compile (EMAIL_VALIDATION_PATTERN); } catch (MalformedPat...
if(numberOfObjectsPerBatch() == 0) { return 0;
if(isBatching()) { if(numberOfObjectsPerBatch() == 0) { return 0; } if(rowCount() == 0) { return 1; } else { return (rowCount() - 1) / numberOfObjectsPerBatch() + 1; }
public int batchCount() { if(numberOfObjectsPerBatch() == 0) { return 0; } if(rowCount() == 0) { return 1; } else { return (rowCount() - 1) / numberOfObjectsPerBatch() + 1; } }
if(rowCount() == 0) { return 1; } else { return (rowCount() - 1) / numberOfObjectsPerBatch() + 1; }
return super.batchCount();
public int batchCount() { if(numberOfObjectsPerBatch() == 0) { return 0; } if(rowCount() == 0) { return 1; } else { return (rowCount() - 1) / numberOfObjectsPerBatch() + 1; } }
if (!isBatching()) return super.displayedObjects();
if (!isBatching()) { return super.displayedObjects(); } else { if(_displayedObjects == null) { int count = rowCount(); int start = (currentBatchIndex()-1) * numberOfObjectsPerBatch(); int end = start + numberOfObjectsPerBatch();
public NSArray displayedObjects() { if (!isBatching()) return super.displayedObjects(); //check the start and end based on currentBatchIndex and numberOfObjectsPerBatch() int count = rowCount(); int start = currentBatchIndex() * numberOfObjectsPerBatch(); int end = start + numberO...
int count = rowCount(); int start = currentBatchIndex() * numberOfObjectsPerBatch(); int end = start + numberOfObjectsPerBatch();
if (numberOfObjectsPerBatch() == 0) { start = 0; end = rowCount(); }
public NSArray displayedObjects() { if (!isBatching()) return super.displayedObjects(); //check the start and end based on currentBatchIndex and numberOfObjectsPerBatch() int count = rowCount(); int start = currentBatchIndex() * numberOfObjectsPerBatch(); int end = start + numberO...
if (numberOfObjectsPerBatch() == 0) { start = 0; end = rowCount();
_displayedObjects = objectsInRange(start, end).mutableClone(); }
public NSArray displayedObjects() { if (!isBatching()) return super.displayedObjects(); //check the start and end based on currentBatchIndex and numberOfObjectsPerBatch() int count = rowCount(); int start = currentBatchIndex() * numberOfObjectsPerBatch(); int end = start + numberO...
NSMutableArray objects = objectsInRange(start, end).mutableClone(); return objects;
return _displayedObjects;
public NSArray displayedObjects() { if (!isBatching()) return super.displayedObjects(); //check the start and end based on currentBatchIndex and numberOfObjectsPerBatch() int count = rowCount(); int start = currentBatchIndex() * numberOfObjectsPerBatch(); int end = start + numberO...
return dataSource() instanceof EODatabaseDataSource;
if(_isBatching == null) { _isBatching = dataSource() instanceof EODatabaseDataSource ? Boolean.TRUE : Boolean.FALSE; } return _isBatching.booleanValue();
public boolean isBatching() { return dataSource() instanceof EODatabaseDataSource; }
String sql = ERXEOAccessUtilities.sqlForFetchSpecificationAndEditingContext(spec, ec);
String sql = ERXEOAccessUtilities.sqlForFetchSpecificationAndEditingContext(spec, ec, start, end);
public NSArray objectsInRange(int start, int end) { //uses the original fetch specification and adds a top(start,(end - start)) to the query sql EOFetchSpecification spec = databaseDataSource().fetchSpecificationForFetch(); //sortOrderings from the WODisplayGroup is only used in Memory: painful...
int index = sql.indexOf("select"); if (index == -1) { index = sql.indexOf("SELECT"); } index += 6; StringBuffer buf = new StringBuffer(); buf.append(sql.substring(0, index)).append(" TOP(").append(start).append(",").append(end - start).append(") ").append(sql.substring(index + 1, sql.length())); sql = buf.toString();
public NSArray objectsInRange(int start, int end) { //uses the original fetch specification and adds a top(start,(end - start)) to the query sql EOFetchSpecification spec = databaseDataSource().fetchSpecificationForFetch(); //sortOrderings from the WODisplayGroup is only used in Memory: painful...
EOFetchSpecification spec = databaseDataSource().fetchSpecificationForFetch(); EOEditingContext ec = databaseDataSource().editingContext(); EOModel model = ERXEOAccessUtilities.modelForFetchSpecificationAndEditingContext(spec, ec); String sql = ERXEOAccessUtilities.sqlForFetchSpecificationAndEditingContext(spec, ec); i...
if(_rowCount == -1) { EOFetchSpecification spec = databaseDataSource().fetchSpecificationForFetch(); EOEditingContext ec = databaseDataSource().editingContext(); EOModel model = ERXEOAccessUtilities.modelForFetchSpecificationAndEditingContext(spec, ec); String sql = ERXEOAccessUtilities.sqlForFetchSpecificationAndEditi...
public int rowCount() { EOFetchSpecification spec = databaseDataSource().fetchSpecificationForFetch(); EOEditingContext ec = databaseDataSource().editingContext(); EOModel model = ERXEOAccessUtilities.modelForFetchSpecificationAndEditingContext(spec, ec); String sql = ERXEOAccessUtilitie...
if (result.count() > 0) { NSDictionary dict = (NSDictionary)result.objectAtIndex(0); NSArray values = dict.allValues(); if (values.count() > 0) { Object value = values.objectAtIndex(0); if (value instanceof Number) { return ((Number)value).intValue();
if (result.count() > 0) { NSDictionary dict = (NSDictionary)result.objectAtIndex(0); NSArray values = dict.allValues(); if (values.count() > 0) { Object value = values.objectAtIndex(0); if (value instanceof Number) { return ((Number)value).intValue(); } else { try { int c = Integer.parseInt(value.toString()); setObject...
public int rowCount() { EOFetchSpecification spec = databaseDataSource().fetchSpecificationForFetch(); EOEditingContext ec = databaseDataSource().editingContext(); EOModel model = ERXEOAccessUtilities.modelForFetchSpecificationAndEditingContext(spec, ec); String sql = ERXEOAccessUtilitie...
try { int c = Integer.parseInt(value.toString()); setObjectArray(new ERFakeNSArray(c)); return c; } catch (NumberFormatException e) { throw new IllegalStateException("sql "+sql+" returned a wrong result, could not convert "+value+" into an int!"); }
throw new IllegalStateException("sql "+sql+" returned no result!");
public int rowCount() { EOFetchSpecification spec = databaseDataSource().fetchSpecificationForFetch(); EOEditingContext ec = databaseDataSource().editingContext(); EOModel model = ERXEOAccessUtilities.modelForFetchSpecificationAndEditingContext(spec, ec); String sql = ERXEOAccessUtilitie...
} else { throw new IllegalStateException("sql "+sql+" returned no result!");
public int rowCount() { EOFetchSpecification spec = databaseDataSource().fetchSpecificationForFetch(); EOEditingContext ec = databaseDataSource().editingContext(); EOModel model = ERXEOAccessUtilities.modelForFetchSpecificationAndEditingContext(spec, ec); String sql = ERXEOAccessUtilitie...
return _rowCount;
public int rowCount() { EOFetchSpecification spec = databaseDataSource().fetchSpecificationForFetch(); EOEditingContext ec = databaseDataSource().editingContext(); EOModel model = ERXEOAccessUtilities.modelForFetchSpecificationAndEditingContext(spec, ec); String sql = ERXEOAccessUtilitie...
String excel = "C:/Program Files/Microsoft Office/Office/EXCEL.EXE"; try { excel = System.getProperty(EXCEL); } catch (RuntimeException e) { }
String excel = Parameters.findParameter("org.cougaar.tools.csmart.excelpath");
private void showExcelFile() { File resultsDir = experiment.getResultDirectory(); if (resultsDir == null) { JOptionPane.showMessageDialog(this, "No Results (Metrics) Directory for Experiment", "No Results Directory", JOptionPane.WARNING_MESSAGE); return; } resultsDir = new...
log.info(document.getDocumentElement());
if (log.isDebugEnabled()) log.debug(document.getDocumentElement());
private void parse() { try { Document document = null; DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); dbf.setIgnoringElementContentWhitespace(true); DocumentBuilder builder = dbf.newDocumentBuilder(); InputStream stream = _contentStr...
long d2 = ((ArtifactInfo)o1).getLastModified();
long d2 = ((ArtifactInfo)o2).getLastModified();
public int compare(Object o1, Object o2) { long d1 = ((ArtifactInfo)o1).getLastModified(); long d2 = ((ArtifactInfo)o1).getLastModified(); return new Long(d1).compareTo(new Long(d2)); }
File file = new File(new File("/tmp"), className + ".class"); OutputStream out = new BufferedOutputStream(new FileOutputStream(file)); out.write(b); out.close();
if (debugLocation != null) { File file = new File(new File(debugLocation), className + ".class"); OutputStream out = new BufferedOutputStream(new FileOutputStream(file)); out.write(b); out.close(); }
private static Class defineClass(String className, byte[] b, ClassLoader loader) throws Exception { // if (debugLocation != null) { // File file = new File(new File(debugLocation), className + ".class"); // // System.err.println("CGLIB writing " + file); // OutputStream out =...
observer = new Observer(); monitoredFiles = new NSMutableArray(); isLocalizationEnabled = ERXUtilities.booleanValueWithDefault(System.getProperty("er.extensions.ERXLocalizer.isLocalizationEnabled"), true);
if(!isInitialized) { observer = new Observer(); monitoredFiles = new NSMutableArray(); isLocalizationEnabled = ERXUtilities.booleanValueWithDefault(System.getProperty("er.extensions.ERXLocalizer.isLocalizationEnabled"), true); isInitialized = true; }
public static void initialize() { observer = new Observer(); monitoredFiles = new NSMutableArray(); isLocalizationEnabled = ERXUtilities.booleanValueWithDefault(System.getProperty("er.extensions.ERXLocalizer.isLocalizationEnabled"), true); }
initialize();
public static void resetCache() { if(WOApplication.application().isCachingEnabled()) { Enumeration e = localizers.objectEnumerator(); while(e.hasMoreElements()) { ((ERXLocalizer)e.nextElement()).load(); } } else { localizers = new NSMutableDic...
assert("Test isInRange()", dr.isInRange(new Double(8.5))); assert("Test isInRange()", dr.isInRange(new Double(0.01))); assert("Test isInRange()", !dr.isInRange(new Integer(5))); assert("Test isInRange()", !dr.isInRange(new Double(10.1))); assert("Test isInRange()", !dr.isInRange(new String("Hello")));
assertTrue("Test isInRange()", dr.isInRange(new Double(8.5))); assertTrue("Test isInRange()", dr.isInRange(new Double(0.01))); assertTrue("Test isInRange()", !dr.isInRange(new Integer(5))); assertTrue("Test isInRange()", !dr.isInRange(new Double(10.1))); assertTrue("Test isInRange()", !dr.isInRange(new String("Hello"))...
public void testIsInRange() { assert("Test isInRange()", dr.isInRange(new Double(8.5))); assert("Test isInRange()", dr.isInRange(new Double(0.01))); assert("Test isInRange()", !dr.isInRange(new Integer(5))); assert("Test isInRange()", !dr.isInRange(new Double(10.1))); assert("Test isInRange()", !dr.isI...
public void testToString() { String expect = new String(minimum + ":" + maximum); assertEquals("Test toString()", expect, dr.toString()); }
public void testIsInRange() { assert("Test isInRange()", dr.isInRange(new Double(8.5))); assert("Test isInRange()", dr.isInRange(new Double(0.01))); assert("Test isInRange()", !dr.isInRange(new Integer(5))); assert("Test isInRange()", !dr.isInRange(new Double(10.1))); assert("Test isInRange()", !dr.isI...
log.error(this + " got null relationship type for " + data.getName() + " in rel #" + i);
log.error(this + " using CSMART " + CSMART.writeDebug() + " got null relationship type for " + data.getName() + " in rel #" + i + " with role=" + rel.getProperty(RelationshipBase.PROP_ROLE) + ", ItemId=" + rel.getProperty(RelationshipBase.PROP_ITEM) + ", please report this on bug# 1304");
public ComponentData addComponentData(ComponentData data) { AgentAssetData assetData = new AgentAssetData((AgentComponentData)data); // assetData.setType(((Integer)propAssetType.getValue()).intValue()); assetData.setAssetClass((String)propAssetClass.getValue()); assetData.setUniqueID((String)propUnique...
gtkEntryGetSize (cols, dims);
gtkEntryGetSize (dims);
public Dimension getMinimumSize (int cols) { int dims[] = new int[2]; gtkEntryGetSize (cols, dims); return (new Dimension (dims[0], dims[1])); }
gtkEntryGetSize (cols, dims);
gtkEntryGetSize (dims);
public Dimension getPreferredSize (int cols) { int dims[] = new int[2]; gtkEntryGetSize (cols, dims); return (new Dimension (dims[0], dims[1])); }
abstract void produce (Vector v, FileInputStream is) throws IOException;
abstract void produce (Vector v, InputStream is) throws IOException;
abstract void produce (Vector v, FileInputStream is) throws IOException;
FileInputStream is = (url == null) ? new FileInputStream (filename) : (FileInputStream) url.openStream(); produce (list, is); }
if (url != null) input = url.openStream(); else { if (filename != null) input = new FileInputStream (filename); else input = new ByteArrayInputStream (data, offset, length); } produce (list, input); }
public void startProduction (ImageConsumer ic) { addConsumer (ic); Vector list = (Vector) consumers.clone (); try { FileInputStream is = (url == null) ? new FileInputStream (filename) : (FileInputStream) url.openStream(); produce (list, is); } catch (...
int_pixel_buffer[i] = currentModel.getRGB (pixels[p]);
int_pixel_buffer[i] = currentModel.getRGB (pixels[p] & 0xFF);
public synchronized void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize) { ColorModel currentModel; if (model != null) currentModel = model; else currentModel = this.model; for(int yp = y; yp < (y + h); yp++) { for(int xp = ...
out.write(b); out.close();
try{ out.write(b); }finally{ out.close(); } file = new File(new File(debugLocation), className + ".asm"); out = new BufferedOutputStream(new FileOutputStream(file)); try{ ClassReader cr = new ClassReader(b); PrintWriter pw = new PrintWriter(new OutputStreamWriter(out)); TraceClassVisitor tcv = new TraceClassVisitor(n...
public byte[] toByteArray() { byte[] b = super.toByteArray(); if (debugLocation != null) { try { File file = new File(new File(debugLocation), className + ".class"); OutputStream out = new BufferedOutputStream(new FileOutputStream(file)); out.wri...
} if (experiment != null) csmart.runConsole(experiment);
} csmart.runConsole(experiment);
protected void startConsole() { DefaultMutableTreeNode node = getSelectedNode(); Object o = node.getUserObject(); Experiment experiment = null; if (o instanceof SocietyComponent) { experiment = createExperiment((SocietyComponent)o); if (experiment == null) return; addExperimentAndCom...
doc.setBufferSize(20);
public static void main(String[] args) { ConsoleStyledDocument doc = new ConsoleStyledDocument(); javax.swing.text.AttributeSet a = new javax.swing.text.SimpleAttributeSet(); ConsoleTextPane pane = new ConsoleTextPane(doc, new NodeStatusButton((javax.swing.Icon)null)); // doc.setBufferSize(...
pane.setNotifyCondition("now is the time for all good men");
public static void main(String[] args) { ConsoleStyledDocument doc = new ConsoleStyledDocument(); javax.swing.text.AttributeSet a = new javax.swing.text.SimpleAttributeSet(); ConsoleTextPane pane = new ConsoleTextPane(doc, new NodeStatusButton((javax.swing.Icon)null)); // doc.setBufferSize(...
pane.setCaretPosition(0); pane.moveCaretPosition(pane.getDocument().getLength());
public static void main(String[] args) { ConsoleStyledDocument doc = new ConsoleStyledDocument(); javax.swing.text.AttributeSet a = new javax.swing.text.SimpleAttributeSet(); ConsoleTextPane pane = new ConsoleTextPane(doc, new NodeStatusButton((javax.swing.Icon)null)); // doc.setBufferSize(...
} finally { return;
public void setName(final String newName) { // If name is same, don't fire modification if (getExperimentName().equals(newName) || newName == null || newName.equals("")) return; if (log.isDebugEnabled()) { log.debug("Change expt name from " + getExperimentName() + " to " + newName); } super.s...
return;
public void setName(final String newName) { // If name is same, don't fire modification if (getExperimentName().equals(newName) || newName == null || newName.equals("")) return; if (log.isDebugEnabled()) { log.debug("Change expt name from " + getExperimentName() + " to " + newName); } super.s...
result=c.attribute();
if (propertyKey!=null) result=c.attribute();
public Object smartAttribute(D2WContext c) { EOAttribute result=null; String propertyKey=c.propertyKey(); Object rawObject=c.valueForKey("object"); if (rawObject!=null && rawObject instanceof EOEnterpriseObject && propertyKey!=null) { EOEnterpriseObject object=(EOEnterpriseObj...
*/
private static final ResourceBundle trySomeGetBundle (String bundleName, String stopHere) { Class rbc; ResourceBundle needs_parent = null, r, result = null; while (true) { try { rbc = Class.forName(bundleName); r = null; try { r = (ResourceBundle) rbc.newInstance(...
public void setPort(String host)
public void setPort(int port)
public void setPort(String host) { if(sock != null && this.port != port) close(); this.port = port; }
Iterator i = keyEventDispatchers.iterator ();
Iterator i = getKeyEventDispatchers().iterator();
public boolean dispatchEvent (AWTEvent e) { if (e instanceof WindowEvent) { Window target = (Window) e.getSource (); if (e.id == WindowEvent.WINDOW_ACTIVATED) setGlobalActiveWindow (target); else if (e.id == WindowEvent.WINDOW_GAINED_FOCUS) setGlobalFocusedWindow (targe...
Iterator i = keyEventPostProcessors.iterator ();
Iterator i = getKeyEventPostProcessors().iterator();
public boolean dispatchKeyEvent (KeyEvent e) { Component focusOwner = getGlobalPermanentFocusOwner (); focusOwner.dispatchEvent (e); // Loop through all registered KeyEventPostProcessors, giving // each a chance to process this event. Iterator i = keyEventPostProcessors.iterator (); while (i.hasNex...
public ActionEvent (Object source, int id, String command, int modifiers)
public ActionEvent (Object source, int id, String command)
public ActionEvent (Object source, int id, String command, int modifiers) { super(source, id); actionCommand = command; this.modifiers = modifiers; }