rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
AIMBuddy buddy = mySender.getBuddy(_buddyName); if (buddy == null) { mySender.addBuddy(new AIMBuddy(_buddyName)); buddy = mySender.getBuddy(_buddyName); }
AIMBuddy buddy = getBuddy(_buddyName);
public synchronized void sendMessage(String _buddyName, String _message) throws MessageException { if (mySender != null) { AIMBuddy buddy = mySender.getBuddy(_buddyName); if (buddy == null) { mySender.addBuddy(new AIMBuddy(_buddyName)); buddy = mySender.getBuddy(_buddyName); } if ...
return getToolkit().getFontMetrics(font);
if (peer == null) return getToolkit().getFontMetrics(font); return peer.getFontMetrics (font);
public FontMetrics getFontMetrics(Font font) { return getToolkit().getFontMetrics(font); }
if (peer != null) peer.setCursor (cursor);
public void setCursor(Cursor cursor) { this.cursor = cursor; }
exit();
if(!CSMART.this.getGlassPane().isVisible()) { exit(); }
public CSMART() { setTitle("CSMART"); createLog(); // Write initial CSMART info to the log file if (log.isShoutEnabled()) { log.shout(writeDebug()); } resultDir = initResultDir(); organizer = new Organizer(this); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); ...
exit();
if(!CSMART.this.getGlassPane().isVisible()) { exit(); }
public void windowClosing(WindowEvent e) { exit(); }
NamedFrame.getNamedFrame().removeFrame(frameArg); frameArg.dispose();
if(!frameArg.getGlassPane().isVisible()) { NamedFrame.getNamedFrame().removeFrame(frameArg); frameArg.dispose(); }
private void addTool(String toolName, String docName, JFrame tool) { NamedFrame.getNamedFrame().addFrame(toolName + ": " + docName, tool); final JFrame frameArg = tool; tool.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { NamedFrame.getNamedFrame().removeFrame(frameArg...
NamedFrame.getNamedFrame().removeFrame(frameArg); frameArg.dispose();
if(!frameArg.getGlassPane().isVisible()) { NamedFrame.getNamedFrame().removeFrame(frameArg); frameArg.dispose(); }
public void windowClosing(WindowEvent e) { NamedFrame.getNamedFrame().removeFrame(frameArg); frameArg.dispose(); }
public DataBufferInt(int size, int numBanks)
public DataBufferInt(int size)
public DataBufferInt(int size, int numBanks) { super(TYPE_INT, size, numBanks); bankData = new int[numBanks][size]; data = bankData[0]; }
super(TYPE_INT, size, numBanks); bankData = new int[numBanks][size]; data = bankData[0];
super(TYPE_INT, size); data = new int[size];
public DataBufferInt(int size, int numBanks) { super(TYPE_INT, size, numBanks); bankData = new int[numBanks][size]; data = bankData[0]; }
System.err.println("ERCoreBusinessLogic: finishInitialization");
log.debug("ERCoreBusinessLogic: finishInitialization");
public void finishInitialization() { initializeSharedData(); // Register handlers for user preferences. ERCoreUserPreferences.userPreferences().registerHandlers(); System.err.println("ERCoreBusinessLogic: finishInitialization"); }
defaultModelGroup = ERXModelGroup.loadModelGroupForLoadedBundles();
defaultModelGroup = new ERXModelGroup(); defaultModelGroup.loadModelsFromLoadedBundles();
public EOModelGroup defaultModelGroup() { if(defaultModelGroup == null) { defaultModelGroup = ERXModelGroup.loadModelGroupForLoadedBundles(); } return defaultModelGroup; }
public void setLoggingEntity(String loggingEntity) { loggingEntity = loggingEntity; }
public void setLoggingEntity(String name) { loggingEntity = name; }
public void setLoggingEntity(String loggingEntity) { loggingEntity = loggingEntity; }
metricRelate.setItem(data.getName());
metricRelate.setItemId(data.getName());
private ComponentData addMetricsComponentData(ComponentData data) { ComponentData picd = null; // Find the Experiment. // From it, get a count of the Agents in the Society & set the numAgents if (numAgents == 0 && data.getOwner() instanceof Experiment) { Experiment exp = (Experiment)data.getOwner(); ...
soc = new SocietyDBComponent(societyName, id); soc.initProperties();
soc = (SocietyDBComponent)organizer.getSociety(societyName); if (soc == null) { soc = new SocietyDBComponent(societyName, id); soc.initProperties(); }
public Experiment createExperiment(String originalExperimentName, String experimentName, String experimentId, String trialId) { createLogger(); // get assembly ids for trial ArrayList assemblyIds = get...
RecipeComponent mc = createRecipe(dbRecipe.name, dbRecipe.cls); setRecipeComponentProperties(dbRecipe, mc); ((RecipeBase)mc).resetModified(); ((RecipeBase)mc).installListeners();
RecipeComponent mc = organizer.getRecipe(dbRecipe.name); if (mc == null) { mc = createRecipe(dbRecipe.name, dbRecipe.cls); setRecipeComponentProperties(dbRecipe, mc); ((RecipeBase)mc).resetModified(); ((RecipeBase)mc).installListeners(); }
public Experiment createExperiment(String originalExperimentName, String experimentName, String experimentId, String trialId) { createLogger(); // get assembly ids for trial ArrayList assemblyIds = get...
((RecipeBase)recipe).resetModified(); ((RecipeBase)recipe).installListeners();
public RecipeComponent createRecipe(String name, Class cls) { createLogger(); try { Constructor constructor = cls.getConstructor(singleStringConstructor); RecipeComponent recipe = (RecipeComponent) constructor.newInstance(new String[] {name}); recipe.initProperties(); return recipe; ...
rc = createRecipe(dbRecipe.name, dbRecipe.cls); setRecipeComponentProperties(dbRecipe, rc); ((RecipeBase)rc).resetModified(); ((RecipeBase)rc).installListeners();
rc = organizer.getRecipe(dbRecipe.name); if (rc == null) { rc = createRecipe(dbRecipe.name, dbRecipe.cls); setRecipeComponentProperties(dbRecipe, rc); ((RecipeBase)rc).resetModified(); ((RecipeBase)rc).installListeners(); } return rc;
public RecipeComponent getDatabaseRecipe(String recipeId, String recipeName) { createLogger(); String query = null; RecipeComponent rc = null; try { Connection conn = DBUtils.getConnection(); try { Map substitutions = new HashMap(); sub...
components.remove(externalComponent.getComponent());
public void removeComponent(String subdomain) throws ComponentException { ExternalComponent externalComponent = componentsByDomain.remove(subdomain); components.remove(externalComponent.getComponent()); if (externalComponent != null) { externalComponent.shutdown(); } }
components.remove(externalComponent.getComponent());
public void removeComponent(String subdomain) throws ComponentException { ExternalComponent externalComponent = componentsByDomain.remove(subdomain); components.remove(externalComponent.getComponent()); if (externalComponent != null) { externalComponent.shutdown(); } }
result=value==null ? false : booleanValueWithDefault(value, def);
result=booleanValueWithDefault(value, def);
public static boolean booleanValueForBindingOnComponentWithDefault(String binding, WOComponent component, boolean def) { // CHECKME: I don't believe the statement below is true with WO 5 // this method is useful because binding=NO in fact sends null, which in turns // leads booleanValueWithDefa...
};
}
private static UnaryPredicate getPred() { return new UnaryPredicate() { public boolean execute(Object o) { if (o instanceof Task || o instanceof HappinessChangeEvent || o instanceof Asset || o instanceof PlanElement) return true; return false; }; }; }
};
}
public boolean execute(Object o) { if (o instanceof Task || o instanceof HappinessChangeEvent || o instanceof Asset || o instanceof PlanElement) return true; return false; };
doc.setBufferSize(5);
public static void main(String[] args) { ConsoleStyledDocument doc = new ConsoleStyledDocument(); AttributeSet a = new javax.swing.text.SimpleAttributeSet(); // with MAX_CHARACTER = 5 this prints: // abc, abcde, fghij, vwxyz try { doc.appendString("abc", a); System.out.println(doc.getText(0, ...
public CSMARTConsoleModel(Experiment experiment, CSMART csmart) { this.csmart = csmart; this.runStart = new Date(); this.experiment = experiment; this.appServerSupport = new AppServerSupport(this); this.runningNodes = new Hashtable(5); this.nodeModels = new Hashtable(5); this.nodeViews = new Hashtable(5); this.nodeToAp...
public CSMARTConsoleModel() { this(null, null);
public CSMARTConsoleModel(Experiment experiment, CSMART csmart) { this.csmart = csmart; this.runStart = new Date(); this.experiment = experiment; this.appServerSupport = new AppServerSupport(this); this.runningNodes = new Hashtable(5); this.nodeModels = new Hashtable(5); this.nodeViews = new Hash...
notifyObservers(RUN_FAILED);
public void setRunning(boolean running) { try { createAllNodes(); createAllNodeViews(); startNodes(); isRunning = running; } catch(IllegalStateException ise) { JOptionPane.showMessageDialog(null, ("Cannot start run, " + ise.getMessage()), "Cannot star...
viewOnlyMenu.show(hostTree, e.getX(), e.getY());
viewOnlyHostMenu.show(hostTree, e.getX(), e.getY());
private void displayHostTreeMenu(MouseEvent e) { // the path to the node the mouse is pointing at TreePath selPath = hostTree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // if the mouse is pointing at a selected node // and all selected nodes are of the same type, then act...
else viewOnlyMenu.show(hostTree, e.getX(), e.getY());
else { viewOnlyHostMenu.show(hostTree, e.getX(), e.getY()); }
private void displayHostTreeMenu(MouseEvent e) { // the path to the node the mouse is pointing at TreePath selPath = hostTree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // if the mouse is pointing at a selected node // and all selected nodes are of the same type, then act...
viewOnlyMenu.show(nodeTree, e.getX(), e.getY());
viewOnlyNodeMenu.show(nodeTree, e.getX(), e.getY());
private void displayNodeTreeMenu(MouseEvent e) { // the path to the node the mouse is pointing at TreePath selPath = nodeTree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // if the mouse is pointing at a selected node // and all selected nodes are of the same type, then act...
else viewOnlyMenu.show(nodeTree, e.getX(), e.getY());
else { viewOnlyNodeMenu.show(nodeTree, e.getX(), e.getY()); }
private void displayNodeTreeMenu(MouseEvent e) { // the path to the node the mouse is pointing at TreePath selPath = nodeTree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // if the mouse is pointing at a selected node // and all selected nodes are of the same type, then act...
viewOnlyMenu = new JPopupMenu();
viewOnlyHostMenu = new JPopupMenu(); viewOnlyNodeMenu = new JPopupMenu();
private void initDisplay() { // host split pane contains host tree and // the bottom split pane which contains the node and agent trees JSplitPane hostPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); // tree of hosts and assigned nodes and agents DefaultMutableTreeNode root = new DefaultMutab...
Action viewArgumentsAction = new AbstractAction(DISPLAY_ARGS_ACTION) { public void actionPerformed(ActionEvent e) { displayArguments(viewOnlyMenu.getInvoker());
Action viewArgumentsHostAction = new AbstractAction(DISPLAY_ARGS_ACTION) { public void actionPerformed(ActionEvent e) { displayArguments(viewOnlyHostMenu.getInvoker());
private void initDisplay() { // host split pane contains host tree and // the bottom split pane which contains the node and agent trees JSplitPane hostPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); // tree of hosts and assigned nodes and agents DefaultMutableTreeNode root = new DefaultMutab...
viewOnlyMenu.add(viewArgumentsAction);
viewOnlyHostMenu.add(viewArgumentsHostAction);
private void initDisplay() { // host split pane contains host tree and // the bottom split pane which contains the node and agent trees JSplitPane hostPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); // tree of hosts and assigned nodes and agents DefaultMutableTreeNode root = new DefaultMutab...
Action viewArgumentsNodeAction = new AbstractAction(DISPLAY_ARGS_ACTION) { public void actionPerformed(ActionEvent e) { displayArguments(viewOnlyNodeMenu.getInvoker()); } }; viewOnlyNodeMenu.add(viewArgumentsNodeAction);
private void initDisplay() { // host split pane contains host tree and // the bottom split pane which contains the node and agent trees JSplitPane hostPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); // tree of hosts and assigned nodes and agents DefaultMutableTreeNode root = new DefaultMutab...
displayArguments(viewOnlyMenu.getInvoker());
displayArguments(viewOnlyHostMenu.getInvoker());
public void actionPerformed(ActionEvent e) { displayArguments(viewOnlyMenu.getInvoker()); }
if (e.isPopupTrigger()) displayAgentTreeMenu(e);
if (e.isPopupTrigger()) displayNodeTreeMenu(e);
public void mouseClicked(MouseEvent e) { if (e.isPopupTrigger()) displayAgentTreeMenu(e); }
if (e.isPopupTrigger()) displayAgentTreeMenu(e);
if (e.isPopupTrigger()) displayNodeTreeMenu(e);
public void mousePressed(MouseEvent e) { if (e.isPopupTrigger()) displayAgentTreeMenu(e); }
if (e.isPopupTrigger()) displayAgentTreeMenu(e);
if (e.isPopupTrigger()) displayNodeTreeMenu(e);
public void mouseReleased(MouseEvent e) { if (e.isPopupTrigger()) displayAgentTreeMenu(e); }
EOEditingContext peer = new EOEditingContext(bug.editingContext().parentObjectStore()); People user = (People)EOUtilities.localInstanceOfObject(peer,((Session)session()).getUser());
EOEditingContext peer = ERXEC.newEditingContext(bug.editingContext().parentObjectStore()); EditPageInterface epi = null; peer.lock(); try { People user = (People)EOUtilities.localInstanceOfObject(peer,((Session)session()).getUser());
public WOComponent createTestItem() { ERXLocalizer localizer = ERXLocalizer.localizerForSession(session()); EOEditingContext peer = new EOEditingContext(bug.editingContext().parentObjectStore()); People user = (People)EOUtilities.localInstanceOfObject(peer,((Session)session()).getUser()); ...
String description = localizer.localizedTemplateStringForKeyWithObject("CreateTestItemFromReq.templateString", bug); TestItem testItem = user.createTestItemFromRequestWithDescription(bug, (Component)valueForKey("component"), description); EditPageInterface epi=(EditPageInterface)D2W.factory().pageForConfigurationNamed...
String description = localizer.localizedTemplateStringForKeyWithObject("CreateTestItemFromReq.templateString", bug); TestItem testItem = user.createTestItemFromRequestWithDescription(bug, (Component)valueForKey("component"), description); epi=(EditPageInterface)D2W.factory().pageForConfigurationNamed("CreateNewTestItem...
public WOComponent createTestItem() { ERXLocalizer localizer = ERXLocalizer.localizerForSession(session()); EOEditingContext peer = new EOEditingContext(bug.editingContext().parentObjectStore()); People user = (People)EOUtilities.localInstanceOfObject(peer,((Session)session()).getUser()); ...
((ComponentCollectionRecipe)component).modified = this.modified;
public ModifiableComponent copy(String name) { ComponentData cdata = getComponentData(); cdata.setName(name); RecipeComponent component = new ComponentCollectionRecipe(cdata, null); component.initProperties(); ((ComponentCollectionRecipe)component).modified = this.modified; ((ComponentCollectionReci...
modified = false; fireModification(new ModificationEvent(this, RECIPE_SAVED));
public void initProperties() { propTargetComponent = addRecipeQueryProperty(PROP_TARGET_COMPONENT_QUERY, PROP_TARGET_COMPONENT_QUERY_DFLT); propTargetComponent.setToolTip(PROP_TARGET_COMPONENT_QUERY_DESC); super.initProperties(); // The super will set the parent target que...
+ requestFile.length() != 0 ? requestFile : "/";
+ (requestFile.length() != 0 ? requestFile : "/")
void sendRequest() throws IOException { // Create PrintWriter for easier sending of headers. PrintWriter outputWriter = new PrintWriter(new OutputStreamWriter(outputStream, "8859_1")); // Send request including any request properties that were set. String requestFile = url.getFile(); outputW...
response.setHeader("inline; filename=" + fileName, "content-disposition");
response.setHeader("inline; filename=\"" + fileName + "\"", "content-disposition");
public void appendToResponse(WOResponse response, WOContext context) { if (isEnabled()) { WOResponse newResponse = new WOResponse(); super.appendToResponse(newResponse, context); String contentString = newResponse.contentString(); if (log.isDebugEnabled()) { ...
finishConfiguration();
public ComponentData addComponentData(ComponentData data) { ComponentData[] children = data.getChildren(); // This seams like it can be more efficient. for(int i=0; i < children.length; i++) { ComponentData child = children[i]; if(child.getType() == ComponentData.AGENT) { Iterator iter = ((Collecti...
return ERD2WUtilities.localInstanceFromObjectWithD2WContext(object(), d2wContext());
EOEnterpriseObject object = object(); D2WContext d2wContext = d2wContext(); return ERD2WUtilities.localInstanceFromObjectWithD2WContext(object, d2wContext);
protected EOEnterpriseObject localInstanceOfObject() { return ERD2WUtilities.localInstanceFromObjectWithD2WContext(object(), d2wContext()); }
};
private static UnaryPredicate getSelfPred() { return new UnaryPredicate() { public boolean execute(Object o) { if (o instanceof Asset) { Asset asset = (Asset)o; if ((asset instanceof HasRelationships) && ((HasRelationships)asset).isLocal() && // (asset.hasCommunityPG(new Date().getTime()...
};
}
public boolean execute(Object o) { if (o instanceof Asset) { Asset asset = (Asset)o; if ((asset instanceof HasRelationships) && ((HasRelationships)asset).isLocal() && // (asset.hasCommunityPG(new Date().getTime())) && (asset.hasClusterPG())) return true; } return false; };
Component c = argTable.getEditorComponent(); if (c != null) if (c instanceof JTextField) { int rowIndex = argTable.getEditingRow(); int colIndex = argTable.getEditingColumn(); if (rowIndex != -1 && colIndex != -1) argTable.getModel().setValueAt(((JTextField)c).getText(), rowIndex, colIndex); } else System.out.println("...
public void actionPerformed(ActionEvent e) { setVisible(false); }
cacheKeyMap.put(policyCacheEntry, actionClass.getName() + "@" + actionName);
cacheKeyMap.put(actionClass.getName() + "@" + actionName, policyCacheEntry);
public void createPolicyEntryForClass(Class actionClass, NSArray actionNames, NSArray formKeys, NSArray headerKeys, NSArray cookieKeys) { PolicyC...
cacheKeyMap.put(policyCacheEntry, actionClass.getName());
cacheKeyMap.put(actionClass.getName(), policyCacheEntry);
public void createPolicyEntryForClass(Class actionClass, NSArray actionNames, NSArray formKeys, NSArray headerKeys, NSArray cookieKeys) { PolicyC...
public _ObserverSelectorHolder(Object observer, NSSelector selector) { observer = observer; selector = selector;
public _ObserverSelectorHolder(Object obs, NSSelector sel) { observer = obs; selector = sel;
public _ObserverSelectorHolder(Object observer, NSSelector selector) { observer = observer; selector = selector; }
cat.error("Catching exception when invoking method on observer: " + ex.toString());
cat.error("Catching exception when invoking method on observer: " + ex.toString()+" - "+ERXUtilities.stackTrace(ex));
protected void fileHasChanged(File file) { NSMutableSet observers = (NSMutableSet)_observersByFilePath.objectForKey(file.getAbsolutePath()); if (observers == null) cat.warn("Unable to find observers for file: " + file); else { NSNotification notification = new NSNotificati...
Node xpathNode= DOMUtil.getSingleNode(rootNode, path,
Node xpathNode= DOMUtil.getSingleNode(rootNode, location,
private void contractProcessingEnd() throws SAXException { try { contract.setContractResultData(); Document node = (Document) contract.getContractResultData() .getNode(); Document root = this.rootNode.getOwnerDocument(); /* * debug co...
desc.open (l, FileDescriptor.WRITE | FileDescriptor.EXCL);
desc = new FileDescriptor (l, FileDescriptor.WRITE | FileDescriptor.EXCL); desc.close ();
public static File createTempFile (String prefix, String suffix, File directory) throws IOException { FileDescriptor desc = new FileDescriptor (); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkWrite (desc); if (prefix.length () < 3) throw new IllegalArgumentE...
addScriptResourceInHead(context, res, "wonder.js");
protected void addRequiredWebResources(WOResponse res, WOContext context) { addScriptResourceInHead(context, res, "prototype.js"); addScriptResourceInHead(context, res, "scriptaculous.js"); addScriptResourceInHead(context, res, "effects.js"); addScriptResourceInHead(context, res, "builder.js"); addScri...
parametersBuffer.append("Form.serialize(" + formReference + ")");
parametersBuffer.append("Form.serializeWithoutSubmits(" + formReference + ")");
public NSDictionary createAjaxOptions(WOComponent component, String formReference) { String name = nameInContext(component.context(), component); NSMutableArray ajaxOptionsArray = new NSMutableArray(); ajaxOptionsArray.addObject(new AjaxOption("onComplete", AjaxOption.SCRIPT)); ajaxOptionsArray.addObject(...
data = addAssetData(data);
Iterator iter = ((Collection)getDescendentsOfClass(AssetComponent.class)).iterator(); while(iter.hasNext()) { AssetComponent asset = (AssetComponent)iter.next(); asset.addComponentData(data); }
public ComponentData addComponentData(ComponentData data) {// if(log.isDebugEnabled()) {// log.debug("In CMTAgent addComponentData");// } // The incoming data is an agent String name = data.getName(); int dotPos = name.lastIndexOf('.'); if (dotPos >= 0) { name = name.substring(dotPos + ...
Locale old = Locale.getDefault(); Locale.setDefault(locale()); NSTimestampFormatter formatter = new NSTimestampFormatter(formatString);
Locale current = locale(); NSTimestampFormatter formatter = new NSTimestampFormatter(formatString, new DateFormatSymbols(current));
public Format localizedDateFormatForKey(String formatString) { formatString = formatString == null ? ERXTimestampFormatter.DEFAULT_PATTERN : formatString; formatString = localizedStringForKeyWithDefault(formatString); Format result = (Format)_dateFormatters.get(formatString); if(result == null...
Locale.setDefault(old);
public Format localizedDateFormatForKey(String formatString) { formatString = formatString == null ? ERXTimestampFormatter.DEFAULT_PATTERN : formatString; formatString = localizedStringForKeyWithDefault(formatString); Format result = (Format)_dateFormatters.get(formatString); if(result == null...
experiment.getExperimentName(),
experimentName,
public void runConsole(Experiment experiment) { // TODO: we get here if the user edits an experiment containing // societies and removes all the societies, and then invokes the console if (experiment.getSocietyComponentCount() == 0) { // don't run console and disable it's button enableConsoleTool(f...
ERXPatcher.setClassForName(WOToManyRelationship.class, "WOToManyRelationship"); ERXPatcher.setClassForName(WOToOneRelationship.class, "WOToOneRelationship");
public static synchronized void installPatches() { ERXPatcher.setClassForName(DynamicElementsPatches.SubmitButton.class, "WOSubmitButton"); ERXPatcher.setClassForName(DynamicElementsPatches.ResetButton.class, "WOResetButton"); ERXPatcher.setClassForName(DynamicElementsPatches.TextField.class, "...
(ArrayList)getPropertyValue(node, "AgentNames");
(ArrayList)((ArrayList)getPropertyValue(node, "AgentNames")).clone();
public void displayAbout() { ArrayList agentNames = (ArrayList)getPropertyValue(node, "AgentNames"); if (agentNames == null) agentNames = new ArrayList(); // Add the NodeAgent as the first Agent in the list agentNames.add(0, node.getShortName()); JPanel aboutPanel = new JPanel(); aboutPan...
return ("MouseEvent[" + when + "," + modifiers + ",(" + x + "," + y + ")," + clickCount + "," + popupTrigger + ";" + super.paramString () + "]");
String r; switch (id) { case MOUSE_CLICKED: r = "MOUSE_CLICKED"; break; case MOUSE_DRAGGED: r = "MOUSE_DRAGGED"; break; case MOUSE_ENTERED: r = "MOUSE_ENTERED"; break; case MOUSE_EXITED: r = "MOUSE_EXITED"; break; case MOUSE_MOVED: r = "MOUSE_MOVED"; break; case MOUSE_PRESSED: r = "MOUSE_PRESSED"; break; case MOUSE_REL...
public String paramString () { return ("MouseEvent[" + when + "," + modifiers + ",(" + x + "," + y + ")," + clickCount + "," + popupTrigger + ";" + super.paramString () + "]"); }
public final static float arcRadius(float meters) {
public static final float arcRadius(float meters) {
public final static float arcRadius(float meters) { float arc = meters / EarthConstants.equatorialRadiusMeters; if(arc > Math.PI) { arc = (float)(2 * Math.PI - arc); } return arc; }
public final static LatLonPoint spherical_between(float phi1,
public static final LatLonPoint spherical_between(float phi1,
public final static LatLonPoint spherical_between(float phi1, float lambda0, float c, float Az) { float cosphi1 = (float)Math.cos(phi1); float sinphi1 = (float)Math.sin(phi1); float cosAz = (float)Math.cos(Az); float sinAz = (float)Math.sin(Az); float sinc = (float)Math.sin(...
public final static LatLonPoint spherical_between_degs(float lat, float lon,
public static final LatLonPoint spherical_between_degs(float lat, float lon,
public final static LatLonPoint spherical_between_degs(float lat, float lon, float c, float Az) { return spherical_between(EarthConstants.degToRad(lat), EarthConstants.degToRad(lon), c, Az); }
final public static float spherical_distance (float phi1,
public static final float spherical_distance (float phi1,
final public static float spherical_distance (float phi1, float lambda0, float phi, float lambda) { float pdiff = (float)Math.sin(((phi-phi1)/2)); float ldiff = (float)Math.sin((lambda-lambda0)/2); float rval = (float)Math.sqrt((pdiff*pdiff) + (float)Math.cos(phi1)*(float)Math.cos(phi)*(...
public final static float spherical_distance_deg (float lat1, float lon1,
public static final float spherical_distance_deg (float lat1, float lon1,
public final static float spherical_distance_deg (float lat1, float lon1, float lat2, float lon2) { return spherical_distance(EarthConstants.degToRad(lat1), EarthConstants.degToRad(lon1), EarthConstants.degToRad(lat2), EarthConstants.degToRad(lon2)); }
if (EOModelGroup.defaultGroup() != null && EOModelGroup.defaultGroup().models().count() == 0) {
EOModelGroup group = EOModelGroup.modelGroupForObjectStoreCoordinator((EOObjectStoreCoordinator)aNotification.object()); if (group != null && group.models().count() == 0) {
public void objectStoreWasAdded(NSNotification aNotification) { if (!_loadingComplete) { if (_modelList.count() == 0) { if (EOModelGroup.defaultGroup() != null && EOModelGroup.defaultGroup().models().count() == 0) { throw new RuntimeException("No models found in d...
_modelList = new NSMutableArray(EOModelGroup.defaultGroup().models());
_modelList = new NSMutableArray(group.models());
public void objectStoreWasAdded(NSNotification aNotification) { if (!_loadingComplete) { if (_modelList.count() == 0) { if (EOModelGroup.defaultGroup() != null && EOModelGroup.defaultGroup().models().count() == 0) { throw new RuntimeException("No models found in d...
return context().directActionURLForActionNamed(actionName, dict);
return context().directActionURLForActionNamed(actionName, dict).replaceAll("&amp;", "&");
public String urlForCurrentState() { NSDictionary dict = null; String actionName = d2wContext().dynamicPage(); String primaryKeyString = ERXEOControlUtilities.primaryKeyStringForObject(object()); if(primaryKeyString != null) { dict = new NSDictionary(primaryKeyString, "__key")...
if ((_content == null) && _isAvailable) {
if (_content == null) {
public FileContent getContent() throws IOException { if ((_content == null) && _isAvailable) { try { _content = _resourceImpl.getContent(); } catch (FileSystemException e) { IOException error = new IOException(e.getLocalizedMessage()); error.initCause(e); throw error; } } return _con...
public String writeDebug() {
public static String writeDebug() {
public String writeDebug() { // Cougaar version, build info StringBuffer result = new StringBuffer(); String version = null; long buildtime = 0; try { Class vc = Class.forName("org.cougaar.Version"); Field vf = vc.getField("version"); Field bf = vc.getField("buildTime"); version = (...
cmdLineNodeMenuItem.setEnabled(false);
private void initDisplay() { // host split pane contains host tree and // the bottom split pane which contains the node and agent trees JSplitPane hostPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); // tree of hosts and assigned nodes and agents DefaultMutableTreeNode root = new DefaultMutable...
void produce (Vector v, FileInputStream is) throws IOException
public void produce (Vector v, InputStream is) throws IOException
void produce (Vector v, FileInputStream is) throws IOException { curr = v; byte bytes[] = new byte[4096]; int len = 0; while ((len = is.read (bytes)) != -1) pumpBytes (bytes, len); for (int i = 0; i < curr.size (); i++) { ImageConsumer ic = (ImageConsumer) curr.elementAt (i); ...
return "WRAttribute" + depth + "Total" + currentIndex;
return "WRAttribute" + depth + "Total" + this.totalCount();
public String classAttributeTd() { return "WRAttribute" + depth + "Total" + currentIndex; }
log = CSMART.createLogger(this.getClass().getName());
public void setupSubscriptions() { log = CSMART.createLogger(this.getClass().getName()); world = new Society(); theIEF = new IEFactory(theCSMARTF); // This reads in the data file and fills in the world parseParameters(); // Subscribe to RealWorldEvents rweSub = (IncrementalSubscription) subsc...
if(Modifier.isPublic(method.getModifiers()) && !Modifier.isStatic(method.getModifiers())) {
if(Modifier.isPublic(method.getModifiers())) {
public void addMethod(Method method) { if(Modifier.isPublic(method.getModifiers()) && !Modifier.isStatic(method.getModifiers())) { String name = ClassHelper.getTruncatedName(method.getName()); Class retType = method.getReturnType(); Class[] params = method.getParameterTypes(); boolean isVoid = retType.equal...
EOEntity entity=EOModelGroup.defaultGroup().entityNamed("Bug"); EOClassDescription aClassDesc=entity.classDescriptionForInstances(); EOEditingContext peerContext=new EOEditingContext(object.editingContext().parentObjectStore()); EOEnterpriseObject localObject=EOUtilities.localInstanceOfObject(peerContext,object); local...
EOEditingContext peer = ERXEC.newEditingContext(object.editingContext().parentObjectStore()); EditPageInterface epi = null; peer.lock(); try {
public WOComponent fileBug() { EOEntity entity=EOModelGroup.defaultGroup().entityNamed("Bug"); EOClassDescription aClassDesc=entity.classDescriptionForInstances(); EOEditingContext peerContext=new EOEditingContext(object.editingContext().parentObjectStore()); EOEnterpriseObject localObje...
Component component = valueForKey("component");
Component component = (Component)valueForKey("component");
public WOComponent fileBug() { EOEntity entity=EOModelGroup.defaultGroup().entityNamed("Bug"); EOClassDescription aClassDesc=entity.classDescriptionForInstances(); EOEditingContext peerContext=new EOEditingContext(object.editingContext().parentObjectStore()); EOEnterpriseObject localObje...
testItem.setState(TestItem.BUG_STATE);
testItem.setState(TestItemState.BUG);
public WOComponent fileBug() { EOEntity entity=EOModelGroup.defaultGroup().entityNamed("Bug"); EOClassDescription aClassDesc=entity.classDescriptionForInstances(); EOEditingContext peerContext=new EOEditingContext(object.editingContext().parentObjectStore()); EOEnterpriseObject localObje...
bug.setTextDescription("[From Test #"testItem.primaryKey()+"]"); bug.addtoBothSidesOfTestItems(testItem); bug.addtoBothSidesOfOriginator(user); bug.addtoBothSidesOfComponents(component);
bug.setTextDescription("[From Test #" + testItem.primaryKey()+"]"); bug.addToBothSidesOfTestItems(testItem); bug.addToBothSidesOfOriginator(user); bug.addToBothSidesOfComponent(component);
public WOComponent fileBug() { EOEntity entity=EOModelGroup.defaultGroup().entityNamed("Bug"); EOClassDescription aClassDesc=entity.classDescriptionForInstances(); EOEditingContext peerContext=new EOEditingContext(object.editingContext().parentObjectStore()); EOEnterpriseObject localObje...
EditPageInterface epi=(EditPageInterface)D2W.factory().pageForConfigurationNamed("EditNewBug",session());
epi=(EditPageInterface)D2W.factory().pageForConfigurationNamed("EditNewBug",session());
public WOComponent fileBug() { EOEntity entity=EOModelGroup.defaultGroup().entityNamed("Bug"); EOClassDescription aClassDesc=entity.classDescriptionForInstances(); EOEditingContext peerContext=new EOEditingContext(object.editingContext().parentObjectStore()); EOEnterpriseObject localObje...
return (WOComponent)epi; }*/ return (WOComponent)epi;
} finally { peer.unlock(); } return (WOComponent)epi;
public WOComponent fileBug() { EOEntity entity=EOModelGroup.defaultGroup().entityNamed("Bug"); EOClassDescription aClassDesc=entity.classDescriptionForInstances(); EOEditingContext peerContext=new EOEditingContext(object.editingContext().parentObjectStore()); EOEnterpriseObject localObje...
x = (d.width - new_w) / 2;
x = ins.left + (d.width - new_w) / 2 + hgap;
public void layoutContainer (Container parent) { synchronized (parent.getTreeLock ()) { int num = parent.getComponentCount (); // This is more efficient than calling getComponents(). Component[] comps = parent.component; Dimension d = parent.getSize (); Insets ins = parent.getInsets (); ComponentOrientation ...
x = d.width - new_w;
x = ins.left + (d.width - new_w) + hgap;
public void layoutContainer (Container parent) { synchronized (parent.getTreeLock ()) { int num = parent.getComponentCount (); // This is more efficient than calling getComponents(). Component[] comps = parent.component; Dimension d = parent.getSize (); Insets ins = parent.getInsets (); ComponentOrientation ...
new JFileChooser(SocietyFinder.getInstance().getPath());
new JFileChooser(System.getProperty("org.cougaar.install.path")); chooser.setDialogTitle("Select directory of Agent INI files or a single Node INI to load");
protected SocietyComponent createSocietyFromFile() { // display file chooser to allow user to select file that defines society JFileChooser chooser = new JFileChooser(SocietyFinder.getInstance().getPath()); chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); File file = null; Societ...
create (GTK_WINDOW_TOPLEVEL, awtComponent.getWidth(), awtComponent.getHeight());
create (GDK_WINDOW_TYPE_HINT_DIALOG, true);
void create () { create (GTK_WINDOW_TOPLEVEL, awtComponent.getWidth(), awtComponent.getHeight()); }
throw new IllegalArgumentException("no argument may be less then 1");
throw new IllegalArgumentException("no argument may be less than 1");
public ResolutionSyntax(int crossFeedResolution, int feedResolution, int units) { if (crossFeedResolution < 1 || feedResolution < 1 || units < 1) throw new IllegalArgumentException("no argument may be less then 1"); this.crossFeedResolution = crossFeedResolution * un...
NSArray array() {
protected NSArray array() {
NSArray array() { return (NSArray)valueForBinding("items"); }
String entityName() {
protected String entityName() {
String entityName() { return (String)valueForBinding("entityName"); }
if (theObject == null) {
if (theObject == null && arg0.indexOf(".") > -1) {
public Object objectStore() { if(_objectStore == null) { _objectStore = new NSKeyValueCodingAdditions() { public void takeValueForKey(Object arg0, String arg1) { if (arg0 == null) { removeObjectForKey(arg1); } else { ...
if (theObject == null) {
if (theObject == null && arg0.indexOf(".") > -1) {
public Object valueForKeyPath(String arg0) { Object theObject = objectForKey(arg0); if (theObject == null) { String key = ""; String oriKey = arg0; do { key = key + oriKe...
Class[] classes = new Class[delegates.length]; for (int i = 0; i < delegates.length; i++) { classes[i] = delegates[i].getClass(); } Object key = keyFactory.newInstance(classes);
Object key = keyFactory.newInstance(getClasses(delegates));
synchronized private static Info getInfo(Object[] delegates) { // TODO: optimize object->class conversion? Class[] classes = new Class[delegates.length]; for (int i = 0; i < delegates.length; i++) { classes[i] = delegates[i].getClass(); } Object key = keyFactory.newInst...
return makeDelegatorHelper(keyFactory.newInstance(interfaces), interfaces, delegates, loader);
return makeDelegatorHelper(keyFactory.newInstance(interfaces), interfaces, delegates, loader, false);
public static Object makeDelegator(Class[] interfaces, Object[] delegates, ClassLoader loader) { return makeDelegatorHelper(keyFactory.newInstance(interfaces), interfaces, delegates, loader); }
synchronized private static Object makeDelegatorHelper(Object key, Class[] interfaces, Object[] delegates, ClassLoader loader) { if (loader == null) { loader = defaultLoader;
private static Object makeDelegatorHelper(Object key, Class[] classes, Object[] delegates, ClassLoader loader, boolean bean) { Factory factory; synchronized (cache) { if (loader == null) { loader = defaultLoader; } factory = (Factory)cache.get(loader, key); if (factory == null) { Class result = new DelegatorGenerator(g...
synchronized private static Object makeDelegatorHelper(Object key, Class[] interfaces, Object[] delegates, ClassLoader loader) { if (lo...
Map factories = (Map)loaders.get(loader); if (factories == null) { loaders.put(loader, factories = new HashMap()); } Factory factory = (Factory)factories.get(key); if (factory == null) { Class clazz = new DelegatorGenerator(getNextName(), interfaces, loader).define(); try { factory = (Factory)clazz.getConstructor(Const...
return factory.cglib_newInstance(delegates);
synchronized private static Object makeDelegatorHelper(Object key, Class[] interfaces, Object[] delegates, ClassLoader loader) { if (lo...
int dims[] = new int[2]; getSize (rows, dims); return (new Dimension (dims[0], dims[1]));
return minimumSize (rows);
public Dimension getMinimumSize (int rows) { int dims[] = new int[2]; getSize (rows, dims); return (new Dimension (dims[0], dims[1])); }
int dims[] = new int[2]; getSize (rows, dims); return (new Dimension (dims[0], dims[1]));
return preferredSize (rows);
public Dimension getPreferredSize (int rows) { int dims[] = new int[2]; getSize (rows, dims); return (new Dimension (dims[0], dims[1])); }
return (getMinimumSize (rows));
int dims[] = new int[2]; getSize (rows, dims); return new Dimension (dims[0], dims[1]);
public Dimension minimumSize (int rows) { return (getMinimumSize (rows)); }