rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
modified = false;
public boolean saveToDatabase() { if(log.isInfoEnabled()) { log.info("saveToDatabase society (" + getSocietyName() + " with asb: " + getAssemblyId()); } // TODO: // Should I notice when I need to save and only save then? // Should I resist creating a new assembly ID, to avoid // breaking other ...
return null;
return this.cacheKey;
public Serializable getKey() { return null; }
return null;
return this.validity;
public SourceValidity getValidity() { return null; }
this.cacheKey = parameters.getParameter( this.CACHE_PARAMETER, null); if(null==this.cacheKey) getLogger().warn("Caching not activated! Declare the CACHE_KEY_PARAMETER="+CACHE_PARAMETER+" in your sitemap."); this.validityFile = parameters.getParameter( this.VALIDITY_PARAMETER, null); if(null!=validityFile) this.val...
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException { super.setup(resolver, objectModel, src, par); localRecycle(); try { if (null==this.dispatcherHelper)this.dispatcherHel...
contextHome = forrestHome + SystemUtils.FILE_SEPARATOR + "/webapp";
contextHome = forrestHome + SystemUtils.FILE_SEPARATOR + "main/webapp";
public static String getContextHome() throws Exception { String forrestHome = getForrestHome(); String contextHome; if (forrestHome.equals(defaultHome)) { contextHome = defaultHome; } else { contextHome = forrestHome + SystemUtils.FILE_SEPARATOR + "/webapp"; ...
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.society");
createLogger();
public ULSocietyTableModel(Node node) { log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.society"); this.node = node; names = new Vector(); values = new Vector(); addAttribute(PropertyNames.UID_ATTR); addAttribute(PropertyNames.ORGANIZATION_NAME); // TODO: for debugging, probably do...
deleteExperiment();
copyExperimentInNode();
public void actionPerformed(ActionEvent e) { deleteExperiment(); }
renameExperiment();
deleteExperiment();
public void actionPerformed(ActionEvent e) { renameExperiment(); }
startBuilder();
renameExperiment();
public void actionPerformed(ActionEvent e) { startBuilder(); }
startExperimentBuilder();
startBuilder();
public void actionPerformed(ActionEvent e) { startExperimentBuilder(); }
startConsole();
startExperimentBuilder();
public void actionPerformed(ActionEvent e) { startConsole(); }
copySocietyInNode();
startConsole();
public void actionPerformed(ActionEvent e) { copySocietyInNode(); }
deleteSociety();
copySocietyInNode();
public void actionPerformed(ActionEvent e) { deleteSociety(); }
renameSociety();
deleteSociety();
public void actionPerformed(ActionEvent e) { renameSociety(); }
startExperimentBuilder();
renameSociety();
public void actionPerformed(ActionEvent e) { startExperimentBuilder(); }
copyComponentInNode();
startExperimentBuilder();
public void actionPerformed(ActionEvent e) { copyComponentInNode(); }
deleteComponent();
copyComponentInNode();
public void actionPerformed(ActionEvent e) { deleteComponent(); }
renameComponent();
deleteComponent();
public void actionPerformed(ActionEvent e) { renameComponent(); }
selectRecipeFromDatabase(); }
renameComponent(); }
public void actionPerformed(ActionEvent e) { selectRecipeFromDatabase(); }
newRecipe(); }
selectRecipeFromDatabase(); }
public void actionPerformed(ActionEvent e) { newRecipe(); }
startBuilder();
newRecipe();
public void actionPerformed(ActionEvent e) { startBuilder(); }
copyRecipeInNode();
startExperimentBuilder();
public void actionPerformed(ActionEvent e) { copyRecipeInNode(); }
deleteRecipe();
copyRecipeInNode();
public void actionPerformed(ActionEvent e) { deleteRecipe(); }
renameRecipe();
deleteRecipe();
public void actionPerformed(ActionEvent e) { renameRecipe(); }
saveRecipe();
renameRecipe();
public void actionPerformed(ActionEvent e) { saveRecipe(); }
DefaultMutableTreeNode node = getSelectedNode(); while (!node.getAllowsChildren()) node = (DefaultMutableTreeNode)node.getParent(); if (!node.equals(getSelectedNode())) workspace.setSelectionPath(new TreePath(node.getPath())); newSociety();
saveRecipe();
public void actionPerformed(ActionEvent e) { // TODO: its unclear when you would get to this point // and not have a node that allows children DefaultMutableTreeNode node = getSelectedNode(); while (!node.getAllowsChildren()) node = (DefaultMutableTreeNode)node.getParent...
newRecipe();
newSociety();
public void actionPerformed(ActionEvent e) { DefaultMutableTreeNode node = getSelectedNode(); while (!node.getAllowsChildren()) node = (DefaultMutableTreeNode)node.getParent(); if (!node.equals(getSelectedNode())) workspace.setSelectionPath(new TreePath(node.getPath())...
newFolder();
newRecipe();
public void actionPerformed(ActionEvent e) { DefaultMutableTreeNode node = getSelectedNode(); while (!node.getAllowsChildren()) node = (DefaultMutableTreeNode)node.getParent(); if (!node.equals(getSelectedNode())) workspace.setSelectionPath(new TreePath(node.getPath())...
deleteFolder();
DefaultMutableTreeNode node = getSelectedNode(); while (!node.getAllowsChildren()) node = (DefaultMutableTreeNode)node.getParent(); if (!node.equals(getSelectedNode())) workspace.setSelectionPath(new TreePath(node.getPath())); newFolder();
public void actionPerformed(ActionEvent e) { deleteFolder(); }
renameFolder();
deleteFolder();
public void actionPerformed(ActionEvent e) { renameFolder(); }
selectExperimentFromDatabase(); }
deleteRecipeFromDatabase(); }
public void actionPerformed(ActionEvent e) { selectExperimentFromDatabase(); }
newExperiment(); }
selectExperimentFromDatabase(); }
public void actionPerformed(ActionEvent e) { newExperiment(); }
startExperimentBuilder();
newExperiment();
public void actionPerformed(ActionEvent e) { startExperimentBuilder(); }
copyExperimentInNode();
startConsole();
public void actionPerformed(ActionEvent e) { copyExperimentInNode(); }
synchronized (root) { while (true) { try { long now = System.currentTimeMillis(); if (updateNeeded && now > nextUpdate) { save(workspaceFileName); updateNeeded = false; root.notifyAll(); } else if (updateNeeded) { long delay = nextUpdate - now; if (delay > 0) { root.wait(delay); } } else { root.wait(); } } catch (Inter...
ExperimentDB.deleteExperiment(id, name); GUIUtils.timeConsumingTaskEnd(organizer); }
public void run() { synchronized (root) { while (true) { try { long now = System.currentTimeMillis(); if (updateNeeded && now > nextUpdate) { save(workspaceFileName); updateNeeded = false; root.notifyAll(); // In case anyone's waiting for the update to finish } else if (updateNeeded) { ...
ExperimentDB.deleteExperiment(id, name);
experiment.saveToDb(saveToDbConflictHandler);
public void run() { ExperimentDB.deleteExperiment(id, name); GUIUtils.timeConsumingTaskEnd(organizer); }
experiment.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer); }
cmtDialog.processResults(); final String trialId = cmtDialog.getTrialId(); if (trialId != null) createCMTExperiment(getSelectedNode(), originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperimentId(), trialId); GUIUtils.timeConsumingTaskEnd(organizer); }
public void run() { experiment.saveToDb(saveToDbConflictHandler); // save under new name GUIUtils.timeConsumingTaskEnd(organizer); }
final int paddedSize = ((count / padToSize) + 1) * padToSize;
final int paddedSize = (((count - 1) / padToSize) + 1) * padToSize;
private static NSArray paddedValues(NSArray values, final int padToSize) { final int count = values.count(); if (count > 1) { final int paddedSize = ((count / padToSize) + 1) * padToSize; final NSMutableArray paddedValues = new NSMutableArray(values); int padCount = pa...
key = ERXStringUtilities.lastPropertyKeyInKeyPath(key);
attributeName = ERXStringUtilities.lastPropertyKeyInKeyPath(key);
public EOFetchSpecification fetchSpecificationFromRequest(String entityName) { EOFetchSpecification fs = null; if(context().request().formValueKeys().containsObject(fetchSpecificationKey)) { String fsName = context().request().stringFormValueForKey(fetchSpecificationKey); if(ERXStringUtilities.str...
attribute = entity.attributeNamed(key);
attribute = entity.attributeNamed(attributeName);
public EOFetchSpecification fetchSpecificationFromRequest(String entityName) { EOFetchSpecification fs = null; if(context().request().formValueKeys().containsObject(fetchSpecificationKey)) { String fsName = context().request().stringFormValueForKey(fetchSpecificationKey); if(ERXStringUtilities.str...
String stringValue = context().request().stringFormValueForKey(attribute.name());
String stringValue = context().request().stringFormValueForKey(key);
public EOFetchSpecification fetchSpecificationFromRequest(String entityName) { EOFetchSpecification fs = null; if(context().request().formValueKeys().containsObject(fetchSpecificationKey)) { String fsName = context().request().stringFormValueForKey(fetchSpecificationKey); if(ERXStringUtilities.str...
qualifiers.addObject(new EOKeyValueQualifier(attribute.name(), selector, value));
qualifiers.addObject(new EOKeyValueQualifier(key, selector, value));
public EOFetchSpecification fetchSpecificationFromRequest(String entityName) { EOFetchSpecification fs = null; if(context().request().formValueKeys().containsObject(fetchSpecificationKey)) { String fsName = context().request().stringFormValueForKey(fetchSpecificationKey); if(ERXStringUtilities.str...
public String entityNameSeparator() { return (String)valueForBinding("entityNameSeparator"); }
public String entityNameSeparator() { String separator = (String)this.valueForBinding("entityNameSeparator"); if (separator == null) separator = ERXEOEncodingUtilities.EntityNameSeparator; return separator; }
public String entityNameSeparator() { return (String)valueForBinding("entityNameSeparator"); }
StringBuffer result=new StringBuffer(ADAPTOR_PREFIX_MARKER); result.append(".woa/wa/"); result.append(valueForBinding("actionClass")); result.append('/'); result.append(valueForBinding("directActionName")); result.append('?'); if (hasBinding("bindingDictionary")) { NSDictionary bdgs = (NSDictionary)valueForBinding("b...
String directActionName = null; NSDictionary encryptedBindingDict = null; NSDictionary unencryptedBindingDict = null; NSArray formValuesObjects = null; if(this.hasBinding("actionClass")) { StringBuffer daBuffer = new StringBuffer(); daBuffer.append(this.valueForBinding("actionClass")); daBuffer.append('/'); daBuf...
public String href() { //FIXME: Need to make this optional StringBuffer result=new StringBuffer(ADAPTOR_PREFIX_MARKER); result.append(".woa/wa/"); // FIXME: Should make actionClass optional result.append(valueForBinding("actionClass")); result.append('/'); result.app...
return ERXUtilities.booleanValue(valueForBinding("shouldEncryptObjectFormValues"));
return valueForBooleanBinding("shouldEncryptObjectFormValues");
public boolean shouldEncryptObjectFormValues() { return ERXUtilities.booleanValue(valueForBinding("shouldEncryptObjectFormValues")); }
if(log.isDebugEnabled()) { log.debug("ExperimentHost: " + getShortName() + " added node: " + node.getShortName()); }
public void addNode(NodeComponent node) { Property prop = getProperty("NodeNames"); if (prop == null) prop = addProperty("NodeNames", new ArrayList()); ArrayList names = (ArrayList)prop.getValue(); names.add(node.getShortName()); ExperimentNode sa = (ExperimentNode) node;// if(log.isDebugEna...
if(log.isDebugEnabled()) { log.debug("ExperimentHost: " + getShortName() + " removed node: " + node.getShortName()); }
public void removeNode(NodeComponent node) { Property prop = getProperty("NodeNames"); if (prop != null) { ArrayList names = (ArrayList)prop.getValue(); int index = names.indexOf(node.getShortName()); if (index != -1) names.remove(node.getShortName()); } // if(log.isDebugEnabled()...
object().editingContext().saveChanges();
ERXEOControlUtilities.saveChanges(object().editingContext());
public boolean tryToSaveChanges(boolean validateObject) { // throws Throwable { validationLog.debug("tryToSaveChanges calling validateForSave"); boolean saved = false; try { if (object()!=null && validateObject && shouldValidateBeforeSave()) { if (_context.insertedObje...
_fetchedConfigurations.addAll(Arrays.asList(_md.getConfigurationsNames()));
_fetchedConfigurations.addAll(Arrays.asList(_md.getPublicConfigurationsNames()));
public boolean loadData(String conf) { boolean loaded = _md != null; if (!isEvicted(_rootModuleConf) && hasConfigurationsToLoad() && !hasProblem()) { if (_md == null) { DependencyResolver resolver = _data.getIvy().getResolver(getModuleId()); try { ...
addRootModuleConfigurations(_rootModuleConf, _md.getConfigurationsNames());
addRootModuleConfigurations(_rootModuleConf, _md.getPublicConfigurationsNames());
public boolean loadData(String conf) { boolean loaded = _md != null; if (!isEvicted(_rootModuleConf) && hasConfigurationsToLoad() && !hasProblem()) { if (_md == null) { DependencyResolver resolver = _data.getIvy().getResolver(getModuleId()); try { ...
if (_md != null) { Configuration c = _md.getConfiguration(conf); if (c == null) { Message.error("configuration not found in "+this+": "+conf+". It was required from "+getParent()+" "+getParentConf()); _confsToFetch.remove(conf); return false; } else if (!isRoot() && c.getVisibility() != Configuration.Visibility.PUBLIC)...
public boolean loadData(String conf) { boolean loaded = _md != null; if (!isEvicted(_rootModuleConf) && hasConfigurationsToLoad() && !hasProblem()) { if (_md == null) { DependencyResolver resolver = _data.getIvy().getResolver(getModuleId()); try { ...
assertFalse(r.hasError());
public void testDisableTransitivityPerConfiguration() throws Exception { // mod2.1 (compile, runtime) depends on mod1.1 which depends on mod1.2 // compile conf is not transitive // first we resolve compile conf only _ivy.resolve(new File("test/repositories/1/org2/mod2.1/ivys/ivy-...
assertFalse(r.hasError());
public void testDisableTransitivityPerConfiguration2() throws Exception { // mod2.1 (compile, runtime) depends on mod1.1 which depends on mod1.2 // compile conf is not transitive // compile extends runtime // first we resolve compile conf only _ivy.resolve(new File("test/rep...
assertFalse(r.hasError());
public void testDisableTransitivityPerConfiguration3() throws Exception { // mod2.1 (compile, runtime) depends on mod1.1 which depends on mod1.2 // compile conf is not transitive // runtime extends compile // first we resolve compile conf only _ivy.resolve(new File("test/rep...
assertFalse(r.hasError());
public void testDisableTransitivityPerConfiguration4() throws Exception { // mod2.2 (A,B,compile) depends on mod 2.1 (A->runtime;B->compile) // compile is not transitive and extends A and B // // mod2.1 (compile, runtime) depends on mod1.1 which depends on mod1.2 // compile conf is not tra...
createClusterPG();
assetData.addPropertyGroup(createClusterPG());
private ComponentData addAssetData(ComponentData data) { AgentAssetData assetData = new AgentAssetData((AgentComponentData)data); if(log.isDebugEnabled()) { log.debug("Adding Asset Data"); } assetData.setType(AgentAssetData.ORG); assetData.setAssetClass(propAssetClass.getValue().toString());...
createItemIdentificationPG();
assetData.addPropertyGroup(createItemIdentificationPG());
private ComponentData addAssetData(ComponentData data) { AgentAssetData assetData = new AgentAssetData((AgentComponentData)data); if(log.isDebugEnabled()) { log.debug("Adding Asset Data"); } assetData.setType(AgentAssetData.ORG); assetData.setAssetClass(propAssetClass.getValue().toString());...
outputStream = new BufferedOutputStream (socket.getOutputStream()); bufferedOutputStream = new ByteArrayOutputStream (256);
public void connect() throws IOException { // Call is ignored if already connected. if (connected) return; // Get address and port number. int port; if (proxyInUse) { port = proxyPort; socket = new Socket(proxyHost, port); } else { if ((port = url.getPort()) == -1) port = 80; ...
return socket.getOutputStream();
return bufferedOutputStream;
public OutputStream getOutputStream() throws IOException { if (!doOutput) throw new ProtocolException ("Want output stream while haven't setDoOutput(true)"); if (!connected) connect(); return socket.getOutputStream(); }
PrintWriter outputWriter = new PrintWriter(socket.getOutputStream());
PrintWriter outputWriter = new PrintWriter(outputStream);
void sendRequest() throws IOException { // Create PrintWriter for easier sending of headers. PrintWriter outputWriter = new PrintWriter(socket.getOutputStream()); // Send request including any request properties that were set. outputWriter.print (getRequestMethod() + " " + url.getFile() ...
+ " HTTP/1.0\r\n");
+ " HTTP/1.1\r\n");
void sendRequest() throws IOException { // Create PrintWriter for easier sending of headers. PrintWriter outputWriter = new PrintWriter(socket.getOutputStream()); // Send request including any request properties that were set. outputWriter.print (getRequestMethod() + " " + url.getFile() ...
bufferedOutputStream.writeTo (outputStream); outputStream.flush();
void sendRequest() throws IOException { // Create PrintWriter for easier sending of headers. PrintWriter outputWriter = new PrintWriter(socket.getOutputStream()); // Send request including any request properties that were set. outputWriter.print (getRequestMethod() + " " + url.getFile() ...
if (method.equals("GET"))
if (method.equals("GET") || method.equals("HEAD") || method.equals("POST"))
public void setRequestMethod (String method) throws ProtocolException { method = method.toUpperCase(); if (method.equals("GET")) super.setRequestMethod (method); else throw new ProtocolException ("Unsupported or unknown request method " + method); }
if (h > table.length)
if (h >= table.length)
public Object get (Object key) { int h = Math.abs (2 * System.identityHashCode (key) % table.length); int save = h; while (true) { if (table[h] == key) return table[h + 1]; if (table[h] == emptyslot) return null; h += 2; if (h > table.length) h = 0; if (h == save) return null; } }
ServletUtil.ParamVisitor vis = new ServletUtil.ParamVisitor() { public void setParam(String name, String value) { There is no mode, as it only returns the list of agent names, so do nothing but set up for parameter parsing. } }; ServletUtil.parseParams(vis, request);
public void execute( HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { /*this.out = response.getOutputStream(); // create a URL parameter visitor ServletUtil.ParamVisitor vis = new ServletUtil.ParamVisitor() { public voi...
StringBuffer buf = HttpUtils.getRequestURL(request);
StringBuffer buf = request.getRequestURL();
public void execute( HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { /*this.out = response.getOutputStream(); // create a URL parameter visitor ServletUtil.ParamVisitor vis = new ServletUtil.ParamVisitor() { public voi...
this.endDay = Math.abs(day);
this.endDay = day;
public void setEndRule(int month, int day, int dayOfWeek, int time) { this.endMode = checkRule(month, day, dayOfWeek); this.endMonth = month; // FIXME: XXX: JDK 1.2 allows negative values and has 2 new variations // of this method. this.endDay = Math.abs(day); this.endDayOfWeek = Math.abs(dayOfWeek...
this.startDay = Math.abs(day);
this.startDay = day;
public void setStartRule(int month, int day, int dayOfWeek, int time) { this.startMode = checkRule(month, day, dayOfWeek); this.startMonth = month; // FIXME: XXX: JDK 1.2 allows negative values and has 2 new variations // of this method. this.startDay = Math.abs(day); this.startDayOfWeek = Math.abs...
Class[] interfaces = cl.getInterfaces (); Arrays.sort (interfaces, interfaceComparator); for (int i=0; i < interfaces.length; i++) data_out.writeUTF (interfaces[i].getName ());
if (! cl.isArray ()) { Class[] interfaces = cl.getInterfaces (); Arrays.sort (interfaces, interfaceComparator); for (int i=0; i < interfaces.length; i++) data_out.writeUTF (interfaces[i].getName ()); }
private void setUID (Class cl) { try { Field suid = cl.getDeclaredField ("serialVersionUID"); int modifiers = suid.getModifiers (); if (Modifier.isStatic (modifiers) && Modifier.isFinal (modifiers)) { uid = getDefinedSUID (cl); return; } } catch (NoSuchFieldException ignore) ...
System.out.println();
public static void main(String[] args) { String line; Readline.initReadline("ReadLineTest"); // init, set app name, read inputrc try { if (args.length > 0) Readline.readInitFile(args[0]); // read private inputrc } catch (IOException e) { // this deletes any initialization System....
if(log.isDebugEnabled()) { log.debug("ULSocietyTableModel: attribute not found: " + name); }
private void addAttribute(String name) { Attribute a = node.getLocalAttribute(name); if (a == null) { if(log.isDebugEnabled()) { log.debug("ULSocietyTableModel: attribute not found: " + name); } return; } names.addElement(name); values.addElement(a.getValue()); }
Property p = addProperty(AssetComponent.PROP_TYPE, ""); p.setToolTip(PROP_TYPE_DESC); p = addProperty(AssetComponent.PROP_CLASS, ""); p.setToolTip(PROP_CLASS_DESC); p = addProperty(AssetComponent.PROP_UID, ""); p.setToolTip(PROP_UID_DESC); p = addProperty(AssetComponent.PROP_UNITNAME, ""); p.setToolTip(PROP_UNITNAME_DE...
propAssetType = addProperty(AssetComponent.PROP_TYPE, new Integer(0)); propAssetType.setToolTip(PROP_TYPE_DESC); propAssetClass = addProperty(AssetComponent.PROP_CLASS, ""); propAssetClass.setToolTip(PROP_CLASS_DESC); propUniqueID = addProperty(AssetComponent.PROP_UID, ""); propUniqueID.setToolTip(PROP_UID_DESC); propU...
public void initProperties() { Property p = addProperty(AssetComponent.PROP_TYPE, ""); p.setToolTip(PROP_TYPE_DESC); p = addProperty(AssetComponent.PROP_CLASS, ""); p.setToolTip(PROP_CLASS_DESC); p = addProperty(AssetComponent.PROP_UID, ""); p.setToolTip(PROP_UID_DESC); p = addProperty(AssetCompo...
for(Enumeration e = displayPropertyKeys.objectEnumerator(); e.hasMoreElements(); ) { Object o = (Object)e.nextElement(); if(o instanceof NSArray) { for(Enumeration e1 = ((NSArray)o).objectEnumerator(); e1.hasMoreElements(); ) { String key = (String)e1.nextElement(); componentLevelKeys.setObjectForKey(componentLevelValu...
addPropertyKeys(componentLevelKeys, displayPropertyKeys);
public NSDictionary dictionary() { if(_dictionary == null) { _dictionary = new NSMutableDictionary(); addPageLevelValues(); NSArray displayPropertyKeys = (NSArray)_context.valueForKey("displayPropertyKeys"); if(displayPropertyKeys != null && displayPropertyKeys.cou...
for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); Object value = dictionary().valueForKeyPath("componentLevelKeys." + key); EOQualifier q = EOQualifier.qualifierWithQualifierFormat( "pageConfiguration = '" + _pageConfiguration + "' and propertyKey = '" + key + "...
addRulesForPropertyKeys(level, arr, keys);
public NSArray rulesForLevel(int level) { NSMutableArray arr = new NSMutableArray(); for(Enumeration e = dictionary().keyEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); if(!"componentLevelKeys".equals(key)) { Object value = dictionary()...
decal = genTexture(gl); gl.glBindTexture(GL.GL_TEXTURE_2D, decal); BufferedImage img = readPNGImage("demos/data/images/decal_image.png"); makeRGBTexture(gl, img, GL.GL_TEXTURE_2D, true); gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR_MIPMAP_LINEAR); gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.G...
try { decal = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/images/decal_image.png"), true, TextureIO.PNG); decal.setTexParameteri(GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT); decal.setTexParameteri(GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT); light_image = TextureIO.newTexture(getClass().getClassLoa...
public void init(GLAutoDrawable drawable) { // Use debug pipeline // drawable.setGL(new DebugGL(drawable.getGL())); GL gl = drawable.getGL(); glu = new GLU(); glut = new GLUT(); try { checkExtension(gl, "GL_VERSION_1_3"); // For multitexture checkExtension(gl, "GL_ARB_depth_texture"); ...
gl.glBindTexture(GL.GL_TEXTURE_2D, decal); gl.glEnable(GL.GL_TEXTURE_2D);
decal.bind(); decal.enable();
private void render_quad(GL gl) { gl.glActiveTexture(GL.GL_TEXTURE0); obj_linear_texgen(gl); texgen(gl, true); gl.glMatrixMode(GL.GL_TEXTURE); gl.glLoadIdentity(); gl.glScalef(4,4,1); gl.glMatrixMode(GL.GL_MODELVIEW); gl.glDisable(GL.GL_LIGHTING); gl.glBindTexture(GL.GL_TEXTURE_2D, decal); ...
gl.glDisable(GL.GL_TEXTURE_2D);
decal.disable();
private void render_quad(GL gl) { gl.glActiveTexture(GL.GL_TEXTURE0); obj_linear_texgen(gl); texgen(gl, true); gl.glMatrixMode(GL.GL_TEXTURE); gl.glLoadIdentity(); gl.glScalef(4,4,1); gl.glMatrixMode(GL.GL_MODELVIEW); gl.glDisable(GL.GL_LIGHTING); gl.glBindTexture(GL.GL_TEXTURE_2D, decal); ...
gl.glBindTexture(GL.GL_TEXTURE_2D, light_image); gl.glEnable(GL.GL_TEXTURE_2D);
light_image.bind(); light_image.enable();
private void render_scene_from_camera_view(GL gl, GLAutoDrawable drawable, CameraParameters params) { // place light gl.glPushMatrix(); gl.glLoadIdentity(); applyTransform(gl, cameraInverseTransform); applyTransform(gl, spotlightTransform); gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, light_pos, 0); ...
gl.glDisable(GL.GL_TEXTURE_2D);
light_image.disable();
private void render_scene_from_camera_view(GL gl, GLAutoDrawable drawable, CameraParameters params) { // place light gl.glPushMatrix(); gl.glLoadIdentity(); applyTransform(gl, cameraInverseTransform); applyTransform(gl, spotlightTransform); gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, light_pos, 0); ...
gl.glBindTexture(GL.GL_TEXTURE_2D, light_image); gl.glEnable(GL.GL_TEXTURE_2D);
light_image.bind(); light_image.enable();
private void render_scene_from_camera_view_shadowed(GL gl, GLAutoDrawable drawable, CameraParameters params) { // place light gl.glPushMatrix(); gl.glLoadIdentity(); applyTransform(gl, cameraInverseTransform); applyTransform(gl, spotlightTransform); gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, light_p...
gl.glDisable(GL.GL_TEXTURE_2D);
light_image.disable();
private void render_scene_from_camera_view_shadowed(GL gl, GLAutoDrawable drawable, CameraParameters params) { // place light gl.glPushMatrix(); gl.glLoadIdentity(); applyTransform(gl, cameraInverseTransform); applyTransform(gl, spotlightTransform); gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, light_p...
gl.glBindTexture(GL.GL_TEXTURE_2D, light_image); gl.glEnable(GL.GL_TEXTURE_2D);
light_image.bind(); light_image.enable();
private void render_scene_from_light_view(GL gl, GLAutoDrawable drawable, int viewportX, int viewportY) { // place light gl.glPushMatrix(); gl.glLoadIdentity(); gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, light_pos, 0); gl.glPopMatrix(); // spot image gl.glActiveTexture(GL.GL_TEXTURE1); gl.glPu...
gl.glDisable(GL.GL_TEXTURE_2D);
light_image.disable();
private void render_scene_from_light_view(GL gl, GLAutoDrawable drawable, int viewportX, int viewportY) { // place light gl.glPushMatrix(); gl.glLoadIdentity(); gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, light_pos, 0); gl.glPopMatrix(); // spot image gl.glActiveTexture(GL.GL_TEXTURE1); gl.glPu...
public static URLClassLoader newInstance(URL urls[]) throws
public static URLClassLoader newInstance(URL[] urls) throws
public static URLClassLoader newInstance(URL urls[]) throws SecurityException { return new URLClassLoader(urls); }
if(epf instanceof ERDErrorPageInterface) { ((ERDErrorPageInterface)epf).setException(e); }
public WOComponent nextPage(WOComponent sender) { if (_object!=null && _object.editingContext()!=null) { EOEditingContext editingContext=_object.editingContext(); try { if (_dataSource != null) _dataSource.deleteObject(_object); if (editi...
StringTokenizer tokenizer = new StringTokenizer(value, "<"); int token = 0;
StringTokenizer tokenizer = new StringTokenizer(value, "<", false); int token = value.charAt(0) == '<' ? 0 : 1; String nextPart = null;
public String strippedValue() { String value=(String)valueForBinding("value"); StringTokenizer tokenizer = new StringTokenizer(value, "<"); int token = 0; StringBuffer result = new StringBuffer(); String nextPart; int l=length(); int currentLength = 0; while (...
String nextPart;
public String strippedValue() { String value=(String)valueForBinding("value"); StringTokenizer tokenizer = new StringTokenizer(value, "<"); int token = 0; StringBuffer result = new StringBuffer(); String nextPart; int l=length(); int currentLength = 0; while (...
int currentLength = 0;
int currentLength = result.length();
public String strippedValue() { String value=(String)valueForBinding("value"); StringTokenizer tokenizer = new StringTokenizer(value, "<"); int token = 0; StringBuffer result = new StringBuffer(); String nextPart; int l=length(); int currentLength = 0; while (...
else
else {
public String strippedValue() { String value=(String)valueForBinding("value"); StringTokenizer tokenizer = new StringTokenizer(value, "<"); int token = 0; StringBuffer result = new StringBuffer(); String nextPart; int l=length(); int currentLength = 0; while (...
result.append(nextPart.substring(1)); currentLength += nextPart.length() - 1;
result.append(nextPart); currentLength += nextPart.length();
public String strippedValue() { String value=(String)valueForBinding("value"); StringTokenizer tokenizer = new StringTokenizer(value, "<"); int token = 0; StringBuffer result = new StringBuffer(); String nextPart; int l=length(); int currentLength = 0; while (...
Object key = KEY_FACTORY.newInstance(superclass.getName(), props);
String superName = (superclass != null) ? superclass.getName() : "java.lang.Object"; Object key = KEY_FACTORY.newInstance(superName, props);
private Object createHelper() { if (superclass != null) { setNamePrefix(superclass.getName()); } Object key = KEY_FACTORY.newInstance(superclass.getName(), props); return super.create(key); }
length += 2;
length += 3;
public String buildCommand() { StringBuffer command = new StringBuffer(200); int length = 0; // CALC LENGTH // length = trn + len + o|r + ot length = 3 + 5 + 2 + 3; // length += data for(int i=0; i < myUcpFields.length; i++) { if (myUcpFields[i] ...
command.append(StringUtil.byteToHexString(calcChecksum(command.toString())));
command.append(calcChecksum(command.toString()));
public String buildCommand() { StringBuffer command = new StringBuffer(200); int length = 0; // CALC LENGTH // length = trn + len + o|r + ot length = 3 + 5 + 2 + 3; // length += data for(int i=0; i < myUcpFields.length; i++) { if (myUcpFields[i] ...
public byte calcChecksum(String data) { int checksum = 0; for (int i=0; i < data.length(); i++) { checksum = (checksum + data.charAt(i)) % 256; } return (byte)(checksum & 0xff);
protected String calcChecksum(String parCadena) { long sum = 0L; StringCharacterIterator ci = new StringCharacterIterator(parCadena); for (char c = ci.last(); c != '\uffff'; c = ci.previous()) sum += (long) c; String binSum = Long.toBinaryString(sum); StringBuffer sb = new StringBuffer(); sb.append(Integer.toHexString(...
public byte calcChecksum(String data) { int checksum = 0; for (int i=0; i < data.length(); i++) { checksum = (checksum + data.charAt(i)) % 256; } return (byte)(checksum & 0xff); }
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
protected ResultSet executeQuery(PreparedStatement pstmt, String query) throws SQLException { if (query == null) throw new IllegalArgumentException("executeUpdate: null query"); try { long startTime = 0; if (pwlog != null) startTime = System.currentTimeMillis(); ...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
protected int executeUpdate(String query) throws SQLException { if (query == null) throw new IllegalArgumentException("executeUpdate: null query"); try { long startTime = 0; if (pwlog != null) startTime = System.currentTimeMillis(); int result = updateSt...
sqle.printStackTrace();
if(log.isErrorEnabled()) { log.error("Exception", sqle); }
protected void finalize() { try { if (dbConnection != null) close(); } catch (SQLException sqle) { sqle.printStackTrace(); } }
e.printStackTrace();
if(log.isErrorEnabled()) { log.error("Exception: ", e); }
protected String getNextId(String queryName, String prefix) { DecimalFormat format = new DecimalFormat("0000"); format.setPositivePrefix(prefix); substitutions.put(":max_id_pattern:", prefix + "____"); String id = format.format(1); // Default try { Statement stmt = dbCo...
RecipeComponent recipeCopy = (RecipeComponent)recipe.copy(newName);
final RecipeComponent recipeCopy = (RecipeComponent)recipe.copy(newName); GUIUtils.timeConsumingTaskStart(organizer); try { new Thread("DuplicateRecipe") { public void run() { recipeCopy.saveToDatabase(); GUIUtils.timeConsumingTaskEnd(organizer); } }.start(); } catch (RuntimeException re) { if(log.isErrorEnabled()) { l...
public RecipeComponent copyRecipe(RecipeComponent recipe) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)findNode(recipe).getParent(); String newName = generateRecipeName(recipe.getRecipeName()); RecipeComponent recipeCopy = (RecipeComponent)recipe.copy(newName); workspace.setSelection(addR...
return array.toString();
return NSPropertyListSerialization.stringFromPropertyList(array);
public static String toPropertyList(ERXMutableArray array) { return array.toString(); }