rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (anEntity == null) { throw new IllegalStateException("<" + getClass().getName() + " could not find entity named " + anEntityName + ">"); } EOEntity destinationEntity = null; | Object _source = _localSourceObject(); | protected EODataSource _localDataSource() { if (null==dataSource()) { setDataSource((EODataSource)valueForBinding("dataSource")); if (dataSource() == null) { String anEntityName = _localSourceEntityName(); // FIXME (msanchez, 08/00, 2520053): use modelGroup... |
Object _source = _localSourceObject(); | protected EODataSource _localDataSource() { if (null==dataSource()) { setDataSource((EODataSource)valueForBinding("dataSource")); if (dataSource() == null) { String anEntityName = _localSourceEntityName(); // FIXME (msanchez, 08/00, 2520053): use modelGroup... | |
EORelationship relationship = ERXUtilities.relationshipWithObjectAndKeyPath((EOEnterpriseObject)_source, _localRelationshipKey()); destinationEntity = relationship != null ? relationship.destinationEntity() : null; | protected EODataSource _localDataSource() { if (null==dataSource()) { setDataSource((EODataSource)valueForBinding("dataSource")); if (dataSource() == null) { String anEntityName = _localSourceEntityName(); // FIXME (msanchez, 08/00, 2520053): use modelGroup... | |
if (destinationEntity == null) destinationEntity = entityWithEntityAndKeyPath(anEntity, _localRelationshipKey()); | protected EODataSource _localDataSource() { if (null==dataSource()) { setDataSource((EODataSource)valueForBinding("dataSource")); if (dataSource() == null) { String anEntityName = _localSourceEntityName(); // FIXME (msanchez, 08/00, 2520053): use modelGroup... | |
} if(anEntityName == null) { anEntityName = _localSourceEntityName(); EOEntity anEntity = EOUtilities.entityNamed(anEditingContext, anEntityName); if (anEntity == null) { throw new IllegalStateException("<" + getClass().getName() + " could not find entity named " + anEntityName + ">"); } if (_source instanceof EOEnter... | protected EODataSource _localDataSource() { if (null==dataSource()) { setDataSource((EODataSource)valueForBinding("dataSource")); if (dataSource() == null) { String anEntityName = _localSourceEntityName(); // FIXME (msanchez, 08/00, 2520053): use modelGroup... | |
int n = fileMenu.getItemCount(); for (int i = 2; i < n-1; i++) { JMenuItem menuItem = fileMenu.getItem(i); if (menuItem != null) { Action action = menuItem.getAction(); if (action != null) ActionUtil.setActionAllowed(action, organizer); } } | enableActions((JMenu)e.getSource()); | public void menuSelected(MenuEvent e) { int n = fileMenu.getItemCount(); // skip Open Workspace, Save New Results, and Exit // which are always enabled for (int i = 2; i < n-1; i++) { JMenuItem menuItem = fileMenu.getItem(i); if (menuItem != null) { ... |
JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); fileMenu = new JMenu(FILE_MENU); fileMenu.setToolTipText("Create new workspace or quit."); fileMenu.addMenuListener(myMenuListener); JMenuItem newMenuItem = new JMenuItem(NEW_MENU_ITEM); newMenuItem.addActionListener(new ActionListener() { public v... | initDisplay(); | public CSMART() { setTitle("CSMART"); csmart = this; 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().setJMe... |
setResultDir(); | newWorkspace(); | public void actionPerformed(ActionEvent e) { setResultDir(); } |
exit(); | setResultDir(); | public void actionPerformed(ActionEvent e) { exit(); } |
DefaultMutableTreeNode node = organizer.getSelectedNode(); Object userObject = node.getUserObject(); if (userObject instanceof Experiment) runAnalyzer((Experiment)userObject); | JFrame societyMonitorFrame = NamedFrame.getNamedFrame().getToolFrame(SOCIETY_MONITOR); if (societyMonitorFrame == null) runMonitor(); | public void actionPerformed(ActionEvent e) { DefaultMutableTreeNode node = organizer.getSelectedNode(); Object userObject = node.getUserObject(); if (userObject instanceof Experiment) runAnalyzer((Experiment)userObject); else runAnalyzer(); } |
runAnalyzer(); | societyMonitorFrame.toFront(); | public void actionPerformed(ActionEvent e) { DefaultMutableTreeNode node = organizer.getSelectedNode(); Object userObject = node.getUserObject(); if (userObject instanceof Experiment) runAnalyzer((Experiment)userObject); else runAnalyzer(); } |
initDisplay(); | private void newWorkspace() { if (workspaceFileChooser == null) { workspaceFileChooser = new JFileChooser(System.getProperty("org.cougaar.install.path")); String[] filters = { "bin" }; ExtensionFileFilter filter = new ExtensionFileFilter(filters, "workspace file"); workspaceFileChooser.addCho... | |
return localport; | return localPort; | protected int getLocalPort() { return localport; } |
ModifiableComponent sc = getComponent(i); if (sc instanceof SocietyComponent) { ModifiableComponent copiedSC = sc.copy("Society for " + uniqueName); experimentCopy.addComponent(copiedSC); } else System.out.println("Experiment: error in copying: unexpected component of class: " + sc.getClass().getName()); | ModifiableComponent mc = getComponent(i); ModifiableComponent copiedComponent = null; if (mc instanceof SocietyComponent) { copiedComponent = mc.copy("Society for " + uniqueName); } else if (mc instanceof RecipeComponent) { copiedComponent = mc.copy("Recipe for " + uniqueName); } if (copiedComponent != null) experiment... | public ModifiableComponent copy(String uniqueName) { Experiment experimentCopy = null; if (inDatabase) experimentCopy = new Experiment(uniqueName, expID, trialID); else experimentCopy = new Experiment(uniqueName); Properties newProps = experimentCopy.getDefaultNodeArguments(); newProps.clear... |
if (selected != null && selected.size() != 0) { Element element = (Element)selected.elementAt(0); if (element.isNode()) { String UID = element.getName(); String agentName = (String)element.getAttributeValue(PropertyNames.AGENT_ATTR); if (UID != null && agentName != null) if (command.equals(THREAD_UP_MENU_ITEM)) CSMARTU... | if (selected == null || selected.size() == 0) return; Element element = (Element)selected.elementAt(0); if (!(element.isNode())) return; UID = element.getName(); if (UID == null) return; agentName = (String)element.getAttributeValue(PropertyNames.AGENT_ATTR); if (agentName == null) return; isDown = (command.equals(THRE... | public void actionPerformed(ActionEvent evt) { String command = ((JMenuItem)evt.getSource()).getText(); if (command.equals(NEW_WITH_SELECTION_MENU_ITEM)) { // check that at least one node is selected, else do nothing if (!graph.isNodeSelected()) return; CSMARTGraph newGraph = graph.newGraphFromSe... |
try { limit = Integer.parseInt(sLimit); } catch (NumberFormatException nfe) { System.err.println("Illegal number: "+sLimit); return; } CSMARTUL.makeThreadGraph(UID, agentName, isDown, limit); | public void actionPerformed(ActionEvent evt) { String command = ((JMenuItem)evt.getSource()).getText(); if (command.equals(NEW_WITH_SELECTION_MENU_ITEM)) { // check that at least one node is selected, else do nothing if (!graph.isNodeSelected()) return; CSMARTGraph newGraph = graph.newGraphFromSe... | |
setChageTypesToTrack((NSArray)NSPropertyListSerialization.propertyListFromString( | setChangeTypesToTrack((NSArray)NSPropertyListSerialization.propertyListFromString( | public synchronized void initialize(NSNotification notification) { if (_isInitialized) return; NSLog.out.appendln("Initializing ERChangeNotificationJMS Framework"); setEntitiesNotToSynchronize((NSArray)NSPropertyListSerialization.propertyListFromString( System.getProperty("er.ch... |
JButton statusButton, | JRadioButton statusButton, | public ConsoleInternalFrame(NodeComponent node, ConsoleNodeListener listener, JScrollPane pane, JButton statusButton, String logFileName) { super("", // title true, //resizable f... |
aboutPanel.add(new JLabel(CSMARTConsole.getStatusColorDescription(statusButton)), | String status = ""; String s = statusButton.getToolTipText(); int index = s.lastIndexOf(":"); if (index != -1) status = s.substring(index+1); aboutPanel.add(new JLabel(status), | public void displayAbout() { ArrayList agentNames = (ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; aboutPanel.add(new JLabel("Status:"), new GridBagCons... |
InetAdress host = InetAddress.getByName(hostName); | InetAddress host = InetAddress.getByName(hostName); | public void displayAbout() { ArrayList agentNames = (ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; aboutPanel.add(new JLabel("Status:"), new GridBagCons... |
dest.setReadOnly(); | public void testOverwrite() throws Exception { _project.setProperty("ivy.dep.file", "test/java/fr/jayasoft/ivy/ant/ivy-simple.xml"); IvyResolve res = new IvyResolve(); res.setProject(_project); res.execute(); _publish.setPubrevision("1.2"); _publish.setResolver("1")... | |
return ("PaintEvent[" + updateRect + ";" + super.paramString () + "]"); | String r; switch (id) { case UPDATE: r = "UPDATE"; break; case PAINT: r = "PAINT"; break; default: r = "unknown id"; break; } r += ",updateRect=" + updateRect; return r; | public String paramString () { return ("PaintEvent[" + updateRect + ";" + super.paramString () + "]"); } |
bounds = new Rectangle (minx, maxy, maxx - minx, maxy - miny); | bounds = new Rectangle (minx, miny, maxx - minx, maxy - miny); | public Rectangle getBoundingBox() { if (bounds == null) { if (npoints == 0) return bounds = new Rectangle (); int i = npoints - 1; int minx = xpoints[i]; int maxx = minx; int miny = ypoints[i]; int maxy = miny; while (--i >= 0) { i... |
organizer.startBuilder(); | SwingUtilities.invokeLater(new Runnable() { public void run() { organizer.startBuilder(); } }); | public void actionPerformed(ActionEvent e) { // if this was invoked from a popup menu // then take down the menu as this could be a long operation// Component c = ((Component)e.getSource()).getParent();// if (c instanceof JPopupMenu) {// System.out.println("Taking d... |
if (!society.isEditable()) { int result = JOptionPane.showConfirmDialog(this, "Society has been or is being used; delete anyway?", "Society Not Editable", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); if (result != JOptionPane.YES_OPTION) return; } | protected void deleteSocietyInNode(DefaultMutableTreeNode societyNode) { SocietyComponent society = (SocietyComponent)societyNode.getUserObject(); if (!society.isEditable()) { int result = JOptionPane.showConfirmDialog(this, "Society has been or is being used; delete anyway?", "Society Not Edit... | |
sb.append(agentChildren[i].getClass().getName()); | sb.append(agentChildren[i].getClassName()); | private void displayPlugIns(String agentName) { ComponentData societyComponentData = experiment.getSocietyComponentData(); if (societyComponentData == null) { System.out.println("ConsoleInternalFrame: Need to save experiment"); return; } ComponentData[] children = societyComponentData.getChildre... |
if(log.isErrorEnabled()) { | if(rc == null && log.isErrorEnabled()) { | 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... |
if (_ivyroot == null || _ivypattern == null) { return null; } | private String getWholeIvyPattern() { return _ivyroot + _ivypattern; } | |
updateWholeIvyPattern(); | updateWholeArtPattern(); | public void setM2compatible(boolean m2compatible) { super.setM2compatible(m2compatible); if (isM2compatible()) { _artroot = "http://www.ibiblio.org/maven2/"; _artpattern = "[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"; ensureIvyConfigured(getIvy()); ... |
patterns.add(getWholeIvyPattern()); patterns.add(getWholeArtPattern()); | if (getWholeIvyPattern() != null) { patterns.add(getWholeIvyPattern()); } if (getWholeArtPattern() != null) { patterns.add(getWholeArtPattern()); } | private void updateWholeIvyPattern() { if (isM2compatible()) { List patterns = new ArrayList(); patterns.add(getWholeIvyPattern()); patterns.add(getWholeArtPattern()); setIvyPatterns(patterns); } else { setIvyPatterns(Collections.singletonList(get... |
InstantMessengerAdaptor.log.debugStackTrace(e); | InstantMessengerAdaptor.log.debug("Failed to connect to provider.", e); | public void connect() { _instantMessenger.addMessageListener(this); try { _instantMessenger.connect(); } catch (Throwable e) { InstantMessengerAdaptor.log.debugStackTrace(e); } if (_watcherFactory != null) { _watcherInstantMessenger = _watcherFactory.createInstantMessenger(_watcherScr... |
InstantMessengerAdaptor.log.debugStackTrace(e); | InstantMessengerAdaptor.log.debug("Failed to connect watcher to provider.", e); | public void connect() { _instantMessenger.addMessageListener(this); try { _instantMessenger.connect(); } catch (Throwable e) { InstantMessengerAdaptor.log.debugStackTrace(e); } if (_watcherFactory != null) { _watcherInstantMessenger = _watcherFactory.createInstantMessenger(_watcherScr... |
if (component == null) return null; int index = -1; while (i >= 0 && ++index < component.length) if (component[index] instanceof Accessible) i--; if (i < 0) return (Accessible) component[index]; return null; | synchronized (getTreeLock ()) { if (component == null) return null; int index = -1; while (i >= 0 && ++index < component.length) if (component[index] instanceof Accessible) i--; if (i < 0) return (Accessible) component[index]; return null; } | public Accessible getAccessibleChild(int i) { if (component == null) return null; int index = -1; while (i >= 0 && ++index < component.length) if (component[index] instanceof Accessible) i--; if (i < 0) return (Accessible) component[index]; return null; } |
int count = 0; int i = component == null ? 0 : component.length; while (--i >= 0) if (component[i] instanceof Accessible) count++; return count; | synchronized (getTreeLock ()) { int count = 0; int i = component == null ? 0 : component.length; while (--i >= 0) if (component[i] instanceof Accessible) count++; return count; } | public int getAccessibleChildrenCount() { int count = 0; int i = component == null ? 0 : component.length; while (--i >= 0) if (component[i] instanceof Accessible) count++; return count; } |
if (index > ncomponents || (index < 0 && index != -1) || comp instanceof Window || (comp instanceof Container && ((Container) comp).isAncestorOf(this))) throw new IllegalArgumentException(); | synchronized (getTreeLock ()) { if (index > ncomponents || (index < 0 && index != -1) || comp instanceof Window || (comp instanceof Container && ((Container) comp).isAncestorOf(this))) throw new IllegalArgumentException(); | protected void addImpl(Component comp, Object constraints, int index) { if (index > ncomponents || (index < 0 && index != -1) || comp instanceof Window || (comp instanceof Container && ((Container) comp).isAncestorOf(this))) throw new IllegalArgumentException(); // Reparent... |
if (comp.isLightweight()) enableEvents(comp.eventMask); | if (comp.isLightweight()) enableEvents(comp.eventMask); } invalidate(); if (component == null) component = new Component[4]; if (ncomponents >= component.length) { int nl = component.length * 2; Component[] c = new Component[nl]; System.arraycopy(component, 0, c, 0, ncomponents); component = c; } if (index == -1) ... | protected void addImpl(Component comp, Object constraints, int index) { if (index > ncomponents || (index < 0 && index != -1) || comp instanceof Window || (comp instanceof Container && ((Container) comp).isAncestorOf(this))) throw new IllegalArgumentException(); // Reparent... |
invalidate(); if (component == null) component = new Component[4]; if (ncomponents >= component.length) { int nl = component.length * 2; Component[] c = new Component[nl]; System.arraycopy(component, 0, c, 0, ncomponents); component = c; } if (index == -1) component[ncomponents++] = comp; else { System.arraycopy(co... | protected void addImpl(Component comp, Object constraints, int index) { if (index > ncomponents || (index < 0 && index != -1) || comp instanceof Window || (comp instanceof Container && ((Container) comp).isAncestorOf(this))) throw new IllegalArgumentException(); // Reparent... | |
for (int i = ncomponents; --i >= 0; ) | synchronized (getTreeLock ()) | private void addNotifyContainerChildren() { for (int i = ncomponents; --i >= 0; ) { component[i].addNotify(); if (component[i].isLightweight()) enableEvents(component[i].eventMask); } } |
component[i].addNotify(); if (component[i].isLightweight()) enableEvents(component[i].eventMask); | for (int i = ncomponents; --i >= 0; ) { component[i].addNotify(); if (component[i].isLightweight()) enableEvents(component[i].eventMask); } | private void addNotifyContainerChildren() { for (int i = ncomponents; --i >= 0; ) { component[i].addNotify(); if (component[i].isLightweight()) enableEvents(component[i].eventMask); } } |
if (! contains(x, y)) return null; | synchronized (getTreeLock ()) { if (! contains(x, y)) return null; | public Component findComponentAt(int x, int y) { if (! contains(x, y)) return null; for (int i = 0; i < ncomponents; ++i) { // Ignore invisible children... if (!component[i].isVisible()) continue; int x2 = x - component[i].x; int y2 = y - component[i].y; //... |
int x2 = x - component[i].x; int y2 = y - component[i].y; if (component[i] instanceof Container) { Container k = (Container) component[i]; Component r = k.findComponentAt(x2, y2); if (r != null) return r; } else if (component[i].contains(x2, y2)) return component[i]; | int x2 = x - component[i].x; int y2 = y - component[i].y; if (component[i] instanceof Container) { Container k = (Container) component[i]; Component r = k.findComponentAt(x2, y2); if (r != null) return r; } else if (component[i].contains(x2, y2)) return component[i]; } return this; | public Component findComponentAt(int x, int y) { if (! contains(x, y)) return null; for (int i = 0; i < ncomponents; ++i) { // Ignore invisible children... if (!component[i].isVisible()) continue; int x2 = x - component[i].x; int y2 = y - component[i].y; //... |
return this; | public Component findComponentAt(int x, int y) { if (! contains(x, y)) return null; for (int i = 0; i < ncomponents; ++i) { // Ignore invisible children... if (!component[i].isVisible()) continue; int x2 = x - component[i].x; int y2 = y - component[i].y; //... | |
int start, end; if (child != null) | synchronized (getTreeLock ()) | Component findNextFocusComponent(Component child) { int start, end; if (child != null) { for (start = 0; start < ncomponents; ++start) { if (component[start] == child) break; } end = start; // This special case lets us be sure to terminate. ... |
for (start = 0; start < ncomponents; ++start) { if (component[start] == child) break; } end = start; if (end == 0) end = ncomponents; ++start; | int start, end; if (child != null) { for (start = 0; start < ncomponents; ++start) { if (component[start] == child) break; } end = start; if (end == 0) end = ncomponents; ++start; } else { start = 0; end = ncomponents; } for (int j = start; j != end; ++j) { if (j >= ncomponents) { if (parent != null) return paren... | Component findNextFocusComponent(Component child) { int start, end; if (child != null) { for (start = 0; start < ncomponents; ++start) { if (component[start] == child) break; } end = start; // This special case lets us be sure to terminate. ... |
else { start = 0; end = ncomponents; } for (int j = start; j != end; ++j) { if (j >= ncomponents) { if (parent != null) return parent.findNextFocusComponent(this); j -= ncomponents; } if (component[j] instanceof Container) { Component c = component[j]; c = c.findNextFocusComponent(null); if (c != null) return c; }... | Component findNextFocusComponent(Component child) { int start, end; if (child != null) { for (start = 0; start < ncomponents; ++start) { if (component[start] == child) break; } end = start; // This special case lets us be sure to terminate. ... | |
if (n < 0 || n >= ncomponents) throw new ArrayIndexOutOfBoundsException("no such component"); return component[n]; | synchronized (getTreeLock ()) { if (n < 0 || n >= ncomponents) throw new ArrayIndexOutOfBoundsException("no such component"); return component[n]; } | public Component getComponent(int n) { if (n < 0 || n >= ncomponents) throw new ArrayIndexOutOfBoundsException("no such component"); return component[n]; } |
if (! contains(x, y)) return null; for (int i = 0; i < ncomponents; ++i) | synchronized (getTreeLock ()) | public Component getComponentAt(int x, int y) { if (! contains(x, y)) return null; for (int i = 0; i < ncomponents; ++i) { // Ignore invisible children... if (!component[i].isVisible()) continue; int x2 = x - component[i].x; int y2 = y - component[i].y; if ... |
if (!component[i].isVisible()) continue; | if (! contains(x, y)) return null; for (int i = 0; i < ncomponents; ++i) { if (!component[i].isVisible()) continue; | public Component getComponentAt(int x, int y) { if (! contains(x, y)) return null; for (int i = 0; i < ncomponents; ++i) { // Ignore invisible children... if (!component[i].isVisible()) continue; int x2 = x - component[i].x; int y2 = y - component[i].y; if ... |
int x2 = x - component[i].x; int y2 = y - component[i].y; if (component[i].contains(x2, y2)) return component[i]; | int x2 = x - component[i].x; int y2 = y - component[i].y; if (component[i].contains(x2, y2)) return component[i]; } return this; | public Component getComponentAt(int x, int y) { if (! contains(x, y)) return null; for (int i = 0; i < ncomponents; ++i) { // Ignore invisible children... if (!component[i].isVisible()) continue; int x2 = x - component[i].x; int y2 = y - component[i].y; if ... |
return this; | public Component getComponentAt(int x, int y) { if (! contains(x, y)) return null; for (int i = 0; i < ncomponents; ++i) { // Ignore invisible children... if (!component[i].isVisible()) continue; int x2 = x - component[i].x; int y2 = y - component[i].y; if ... | |
Component[] result = new Component[ncomponents]; if (ncomponents > 0) System.arraycopy(component, 0, result, 0, ncomponents); return result; | synchronized (getTreeLock ()) { Component[] result = new Component[ncomponents]; if (ncomponents > 0) System.arraycopy(component, 0, result, 0, ncomponents); return result; } | public Component[] getComponents() { Component[] result = new Component[ncomponents]; if (ncomponents > 0) System.arraycopy(component, 0, result, 0, ncomponents); return result; } |
while (true) | synchronized (getTreeLock ()) | public boolean isAncestorOf(Component comp) { while (true) { if (comp == null) return false; if (comp == this) return true; comp = comp.getParent(); } } |
if (comp == null) return false; if (comp == this) return true; comp = comp.getParent(); | while (true) { if (comp == null) return false; if (comp == this) return true; comp = comp.getParent(); } | public boolean isAncestorOf(Component comp) { while (true) { if (comp == null) return false; if (comp == this) return true; comp = comp.getParent(); } } |
super.list(out, indent); for (int i = 0; i < ncomponents; ++i) component[i].list(out, indent + 2); | synchronized (getTreeLock ()) { super.list(out, indent); for (int i = 0; i < ncomponents; ++i) component[i].list(out, indent + 2); } | public void list(PrintStream out, int indent) { super.list(out, indent); for (int i = 0; i < ncomponents; ++i) component[i].list(out, indent + 2); } |
Component r = component[index]; | synchronized (getTreeLock ()) { Component r = component[index]; | public void remove(int index) { Component r = component[index]; r.removeNotify(); System.arraycopy(component, index + 1, component, index, ncomponents - index - 1); component[--ncomponents] = null; invalidate(); if (layoutMgr != null) layoutMgr.removeLayoutComponent(r); ... |
ContainerEvent ce = new ContainerEvent(this, ContainerEvent.COMPONENT_REMOVED, r); getToolkit().getSystemEventQueue().postEvent(ce); | ContainerEvent ce = new ContainerEvent(this, ContainerEvent.COMPONENT_REMOVED, r); getToolkit().getSystemEventQueue().postEvent(ce); } | public void remove(int index) { Component r = component[index]; r.removeNotify(); System.arraycopy(component, index + 1, component, index, ncomponents - index - 1); component[--ncomponents] = null; invalidate(); if (layoutMgr != null) layoutMgr.removeLayoutComponent(r); ... |
while (ncomponents > 0) remove(0); | synchronized (getTreeLock ()) { while (ncomponents > 0) remove(0); } | public void removeAll() { while (ncomponents > 0) remove(0); } |
for (int i = 0; i < ncomponents; ++i) component[i].removeNotify(); super.removeNotify(); | synchronized (getTreeLock ()) { for (int i = 0; i < ncomponents; ++i) component[i].removeNotify(); super.removeNotify(); } | public void removeNotify() { for (int i = 0; i < ncomponents; ++i) component[i].removeNotify(); super.removeNotify(); } |
synchronized (this) | synchronized (getTreeLock ()) | public void validate() { // FIXME: use the tree lock? synchronized (this) { if (! isValid()) { validateTree(); } } } |
synchronized (getTreeLock ()) { for (int i = 0; i < ncomponents; ++i) { Component comp = component[i]; boolean applicable = comp.isVisible() && (comp.isLightweight() || !lightweightOnly); | private void visitChildren(Graphics gfx, GfxVisitor visitor, boolean lightweightOnly) { // FIXME: do locking for (int i = 0; i < ncomponents; ++i) { Component comp = component[i]; boolean applicable = comp.isVisible() && (comp.isLightweight() || !lightwei... | |
for (int i = 0; i < ncomponents; ++i) { Component comp = component[i]; boolean applicable = comp.isVisible() && (comp.isLightweight() || !lightweightOnly); if (applicable) visitChild(gfx, visitor, comp); | if (applicable) visitChild(gfx, visitor, comp); } | private void visitChildren(Graphics gfx, GfxVisitor visitor, boolean lightweightOnly) { // FIXME: do locking for (int i = 0; i < ncomponents; ++i) { Component comp = component[i]; boolean applicable = comp.isVisible() && (comp.isLightweight() || !lightwei... |
isEditable = experiment.isEditable(); | public HostConfigurationBuilder(Experiment experiment, ExperimentBuilder experimentBuilder) { createLogger(); this.experiment = experiment; this.experimentBuilder = experimentBuilder; hostConfigurationBuilder = this; // for inner class dialogs isEditable = experiment.i... | |
else isEditable = true; | public HostConfigurationBuilder(Experiment experiment, ExperimentBuilder experimentBuilder) { createLogger(); this.experiment = experiment; this.experimentBuilder = experimentBuilder; hostConfigurationBuilder = this; // for inner class dialogs isEditable = experiment.i... | |
isEditable = experiment.isEditable(); | public void reinit(Experiment newExperiment) { experiment = newExperiment; isEditable = experiment.isEditable(); // if this pane is being displayed, then bring it up-to-date if (isShowing()) update(); } | |
load_this(); | load_arg(0); | private void generateFindClass() { /* generates: static private Class findClass(String name) throws Exception { try { return Class.forName(name); } catch (java.lang.ClassNotFoundException cne) { throw new java.lang.NoClassDefFoundError... |
return ("ItemEvent[" + item + "," + stateChange + ";" + super.paramString () + "]"); | String r; switch (id) { case ITEM_STATE_CHANGED: r = "ITEM_STATE_CHANGED"; break; default: r = "unknown id"; break; } r += ",item=" + item + ",stateChange="; switch (stateChange) { case SELECTED: r += "SELECTED"; break; case DESELECTED: r += "DESELECTED"; break; default: r += "unknown"; break; } return r; | public String paramString () { return ("ItemEvent[" + item + "," + stateChange + ";" + super.paramString () + "]"); } |
return (mode.getBitDepth() >= 24); | return (mode.getBitDepth() < 0 || mode.getBitDepth() >= 24); | public static java.util.List getAvailableDisplayModes() { java.util.List modes = getDisplayModes(); final DisplayMode curMode = getCurrentDisplayMode(); // Filter everything which is higher frequency than the current // display mode modes = filterDisplayModes(modes, new DisplayModeFilter() { pub... |
return (mode.getBitDepth() >= 24); | return (mode.getBitDepth() < 0 || mode.getBitDepth() >= 24); | public boolean filter(DisplayMode mode) { return (mode.getBitDepth() >= 24); } |
return (mode.getBitDepth() + " bits, " + | return (((mode.getBitDepth() > 0) ? (mode.getBitDepth() + " bits, ") : "") + | private static String modeToString(DisplayMode mode) { return (mode.getBitDepth() + " bits, " + mode.getWidth() + "x" + mode.getHeight() + ", " + mode.getRefreshRate() + " Hz"); } |
else if (e <= 90) | else if (e <= Math.PI / 2.0) | ArcIterator(Arc2D a, AffineTransform xform) { this.xform = xform; x = a.getX(); y = a.getY(); w = a.getWidth(); h = a.getHeight(); start = a.getAngleStart() * (Math.PI / 180); extent = a.getAngleExtent() * (Math.PI / 180); type = a.type; double e = extent < 0 ? -exten... |
else if (e <= 180) | else if (e <= Math.PI) | ArcIterator(Arc2D a, AffineTransform xform) { this.xform = xform; x = a.getX(); y = a.getY(); w = a.getWidth(); h = a.getHeight(); start = a.getAngleStart() * (Math.PI / 180); extent = a.getAngleExtent() * (Math.PI / 180); type = a.type; double e = extent < 0 ? -exten... |
else if (e <= 270) | else if (e <= 3.0 * (Math.PI / 2.0)) | ArcIterator(Arc2D a, AffineTransform xform) { this.xform = xform; x = a.getX(); y = a.getY(); w = a.getWidth(); h = a.getHeight(); start = a.getAngleStart() * (Math.PI / 180); extent = a.getAngleExtent() * (Math.PI / 180); type = a.type; double e = extent < 0 ? -exten... |
if (current > limit) throw new NoSuchElementException("arc iterator out of bounds"); if (current == 0) { coords[0] = (float) (Math.cos(start) * w + x) / 2; coords[1] = (float) (Math.sin(start) * h + y) / 2; if (xform != null) xform.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (type != OPEN && current == ... | double[] double_coords = new double[6]; int code = currentSegment (double_coords); for (int i = 0; i < 6; ++i) coords[i] = (float) double_coords[i]; return code; | public int currentSegment(float[] coords) { if (current > limit) throw new NoSuchElementException("arc iterator out of bounds"); if (current == 0) { coords[0] = (float) (Math.cos(start) * w + x) / 2; coords[1] = (float) (Math.sin(start) * h + y) / 2; if (xform !... |
public void add(Point2D p) | public void add(double newx, double newy) | public void add(Point2D p) { add(p.getX(), p.getY()); } |
add(p.getX(), p.getY()); | double minx = Math.min(getX(), newx); double maxx = Math.max(getMaxX(), newx); double miny = Math.min(getY(), newy); double maxy = Math.max(getMaxY(), newy); setRect(minx, miny, maxx - minx, maxy - miny); | public void add(Point2D p) { add(p.getX(), p.getY()); } |
child.addChild(getImpactPlugIn()); | child.addChild(getImpactPlugIn(child)); | private ComponentData addImpactPlugin(ComponentData data) { ComponentData[] children = data.getChildren(); for(int i=0; i < children.length; i++) { ComponentData child = children[i]; if(child.getType() == ComponentData.AGENT) { // Process it. if(!child.getName().equals(generatorAgent.getFullName().toS... |
data.setType(ComponentData.BINDER); | data.setType(ComponentData.NODEBINDER); | private ComponentData createBinderComponentData() { ComponentData data = new GenericComponentData(); data.setType(ComponentData.BINDER); data.setName("Node.Agent.Binder"); data.setClassName(BinderClass_name); data.addParameter(propSamplesPerSecond.getValue()); data.addParameter(propInMsgsPerSecond.g... |
private ComponentData getImpactPlugIn() { ComponentData data = new GenericComponentData(); | private ComponentData getImpactPlugIn(ComponentData data) { ComponentData gcdata = new GenericComponentData(); | private ComponentData getImpactPlugIn() { ComponentData data = new GenericComponentData(); data.setType(ComponentData.PLUGIN); data.setName(ImpactPlugin_name); return data; } |
data.setType(ComponentData.PLUGIN); data.setName(ImpactPlugin_name); | gcdata.setType(ComponentData.PLUGIN); gcdata.setName(ImpactPlugin_name); gcdata.setParent(data); gcdata.setOwner(this); | private ComponentData getImpactPlugIn() { ComponentData data = new GenericComponentData(); data.setType(ComponentData.PLUGIN); data.setName(ImpactPlugin_name); return data; } |
return data; | return gcdata; | private ComponentData getImpactPlugIn() { ComponentData data = new GenericComponentData(); data.setType(ComponentData.PLUGIN); data.setName(ImpactPlugin_name); return data; } |
String orgClass; | String orgClass = null; | private String queryOrgClass() { String orgClass; substitutions.put(":agent_name", name); try { Connection conn = DBUtils.getConnection(); try { Statement stmt = conn.createStatement(); String query = DBUtils.getQuery(QUERY_AGENT_ASSET_CLASS, substitutions); ResultSet rs = stmt.executeQuery(query)... |
rs.next(); orgClass = rs.getString(1); | while (rs.next()) { orgClass = rs.getString(1); } | private String queryOrgClass() { String orgClass; substitutions.put(":agent_name", name); try { Connection conn = DBUtils.getConnection(); try { Statement stmt = conn.createStatement(); String query = DBUtils.getQuery(QUERY_AGENT_ASSET_CLASS, substitutions); ResultSet rs = stmt.executeQuery(query)... |
long result = bb.getLong ((position () >> 3) + offset); | long result = bb.getLong ((position () << 3) + offset); | public long get () { long result = bb.getLong ((position () >> 3) + offset); position (position () + 1); return result; } |
bb.putLong ((position () >> 3) + offset, value); | bb.putLong ((position () << 3) + offset, value); position (position () + 1); | public LongBuffer put (long value) { bb.putLong ((position () >> 3) + offset, value); return this; } |
for (Iterator i = getPropertyNames(); i.hasNext(); ) { | for (Iterator i = getLocalPropertyNames(); i.hasNext(); ) { | public void installListeners() { addPropertiesListener(this); for (Iterator i = getPropertyNames(); i.hasNext(); ) { Property p = getProperty((CompositeName)i.next()); p.addPropertyListener(myPropertyListener); } } |
log.info("Invalidating cache"); | log.debug("Invalidating cache"); | protected void invalidateCaches() { log.info("Invalidating cache"); if (_cache!=null) _cache.clear(); if (_systemCache!=null) _systemCache.clear(); if (_significantKeysPerKey!=null) _significantKeysPerKey.clear(); super.invalidateCaches(); } |
ruleDecodeLog.info("Got dictionary for file: " + modelFile + "\n\n"); | ruleDecodeLog.debug("Got dictionary for file: " + modelFile + "\n\n"); | protected void mergeFile(File modelFile) { if(log.isDebugEnabled()) log.debug("Merging rule file: "+modelFile.getPath()); setCurrentFile(modelFile); if(ruleDecodeLog.isDebugEnabled()) { try { NSDictionary dic = Services.dictionaryFromFile(modelFile); rul... |
if (NSLog.debugLoggingAllowedForGroups(NSLog.DebugGroupRules)) System.out.print("Rhs key "+key+" <-- "); | public void prepareDataStructures() { log.debug("prepareDataStructures"); boolean localizationEnabled = ERXLocalizer.isLocalizationEnabled(); // is a dictionary which will contain for each rhs key, which other keys it depends // on, for single rule hops Hashtable dependendKeysPerK... | |
if (NSLog.debugLoggingAllowedForGroups(NSLog.DebugGroupRules)) System.out.println(keys); | if (log.isDebugEnabled()) log.debug("Rhs key "+key+" <-- " + keys); | public void prepareDataStructures() { log.debug("prepareDataStructures"); boolean localizationEnabled = ERXLocalizer.isLocalizationEnabled(); // is a dictionary which will contain for each rhs key, which other keys it depends // on, for single rule hops Hashtable dependendKeysPerK... |
e.aconst_null(); e.invoke_static_this(SET_THREAD_CALLBACKS); | private void emitCommonNewInstance(CodeEmitter e) { e.new_instance_this(); e.dup(); e.invoke_constructor_this(); e.return_value(); e.end_method(); } | |
if (action.equals(organizer.runExperimentAction)) { action.setEnabled(true); return; } | public static void setActionAllowed(Action action, Organizer organizer) { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.viewer.ActionUtil"); DefaultMutableTreeNode selectedNode = organizer.getSelectedNode(); // If nothing is selected, some things are still... | |
ComponentDataBlitOp.INSTANCE.filter(src, dest); | if (src.getSampleModel () instanceof ComponentSampleModel && dest.getSampleModel () instanceof ComponentSampleModel) ComponentDataBlitOp.INSTANCE.filter(src, dest); else { int samples[] = src.getPixels (x, y, w, h, (int [])null); dest.setPixels (x, y, w, h, samples); } | public WritableRaster copyData(WritableRaster dest) { if (dest == null) dest = raster.createCompatibleWritableRaster(); int x = dest.getMinX(); int y = dest.getMinY(); int w = dest.getWidth(); int h = dest.getHeight(); // create a src child that has the right bounds... WritableRaster sr... |
ComponentDataBlitOp.INSTANCE.filter(src, dest); | if (src.getSampleModel () instanceof ComponentSampleModel && dest.getSampleModel () instanceof ComponentSampleModel) ComponentDataBlitOp.INSTANCE.filter(src, dest); else { int samples[] = src.getPixels (x, y, w, h, (int [])null); dest.setPixels (x, y, w, h, samples); } | public void setData(Raster src) { int x = src.getMinX(); int y = src.getMinY(); int w = src.getWidth(); int h = src.getHeight(); // create a dest child that has the right bounds... WritableRaster dest = raster.createWritableChild(x, y, w, h, x, y, null // same bands ); // R... |
public void setRGB(int startX, int startY, int w, int h, int[] argbArray, int offset, int scanlineStride) | public void setRGB(int x, int y, int argb) | public void setRGB(int startX, int startY, int w, int h, int[] argbArray, int offset, int scanlineStride) { int endX = startX + w; int endY = startY + h; Object rgbElem = null; for (int y=startY; y<endY; y++) { int xoffset = offset; for (int x=startX; x<endX; x++) { int argb = argbAr... |
int endX = startX + w; int endY = startY + h; Object rgbElem = null; for (int y=startY; y<endY; y++) { int xoffset = offset; for (int x=startX; x<endX; x++) { int argb = argbArray[xoffset++]; rgbElem = colorModel.getDataElements(argb, rgbElem); raster.setDataElements(x, y, rgbElem); } offset += scanlineStride; } | Object rgbElem = colorModel.getDataElements(argb, null); raster.setDataElements(x, y, rgbElem); | public void setRGB(int startX, int startY, int w, int h, int[] argbArray, int offset, int scanlineStride) { int endX = startX + w; int endY = startY + h; Object rgbElem = null; for (int y=startY; y<endY; y++) { int xoffset = offset; for (int x=startX; x<endX; x++) { int argb = argbAr... |
ERXArrayUtilities.sortedArraySortedWithKey(aSortedArray, _localDestinationDisplayKey()); | ERXArrayUtilities.sortArrayWithKey(aSortedArray, _localDestinationDisplayKey()); | public NSArray theList() { NSMutableArray aSortedArray; // ** This is cached because WOBrowser and WOCheckBoxList // ** might ask for list many times. if (_privateList()==null) { // 81398 sort contents aSortedArray = (NSMutableArray)_localDataSource().fetchObjects()... |
if (members.size() == 1) { member_helper_finish((Member)members.get(0), callback, typer, def, end, null); return; } | private void member_helper_size(List members, final ObjectSwitchCallback callback, final ParameterTyper typer, final Label def, final Label end) throws Exception { if (m... | |
member_helper_finish((Member)members.get(0), callback, typer, def, end, checked); return; } | Member member = (Member)members.get(0); Class[] types = typer.getParameterTypes(member); for (int i = 0; i < types.length; i++) { if (checked == null || !checked.get(i)) { dup(); aaload(i); invoke(MethodConstants.CLASS_GET_NAME); push(types[i].getName()); invoke(MethodConstants.EQUALS); ifeq(def); } } pop(); callback.p... | private void member_helper_type(List members, final ObjectSwitchCallback callback, final ParameterTyper typer, final Label def, final Label end, ... |
Class[] example = typer.getParameterTypes(members.get(0)); Map buckets = null; int index = -1; for (int i = 0; i < example.length; i++) { final int j = i; Map test = bucket(members, new Transformer() { public Object transform(Object value) { return typer.getParameterTypes(value)[j].getName(); | dup(); aaload(index); invoke(MethodConstants.CLASS_GET_NAME); final Map fbuckets = buckets; String[] names = (String[])buckets.keySet().toArray(new String[buckets.size()]); string_switch_hash(names, new ObjectSwitchCallback() { public void processCase(Object key, Label dontUseEnd) throws Exception { member_helper_typ... | private void member_helper_type(List members, final ObjectSwitchCallback callback, final ParameterTyper typer, final Label def, final Label end, ... |
if (buckets == null || test.size() > buckets.size()) { buckets = test; index = i; } | private void member_helper_type(List members, final ObjectSwitchCallback callback, final ParameterTyper typer, final Label def, final Label end, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.