rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
NSNotificationCenter.defaultCenter().addObserver(observer, new NSSelector("modelWasAddedNotification", ERXConstant.NotificationClassArray), EOModelGroup.ModelAddedNotification, ...
NSNotificationCenter.defaultCenter().addObserver(observer, new NSSelector("modelWasAddedNotification", ERXConstant.NotificationClassArray), EOModelGroup.ModelAddedNotification, null); NSNotificationCenter.defaultCenter().addObserver(observer, new NSSelector("applicationDidFinishLaunching", ERXConstant.NotificationClass...
public static void registerDescription() { if (!_registered) { Factory observer = null; try { String className = System.getProperty("er.extensions.ERXClassDescription.factoryClass"); if (className != null) { observer = (Factory)Class.forN...
boolean modified = false; int n = ULThreads.length; for (int i = 0; i < n; i++) { JCheckBox cb = (JCheckBox)ULThreadCheckBoxes.get(i); Boolean b = (Boolean)originalThreadSelected.get(i); if (b.booleanValue() == cb.isSelected()) continue; if (!modified) { if (!cloneExperiment()) return; modified = true; } ExperimentDB.s...
private void ok_actionPerformed() { setVisible(false); boolean modified = false; int n = ULThreads.length; for (int i = 0; i < n; i++) { JCheckBox cb = (JCheckBox)ULThreadCheckBoxes.get(i); Boolean b = (Boolean)originalThreadSelected.get(i); if (b.booleanValue() == cb.isSelected()) c...
System.out.println(theMsg);
public static byte[] getSeptets(String theMsg) { ByteArrayOutputStream baos = new ByteArrayOutputStream(140); try { writeSeptets(baos, theMsg); baos.close(); } catch (IOException ex) { // Should not happen... throw new RuntimeE...
menuBar.add(findMenu);
private void setSocietyComponent(SocietyComponent cc) { communitySupport = new ClientCommunityController(); runningNodes = new Hashtable(); oldNodes = new ArrayList(); nodeListeners = new Hashtable(); nodePanes = new Hashtable(); // top level menus JMenu fileMenu = new JMenu(FILE_MENU); fileMe...
URL help = (URL)this.getClass().getResource(HELP_DOC); if (help != null) Browser.setPage(help); }
viewNotifyMenuItem_actionPerformed(); }
public void actionPerformed(ActionEvent e) { URL help = (URL)this.getClass().getResource(HELP_DOC); if (help != null) Browser.setPage(help); }
URL about = (URL)this.getClass().getResource(ABOUT_DOC); if (about != null) Browser.setPage(about); }
removeNotifyMenuItem_actionPerformed(); }
public void actionPerformed(ActionEvent e) { URL about = (URL)this.getClass().getResource(ABOUT_DOC); if (about != null) Browser.setPage(about); }
legend.setVisible(true); }
resetNotifyMenuItem_actionPerformed(); }
public void actionPerformed(ActionEvent e) { legend.setVisible(true); }
runButton_actionPerformed(); }
URL help = (URL)this.getClass().getResource(HELP_DOC); if (help != null) Browser.setPage(help); }
public void actionPerformed(ActionEvent e) { runButton_actionPerformed(); }
stopButton_actionPerformed(e); }
URL about = (URL)this.getClass().getResource(ABOUT_DOC); if (about != null) Browser.setPage(about); }
public void actionPerformed(ActionEvent e) { stopButton_actionPerformed(e); }
abortButton_actionPerformed(); }
legend.setVisible(true); }
public void actionPerformed(ActionEvent e) { abortButton_actionPerformed(); }
trialTimeLabel.setText(getElapsedTimeLabel("Trial: ", startTrialTime)); }
runButton_actionPerformed(); }
public void actionPerformed(ActionEvent e) { trialTimeLabel.setText(getElapsedTimeLabel("Trial: ", startTrialTime)); }
experimentTimeLabel.setText(getElapsedTimeLabel("Experiment: ", startExperimentTime)); }
stopButton_actionPerformed(e); }
public void actionPerformed(ActionEvent e) { experimentTimeLabel.setText(getElapsedTimeLabel("Experiment: ", startExperimentTime)); }
displayAboutNode();
abortButton_actionPerformed();
public void actionPerformed(ActionEvent e) { displayAboutNode(); }
resetNodeStatus(); }
trialTimeLabel.setText(getElapsedTimeLabel("Trial: ", startTrialTime)); }
public void actionPerformed(ActionEvent e) { resetNodeStatus(); }
legend.setVisible(true); }
experimentTimeLabel.setText(getElapsedTimeLabel("Experiment: ", startExperimentTime)); }
public void actionPerformed(ActionEvent e) { legend.setVisible(true); }
setNotifyMenuItem_actionPerformed();
hostConfiguration.findHost();
public void actionPerformed(ActionEvent e) { setNotifyMenuItem_actionPerformed(); }
viewNotifyMenuItem_actionPerformed();
hostConfiguration.findNode();
public void actionPerformed(ActionEvent e) { viewNotifyMenuItem_actionPerformed(); }
removeNotifyMenuItem_actionPerformed();
hostConfiguration.findAgent();
public void actionPerformed(ActionEvent e) { removeNotifyMenuItem_actionPerformed(); }
resetNotifyMenuItem_actionPerformed();
setNotifyMenuItem_actionPerformed();
public void actionPerformed(ActionEvent e) { resetNotifyMenuItem_actionPerformed(); }
if(log.isDebugEnabled()) { log.debug("Parse: " + filename); }
protected void addBinders() { ContainerBase container = new ContainerBase("Binders"); container.initProperties(); addChild(container); if(log.isDebugEnabled()) { log.debug("Parse: " + filename); } ComponentDescription[] desc = ComponentConnector.parseFile(filename); for (int i=0; i < d...
log.debug("Create Binder: " + desc[i].getName());
log.debug("Insertion Point: " + insertionPoint);
protected void addBinders() { ContainerBase container = new ContainerBase("Binders"); container.initProperties(); addChild(container); if(log.isDebugEnabled()) { log.debug("Parse: " + filename); } ComponentDescription[] desc = ComponentConnector.parseFile(filename); for (int i=0; i < d...
String name = desc[i].getName(); int index = name.lastIndexOf('.'); if (index != -1) name = name.substring(index+1); BinderBase binder = new BinderBase(name, desc[i].getClassname()); binder.initProperties();
protected void addBinders() { ContainerBase container = new ContainerBase("Binders"); container.initProperties(); addChild(container); if(log.isDebugEnabled()) { log.debug("Parse: " + filename); } ComponentDescription[] desc = ComponentConnector.parseFile(filename); for (int i=0; i < d...
Iterator iter = ComponentConnector.getPluginProps(desc[i]); while(iter.hasNext()) binder.addParameter((String)iter.next()); container.addChild(binder);
if(insertionPoint.endsWith("Binder")) { if(log.isDebugEnabled()) { log.debug("Create Binder: " + name); } int index = name.lastIndexOf('.'); if (index != -1) name = name.substring(index+1); BinderBase binder = new BinderBase(name, desc[i].getClassname()); binder.initProperties(); Iterator iter = ComponentConnector.ge...
protected void addBinders() { ContainerBase container = new ContainerBase("Binders"); container.initProperties(); addChild(container); if(log.isDebugEnabled()) { log.debug("Parse: " + filename); } ComponentDescription[] desc = ComponentConnector.parseFile(filename); for (int i=0; i < d...
if(log.isDebugEnabled()) { log.debug("Parse: " + filename); }
protected void addPlugins() { ContainerBase container = new ContainerBase("Plugins"); container.initProperties(); addChild(container); if(log.isDebugEnabled()) { log.debug("Parse: " + filename); } ComponentDescription[] desc = ComponentConnector.parseFile(filename); for (int i=0; i < d...
log.debug("Create Plugin: " + desc[i].getName());
log.debug("Insertion Point: " + insertionPoint);
protected void addPlugins() { ContainerBase container = new ContainerBase("Plugins"); container.initProperties(); addChild(container); if(log.isDebugEnabled()) { log.debug("Parse: " + filename); } ComponentDescription[] desc = ComponentConnector.parseFile(filename); for (int i=0; i < d...
String name = desc[i].getName(); int index = name.lastIndexOf('.'); if (index != -1) name = name.substring(index+1); PluginBase plugin = new PluginBase(name, desc[i].getClassname()); plugin.initProperties(); Iterator iter = ComponentConnector.getPluginProps(desc[i]); while(iter.hasNext()) plugin.addParameter((String)it...
if(insertionPoint.endsWith("Plugin")) { if(log.isDebugEnabled()) { log.debug("Create Plugin: " + desc[i].getName()); } int index = name.lastIndexOf('.'); if (index != -1) name = name.substring(index+1); PluginBase plugin = new PluginBase(name, desc[i].getClassname()); plugin.initProperties(); Iterator iter = ComponentC...
protected void addPlugins() { ContainerBase container = new ContainerBase("Plugins"); container.initProperties(); addChild(container); if(log.isDebugEnabled()) { log.debug("Parse: " + filename); } ComponentDescription[] desc = ComponentConnector.parseFile(filename); for (int i=0; i < d...
return ((status & COMPLETE) != 0);
return (status & COMPLETE) == 0;
public boolean imageUpdate(Image img, int flags, int x, int y, int width, int height) { if ((flags & ABORT) != 0) status = ABORTED | COMPLETE; else if ((flags & ERROR) != 0) status = ERRORED | COMPLETE; else if ((flags & ALLBITS) != 0) status = COMPLETE; else ...
log = CSMART.createLogger("org.cougaar.tools.csmart.society.scalability");
createLogger();
public ScalabilityXPlugIn(String name, String pluginClass) { super(name); this.pluginClass = pluginClass; log = CSMART.createLogger("org.cougaar.tools.csmart.society.scalability"); }
dbLog.debug("databaseContextDidSelectObjects " + fs + " \n" + ERXUtilities.stackTrace());
dbLog.debug("databaseContextDidSelectObjects " + fs);
public void databaseContextDidSelectObjects(EODatabaseContext dc, EOFetchSpecification fs, EODatabaseChannel channel) { if (dbLog.isDebugEnabled()) { dbLog.debug("databaseContextDidSelectObjects " + fs + ...
return "<" + getClass ().getName () + " lastResetTime: " + lastResetTime () + ", mailCount: " + mailCount () + ", errorCount: " + errorCount () + ", currentQueueSize: " + currentQueueSize () + ", peakMemoryUsage: " + formattedPeakMemoryUsage () + ">";
return "<" + this.getClass ().getName () + " lastResetTime: " + lastResetTime () + ", mailCount: " + mailCount () + ", errorCount: " + errorCount () + ", currentQueueSize: " + currentQueueSize () + ", peakMemoryUsage: " + formattedPeakMemoryUsage () + ">";
public String toString () { return "<" + getClass ().getName () + " lastResetTime: " + lastResetTime () + ", mailCount: " + mailCount () + ", errorCount: " + errorCount () + ", currentQueueSize: " + currentQueueSize () + ", ...
try { if (debug) log.debug ("Sending a message ..."); transport.sendMessage (aMessage, aMessage.getAllRecipients ());
try { if (debug) log.debug ("Sending a message ... " + aMessage); transport.sendMessage (aMessage, aMessage.getAllRecipients ()); if (debug) log.debug ("Done.");
protected void _sendMessageNow (ERMessage message, Transport transport) throws MessagingException { boolean debug = log.isDebugEnabled (); MimeMessage aMessage = message.mimeMessage (); Object callbackObject = message.callbackObject (); MessagingException exception = null; // Send the message try { ...
if (callbackObject != null) { SendFailedException sfex = (SendFailedException)e; NSArray invalidEmails = ERMailUtils.convertInternetAddressesToNSArray ((InternetAddress [])sfex.getInvalidAddresses ()); this.notifyInvalidEmails (callbackObject, invalidEmails); } exception = e; } catch (MessagingException e) { exception...
if (callbackObject != null) { SendFailedException sfex = (SendFailedException)e; NSArray invalidEmails = ERMailUtils.convertInternetAddressesToNSArray ((InternetAddress [])sfex.getInvalidAddresses ()); this.notifyInvalidEmails (callbackObject, invalidEmails); } exception = e; } catch (MessagingException e) { exception...
protected void _sendMessageNow (ERMessage message, Transport transport) throws MessagingException { boolean debug = log.isDebugEnabled (); MimeMessage aMessage = message.mimeMessage (); Object callbackObject = message.callbackObject (); MessagingException exception = null; // Send the message try { ...
try { if (!transport.isConnected ()) transport.connect(); } catch (MessagingException e) { log.error ("Unable to connect transport.", e);
try { if (!transport.isConnected ()) { transport.connect(); } } catch (MessagingException e) { log.error ("Unable to connect transport.", e);
public void run () { while (true) { try { if (threadSuspended) { synchronized (this) { while (threadSuspended) this.wait (milliSecondsWaitRunLoop); } } } catch (Interrup...
if (!ERXUtilities.booleanValue(d2wContext().valueForKey("isMandatory"))) {
if (!ERXValueUtilities.booleanValue(d2wContext().valueForKey("isMandatory"))) {
public boolean displayRequiredMarker() { boolean displayRequiredMarker = false; // avoiding attribute() and relationship() because of lame-ass caching scheme on D2WContext String task = (String)d2wContext().valueForKey("task"); if (task==null || task.equals("edit")) { if (!ERX...
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.console");
createLogger();
public StripChartSource(JCChart c) { super(null, null, null, null, "Strip Chart"); chart = c; init(); log = CSMART.createLogger("org.cougaar.tools.csmart.ui.console"); }
if(log.isDebugEnabled()) { log.error("Error writing config file: " + e); e.printStackTrace();
if(log.isErrorEnabled()) { log.error("Error writing config file: ", e);
private void writeAgentFile(File configDir, AgentComponentData ac) throws IOException { PrintWriter writer = new PrintWriter(new FileWriter(new File(configDir, ac.getName() + ".ini"))); try { writer.println("[ Cluster ]"); writer.println("class = " + ac.getClassName()); writer.println("uic = \"" ...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
private void writeHostFile(File configDir, ComponentData hc) throws IOException { if (hc.childCount() == 0) { // host has no Nodes. Skip it return; } String configFileName = hc.getName() + ".txt"; PrintWriter writer = new PrintWriter(new FileWriter(new File(configDir, configFileName))); try {...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
private void writeLeafData(File configDir, ComponentData me) throws IOException { if (me.leafCount() < 1) return; LeafComponentData[] leaves = me.getLeafComponents(); for (int i = 0; i < me.leafCount(); i++) { LeafComponentData leaf = leaves[i]; if (leaf == null) continue; if (!leaf.getTy...
if(log.isDebugEnabled()) { log.error("Error writing config file: " + e); e.printStackTrace();
if(log.isErrorEnabled()) { log.error("Error writing config file: ", e);
private void writeLeafData(File configDir, ComponentData me) throws IOException { if (me.leafCount() < 1) return; LeafComponentData[] leaves = me.getLeafComponents(); for (int i = 0; i < me.leafCount(); i++) { LeafComponentData leaf = leaves[i]; if (leaf == null) continue; if (!leaf.getTy...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
private void writeNodeFile(File configDir, ComponentData nc) throws IOException { if (nc.childCount() == 0) { // node has no agents or binders. skip it return; } Object[] parameters = nc.getParameters(); String configFileName = nc.getName() + ".ini"; if (parameters.length > 0) configFileName...
if(log.isDebugEnabled()) { log.error("Error writing config file: " + e); e.printStackTrace();
if(log.isErrorEnabled()) { log.error("Error writing config file: ", e);
private void writeNodeFile(File configDir, ComponentData nc) throws IOException { if (nc.childCount() == 0) { // node has no agents or binders. skip it return; } Object[] parameters = nc.getParameters(); String configFileName = nc.getName() + ".ini"; if (parameters.length > 0) configFileName...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
private void writeSocietyFile(File configDir, ComponentData hc) throws IOException { String configFileName = hc.getName() + ".txt"; PrintWriter writer = new PrintWriter(new FileWriter(new File(configDir, configFileName))); try { writer.print("society = "); writeChildLine(writer, hc); } catch (Ex...
experiment.removeExperimentListener(listener);
if (experiment != null) experiment.removeExperimentListener(listener);
public void actionPerformed(ActionEvent e) { String s = ((AbstractButton)e.getSource()).getActionCommand(); if (s.equals(NamedFrame.COMMUNITY)) { makeCommunityGraph(); } else if (s.equals(NamedFrame.AGENT)) { makeSocietyGraph(); // only the name changes! } else if (s.equals(NamedFrame.PLAN)) { ...
try { runnable.run (); } catch (Exception _) { e = _; }
public void dispatch () { Exception e = null; try { runnable.run (); } catch (Exception _) { e = _; } // FIXME: what to do if !catchExceptions? if (catchExceptions) exception = e; if (notifier != null) notifier.notifyAll (); }
exception = e;
try { runnable.run (); } catch (Exception x) { exception = x; } else runnable.run ();
public void dispatch () { Exception e = null; try { runnable.run (); } catch (Exception _) { e = _; } // FIXME: what to do if !catchExceptions? if (catchExceptions) exception = e; if (notifier != null) notifier.notifyAll (); }
return ("InvocationEvent[" + notifier + "," + runnable + "," + catchExceptions + ";" + super.paramString () + "]");
String r; if (id == INVOCATION_DEFAULT) r = "INVOCATION_DEFAULT"; else r = "unknown type"; r += ",runnable=" + runnable + ",notifier=" + notifier + ",catchExceptions=" + catchExceptions; return r;
public String paramString () { return ("InvocationEvent[" + notifier + "," + runnable + "," + catchExceptions + ";" + super.paramString () + "]"); }
log.debug("templateForException with entityName: " + entityName + "; property: " + property + "; type: " + type + "; targetLanguage: " + targetLanguage); ERXMultiKey k = new ERXMultiKey(new Object[] {entityName, property,
if (log.isDebugEnabled ()) log.debug("templateForException with entityName: " + entityName + "; property: " + property + "; type: " + type + "; targetLanguage: " + targetLanguage); ERXMultiKey k = new ERXMultiKey (new Object[] {entityName, property,
public String templateForException(ERXValidationException erv) { String template = null; if (erv.delegate() != null && erv.delegate() instanceof ExceptionDelegateInterface) { template = ((ExceptionDelegateInterface)erv.delegate()).templateForException(erv); } if (template == n...
this.pageConfiguration = pageConfigurationName;
_pageConfiguration = pageConfigurationName;
public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { this.pageConfiguration = pageConfigurationName; context = new D2WContext(); context.setDynamicPage(pageConfiguration); if(pageKeys == null) { pageLevelKeys = new NSMutableArr...
context = new D2WContext(); context.setDynamicPage(pageConfiguration);
_context = new D2WContext(); _context.setDynamicPage(_pageConfiguration);
public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { this.pageConfiguration = pageConfigurationName; context = new D2WContext(); context.setDynamicPage(pageConfiguration); if(pageKeys == null) { pageLevelKeys = new NSMutableArr...
pageLevelKeys = new NSMutableArray(new Object[] {"pageWrapperName","displayPropertyKeys"});
_pageLevelKeys = new NSMutableArray(new Object[] {"pageWrapperName", "displayPropertyKeys"});
public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { this.pageConfiguration = pageConfigurationName; context = new D2WContext(); context.setDynamicPage(pageConfiguration); if(pageKeys == null) { pageLevelKeys = new NSMutableArr...
pageLevelKeys = pageKeys.mutableClone();
_pageLevelKeys = pageKeys.mutableClone();
public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { this.pageConfiguration = pageConfigurationName; context = new D2WContext(); context.setDynamicPage(pageConfiguration); if(pageKeys == null) { pageLevelKeys = new NSMutableArr...
componentLevelKeys = new NSMutableArray(new Object[] {"componentName", "customComponentName", "displayNameForProperty"});
_componentLevelKeys = new NSMutableArray(new Object[] {"componentName", "customComponentName", "displayNameForProperty", "propertyKey"});
public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { this.pageConfiguration = pageConfigurationName; context = new D2WContext(); context.setDynamicPage(pageConfiguration); if(pageKeys == null) { pageLevelKeys = new NSMutableArr...
componentLevelKeys = componentKeys.mutableClone();
_componentLevelKeys = componentKeys.mutableClone();
public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { this.pageConfiguration = pageConfigurationName; context = new D2WContext(); context.setDynamicPage(pageConfiguration); if(pageKeys == null) { pageLevelKeys = new NSMutableArr...
if("edit".equals(context.task())) { componentLevelKeys.addObject("isMandatory");
if("edit".equals(_context.task())) { _componentLevelKeys.addObject("isMandatory");
public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { this.pageConfiguration = pageConfigurationName; context = new D2WContext(); context.setDynamicPage(pageConfiguration); if(pageKeys == null) { pageLevelKeys = new NSMutableArr...
if("list".equals(context.task())) { componentLevelKeys.addObject("propertyIsSortable"); componentLevelKeys.addObject("sortKeyForList");
if("list".equals(_context.task())) { _componentLevelKeys.addObject("propertyIsSortable"); _componentLevelKeys.addObject("sortKeyForList");
public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { this.pageConfiguration = pageConfigurationName; context = new D2WContext(); context.setDynamicPage(pageConfiguration); if(pageKeys == null) { pageLevelKeys = new NSMutableArr...
allKeys = new NSMutableDictionary();
_allKeys = new NSMutableDictionary();
public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { this.pageConfiguration = pageConfigurationName; context = new D2WContext(); context.setDynamicPage(pageConfiguration); if(pageKeys == null) { pageLevelKeys = new NSMutableArr...
allKeys.setObjectForKey(components, "components"); allKeys.setObjectForKey(editors, "editors");
public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { this.pageConfiguration = pageConfigurationName; context = new D2WContext(); context.setDynamicPage(pageConfiguration); if(pageKeys == null) { pageLevelKeys = new NSMutableArr...
if(dict != null) { dict = ERXDictionaryUtilities.dictionaryFromPropertyList("d2wclientConfiguration", bundle); if(dict.objectForKey("components") != null) { components.addEntriesFromDictionary((NSDictionary)dict.objectForKey("components")); } if(dict.objectForKey("editors") != null) { editors.addEntriesFromDictionary((...
public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { this.pageConfiguration = pageConfigurationName; context = new D2WContext(); context.setDynamicPage(pageConfiguration); if(pageKeys == null) { pageLevelKeys = new NSMutableArr...
_allKeys.setObjectForKey(components, "components"); _allKeys.setObjectForKey(editors, "editors");
public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { this.pageConfiguration = pageConfigurationName; context = new D2WContext(); context.setDynamicPage(pageConfiguration); if(pageKeys == null) { pageLevelKeys = new NSMutableArr...
for(Enumeration e = pageLevelKeys.objectEnumerator(); e.hasMoreElements(); ) {
for(Enumeration e = _pageLevelKeys.objectEnumerator(); e.hasMoreElements(); ) {
protected void addPageLevelValues() { for(Enumeration e = pageLevelKeys.objectEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); Object o = context.valueForKey(key); if(o != null) dict.takeValueForKey(o, key); } String pa...
Object o = context.valueForKey(key);
Object o = _context.valueForKey(key);
protected void addPageLevelValues() { for(Enumeration e = pageLevelKeys.objectEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); Object o = context.valueForKey(key); if(o != null) dict.takeValueForKey(o, key); } String pa...
dict.takeValueForKey(o, key);
_dictionary.takeValueForKey(o, key);
protected void addPageLevelValues() { for(Enumeration e = pageLevelKeys.objectEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); Object o = context.valueForKey(key); if(o != null) dict.takeValueForKey(o, key); } String pa...
String path = "components." + context.valueForKey("pageName") + ".editors"; NSArray keys = (NSArray)allKeys.valueForKeyPath(path);
String path = "components." + _context.valueForKey("pageName") + ".editors"; NSArray keys = (NSArray)_allKeys.valueForKeyPath(path);
protected void addPageLevelValues() { for(Enumeration e = pageLevelKeys.objectEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); Object o = context.valueForKey(key); if(o != null) dict.takeValueForKey(o, key); } String pa...
dict.takeValueForKeyPath(o, key);
_dictionary.takeValueForKeyPath(o, key);
protected void addPageLevelValues() { for(Enumeration e = pageLevelKeys.objectEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); Object o = context.valueForKey(key); if(o != null) dict.takeValueForKey(o, key); } String pa...
path = "components." + context.valueForKey("pageName") + ".supports"; keys = (NSArray)allKeys.valueForKeyPath(path);
path = "components." + _context.valueForKey("pageName") + ".supports"; keys = (NSArray)_allKeys.valueForKeyPath(path);
protected void addPageLevelValues() { for(Enumeration e = pageLevelKeys.objectEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); Object o = context.valueForKey(key); if(o != null) dict.takeValueForKey(o, key); } String pa...
return context;
return _context;
public D2WContext context() { return context; }
if(dict == null) { dict = new NSMutableDictionary();
if(_dictionary == null) { _dictionary = new NSMutableDictionary();
public NSDictionary dictionary() { if(dict == null) { dict = new NSMutableDictionary(); addPageLevelValues(); NSArray displayPropertyKeys = (NSArray)context.valueForKey("displayPropertyKeys"); if(displayPropertyKeys != null && displayPropertyKeys.count() > 0) { ...
NSArray displayPropertyKeys = (NSArray)context.valueForKey("displayPropertyKeys");
NSArray displayPropertyKeys = (NSArray)_context.valueForKey("displayPropertyKeys");
public NSDictionary dictionary() { if(dict == null) { dict = new NSMutableDictionary(); addPageLevelValues(); NSArray displayPropertyKeys = (NSArray)context.valueForKey("displayPropertyKeys"); if(displayPropertyKeys != null && displayPropertyKeys.count() > 0) { ...
dict.setObjectForKey( new NSMutableDictionary(), "componentLevelKeys");
NSMutableDictionary componentLevelKeys = new NSMutableDictionary();
public NSDictionary dictionary() { if(dict == null) { dict = new NSMutableDictionary(); addPageLevelValues(); NSArray displayPropertyKeys = (NSArray)context.valueForKey("displayPropertyKeys"); if(displayPropertyKeys != null && displayPropertyKeys.count() > 0) { ...
addComponentLevelValuesForKey(key);
componentLevelKeys.setObjectForKey(componentLevelValuesForKey(key), key);
public NSDictionary dictionary() { if(dict == null) { dict = new NSMutableDictionary(); addPageLevelValues(); NSArray displayPropertyKeys = (NSArray)context.valueForKey("displayPropertyKeys"); if(displayPropertyKeys != null && displayPropertyKeys.count() > 0) { ...
return dict;
return _dictionary;
public NSDictionary dictionary() { if(dict == null) { dict = new NSMutableDictionary(); addPageLevelValues(); NSArray displayPropertyKeys = (NSArray)context.valueForKey("displayPropertyKeys"); if(displayPropertyKeys != null && displayPropertyKeys.count() > 0) { ...
EOQualifier q = EOQualifier.qualifierWithQualifierFormat( "pageConfiguration = '" + pageConfiguration + "'" , null);
EOQualifier q = EOQualifier.qualifierWithQualifierFormat( "pageConfiguration = '" + _pageConfiguration + "'" , null);
public NSArray rulesForLevel(int level) { NSMutableArray arr = new NSMutableArray(); for(Enumeration e = dictionary().keyEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); if(!"componentLevelKeys".equals(key)) { Object value = dictionary()...
NSArray keys = (NSArray)dict.valueForKey("displayPropertyKeys");
NSArray keys = (NSArray)_dictionary.valueForKey("displayPropertyKeys");
public NSArray rulesForLevel(int level) { NSMutableArray arr = new NSMutableArray(); for(Enumeration e = dictionary().keyEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); if(!"componentLevelKeys".equals(key)) { Object value = dictionary()...
EOQualifier q = EOQualifier.qualifierWithQualifierFormat( "pageConfiguration = '" + pageConfiguration + "' and propertyKey = '" + key + "'" , null);
EOQualifier q = EOQualifier.qualifierWithQualifierFormat( "pageConfiguration = '" + _pageConfiguration + "' and propertyKey = '" + key + "'" , null);
public NSArray rulesForLevel(int level) { NSMutableArray arr = new NSMutableArray(); for(Enumeration e = dictionary().keyEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); if(!"componentLevelKeys".equals(key)) { Object value = dictionary()...
theData = aNode.getUserObject(); if (theData instanceof String) flavors = new DataFlavor[] {folderFlavor}; else if (theData instanceof SocietyComponent) flavors = new DataFlavor[] {societyFlavor}; else if (theData instanceof RecipeComponent) flavors = new DataFlavor[] {recipeFlavor}; else if (theData instanceof Experi...
theData = aNode; Object theUserData = aNode.getUserObject(); if (theUserData instanceof String) flavors = new DataFlavor[] {folderFlavor}; else if (theUserData instanceof SocietyComponent) flavors = new DataFlavor[] {societyFlavor}; else if (theUserData instanceof RecipeComponent) flavors = new DataFlavor[] {recipeFlav...
public MyTransferable(DefaultMutableTreeNode aNode) { theData = aNode.getUserObject(); if (theData instanceof String) flavors = new DataFlavor[] {folderFlavor}; else if (theData instanceof SocietyComponent) flavors = new DataFlavor[] {societyFlavor}...
if (!flavor.equals(flavors[0])) throw new IllegalArgumentException("Illegal DataFlavor"); return theData; }
if (!flavor.equals(flavors[0])) throw new IllegalArgumentException("Illegal DataFlavor"); if (flavor.equals(folderFlavor) || flavor.equals(experimentFlavor)) return theData; else return ((DefaultMutableTreeNode)theData).getUserObject(); }
public Object getTransferData(DataFlavor flavor) { if (!flavor.equals(flavors[0])) throw new IllegalArgumentException("Illegal DataFlavor"); return theData; }
DefaultMutableTreeNode target, DefaultMutableTreeNode before) { DataFlavor[] flavors = t.getTransferDataFlavors(); int action = isDroppable(flavors, target); if (action != DnDConstants.ACTION_NONE) { try { Object userData = t.getTransferData(flavors[0]); DefaultMutableTreeNode node = new DefaultMutableTreeNode(userData...
DefaultMutableTreeNode target, DefaultMutableTreeNode before) { DataFlavor[] flavors = t.getTransferDataFlavors(); int action = isDroppable(flavors, target); if (action == DnDConstants.ACTION_NONE) return action; Object data = null; try { data = t.getTransferData(flavors[0]); } catch (Exception e) { if(log.isErrorEnabl...
public int addElement(Transferable t, DefaultMutableTreeNode target, DefaultMutableTreeNode before) { DataFlavor[] flavors = t.getTransferDataFlavors(); int action = isDroppable(flavors, target); if (action != DnDConstants.ACTION_NONE) { ...
Object userData = data; boolean allowsChildren = false; if (data instanceof DefaultMutableTreeNode) { userData = ((DefaultMutableTreeNode)data).getUserObject(); if (userData instanceof String || userData instanceof Experiment) allowsChildren = true; } DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(userDa...
public int addElement(Transferable t, DefaultMutableTreeNode target, DefaultMutableTreeNode before) { DataFlavor[] flavors = t.getTransferDataFlavors(); int action = isDroppable(flavors, target); if (action != DnDConstants.ACTION_NONE) { ...
if (o instanceof DefaultMutableTreeNode) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) o; if (node == getModel().getRoot()) return false; return true; }
if (o instanceof DefaultMutableTreeNode) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) o; if (node == getModel().getRoot()) return false; DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode)node.getParent(); Object userObject = parentNode.getUserObject(); if (userObject != null && userObject instanc...
public boolean isDraggable(Object o) { if (o instanceof DefaultMutableTreeNode) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) o; if (node == getModel().getRoot()) return false; // not draggable if it's the root node return true; } return false; }
return false; }
public boolean isDraggable(Object o) { if (o instanceof DefaultMutableTreeNode) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) o; if (node == getModel().getRoot()) return false; // not draggable if it's the root node return true; } return false; }
public int isDroppable(DataFlavor[] possibleFlavors, DefaultMutableTreeNode target) { Object userObject = target.getUserObject(); if (userObject == null || userObject instanceof String) { for (int i = 0; i < possibleFlavors.length; i++) { DataFlavor flavor = possibleFlavors[i]; if (flavor.equals(DataFlavor.stringFlavo...
public int isDroppable(DataFlavor[] possibleFlavors, DefaultMutableTreeNode target) { Object userObject = target.getUserObject(); if (userObject == null || userObject instanceof String) { for (int i = 0; i < possibleFlavors.length; i++) { DataFlavor flavor = possibleFlavors[i]; if (flavor instanceof CSMARTDataFlavor) ...
public int isDroppable(DataFlavor[] possibleFlavors, DefaultMutableTreeNode target) { Object userObject = target.getUserObject(); // Can only drop on folders (or the root) if (userObject == null || userObject instanceof String) { for (int i = 0; i < possibleFlavors.length; i++) { ...
return DnDConstants.ACTION_NONE;
}
public int isDroppable(DataFlavor[] possibleFlavors, DefaultMutableTreeNode target) { Object userObject = target.getUserObject(); // Can only drop on folders (or the root) if (userObject == null || userObject instanceof String) { for (int i = 0; i < possibleFlavors.length; i++) { ...
return DnDConstants.ACTION_NONE; }
public int isDroppable(DataFlavor[] possibleFlavors, DefaultMutableTreeNode target) { Object userObject = target.getUserObject(); // Can only drop on folders (or the root) if (userObject == null || userObject instanceof String) { for (int i = 0; i < possibleFlavors.length; i++) { ...
Transferable tran = null; if (o instanceof DefaultMutableTreeNode) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) o; return new MyTransferable(node); } throw new IllegalArgumentException("Not a DefaultMutableTreeNode");
Transferable tran = null; if (o instanceof DefaultMutableTreeNode) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) o; return new MyTransferable(node);
public Transferable makeDraggableObject(Object o) { Transferable tran = null; if (o instanceof DefaultMutableTreeNode) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) o; return new MyTransferable(node); } throw new IllegalArgumentException("Not a DefaultMut...
throw new IllegalArgumentException("Not a DefaultMutableTreeNode"); }
public Transferable makeDraggableObject(Object o) { Transferable tran = null; if (o instanceof DefaultMutableTreeNode) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) o; return new MyTransferable(node); } throw new IllegalArgumentException("Not a DefaultMut...
String newNameServerHostName = "";
Properties defaultNodeArgs = experiment.getDefaultNodeArguments(); String oldNameServer = defaultNodeArgs.getProperty("org.cougaar.name.server"); String newNameServer = null; String dfltNameServer = null; String nameServerHost = null; if (oldNameServer != null) { int colon = oldNameServer.indexOf(':'); if (colon >= 0) ...
private void setNameServerHostName() { String newNameServerHostName = ""; HostComponent[] hosts = experiment.getHosts(); for (int i = 0; i < hosts.length; i++) { NodeComponent[] nodes = hosts[i].getNodes(); for (int j = 0; j < nodes.length; j++) { AgentComponent[] agents = nodes[j].getAgents(); // ...
newNameServerHostName = hosts[i].getShortName(); break;
String thisHost = hosts[i].getShortName(); if (thisHost.equals(nameServerHost)) { break hostLoop; } if (dfltNameServer == null) { dfltNameServer = thisHost + ":" + CSMARTConsole.NAME_SERVER_PORTS; if (oldNameServer == null) { break hostLoop; } }
private void setNameServerHostName() { String newNameServerHostName = ""; HostComponent[] hosts = experiment.getHosts(); for (int i = 0; i < hosts.length; i++) { NodeComponent[] nodes = hosts[i].getNodes(); for (int j = 0; j < nodes.length; j++) { AgentComponent[] agents = nodes[j].getAgents(); // ...
nameServerHostName = newNameServerHostName;
if (newNameServer == null) newNameServer = dfltNameServer;
private void setNameServerHostName() { String newNameServerHostName = ""; HostComponent[] hosts = experiment.getHosts(); for (int i = 0; i < hosts.length; i++) { NodeComponent[] nodes = hosts[i].getNodes(); for (int j = 0; j < nodes.length; j++) { AgentComponent[] agents = nodes[j].getAgents(); // ...
experiment.getDefaultNodeArguments().put("org.cougaar.name.server", nameServerHostName + ":" + CSMARTConsole.NAME_SERVER_PORTS);
if (newNameServer != null) { System.out.println("org.cougaar.name.server=" + newNameServer); defaultNodeArgs.setProperty("org.cougaar.name.server", newNameServer); }
private void setNameServerHostName() { String newNameServerHostName = ""; HostComponent[] hosts = experiment.getHosts(); for (int i = 0; i < hosts.length; i++) { NodeComponent[] nodes = hosts[i].getNodes(); for (int j = 0; j < nodes.length; j++) { AgentComponent[] agents = nodes[j].getAgents(); // ...
exception = currentError.thrownException(); error = new WOExceptionParser(exception); exception.printStackTrace(new PrintStream(byos));
currentError.thrownException().printStackTrace(new PrintStream(byos));
public String currentErrorStackTrace() { ByteArrayOutputStream byos = new ByteArrayOutputStream(); exception = currentError.thrownException(); error = new WOExceptionParser(exception); exception.printStackTrace(new PrintStream(byos)); return byos.toString(); }
if (impl == null) throw new IOException ("Cannot initialize Socket implementation"); if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException ("Address type not supported"); InetSocketAddress tmp = (InetSocketAddress) endpoint; SecurityManager s = System.getSecurityManager (); if (s != null)...
bind (endpoint, 50);
public void bind (SocketAddress endpoint) throws IOException { if (impl == null) throw new IOException ("Cannot initialize Socket implementation"); if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException ("Address type not supported"); InetSocketAddress tmp = (InetSock...
if (impl == null) throw new NullPointerException("impl may not be null");
protected DatagramSocket (DatagramSocketImpl impl) { this.impl = impl; this.remoteAddress = null; this.remotePort = -1; }
if (isClosed()) throw new SocketException("socket is closed");
public void bind (SocketAddress address) throws SocketException { if (! (address instanceof InetSocketAddress)) throw new IllegalArgumentException (); InetSocketAddress tmp = (InetSocketAddress) address; SecurityManager s = System.getSecurityManager (); if (s != null) s.checkListen(tmp.getPo...
if (!closed)
if (!isClosed())
public void close() { if (!closed) { impl.close(); remoteAddress = null; remotePort = -1; closed = true; } }
closed = true;
public void close() { if (!closed) { impl.close(); remoteAddress = null; remotePort = -1; closed = true; } }
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
if (isClosed()) throw new SocketException("socket is closed");
public boolean getBroadcast() throws SocketException { if (impl == null) throw new SocketException ("Cannot initialize Socket implementation"); Object obj = impl.getOption (SocketOptions.SO_BROADCAST); if (obj instanceof Boolean) return ((Boolean) obj).booleanValue (); else throw new So...
if (impl == null || closed)
if (isClosed())
public InetAddress getLocalAddress() { if (impl == null || closed) return null; InetAddress localAddr; try { localAddr = (InetAddress) impl.getOption (SocketOptions.SO_BINDADDR); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect (localAddr.getHostName(), -1);...
if (isClosed()) return -1;
public int getLocalPort() { return impl.getLocalPort(); }
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
if (isClosed()) throw new SocketException("socket is closed");
public int getReceiveBufferSize() throws SocketException { if (impl == null) throw new SocketException ("Cannot initialize Socket implementation"); Object obj = impl.getOption(SocketOptions.SO_RCVBUF); if (obj instanceof Integer) return(((Integer)obj).intValue()); else throw new SocketE...
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
if (isClosed()) throw new SocketException("socket is closed");
public boolean getReuseAddress() throws SocketException { if (impl == null) throw new SocketException ("Cannot initialize Socket implementation"); Object obj = impl.getOption (SocketOptions.SO_REUSEADDR); if (obj instanceof Boolean) return(((Boolean) obj).booleanValue ()); else throw ne...