rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (! (awtComponent instanceof Window)) { setCursor (awtComponent.getCursor ()); Rectangle bounds = awtComponent.getBounds (); setBounds (bounds.x, bounds.y, bounds.width, bounds.height); }
initializeInsets (); setCursor (awtComponent.getCursor ()); Rectangle bounds = awtComponent.getBounds (); setBounds (bounds.x, bounds.y, bounds.width, bounds.height);
protected GtkComponentPeer (Component awtComponent) { super (awtComponent); this.awtComponent = awtComponent; /* temporary try/catch block until all peers use this creation method */ try { create (); GtkArgList args = new GtkArgList (); getArgs (awtComponent, args); args.setArgs...
if (parent instanceof Frame)
if (parent instanceof Window)
public void setBounds (int x, int y, int width, int height) { Component parent = awtComponent.getParent (); if (parent instanceof Frame) { Insets insets = ((Frame)parent).getInsets (); /* convert Java's coordinate space into GTK+'s coordinate space */ setNativeBounds (x-insets.left, y-insets.top, widt...
Insets insets = ((Frame)parent).getInsets (); setNativeBounds (x-insets.left, y-insets.top, width, height);
Insets insets = ((Window) parent).getInsets (); setNativeBounds (x - insets.left, y - insets.top, width, height);
public void setBounds (int x, int y, int width, int height) { Component parent = awtComponent.getParent (); if (parent instanceof Frame) { Insets insets = ((Frame)parent).getInsets (); /* convert Java's coordinate space into GTK+'s coordinate space */ setNativeBounds (x-insets.left, y-insets.top, widt...
if(lockLoggerTrace.isDebugEnabled()) { lockLoggerTrace.debug("called method " + method + " without a lock, ec="+this, new Exception());
if(lockTrace.isDebugEnabled()) { lockTrace.debug("called method " + method + " without a lock, ec="+this, new Exception());
protected boolean autoLock(String method) { boolean wasAutoLocked = false; if (lockCount == 0 && useAutoLock()) { wasAutoLocked = true; autoLockCount++; lock(); } if(lockCount == 0) { if (!isAutoLocked() && !isFinalizing) { if(...
String localizedFormatString = localizedStringForKey(formatString); formatString = formatString == null ? ERXTimestampFormatter.DEFAULT_PATTERN : localizedFormatString == null ? formatString : localizedFormatString;
formatString = formatString == null ? ERXTimestampFormatter.DEFAULT_PATTERN : formatString; formatString = localizedStringForKeyWithDefault(formatString);
public Format localizedDateFormatForKey(String formatString) { String localizedFormatString = localizedStringForKey(formatString); formatString = formatString == null ? ERXTimestampFormatter.DEFAULT_PATTERN : localizedFormatString == null ? formatString ...
NSTimestampFormatter formatter = new NSTimestampFormatter(localizedFormatString);
NSTimestampFormatter formatter = new NSTimestampFormatter(formatString);
public Format localizedDateFormatForKey(String formatString) { String localizedFormatString = localizedStringForKey(formatString); formatString = formatString == null ? ERXTimestampFormatter.DEFAULT_PATTERN : localizedFormatString == null ? formatString ...
String localizedFormatString = localizedStringForKey(formatString); formatString = formatString == null ? "#,##0.00;-(#,##0.00)" : localizedFormatString == null ? formatString : localizedFormatString;
formatString = formatString == null ? "#,##0.00;-(#,##0.00)" : formatString; formatString = localizedStringForKeyWithDefault(formatString);
public Format localizedNumberFormatForKey(String formatString) { String localizedFormatString = localizedStringForKey(formatString); formatString = formatString == null ? "#,##0.00;-(#,##0.00)" : localizedFormatString == null ? formatString : localize...
types[index >> 1] = PathIterator.SEG_QUADTO;
types[index >> 1] = PathIterator.SEG_CUBICTO;
public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3) { ensureSize(index + 6); types[index >> 1] = PathIterator.SEG_QUADTO; points[index++] = x1; points[index++] = y1; points[index++] = x2; points[index++] = y2; points[index++] = x3; points[index...
return new Point2D.Float(points[subpath], points[subpath + 1]);
return new Point2D.Float(points[index - 2], points[index - 1]);
public Point2D getCurrentPoint() { if (subpath < 0) return null; return new Point2D.Float(points[subpath], points[subpath + 1]); }
public PathIterator getPathIterator(final AffineTransform at)
public PathIterator getPathIterator(AffineTransform at)
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { int current = 0; public int getWindingRule() { return rule; } public boolean isDone() { return current >= index; } public void next() { current++; }...
return new PathIterator() { int current = 0; public int getWindingRule() { return rule; } public boolean isDone() { return current >= index; } public void next() { current++; } public int currentSegment(float[] coords) { if (current >= index) return SEG_CLOSE; int result = types[current >> 1]; int i = 0; if (result...
return new GeneralPathIterator(this, at);
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { int current = 0; public int getWindingRule() { return rule; } public boolean isDone() { return current >= index; } public void next() { current++; }...
Class mi = ReflectUtils.forName(INTERCEPTOR_NAME, loader); Class[] types = delegating ? new Class[]{ mi, Object.class } : new Class[]{ mi }; Object[] args = delegating ? new Object[]{ ih, obj } : new Object[]{ ih }; factory = (Factory)ReflectUtils.newInstance(gen, types, args);
factory = (Factory)ReflectUtils.newInstance(gen);
private static Object enhanceHelper(boolean delegating, Object obj, Class cls, Class[] interfaces, MethodInterceptor ih, ClassLoader loader, Method wreplace, MethodFilter filter) { if (ih == n...
if (peer != null)
if (peer == null)
addNotify(){ if (peer != null) peer = getToolkit ().createMenuItem (this);}
HashSet hs = new HashSet(); hs.add(new Integer(1)); ccp.setExperimentValues(hs); assertEquals("Test getExperimentValues()", hs, ccp.getExperimentValues());
ArrayList al = new ArrayList(); al.add(new Integer(1)); ccp.setExperimentValues(al); assertEquals("Test getExperimentValues()", al, ccp.getExperimentValues());
public void testExperimentValues() { HashSet hs = new HashSet(); hs.add(new Integer(1)); ccp.setExperimentValues(hs); assertEquals("Test getExperimentValues()", hs, ccp.getExperimentValues()); }
int index = filename.indexOf('.');
int index = filename.lastIndexOf('.');
public void initProperties() { // strip off extension if it exists int index = filename.indexOf('.'); if (index != -1) filename = filename.substring(0, index); // Since there are two possible types of asset files, we // need to determine which parser to use. // We will determine this by lookin...
boolean modified = false;
private void processFile(File file) throws Exception { ClassReader r = new ClassReader(new BufferedInputStream(new FileInputStream(file))); CaptureNameWriter w = new CaptureNameWriter(true); boolean modified = false; ClassTransformer t = getClassTransformer(); if (t != null) { ...
SocietyComponent societyCopy = createSoc(generateSocietyName(society.getSocietyName()), society.getClass());
SocietyComponent societyCopy = null; if(society instanceof CMTSociety) { societyCopy = createSoc(generateSocietyName(society.getSocietyName()), ((CMTSociety)society).getAssemblyID(), society.getClass()); } else { societyCopy = createSoc(generateSocietyName(society.getSocietyName()), society.getClass()); }
public SocietyComponent copySociety(SocietyComponent society, Object context) { // SocietyComponent societyCopy = society.copy(this, context); // Create a new society whose name is based on the old one SocietyComponent societyCopy = createSoc(generateSocietyName(society.getSocietyName()), societ...
System.out.println("Have Property: " + propname);
private void setMetricComponentProperties(String trialId, String metricId, MetricComponent mc) { Map substitutions = new HashMap(); substitutions.put(":trial_id", trialId); substitutions.put(":metric_id", metricId); try { Connection conn = DBUtils.getConnection(); Statement stmt = conn.createSta...
entityNames.addObject(entity.name());
entityNames.addObject(entity.externalName());
public static NSArray externalNamesForEntity(EOEntity entity, boolean includeParentEntities) { if (includeParentEntities) { entity = rootEntityForEntity(entity); } NSMutableArray entityNames = new NSMutableArray(); if (entity.subEntities().count() > 0) { for (Enume...
Collection communities = communityPG.getCommunities(); if (communities.size() > 1) System.out.println("PSP_CommunityProvider: WARNING: handling agents in multiple communities is not implemented."); Iterator i = communities.iterator();
private Vector getSelfInformation(PlanServiceContext psc) { Collection container = psc.getServerPlugInSupport().queryForSubscriber(getSelfPred()); Iterator iter = container.iterator(); Vector results = new Vector(1); int n = 0; // unique index for relationships while (iter.hasNext()) { Asset...
while (i.hasNext()) { communityName = (String)i.next(); break;
if (communityPG != null) { Collection communities = communityPG.getCommunities(); if (communities.size() > 1) System.out.println("PSP_CommunityProvider: WARNING: handling agents in multiple communities is not implemented."); Iterator i = communities.iterator(); while (i.hasNext()) { communityName = (String)i.next(); br...
private Vector getSelfInformation(PlanServiceContext psc) { Collection container = psc.getServerPlugInSupport().queryForSubscriber(getSelfPred()); Iterator iter = container.iterator(); Vector results = new Vector(1); int n = 0; // unique index for relationships while (iter.hasNext()) { Asset...
e.printStackTrace();
if(log.isErrorEnabled()) { log.error("Exception", e); }
public static URL getURL(String anchor) { try { URL url = ScalabilityHelp.class.getResource("help.html"); if (url != null) { return new URL(url.toExternalForm() + "#" + anchor); } } catch (MalformedURLException e) { e.printStackTrace(); ...
pgAttributes.put((String)pgAttrLibIds.get(i), new PGAttr(pgName, pgAttrName, pgAttrType, pgAggregateType)); }
}
private void addPropGroups() { String pgName = ""; String pgAttrName = ""; String pgAttrType = ""; String pgValue = ""; String pgAggregateType = ""; Timestamp pgStartDate; Timestamp pgEndDate; try { Connection conn = DBUtils.getConnection(); try { Statement stmt = conn.createS...
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.plan");
createLogger();
public ULPlanTableModel(Node node) { this.node = node; log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.plan"); names = new Vector(); values = new Vector(); Enumeration keys = node.getLocalAttributeKeys(); // add attributes for indexed properties: // TASK_PARENT_UID, TASK_PREP_PHRAS...
Vector v = (Vector)desc.getParameter(); return (String)v.get(0);
if(desc.getParameter() != null) { Vector v = (Vector)desc.getParameter(); return (String)v.get(0); } else { return null; }
public static String getAgentName(ComponentDescription desc) { Vector v = (Vector)desc.getParameter(); return (String)v.get(0); }
Vector v = (Vector)desc.getParameter(); return v.iterator();
if(desc.getParameter() != null) { Vector v = (Vector)desc.getParameter(); return v.iterator(); } else { return Collections.EMPTY_LIST.iterator(); }
public static Iterator getPluginProps(ComponentDescription desc) { Vector v = (Vector)desc.getParameter(); return v.iterator(); }
Message.error("xml parsing: " +
addError("xml parsing: " +
public void error(SAXParseException ex) { Message.error("xml parsing: " + getLocationString(ex)+": "+ ex.getMessage()); }
if (isPropertyVisible(e.getProperty())) {
if (e.getProperty().isVisible()) {
public void propertyRemoved(PropertyEvent e) { if (isPropertyVisible(e.getProperty())) { firePropertyRemoved(e); } }
throw new IllegalArgumentException("value may not be less then 0");
throw new IllegalArgumentException("value may not be less than 0");
public PagesPerMinute(int value) { super(value); if (value < 0) throw new IllegalArgumentException("value may not be less then 0"); }
protected Document getDocument(String uri) throws Exception { Document doc = org.apache.forrest.dispatcher.util.SourceUtil.readDOM(uri, this.manager);
public Document getDocument(String uri) throws Exception { Document doc = org.apache.forrest.dispatcher.util.SourceUtil.readDOM( uri, this.manager);
protected Document getDocument(String uri) throws Exception { Document doc = org.apache.forrest.dispatcher.util.SourceUtil.readDOM(uri, this.manager); if (doc != null) { this.namespaceHelper = new NamespaceHelper( DISPATCHER_NAMESPACE_URI, DISPATCHER_PREFIX...
defaultNodeArguments.put(CSMARTConsoleModel.COMMAND_ARGUMENTS, value); System.out.println("Adding: " + CSMARTConsoleModel.COMMAND_ARGUMENTS + " " + value);
private void addToNode(String type, String value) { if (type.equals("class")) { nodeComp.addProperty(CSMARTConsoleModel.COMMAND_ARGUMENTS, value); } else if(type.equals("prog_parameter")) { nodeComp.addProperty(CSMARTConsoleModel.COMMAND_ARGUMENTS, value); } else if(type.equals("vm_para...
defaultNodeArguments.put(PERSISTENCE_ENABLE, PERSISTENCE_DFLT); defaultNodeArguments.put(PERSIST_CLEAR, PERSIST_CLEAR_DFLT); defaultNodeArguments.put(TIMEZONE, TIMEZONE_DFLT); defaultNodeArguments.put(AGENT_STARTTIME, AGENT_STARTTIME_DFLT); defaultNodeArguments.put(COMPLAININGLP_LEVEL, COMPLAININGLP_LEVEL_DFLT); defa...
protected void setDefaultNodeArguments() { defaultNodeArguments = new ReadOnlyProperties(); createObserver(); defaultNodeArguments.put(PERSISTENCE_ENABLE, PERSISTENCE_DFLT); // By default we clear any existing persistence deltas when we // start a run. defaultNodeArguments.put(PERSIST_CLEAR, PERSIST...
defaultNodeArguments.put(AS_SWALLOW_ERRORS, AS_SWALLOW_ERRORS_DFLT);
protected void setDefaultNodeArguments() { defaultNodeArguments = new ReadOnlyProperties(); createObserver(); defaultNodeArguments.put(PERSISTENCE_ENABLE, PERSISTENCE_DFLT); // By default we clear any existing persistence deltas when we // start a run. defaultNodeArguments.put(PERSIST_CLEAR, PERSIST...
defaultNodeArguments.put(CSMARTConsoleModel.COMMAND_ARGUMENTS, DEFAULT_NODE_CLASS);
protected void setDefaultNodeArguments() { defaultNodeArguments = new ReadOnlyProperties(); createObserver(); defaultNodeArguments.put(PERSISTENCE_ENABLE, PERSISTENCE_DFLT); // By default we clear any existing persistence deltas when we // start a run. defaultNodeArguments.put(PERSIST_CLEAR, PERSIST...
defaultNodeArguments.put(BOOTSTRAP_CLASS, DEFAULT_BOOTSTRAP_CLASS);
protected void setDefaultNodeArguments() { defaultNodeArguments = new ReadOnlyProperties(); createObserver(); defaultNodeArguments.put(PERSISTENCE_ENABLE, PERSISTENCE_DFLT); // By default we clear any existing persistence deltas when we // start a run. defaultNodeArguments.put(PERSIST_CLEAR, PERSIST...
try { defaultNodeArguments.put(ENV_DISPLAY, InetAddress.getLocalHost().getHostName() + ":0.0"); } catch (UnknownHostException uhe) { if (log.isErrorEnabled()) { log.error("UnknownHost Exception", uhe); } }
protected void setDefaultNodeArguments() { defaultNodeArguments = new ReadOnlyProperties(); createObserver(); defaultNodeArguments.put(PERSISTENCE_ENABLE, PERSISTENCE_DFLT); // By default we clear any existing persistence deltas when we // start a run. defaultNodeArguments.put(PERSIST_CLEAR, PERSIST...
if (!versionMatcher.accept(mrid, ((MDResolvedResource)r).getResolvedModuleRevision().getDescriptor())) {
ModuleDescriptor md = ((MDResolvedResource)r).getResolvedModuleRevision().getDescriptor(); if (md.isDefault()) { Message.debug("\t"+name+": default md rejected by version matcher requiring module descriptor: "+rres); continue; } else if (!versionMatcher.accept(mrid, md)) {
private static ResolvedResource findDynamicResourceUsingPattern( String name, Repository repository, LatestStrategy strategy, VersionMatcher versionMatcher, ResourceMDParser rmdparser, ModuleRevisionId mrid, String pattern, Artifact artifact, Date date) { R...
name = name.trim(); if (name.equals("")) return;
private void addAgent() { String name = (String)JOptionPane.showInputDialog(this, "Enter Agent Name", "Agent Name", JOptionPane.QUESTION_MESSAGE, null, null, ""); if (name == null) r...
} else if (o instanceof AssetComponent) agentMenu.show(tree, x, y); else if (o instanceof AgentComponent)
} else if (o instanceof AssetComponent) { } else if (o instanceof AgentComponent)
private void displayMenu(MouseEvent e) { // the path to the node the mouse is pointing at TreePath selPath = tree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; tree.setSelectionPath(selPath); int x = e.getX(); int y = e.getY(); // show menu for type of node selected ...
System.setProperty("cglib.debugLocation", System.getProperty("user.home") + System.getProperty("file.separator") + "cglib-debug" );
public static void main(String args[])throws Exception { String[] testCaseName = {TestAll.class.getName()}; junit.textui.TestRunner.main(testCaseName); }
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.viewer");
createLogger();
public CSMARTUL(CSMART csmart) { this.csmart = csmart; log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.viewer"); refreshAgents(); // create one version of properties for all objects // and set them in CSMARTGraph because it can't address CSMARTUL // TODO: better handling of properties...
ReflectUtils.getExceptionTypes(method),
exceptions,
public void generate(ClassEmitter ce, final Context context) { for (Iterator it = context.getMethods(); it.hasNext();) { Method method = (Method)it.next(); String fieldName = getFieldName(context, method); ce.declare_field(Constants.PRIVATE_FINAL_STATIC, fieldName, METHOD, nu...
Class[] exceptionTypes = method.getExceptionTypes(); Set exceptionSet = new HashSet(Arrays.asList(exceptionTypes)); if (!(exceptionSet.contains(Exception.class) || exceptionSet.contains(Throwable.class))) { if (!exceptionSet.contains(RuntimeException.class)) { e.catch_exception(handler, Constants.TYPE_RUNTIME_EXCEPTION...
EmitUtils.wrap_undeclared_throwable(e, handler, exceptions, UNDECLARED_THROWABLE_EXCEPTION);
public void generate(ClassEmitter ce, final Context context) { for (Iterator it = context.getMethods(); it.hasNext();) { Method method = (Method)it.next(); String fieldName = getFieldName(context, method); ce.declare_field(Constants.PRIVATE_FINAL_STATIC, fieldName, METHOD, nu...
private Object[] getTestData() { String[] sortme = { "foo", "bar", "qux", "baz", "moof" }; int[] indexes = { 0, 1, 2, 3, 4 }; return new Object[]{ sortme, indexes };
private Object[] getTestData() throws IOException { InputStream in = getClass().getResource("words.txt").openStream(); BufferedReader r = new BufferedReader(new InputStreamReader(in)); List list = new ArrayList(); String line; while ((line = r.readLine()) != null) { list.add(line); } return list.toArray();
private Object[] getTestData() { String[] sortme = { "foo", "bar", "qux", "baz", "moof" }; int[] indexes = { 0, 1, 2, 3, 4 }; return new Object[]{ sortme, indexes }; }
GenericComponentData ac = new GenericComponentData(); ac.setName(cc.getShortName()); ac.setType(cc.getProperty(ComponentBase.PROP_TYPE).getValue().toString()); ac.setClassName(ClusterImpl.class.getName()); ac.setOwner(cc); ac.setParent(cd); cd.addChild((ComponentData)ac);
cd = cc.addComponentData(cd);
public ComponentData getComponentData() { ComponentData cd = new GenericComponentData(); cd.setType(ComponentData.RECIPE); cd.setClassName(RECIPE_CLASS); cd.setName(getRecipeName()); cd.setOwner(null); cd.setParent(null); for(int i=0; i < getChildCount(); i++) { ConfigurableComponent cc = (C...
addComponentData(cd);
public ComponentData getComponentData() { ComponentData cd = new GenericComponentData(); cd.setType(ComponentData.RECIPE); cd.setClassName(RECIPE_CLASS); cd.setName(getRecipeName()); cd.setOwner(null); cd.setParent(null); for(int i=0; i < getChildCount(); i++) { ConfigurableComponent cc = (C...
modifyComponentData(cd);
public ComponentData getComponentData() { ComponentData cd = new GenericComponentData(); cd.setType(ComponentData.RECIPE); cd.setClassName(RECIPE_CLASS); cd.setName(getRecipeName()); cd.setOwner(null); cd.setParent(null); for(int i=0; i < getChildCount(); i++) { ConfigurableComponent cc = (C...
return addComponentData(cd);
return cd;
public ComponentData getComponentData() { ComponentData cd = new GenericComponentData(); cd.setType(ComponentData.RECIPE); cd.setClassName(RECIPE_CLASS); cd.setName(getRecipeName()); cd.setOwner(null); cd.setParent(null); for(int i=0; i < getChildCount(); i++) { ConfigurableComponent cc = (C...
alive_flag = true;
init ();
public NativeThread (ThreadGroup g, String name) { super (g, null, name); alive_flag = true; }
if (log.isWarnEnabled()) { log.warn("Not implemented"); }
public void initProperties() { if (log.isWarnEnabled()) { log.warn("Not implemented"); } }
log = CSMART.createLogger("org.cougaar.tools.csmart.ui");
createLogger();
public CSMARTConsole(CSMART csmart, Experiment experiment) { this.csmart = csmart; this.experiment = experiment; console = this; experiment.setRunInProgress(true); currentTrial = -1; societyComponent = experiment.getSocietyComponent(0); desktop = new ConsoleDesktop(); setSocietyComponent(socie...
if(log.isDebugEnabled()) {
e.printStackTrace(); if(log.isErrorEnabled()) {
private void createNodes() { int delay = 1; // get inter-node start delay String tmp = Parameters.findParameter("org.cougaar.tools.csmart.startdelay"); if (tmp != null) { try { delay = Integer.parseInt(tmp); } catch (NumberFormatException nfe) { } } final int interNodeStar...
nci.nodeName);
nci.nodeName, e);
private void createNodes() { int delay = 1; // get inter-node start delay String tmp = Parameters.findParameter("org.cougaar.tools.csmart.startdelay"); if (tmp != null) { try { delay = Integer.parseInt(tmp); } catch (NumberFormatException nfe) { } } final int interNodeStar...
if (srcConn != null) { if (srcConn instanceof HttpURLConnection) { ((HttpURLConnection) srcConn).disconnect(); } }
disconnect(srcConn);
public void download(URL src, File dest, CopyProgressListener l) throws IOException { URLConnection srcConn = null; try { srcConn = src.openConnection(); int contentLength = srcConn.getContentLength(); FileUtil.copy(srcConn.getInputStream(), dest, l); if (de...
if (conn != null) { if (conn instanceof HttpURLConnection) { ((HttpURLConnection) conn).disconnect(); } }
disconnect(conn);
public InputStream openStream(URL url) throws IOException { URLConnection conn = null; InputStream inStream = null; try { conn = url.openConnection(); inStream = conn.getInputStream(); ByteArrayOutputStream outStream = new ByteArrayOutputStream(); ...
} else if (str.indexOf("FIXME: what is the message that indicates server has stoping") != -1) {
} else if (str.indexOf("FIXME: what is the message that indicates server is stopping") != -1) {
public void run() { try { String str; while ((str = forrestOutput.readLine()) != null) { // FIXME: Output should be sent to log not console System.out.println(str); if (str.indexOf("init-props:") != -1) { status = CONFIGURING; } else if (str.indexOf("run_default_jetty:") != -1 || str.indexOf("run_...
if (log.isDebugEnabled()) { log.debug("Looking at property " + name); }
public ComponentData addComponentData(ComponentData data) { if(log.isDebugEnabled()) { log.debug("Adding ComponentData for: " + data.getName()); } // Warning: This assumes it has been handed the component in // which to add itself if (data.getType() != ComponentData.AGENT && data.getType() != ...
gl.glBindProgramNV(GL.GL_VERTEX_PROGRAM_NV, vtxProg);
gl.glBindProgramARB(GL.GL_VERTEX_PROGRAM_ARB, vtxProg);
public void display(GLDrawable drawable) { if (quit) { return; } time.update(); GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); gl.glClear(GL.GL_COLOR_BUFFER_BIT|GL.GL_DEPTH_BUFFER_BIT); if (doViewAll) { viewer.viewAll(gl); doViewAll = false; } if (getFlag(...
gl.glEnable(GL.GL_VERTEX_PROGRAM_NV); gl.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 62, fresnel, fresnel, fresnel, 1.0f);
gl.glEnable(GL.GL_VERTEX_PROGRAM_ARB); gl.glProgramEnvParameter4fARB(GL.GL_VERTEX_PROGRAM_ARB, 62, fresnel, fresnel, fresnel, 1.0f);
public void display(GLDrawable drawable) { if (quit) { return; } time.update(); GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); gl.glClear(GL.GL_COLOR_BUFFER_BIT|GL.GL_DEPTH_BUFFER_BIT); if (doViewAll) { viewer.viewAll(gl); doViewAll = false; } if (getFlag(...
gl.glDisable(GL.GL_VERTEX_PROGRAM_NV);
gl.glDisable(GL.GL_VERTEX_PROGRAM_ARB);
public void display(GLDrawable drawable) { if (quit) { return; } time.update(); GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); gl.glClear(GL.GL_COLOR_BUFFER_BIT|GL.GL_DEPTH_BUFFER_BIT); if (doViewAll) { viewer.viewAll(gl); doViewAll = false; } if (getFlag(...
gl.glDisable(GL.GL_LIGHTING);
private void drawSkyBox(GL gl, GLU glu) { // Compensates for ExaminerViewer's modification of modelview matrix gl.glMatrixMode(GL.GL_MODELVIEW); gl.glLoadIdentity(); gl.glActiveTextureARB(GL.GL_TEXTURE1_ARB); gl.glDisable(GL.GL_TEXTURE_CUBE_MAP_ARB); gl.glActiveTextureARB(GL.GL_TEXTU...
initExtension(gl, "GL_NV_vertex_program");
initExtension(gl, "GL_ARB_vertex_program");
public void init(GLDrawable drawable) { GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); float cc = 1.0f; gl.glClearColor(cc, cc, cc, 1); gl.glColor3f(1,1,1); gl.glEnable(GL.GL_DEPTH_TEST); try { initExtension(gl, "GL_NV_vertex_program"); initExtension(gl, "GL_...
initExtension(gl, "GL_NV_register_combiners");
initExtension(gl, "GL_ARB_multitexture");
public void init(GLDrawable drawable) { GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); float cc = 1.0f; gl.glClearColor(cc, cc, cc, 1); gl.glColor3f(1,1,1); gl.glEnable(GL.GL_DEPTH_TEST); try { initExtension(gl, "GL_NV_vertex_program"); initExtension(gl, "GL_...
gl.glGenProgramsNV(1, vtxProgTmp);
gl.glGenProgramsARB(1, vtxProgTmp);
public void init(GLDrawable drawable) { GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); float cc = 1.0f; gl.glClearColor(cc, cc, cc, 1); gl.glColor3f(1,1,1); gl.glEnable(GL.GL_DEPTH_TEST); try { initExtension(gl, "GL_NV_vertex_program"); initExtension(gl, "GL_...
gl.glBindProgramNV(GL.GL_VERTEX_PROGRAM_NV, vtxProg); gl.glLoadProgramNV(GL.GL_VERTEX_PROGRAM_NV, vtxProg, transformRefract.length(), transformRefract);
gl.glBindProgramARB (GL.GL_VERTEX_PROGRAM_ARB, vtxProg); gl.glProgramStringARB(GL.GL_VERTEX_PROGRAM_ARB, GL.GL_PROGRAM_FORMAT_ASCII_ARB, transformRefract.length(), transformRefract);
public void init(GLDrawable drawable) { GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); float cc = 1.0f; gl.glClearColor(cc, cc, cc, 1); gl.glColor3f(1,1,1); gl.glEnable(GL.GL_DEPTH_TEST); try { initExtension(gl, "GL_NV_vertex_program"); initExtension(gl, "GL_...
gl.glTrackMatrixNV(GL.GL_VERTEX_PROGRAM_NV, 0, GL.GL_MODELVIEW_PROJECTION_NV, GL.GL_IDENTITY_NV); gl.glTrackMatrixNV(GL.GL_VERTEX_PROGRAM_NV, 4, GL.GL_MODELVIEW, GL.GL_INVERSE_TRANSPOSE_NV); gl.glTrackMatrixNV(GL.GL_VERTEX_PROGRAM_NV, 8, GL.GL_MODELVIEW, GL.GL_IDENTITY_NV); gl.glTrackMatr...
gl.glProgramEnvParameter4fARB(GL.GL_VERTEX_PROGRAM_ARB, 0, 0.0f, 0.0f, 0.0f, 1.0f);
public void init(GLDrawable drawable) { GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); float cc = 1.0f; gl.glClearColor(cc, cc, cc, 1); gl.glColor3f(1,1,1); gl.glEnable(GL.GL_DEPTH_TEST); try { initExtension(gl, "GL_NV_vertex_program"); initExtension(gl, "GL_...
gl.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 59, 0.0f, 0.0f, 0.0f, 1.0f);
gl.glProgramEnvParameter4fARB(GL.GL_VERTEX_PROGRAM_ARB, 1, fresnel, fresnel, fresnel, 1.0f);
public void init(GLDrawable drawable) { GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); float cc = 1.0f; gl.glClearColor(cc, cc, cc, 1); gl.glColor3f(1,1,1); gl.glEnable(GL.GL_DEPTH_TEST); try { initExtension(gl, "GL_NV_vertex_program"); initExtension(gl, "GL_...
gl.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 62, fresnel, fresnel, fresnel, 1.0f); gl.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 63, 1.0f, -1.0f, 1.0f, 0.0f); gl.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 64, 0.0f, 1.0f, 2.0f, 3.0f);
gl.glProgramEnvParameter4fARB(GL.GL_VERTEX_PROGRAM_ARB, 2, 1.0f, -1.0f, 1.0f, 0.0f); gl.glProgramEnvParameter4fARB(GL.GL_VERTEX_PROGRAM_ARB, 3, 0.0f, 1.0f, 2.0f, 3.0f);
public void init(GLDrawable drawable) { GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); float cc = 1.0f; gl.glClearColor(cc, cc, cc, 1); gl.glColor3f(1,1,1); gl.glEnable(GL.GL_DEPTH_TEST); try { initExtension(gl, "GL_NV_vertex_program"); initExtension(gl, "GL_...
gl.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 58, index, index*index, 0.0f, 0.0f);
gl.glProgramEnvParameter4fARB(GL.GL_VERTEX_PROGRAM_ARB, 4, index, index*index, 0.0f, 0.0f);
private void setRefraction(GL gl, float index) { gl.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 58, index, index*index, 0.0f, 0.0f); }
net.sf.cglib.CodeGenerator.setDebugLocation("/tmp/");
public void setUp() { // net.sf.cglib.CodeGenerator.setDebugLocation("/tmp/"); }
try { m_varResolver = VariableResolverFactory.getResolver( configuration.getAttribute("src"), super.m_manager); } catch (PatternException e) { throw new ConfigurationException("unable to resolve action 'src' attribute"); }
public void build(Configuration configuration) throws ConfigurationException { super.build(configuration); // get the selector m_type = configuration.getAttribute("type",m_ln.getDefaultAction());// try {// m_src = VariableResolverFactory.getResolver(// ...
String source; source=""; Map substitutions = m_action.act(redirector, resolver, objectModel, source, parameters);
m_src = m_varResolver.resolve(context,objectModel); Map substitutions = m_action.act(redirector, resolver, objectModel, m_src, parameters);
public String locate(Map objectModel, InvokeContext context) throws Exception { Parameters parameters = resolveParameters(context,objectModel); Redirector redirector = context.getRedirector(); String source; source=""; Map substitutions = m_action.act(redirector, resolver, objectM...
if (result==null) {
if (result==null && propertyKey!=null) {
public Object smartRelationship(D2WContext c) { Object result = null; Object rawObject=c.valueForKey("object"); String propertyKey=c.propertyKey(); if (rawObject!=null && rawObject instanceof EOEnterpriseObject && propertyKey != null) { EOEnterpriseObject object=(EOEnterpriseO...
log.info(choices);
public NSArray availableElements(){ if(_availableElements==null){ Object choices = valueForBinding("possibleChoices"); log.info(choices); if(choices != null) { NSMutableArray keyChoices = new NSMutableArray(); if(choices instanceof NSArray) { ...
return new ERDDelayedKeyValueAssignment(eokeyvalueunarchiver);
return new ERDDelayedBooleanAssignment(eokeyvalueunarchiver);
public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver eokeyvalueunarchiver) { return new ERDDelayedKeyValueAssignment(eokeyvalueunarchiver); }
fields[DAY_OF_WEEK_IN_MONTH] = (fields[DAY_OF_MONTH] + 12) / 7;
fields[DAY_OF_WEEK_IN_MONTH] = (fields[DAY_OF_MONTH] + 6) / 7;
protected synchronized void computeFields() { boolean gregorian = (time >= gregorianCutover); TimeZone zone = getTimeZone(); fields[ZONE_OFFSET] = zone.getRawOffset(); long localTime = time + fields[ZONE_OFFSET]; int day = (int) (localTime / (24 * 60 * 60 * 1000L)); int millisInDay = (int) (localTi...
hour += 12;
if (hour != 12) hour += 12; if (isSet[AM_PM] && fields[AM_PM] == AM && hour == 12) hour = 0;
protected synchronized void computeTime() { int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (era == BC) year = 1 - year; int[] daysOfYear = getDayOfYear(year); int hour = 0; if (isSet[HOUR_OF_DAY]) hour = fields[HOUR_OF_DAY]; else if (isSet[HOU...
} try { properties.put("env.DISPLAY", InetAddress.getLocalHost().getHostName() + ":0.0"); } catch (UnknownHostException uhe) { System.out.println(uhe);
private boolean createNode(NodeComponent nodeComponent, String hostName) { String nodeName = nodeComponent.getShortName(); // create an unique node name to circumvent server problems String uniqueNodeName = nodeName; // Can't change the name of the Nodes when running // from the database, cause it need...
nodeListeners.clear(); nodePanes.clear();
private void destroyOldNodes() { Enumeration nodeComponents = oldNodes.keys(); while (nodeComponents.hasMoreElements()) { NodeComponent nodeComponent = (NodeComponent)nodeComponents.nextElement(); String nodeName = nodeComponent.getShortName(); removeStatusButton(nodeName); oldNodes.remove(...
String s = (String)JOptionPane.showInputDialog(this, "Search string:", "Notification", JOptionPane.QUESTION_MESSAGE, null, null, notifyCondition);
JPanel notifyPanel = new JPanel(new GridBagLayout()); int x = 0; int y = 0; notifyPanel.add(new JLabel("Search string:"), new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(10, 0, 5, 5), 0, 0)); JTextField notifyField = new JTextField(20); notifyField.setText(not...
private void setNotifyMenuItem_actionPerformed() { String s = (String)JOptionPane.showInputDialog(this, "Search string:", "Notification", JOptionPane.QUESTION_MESSAGE, ...
notifyOnStandardError = stdErrorCB.isSelected(); Enumeration buttons = statusButtons.getElements(); while (buttons.hasMoreElements()) { NodeStatusButton button = (NodeStatusButton)buttons.nextElement(); button.setNotifyOnStandardError(notifyOnStandardError); }
private void setNotifyMenuItem_actionPerformed() { String s = (String)JOptionPane.showInputDialog(this, "Search string:", "Notification", JOptionPane.QUESTION_MESSAGE, ...
progressPanel.add(trialProgressBar,
final JLabel trialTimeLabel = new JLabel("Trial: 00:00:00"); final JLabel experimentTimeLabel = new JLabel("Experiment: 00:00:00"); myNumberFormat = new DecimalFormat("00"); JPanel trialProgressPanel = createHorizontalPanel(false); if (!experiment.isInDatabase()) { trialProgressPanel.add(trialTimeLabel); trialProgres...
private void setSocietyComponent(SocietyComponent cc) { communitySupport = new ClientCommunityController(); runningNodes = new Hashtable(); oldNodes = new Hashtable(); nodeListeners = new Hashtable(); nodePanes = new Hashtable(); // top level menus JMenu fileMenu = new JMenu(FILE_MENU); fileMe...
final JLabel trialTimeLabel = new JLabel("Trial: 00:00:00"); final JLabel experimentTimeLabel = new JLabel("Experiment: 00:00:00"); myNumberFormat = new DecimalFormat("00"); JPanel trialProgressPanel = createHorizontalPanel(false); if (!experiment.isInDatabase()) { trialProgressPanel.add(trialTimeLabel); trialProgres...
private void setSocietyComponent(SocietyComponent cc) { communitySupport = new ClientCommunityController(); runningNodes = new Hashtable(); oldNodes = new Hashtable(); nodeListeners = new Hashtable(); nodePanes = new Hashtable(); // top level menus JMenu fileMenu = new JMenu(FILE_MENU); fileMe...
nodeListeners.clear(); nodePanes.clear();
private void trialFinished() { trialTimer.stop(); Collection c = nodeListeners.values(); for (Iterator i = c.iterator(); i.hasNext(); ) ((ConsoleNodeListener)i.next()).closeLogFile(); saveResults(); nodeListeners.clear(); nodePanes.clear(); updateExperimentControls(experiment, false); }
propTaskVerb = addProperty(PROP_TASKVERB, ABCTask.PROP_TASKVERB_DFLT);
propTaskVerb = addProperty(PROP_TASKVERB, PROP_TASKVERB_DFLT);
public void initProperties() { propLevelCount = addProperty(PROP_LEVELCOUNT, PROP_LEVELCOUNT_DFLT, new ConfigurableComponentPropertyAdapter() { public void propertyValueChanged(PropertyEvent e) { if(((Integer)e.getProperty().getValue()).intValue() < 1) { propLevelCount.setValu...
this.field_attribute = field;
this(field, -1);
public FieldPosition (Format.Field field) { this.field_attribute = field; }
writeNodeFile(configDir, nodes[i].getChildren()[j]);
if(nodes[i].getChildren()[j] instanceof AgentComponentData) { writeAgentFile(configDir, (AgentComponentData)nodes[i].getChildren()[j]); } else { writeNodeFile(configDir, nodes[i].getChildren()[j]); }
public void writeConfigFiles(File configDir) throws IOException { // Call writeNodeFile for each of the nodes in theSoc. ComponentData[] nodes = theSoc.getChildren(); writeSocietyFile(configDir, theSoc); for (int i = 0; i < theSoc.childCount(); i++) { if (nodes[i].getType().equals(ComponentData.HOST)...
writeNodeFile(configDir, nodes[i]);
if(nodes[i] instanceof AgentComponentData) { writeAgentFile(configDir, (AgentComponentData)nodes[i]); } else { writeNodeFile(configDir, nodes[i]); }
public void writeConfigFiles(File configDir) throws IOException { // Call writeNodeFile for each of the nodes in theSoc. ComponentData[] nodes = theSoc.getChildren(); writeSocietyFile(configDir, theSoc); for (int i = 0; i < theSoc.childCount(); i++) { if (nodes[i].getType().equals(ComponentData.HOST)...
log.error("Got unexpected child of Node type: " + children[i]);
log.error("Got unexpected child of Node type: " + children[i].getType());
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...
} else { if (children[i].getType().equals(ComponentData.NODEBINDER)) { writer.print("Node.AgentManager.Binder = "); } else { writer.print(children[i].getName() + " = "); } writeChildLine(writer, children[i]); writeChildrenOfComp(writer, configDir, children[i]); writeLeafData(configDir, children[i]); }
} else { if(log.isDebugEnabled()) { log.debug("writeNodeFile: [ "+configFileName+ " ] Type is: " + children[i].getType()); } if (children[i].getType().equals(ComponentData.NODEBINDER)) { writer.print("Node.AgentManager.Binder = "); } else { writer.print(children[i].getName() + " = "); } writeChildLine(writer, childr...
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...
log.error("Got a child of a Node that wasn't an Agent or Node Binder: " + children[i]);
log.error("Got a child of a Node that wasn't an Agent or Node Binder Type: " + children[i].getType());
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...
public void setTarget(ClassVisitor target) { super.setTarget(target); pass.setTarget(target);
public void setTarget(ClassVisitor target, ClassVisitor outer) { super.setTarget(target, outer); pass.setTarget(target, outer);
public void setTarget(ClassVisitor target) { super.setTarget(target); pass.setTarget(target); }
String location = cdf.getProperty("artifact." + artifact.getName() + ".location"); boolean isLocal = Boolean.valueOf(cdf.getProperty("artifact." + artifact.getName() + ".is-local")).booleanValue();
String location = cdf.getProperty("artifact." + artifact.getName() + "#" + artifact.getExt() + ".location"); boolean isLocal = Boolean.valueOf(cdf.getProperty("artifact." + artifact.getName() + "#" + artifact.getExt() + ".is-local")).booleanValue();
public ArtifactOrigin getSavedArtifactOrigin(File cache, Artifact artifact) { PropertiesFile cdf = getCachedDataFile(cache, artifact.getModuleRevisionId()); String location = cdf.getProperty("artifact." + artifact.getName() + ".location"); boolean isLocal = Boolean.valueOf(cdf.getProperty("arti...
cdf.remove("artifact." + artifact.getName() + ".location"); cdf.remove("artifact." + artifact.getName() + ".is-local");
cdf.remove("artifact." + artifact.getName() + "#" + artifact.getExt() + ".location"); cdf.remove("artifact." + artifact.getName() + "#" + artifact.getExt() + ".is-local");
public void removeSavedArtifactOrigin(File cache, Artifact artifact) { PropertiesFile cdf = getCachedDataFile(cache, artifact.getModuleRevisionId()); cdf.remove("artifact." + artifact.getName() + ".location"); cdf.remove("artifact." + artifact.getName() + ".is-local"); cdf.save(); }
cdf.setProperty("artifact." + artifact.getName() + ".is-local", String.valueOf(origin.isLocal())); cdf.setProperty("artifact." + artifact.getName() + ".location", origin.getLocation());
cdf.setProperty("artifact." + artifact.getName() + "#" + artifact.getExt() + ".is-local", String.valueOf(origin.isLocal())); cdf.setProperty("artifact." + artifact.getName() + "#" + artifact.getExt() + ".location", origin.getLocation());
public void saveArtifactOrigin(File cache, Artifact artifact, ArtifactOrigin origin) { PropertiesFile cdf = getCachedDataFile(cache, artifact.getModuleRevisionId()); cdf.setProperty("artifact." + artifact.getName() + ".is-local", String.valueOf(origin.isLocal())); cdf.setProperty("artifact." + art...
name = name.substring(0, name.indexOf("("));
name = name.substring(0, ((name.indexOf("(") == -1) ? name.length() : name.indexOf("(")));
private String getName(Property prop) { String name = prop.getName().toString(); int index = name.lastIndexOf('.'); if (index != -1) name = name.substring(index+1); name = name.substring(0, name.indexOf("(")); return name.trim(); }
return name.substring(name.indexOf("(")+1, name.indexOf(")"));
int typeStart = name.indexOf("("); if (typeStart == -1) return new String("String"); else return name.substring(name.indexOf("(")+1, name.indexOf(")"));
private String getType(Property prop) { String name = prop.getName().toString(); return name.substring(name.indexOf("(")+1, name.indexOf(")")); }
ERXArrayUtilities.sortedArraySortedWithKey(eos, key, EOSortOrdering.CompareCaseInsensitiveAscending);
ERXArrayUtilities.sortArrayWithKey(eos, key, EOSortOrdering.CompareCaseInsensitiveAscending);
public static void sortEOsUsingSingleKey(NSMutableArray eos, String key) { ERXArrayUtilities.sortedArraySortedWithKey(eos, key, EOSortOrdering.CompareCaseInsensitiveAscending); }
return "var elem = document.EditForm.elements[0];"+
String formName = ERXWOForm.formName(context(), "EditForm"); return "var elem = document."+formName+".elements[0];"+
public String tabScriptString() { return "var elem = document.EditForm.elements[0];"+ "if (elem!=null && (elem.type == 'text' || elem.type == 'area')) elem.focus();"; }
sb.append(key);
sb.append(e.sqlStringForAttributeNamed(key));
public static String sqlWhereClauseStringForKey(EOSQLExpression e, String key, NSArray valueArray) { StringBuffer sb=new StringBuffer(); sb.append(key); sb.append(" IN "); sb.append("("); for (int i = 0; i < valueArray.count(); i++ ) { if ( i > 0 ) sb.app...