bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public void paint(Graphics gfx, JComponent c) { TableColumnModel cmod = header.getColumnModel(); int ncols = cmod.getColumnCount(); if (ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableCellRenderer defaultRend = header.getDefaultRenderer(); for (int i = 0; i < ncols; ++i) { Rectangle bounds = header.getHeaderRect(i); if (bounds.intersects(clip)) { Rectangle oldClip = gfx.getClipBounds(); TableColumn col = cmod.getColumn(i); TableCellRenderer rend = col.getHeaderRenderer(); if (rend == null) rend = defaultRend; Object val = col.getHeaderValue(); Component comp = rend.getTableCellRendererComponent(header.getTable(), val, false, // isSelected false, // isFocused -1, i); // FIXME: The following settings should be performed in // rend.getTableCellRendererComponent(). comp.setFont(header.getFont()); comp.setBackground(header.getBackground()); comp.setForeground(header.getForeground()); if (comp instanceof JComponent) ((JComponent)comp).setBorder(cellBorder); rendererPane.paintComponent(gfx, comp, header, bounds.x, bounds.y, bounds.width, bounds.height); } } // This displays a running rectangle that is much simplier than the total // animation, as it is seen in Sun's application. // TODO animate the collumn dragging like in Sun's jre. if (draggingHeaderRect!=null) { gfx.setColor(header.getForeground()); gfx.drawRect(draggingHeaderRect.x, draggingHeaderRect.y+2, draggingHeaderRect.width-1, draggingHeaderRect.height-6); } }
public void paint(Graphics gfx, JComponent c) { TableColumnModel cmod = header.getColumnModel(); int ncols = cmod.getColumnCount(); if (ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableCellRenderer defaultRend = header.getDefaultRenderer(); for (int i = 0; i < ncols; ++i) { Rectangle bounds = header.getHeaderRect(i); if (bounds.intersects(clip)) { Rectangle oldClip = gfx.getClipBounds(); TableColumn col = cmod.getColumn(i); TableCellRenderer rend = col.getHeaderRenderer(); if (rend == null) rend = defaultRend; Object val = col.getHeaderValue(); Component comp = rend.getTableCellRendererComponent(header.getTable(), val, false, // isSelected false, // isFocused -1, i); // FIXME: The following settings should be performed in // rend.getTableCellRendererComponent(). comp.setFont(header.getFont()); comp.setBackground(header.getBackground()); comp.setForeground(header.getForeground()); if (comp instanceof JComponent) ((JComponent)comp).setBorder(cellBorder); rendererPane.paintComponent(gfx, comp, header, bounds.x, bounds.y, bounds.width, bounds.height); } } // This displays a running rectangle that is much simplier than the total // animation, as it is seen in Sun's application. // TODO animate the collumn dragging like in Sun's jre. if (draggingHeaderRect!=null) { gfx.setColor(header.getForeground()); gfx.drawRect(draggingHeaderRect.x, draggingHeaderRect.y+2, draggingHeaderRect.width-1, draggingHeaderRect.height-6); } }
3,499
protected void uninstallKeyboardActions() throws NotImplementedException { // TODO: Implement this properly. }
protected void uninstallKeyboardActions() { // TODO: Implement this properly. }
3,500
protected void uninstallKeyboardActions() throws NotImplementedException { // TODO: Implement this properly. }
protected void uninstallKeyboardActions() throws NotImplementedException { // TODO: Implement this properly. }
3,501
public static XMLOutputFactory newInstance() throws FactoryConfigurationError { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = XMLOutputFactory.class.getClassLoader(); } String className = null; int count = 0; do { className = getFactoryClassName(loader, count++); if (className != null) { try { Class t = (loader != null) ? loader.loadClass(className) : Class.forName(className); return (XMLOutputFactory) t.newInstance(); } catch (ClassNotFoundException e) { className = null; } catch (Exception e) { throw new FactoryConfigurationError(e, "error instantiating class " + className); } } } while (className == null && count < 3); //return new gnu.xml.stream.XMLOutputFactoryImpl(); throw new FactoryConfigurationError(); }
public static XMLOutputFactory newInstance() throws FactoryConfigurationError { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = XMLOutputFactory.class.getClassLoader(); } String className = null; int count = 0; do { className = getFactoryClassName(loader, count++); if (className != null) { try { Class t = (loader != null) ? loader.loadClass(className) : Class.forName(className); return (XMLOutputFactory) t.newInstance(); } catch (ClassNotFoundException e) { className = null; } catch (Exception e) { throw new FactoryConfigurationError(e, "error instantiating class " + className); } } } while (className == null && count < 3); //return new gnu.xml.stream.XMLOutputFactoryImpl(); return new gnu.xml.stream.XMLOutputFactoryImpl(); }
3,503
public abstract XMLStreamWriter createXMLStreamWriter(OutputStream stream) throws XMLStreamException;
public abstract XMLStreamWriter createXMLStreamWriter(Writer stream) throws XMLStreamException;
3,504
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
3,505
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( CurrentArray.getXMLDataIOStyle() instanceof TaggedXMLDataIOStyle ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
3,506
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
3,507
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); CurrentArray.setXMLDataIOStyle(readObj); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
3,508
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
3,509
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values CurrentFormatObjectList.add(readObj); } return (Object) null; }
3,510
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
3,511
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
3,512
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
3,513
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
3,514
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
3,515
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
3,516
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( CurrentArray.getXMLDataIOStyle() instanceof TaggedXMLDataIOStyle ) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
3,517
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands XMLDataIOStyle readObj = createFormattedReadObj(DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
3,518
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
3,519
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
3,520
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // If we see a skipChar command, then we must have Formatted data IO style FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a skipChar // command. DataIOStyleAttribs.clear(); // clear out table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); SkipCharFormattedIOCmd skipObj = new SkipCharFormattedIOCmd(); skipObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(skipObj) ) return skipObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(skipObj)) return skipObj; } else { Log.warnln("Warning: cant add SkipCharFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // If we see a skipChar command, then we must have Formatted data IO style FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a skipChar // command. DataIOStyleAttribs.clear(); // clear out table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); SkipCharFormattedIOCmd skipObj = new SkipCharFormattedIOCmd(); skipObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(skipObj) ) return skipObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(skipObj)) return skipObj; } else { Log.warnln("Warning: cant add SkipCharFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
3,521
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // If we see a skipChar command, then we must have Formatted data IO style FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a skipChar // command. DataIOStyleAttribs.clear(); // clear out table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); SkipCharFormattedIOCmd skipObj = new SkipCharFormattedIOCmd(); skipObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(skipObj) ) return skipObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(skipObj)) return skipObj; } else { Log.warnln("Warning: cant add SkipCharFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( CurrentArray.getXMLDataIOStyle() instanceof TaggedXMLDataIOStyle ) { // If we see a skipChar command, then we must have Formatted data IO style FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a skipChar // command. DataIOStyleAttribs.clear(); // clear out table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); SkipCharFormattedIOCmd skipObj = new SkipCharFormattedIOCmd(); skipObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(skipObj) ) return skipObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(skipObj)) return skipObj; } else { Log.warnln("Warning: cant add SkipCharFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
3,522
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // If we see a skipChar command, then we must have Formatted data IO style FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a skipChar // command. DataIOStyleAttribs.clear(); // clear out table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); SkipCharFormattedIOCmd skipObj = new SkipCharFormattedIOCmd(); skipObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(skipObj) ) return skipObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(skipObj)) return skipObj; } else { Log.warnln("Warning: cant add SkipCharFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // If we see a skipChar command, then we must have Formatted data IO style XMLDataIOStyle readObj = createFormattedReadObj(DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a skipChar // command. DataIOStyleAttribs.clear(); // clear out table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); SkipCharFormattedIOCmd skipObj = new SkipCharFormattedIOCmd(); skipObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(skipObj) ) return skipObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(skipObj)) return skipObj; } else { Log.warnln("Warning: cant add SkipCharFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
3,523
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // If we see a skipChar command, then we must have Formatted data IO style FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a skipChar // command. DataIOStyleAttribs.clear(); // clear out table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); SkipCharFormattedIOCmd skipObj = new SkipCharFormattedIOCmd(); skipObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(skipObj) ) return skipObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(skipObj)) return skipObj; } else { Log.warnln("Warning: cant add SkipCharFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // If we see a skipChar command, then we must have Formatted data IO style FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a skipChar // command. DataIOStyleAttribs.clear(); // clear out table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); SkipCharFormattedIOCmd skipObj = new SkipCharFormattedIOCmd(); skipObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(skipObj) ) return skipObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(skipObj)) return skipObj; } else { Log.warnln("Warning: cant add SkipCharFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
3,524
private void addDataToCurrentArray ( Locator dataLocator, String thisString, DataFormat CurrentDataFormat, int intRadix ) {Log.debug("Add Data:["+thisString+"] (");List axes = dataLocator.getIterationOrder();Iterator liter = axes.iterator();while (liter.hasNext()) { AxisInterface axis = (AxisInterface) liter.next(); Log.debug(dataLocator.getAxisIndex(axis)+ " ["+axis.getAxisId()+"],");}Log.debugln(") "); // Note that we dont treat binary data at all here try { if ( CurrentDataFormat instanceof StringDataFormat) {//Log.debugln("(String)"); CurrentArray.setData(dataLocator, thisString); } else if ( CurrentDataFormat instanceof FloatDataFormat || CurrentDataFormat instanceof BinaryFloatDataFormat) {//Log.debugln("(Double)"); Double number = new Double (thisString); CurrentArray.setData(dataLocator, number.doubleValue()); } else if ( CurrentDataFormat instanceof IntegerDataFormat || CurrentDataFormat instanceof BinaryIntegerDataFormat) { // Integer number = new Integer (thisString);//Log.debugln("(Integer)"); if (intRadix == 16) // peal off leading "0x" thisString = thisString.substring(2); int thisInt = Integer.parseInt(thisString, intRadix); CurrentArray.setData(dataLocator, thisInt); } else { Log.warnln("Unknown data format, unable to setData:["+thisString+"], ignoring request"); } } catch (SetDataException e) { // bizarre error. Cant add data (out of memory??) :P Log.errorln("Unable to setData:["+thisString+"], ignoring request"); Log.printStackTrace(e); } }
/* /* /* /* private/* void/* addDataToCurrentArray/* (/* Locator/* dataLocator,/* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* String/* thisString,/* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* DataFormat/* CurrentDataFormat,/* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* int/* intRadix/* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* )/* /* /* /* /* {Log.debug("Add/* Data:["+thisString+"]/* (");List/* axes/* =/* dataLocator.getIterationOrder();Iterator/* liter/* =/* axes.iterator();while/* (liter.hasNext())/* {/* /* /* AxisInterface/* axis/* =/* (AxisInterface)/* liter.next();/* /* /* Log.debug(dataLocator.getAxisIndex(axis)+/* "/* ["+axis.getAxisId()+"],");}Log.debugln(")/* ");/* /* /* /* /* /* /* ///* Note/* that/* we/* dont/* treat/* binary/* data/* at/* all/* here/* /* /* /* /* /* /* /* try/* {/* /* /* /* /* /* /* /* /* /* /* if/* (/* CurrentDataFormat/* instanceof/* StringDataFormat)/* {//Log.debugln("(String)");/* /* /* /* /* /* /* /* /* /* /* /* /* /* CurrentArray.setData(dataLocator,/* thisString);/* /* /* /* /* /* /* /* /* /* /* }/* else/* if/* (/* CurrentDataFormat/* instanceof/* FloatDataFormat/* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* ||/* CurrentDataFormat/* instanceof/* BinaryFloatDataFormat)/* /* /* /* /* /* /* /* /* /* /* /* {//Log.debugln("(Double)");/* /* /* /* /* /* /* /* /* /* /* /* /* /* Double/* number/* =/* new/* Double/* (thisString);/* /* /* /* /* /* /* /* /* /* /* /* /* /* CurrentArray.setData(dataLocator,/* number.doubleValue());/* /* /* /* /* /* /* /* /* /* /* }/* else/* if/* (/* CurrentDataFormat/* instanceof/* IntegerDataFormat/* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* ||/* CurrentDataFormat/* instanceof/* BinaryIntegerDataFormat)/* /* /* /* /* /* /* /* /* /* /* /* {/* /* /* /* /* /* /* /* /* /* /* /* /* /* ///* Integer/* number/* =/* new/* Integer/* (thisString);//Log.debugln("(Integer)");/* /* /* /* /* /* /* /* /* /* /* /* /* /* if/* (intRadix/* ==/* 16)/* ///* peal/* off/* leading/* "0x"/* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* thisString/* =/* thisString.substring(2);/* /* /* /* /* /* /* /* /* /* /* /* /* /* int/* thisInt/* =/* Integer.parseInt(thisString,/* intRadix);/* /* /* /* /* /* /* /* /* /* /* /* /* /* /* CurrentArray.setData(dataLocator,/* thisInt);/* /* /* /* /* /* /* /* /* /* /* }/* else/* {/* /* /* /* /* /* /* /* /* /* /* /* /* /* Log.warnln("Unknown/* data/* format,/* unable/* to/* setData:["+thisString+"],/* ignoring/* request");/* /* /* /* /* /* /* /* /* /* /* }/* /* /* /* /* /* /* }/* catch/* (SetDataException/* e)/* {/* /* /* /* /* /* /* /* /* /* /* ///* bizarre/* error./* Cant/* add/* data/* (out/* of/* memory??)/* :P/* /* /* /* /* /* /* /* /* /* /* Log.errorln("Unable/* to/* setData:["+thisString+"],/* ignoring/* request");/* /* /* /* /* /* /* /* /* /* /* Log.printStackTrace(e);/* /* /* /* /* /* /* }/* /* /* /* }
3,525
private void addDataToCurrentArray ( Locator dataLocator, String thisString, DataFormat CurrentDataFormat, int intRadix ) {Log.debug("Add Data:["+thisString+"] (");List axes = dataLocator.getIterationOrder();Iterator liter = axes.iterator();while (liter.hasNext()) { AxisInterface axis = (AxisInterface) liter.next(); Log.debug(dataLocator.getAxisIndex(axis)+ " ["+axis.getAxisId()+"],");}Log.debugln(") "); // Note that we dont treat binary data at all here try { if ( CurrentDataFormat instanceof StringDataFormat) {//Log.debugln("(String)"); CurrentArray.setData(dataLocator, thisString); } else if ( CurrentDataFormat instanceof FloatDataFormat || CurrentDataFormat instanceof BinaryFloatDataFormat) {//Log.debugln("(Double)"); Double number = new Double (thisString); CurrentArray.setData(dataLocator, number.doubleValue()); } else if ( CurrentDataFormat instanceof IntegerDataFormat || CurrentDataFormat instanceof BinaryIntegerDataFormat) { // Integer number = new Integer (thisString);//Log.debugln("(Integer)"); if (intRadix == 16) // peal off leading "0x" thisString = thisString.substring(2); int thisInt = Integer.parseInt(thisString, intRadix); CurrentArray.setData(dataLocator, thisInt); } else { Log.warnln("Unknown data format, unable to setData:["+thisString+"], ignoring request"); } } catch (SetDataException e) { // bizarre error. Cant add data (out of memory??) :P Log.errorln("Unable to setData:["+thisString+"], ignoring request"); Log.printStackTrace(e); } }
privatevoidaddDataToCurrentArray(LocatordataLocator,StringthisString,DataFormatCurrentDataFormat,intintRadix){Log.debug("AddData:["+thisString+"](");Listaxes=dataLocator.getIterationOrder();Iteratorliter=axes.iterator();while(liter.hasNext()){AxisInterfaceaxis=(AxisInterface)liter.next();Log.debug(dataLocator.getAxisIndex(axis)+"["+axis.getAxisId()+"],");}Log.debugln(")");//Notethatwedonttreatbinarydataatallheretry{if(CurrentDataFormatinstanceofStringDataFormat){//Log.debugln("(String)");CurrentArray.setData(dataLocator,thisString);}elseif(CurrentDataFormatinstanceofFloatDataFormat||CurrentDataFormatinstanceofBinaryFloatDataFormat){//Log.debugln("(Double)");Doublenumber=newDouble(thisString);CurrentArray.setData(dataLocator,number.doubleValue());}elseif(CurrentDataFormatinstanceofIntegerDataFormat||CurrentDataFormatinstanceofBinaryIntegerDataFormat){//Integernumber=newInteger(thisString);//Log.debugln("(Integer)");if(intRadix==16)//pealoffleading"0x"thisString=thisString.substring(2);intthisInt=Integer.parseInt(thisString,intRadix);CurrentArray.setData(dataLocator,thisInt);}else{Log.warnln("Unknowndataformat,unabletosetData:["+thisString+"],ignoringrequest");}}catch(SetDataExceptione){//bizarreerror.Cantadddata(outofmemory??):PLog.errorln("UnabletosetData:["+thisString+"],ignoringrequest");Log.printStackTrace(e);}}
3,526
private void addDataToCurrentArray ( Locator dataLocator, String thisString, DataFormat CurrentDataFormat, int intRadix ) {Log.debug("Add Data:["+thisString+"] (");List axes = dataLocator.getIterationOrder();Iterator liter = axes.iterator();while (liter.hasNext()) { AxisInterface axis = (AxisInterface) liter.next(); Log.debug(dataLocator.getAxisIndex(axis)+ " ["+axis.getAxisId()+"],");}Log.debugln(") "); // Note that we dont treat binary data at all here try { if ( CurrentDataFormat instanceof StringDataFormat) {//Log.debugln("(String)"); CurrentArray.setData(dataLocator, thisString); } else if ( CurrentDataFormat instanceof FloatDataFormat || CurrentDataFormat instanceof BinaryFloatDataFormat) {//Log.debugln("(Double)"); Double number = new Double (thisString); CurrentArray.setData(dataLocator, number.doubleValue()); } else if ( CurrentDataFormat instanceof IntegerDataFormat || CurrentDataFormat instanceof BinaryIntegerDataFormat) { // Integer number = new Integer (thisString);//Log.debugln("(Integer)"); if (intRadix == 16) // peal off leading "0x" thisString = thisString.substring(2); int thisInt = Integer.parseInt(thisString, intRadix); CurrentArray.setData(dataLocator, thisInt); } else { Log.warnln("Unknown data format, unable to setData:["+thisString+"], ignoring request"); } } catch (SetDataException e) { // bizarre error. Cant add data (out of memory??) :P Log.errorln("Unable to setData:["+thisString+"], ignoring request"); Log.printStackTrace(e); } }
privatevoidaddDataToCurrentArray(LocatordataLocator,StringthisString,DataFormatCurrentDataFormat,intintRadix){Log.debug("AddData:["+thisString+"](");Listaxes=dataLocator.getIterationOrder();Iteratorliter=axes.iterator();while(liter.hasNext()){AxisInterfaceaxis=(AxisInterface)liter.next();Log.debug(dataLocator.getAxisIndex(axis)+"["+axis.getAxisId()+"],");}Log.debugln(")");//Notethatwedonttreatbinarydataatallheretry{if(CurrentDataFormatinstanceofStringDataFormat){//Log.debugln("(String)");CurrentArray.setData(dataLocator,thisString);}elseif(CurrentDataFormatinstanceofFloatDataFormat||CurrentDataFormatinstanceofBinaryFloatDataFormat){//Log.debugln("(Double)");Doublenumber=newDouble(thisString);CurrentArray.setData(dataLocator,number.doubleValue());}elseif(CurrentDataFormatinstanceofIntegerDataFormat||CurrentDataFormatinstanceofBinaryIntegerDataFormat){//Integernumber=newInteger(thisString);//Log.debugln("(Integer)");if(intRadix==16)//pealoffleading"0x"thisString=thisString.substring(2);intthisInt=Integer.parseInt(thisString,intRadix);CurrentArray.setData(dataLocator,thisInt);}else{Log.warnln("Unknowndataformat,unabletosetData:["+thisString+"],ignoringrequest");}}catch(SetDataExceptione){//bizarreerror.Cantadddata(outofmemory??):PLog.errorln("UnabletosetData:["+thisString+"],ignoringrequest");Log.printStackTrace(e);}}
3,527
private void addDataToCurrentArray ( Locator dataLocator, String thisString, DataFormat CurrentDataFormat, int intRadix ) {Log.debug("Add Data:["+thisString+"] (");List axes = dataLocator.getIterationOrder();Iterator liter = axes.iterator();while (liter.hasNext()) { AxisInterface axis = (AxisInterface) liter.next(); Log.debug(dataLocator.getAxisIndex(axis)+ " ["+axis.getAxisId()+"],");}Log.debugln(") "); // Note that we dont treat binary data at all here try { if ( CurrentDataFormat instanceof StringDataFormat) {//Log.debugln("(String)"); CurrentArray.setData(dataLocator, thisString); } else if ( CurrentDataFormat instanceof FloatDataFormat || CurrentDataFormat instanceof BinaryFloatDataFormat) {//Log.debugln("(Double)"); Double number = new Double (thisString); CurrentArray.setData(dataLocator, number.doubleValue()); } else if ( CurrentDataFormat instanceof IntegerDataFormat || CurrentDataFormat instanceof BinaryIntegerDataFormat) { // Integer number = new Integer (thisString);//Log.debugln("(Integer)"); if (intRadix == 16) // peal off leading "0x" thisString = thisString.substring(2); int thisInt = Integer.parseInt(thisString, intRadix); CurrentArray.setData(dataLocator, thisInt); } else { Log.warnln("Unknown data format, unable to setData:["+thisString+"], ignoring request"); } } catch (SetDataException e) { // bizarre error. Cant add data (out of memory??) :P Log.errorln("Unable to setData:["+thisString+"], ignoring request"); Log.printStackTrace(e); } }
privatevoidaddDataToCurrentArray(LocatordataLocator,StringthisString,DataFormatCurrentDataFormat,intintRadix){Log.debug("AddData:["+thisString+"](");Listaxes=dataLocator.getIterationOrder();Iteratorliter=axes.iterator();while(liter.hasNext()){AxisInterfaceaxis=(AxisInterface)liter.next();Log.debug(dataLocator.getAxisIndex(axis)+"["+axis.getAxisId()+"],");}Log.debugln(")");//Notethatwedonttreatbinarydataatallheretry{if(CurrentDataFormatinstanceofStringDataFormat){//Log.debugln("(String)");CurrentArray.setData(dataLocator,thisString);}elseif(CurrentDataFormatinstanceofFloatDataFormat||CurrentDataFormatinstanceofBinaryFloatDataFormat){//Log.debugln("(Double)");Doublenumber=newDouble(thisString);CurrentArray.setData(dataLocator,number.doubleValue());}elseif(CurrentDataFormatinstanceofIntegerDataFormat||CurrentDataFormatinstanceofBinaryIntegerDataFormat){//Integernumber=newInteger(thisString);//Log.debugln("(Integer)");if(intRadix==16)//pealoffleading"0x"thisString=thisString.substring(2);intthisInt=Integer.parseInt(thisString,intRadix);CurrentArray.setData(dataLocator,thisInt);}else{Log.warnln("Unknowndataformat,unabletosetData:["+thisString+"],ignoringrequest");}}catch(SetDataExceptione){//bizarreerror.Cantadddata(outofmemory??):PLog.errorln("UnabletosetData:["+thisString+"],ignoringrequest");Log.printStackTrace(e);}}
3,528
private ArrayList splitStringIntoStringObjects ( String valueListString, String delimiter, String repeatable, String terminatingDelimiter ) { // the list we will return ArrayList values = new ArrayList(); // parameters int delimiterSize = delimiter.length(); char delimitChar0 = delimiter.charAt(0); int termDelimiterSize = 0; char termDelimitChar0; int valueListSize = valueListString.length(); boolean isNotRepeatable = repeatable.equals("yes") ? false : true; if(terminatingDelimiter != null) { termDelimiterSize = terminatingDelimiter.length(); termDelimitChar0 = terminatingDelimiter.charAt(0); } // loop over the valueListString and derive values int start = 0; while ( start < valueListSize ) { int stop = start + delimiterSize; // safety, can happen if(stop > valueListSize) stop = valueListSize; if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 ) { // we hit a delimiter start += delimiterSize; if (isNotRepeatable) { // gather a value now.// Log.errorln("ISNOTREPEATABLE CHECK"); // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; } } } else if (termDelimiterSize > 0 && valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0 ) { // we hit record terminator(delimiter) start += termDelimiterSize; // we DONT repeat on record terminators (??)/* if (isNotRepeatable) { // gather values now.Log.errorln("ISNOTREPEATABLE CHECK"); // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; }*/ } else { // we didnt hit a delimiter, gather values // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; } } } return values; }
private ArrayList splitStringIntoStringObjects ( String valueListString,String delimiter, String repeatable,String terminatingDelimiter ){ // the list we will return ArrayList values = new ArrayList(); // parametersint delimiterSize = delimiter.length(); char delimitChar0 = delimiter.charAt(0); int termDelimiterSize = 0; char termDelimitChar0; int valueListSize = valueListString.length();boolean isNotRepeatable = repeatable.equals("yes") ? false : true; if(terminatingDelimiter != null) {termDelimiterSize = terminatingDelimiter.length();termDelimitChar0 = terminatingDelimiter.charAt(0); } // loop over the valueListString and derive valuesint start = 0; while ( start < valueListSize ) {int stop = start + delimiterSize;// safety, can happenif(stop > valueListSize) stop = valueListSize;if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 ) {// we hit a delimiterstart += delimiterSize;if (isNotRepeatable) { // gather a value now.// Log.errorln("ISNOTREPEATABLE CHECK");// find the end of this substringint end = valueListString.indexOf(delimitChar0, start);int termend = 0;if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend);String valueString;if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayListvalues.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loopif ((end+delimiterSize) >= valueListSize ) break; start = end;} else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayListvalues.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loopif ((termend+termDelimiterSize) >= valueListSize ) break; start = termend;} }} else if (termDelimiterSize > 0&& valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0) {// we hit record terminator(delimiter)start += termDelimiterSize;// we DONT repeat on record terminators (??)/* if (isNotRepeatable) { // gather values now.Log.errorln("ISNOTREPEATABLE CHECK");// find the end of this substringint end = valueListString.indexOf(delimitChar0, start);int termend = 0;if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend);String valueString;if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayListvalues.add(valueString);Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loopif ((end+delimiterSize) >= valueListSize ) break; start = end;} else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayListvalues.add(valueString);Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loopif ((termend+termDelimiterSize) >= valueListSize ) break; start = termend;}*/} else { // we didnt hit a delimiter, gather values // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null)termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) {// can happen if no terminating delimiterif (end < 0) end = valueListSize;// derive our value from stringvalueString = valueListString.substring(start, end);// add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString);// this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break;start = end; } else {// if (termend < 0) termend = valueListSize;valueString = valueListString.substring(start, termend);// add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString);// this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break;start = termend; }} } return values;}
3,529
private ArrayList splitStringIntoStringObjects ( String valueListString, String delimiter, String repeatable, String terminatingDelimiter ) { // the list we will return ArrayList values = new ArrayList(); // parameters int delimiterSize = delimiter.length(); char delimitChar0 = delimiter.charAt(0); int termDelimiterSize = 0; char termDelimitChar0; int valueListSize = valueListString.length(); boolean isNotRepeatable = repeatable.equals("yes") ? false : true; if(terminatingDelimiter != null) { termDelimiterSize = terminatingDelimiter.length(); termDelimitChar0 = terminatingDelimiter.charAt(0); } // loop over the valueListString and derive values int start = 0; while ( start < valueListSize ) { int stop = start + delimiterSize; // safety, can happen if(stop > valueListSize) stop = valueListSize; if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 ) { // we hit a delimiter start += delimiterSize; if (isNotRepeatable) { // gather a value now.// Log.errorln("ISNOTREPEATABLE CHECK"); // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; } } } else if (termDelimiterSize > 0 && valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0 ) { // we hit record terminator(delimiter) start += termDelimiterSize; // we DONT repeat on record terminators (??)/* if (isNotRepeatable) { // gather values now.Log.errorln("ISNOTREPEATABLE CHECK"); // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; }*/ } else { // we didnt hit a delimiter, gather values // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; } } } return values; }
private ArrayList splitStringIntoStringObjects ( String valueListString,String delimiter, String repeatable,String terminatingDelimiter ){ // the list we will return ArrayList values = new ArrayList(); // parametersint delimiterSize = delimiter.length(); char delimitChar0 = delimiter.charAt(0); int termDelimiterSize = 0; char termDelimitChar0; int valueListSize = valueListString.length();boolean isNotRepeatable = repeatable.equals("yes") ? false : true; if(terminatingDelimiter != null) {termDelimiterSize = terminatingDelimiter.length();termDelimitChar0 = terminatingDelimiter.charAt(0); } // loop over the valueListString and derive valuesint start = 0; while ( start < valueListSize ) {int stop = start + delimiterSize;// safety, can happenif(stop > valueListSize) stop = valueListSize;if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 ) {// we hit a delimiterstart += delimiterSize;if (isNotRepeatable) { // gather a value now.// Log.errorln("ISNOTREPEATABLE CHECK");// find the end of this substringint end = valueListString.indexOf(delimitChar0, start);int termend = 0;if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend);String valueString;if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayListvalues.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loopif ((end+delimiterSize) >= valueListSize ) break; start = end;} else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayListvalues.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loopif ((termend+termDelimiterSize) >= valueListSize ) break; start = termend;} }} else if (termDelimiterSize > 0&& valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0) {// we hit record terminator(delimiter)start += termDelimiterSize;// we DONT repeat on record terminators (??)/* if (isNotRepeatable) { // gather values now.Log.errorln("ISNOTREPEATABLE CHECK");// find the end of this substringint end = valueListString.indexOf(delimitChar0, start);int termend = 0;if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend);String valueString;if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayListvalues.add(valueString);Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loopif ((end+delimiterSize) >= valueListSize ) break; start = end;} else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayListvalues.add(valueString);Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loopif ((termend+termDelimiterSize) >= valueListSize ) break; start = termend;}*/} else { // we didnt hit a delimiter, gather values // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null)termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) {// can happen if no terminating delimiterif (end < 0) end = valueListSize;// derive our value from stringvalueString = valueListString.substring(start, end);// add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString);// this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break;start = end; } else {// if (termend < 0) termend = valueListSize;valueString = valueListString.substring(start, termend);// add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString);// this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break;start = termend; }} } return values;}
3,530
private ArrayList splitStringIntoStringObjects ( String valueListString, String delimiter, String repeatable, String terminatingDelimiter ) { // the list we will return ArrayList values = new ArrayList(); // parameters int delimiterSize = delimiter.length(); char delimitChar0 = delimiter.charAt(0); int termDelimiterSize = 0; char termDelimitChar0; int valueListSize = valueListString.length(); boolean isNotRepeatable = repeatable.equals("yes") ? false : true; if(terminatingDelimiter != null) { termDelimiterSize = terminatingDelimiter.length(); termDelimitChar0 = terminatingDelimiter.charAt(0); } // loop over the valueListString and derive values int start = 0; while ( start < valueListSize ) { int stop = start + delimiterSize; // safety, can happen if(stop > valueListSize) stop = valueListSize; if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 ) { // we hit a delimiter start += delimiterSize; if (isNotRepeatable) { // gather a value now.// Log.errorln("ISNOTREPEATABLE CHECK"); // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; } } } else if (termDelimiterSize > 0 && valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0 ) { // we hit record terminator(delimiter) start += termDelimiterSize; // we DONT repeat on record terminators (??)/* if (isNotRepeatable) { // gather values now.Log.errorln("ISNOTREPEATABLE CHECK"); // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; }*/ } else { // we didnt hit a delimiter, gather values // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; } } } return values; }
private ArrayList splitStringIntoStringObjects ( String valueListString,String delimiter, String repeatable,String terminatingDelimiter ){ // the list we will return ArrayList values = new ArrayList(); // parametersint delimiterSize = delimiter.length(); char delimitChar0 = delimiter.charAt(0); int termDelimiterSize = 0; char termDelimitChar0; int valueListSize = valueListString.length();boolean isNotRepeatable = repeatable.equals("yes") ? false : true; if(terminatingDelimiter != null) {termDelimiterSize = terminatingDelimiter.length();termDelimitChar0 = terminatingDelimiter.charAt(0); } // loop over the valueListString and derive valuesint start = 0; while ( start < valueListSize ) {int stop = start + delimiterSize;// safety, can happenif(stop > valueListSize) stop = valueListSize;if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 ) {// we hit a delimiterstart += delimiterSize;if (isNotRepeatable) { // gather a value now.// Log.errorln("ISNOTREPEATABLE CHECK");// find the end of this substringint end = valueListString.indexOf(delimitChar0, start);int termend = 0;if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend);String valueString;if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayListvalues.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loopif ((end+delimiterSize) >= valueListSize ) break; start = end;} else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayListvalues.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loopif ((termend+termDelimiterSize) >= valueListSize ) break; start = termend;} }} else if (termDelimiterSize > 0&& valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0) {// we hit record terminator(delimiter)start += termDelimiterSize;// we DONT repeat on record terminators (??)/* if (isNotRepeatable) { // gather values now.Log.errorln("ISNOTREPEATABLE CHECK");// find the end of this substringint end = valueListString.indexOf(delimitChar0, start);int termend = 0;if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend);String valueString;if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayListvalues.add(valueString);Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loopif ((end+delimiterSize) >= valueListSize ) break; start = end;} else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayListvalues.add(valueString);Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loopif ((termend+termDelimiterSize) >= valueListSize ) break; start = termend;}*/} else { // we didnt hit a delimiter, gather values // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null)termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) {// can happen if no terminating delimiterif (end < 0) end = valueListSize;// derive our value from stringvalueString = valueListString.substring(start, end);// add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString);// this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break;start = end; } else {// if (termend < 0) termend = valueListSize;valueString = valueListString.substring(start, termend);// add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString);// this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break;start = termend; }} } return values;}
3,531
private ArrayList splitStringIntoStringObjects ( String valueListString, String delimiter, String repeatable, String terminatingDelimiter ) { // the list we will return ArrayList values = new ArrayList(); // parameters int delimiterSize = delimiter.length(); char delimitChar0 = delimiter.charAt(0); int termDelimiterSize = 0; char termDelimitChar0; int valueListSize = valueListString.length(); boolean isNotRepeatable = repeatable.equals("yes") ? false : true; if(terminatingDelimiter != null) { termDelimiterSize = terminatingDelimiter.length(); termDelimitChar0 = terminatingDelimiter.charAt(0); } // loop over the valueListString and derive values int start = 0; while ( start < valueListSize ) { int stop = start + delimiterSize; // safety, can happen if(stop > valueListSize) stop = valueListSize; if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 ) { // we hit a delimiter start += delimiterSize; if (isNotRepeatable) { // gather a value now.// Log.errorln("ISNOTREPEATABLE CHECK"); // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; } } } else if (termDelimiterSize > 0 && valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0 ) { // we hit record terminator(delimiter) start += termDelimiterSize; // we DONT repeat on record terminators (??)/* if (isNotRepeatable) { // gather values now.Log.errorln("ISNOTREPEATABLE CHECK"); // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; }*/ } else { // we didnt hit a delimiter, gather values // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; } } } return values; }
private ArrayList splitStringIntoStringObjects ( String valueListString,String delimiter, String repeatable,String terminatingDelimiter ){ // the list we will return ArrayList values = new ArrayList(); // parametersint delimiterSize = delimiter.length(); char delimitChar0 = delimiter.charAt(0); int termDelimiterSize = 0; char termDelimitChar0; int valueListSize = valueListString.length();boolean isNotRepeatable = repeatable.equals("yes") ? false : true; if(terminatingDelimiter != null) {termDelimiterSize = terminatingDelimiter.length();termDelimitChar0 = terminatingDelimiter.charAt(0); } // loop over the valueListString and derive valuesint start = 0; while ( start < valueListSize ) {int stop = start + delimiterSize;// safety, can happenif(stop > valueListSize) stop = valueListSize;if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 ) {// we hit a delimiterstart += delimiterSize;if (isNotRepeatable) { // gather a value now.// Log.errorln("ISNOTREPEATABLE CHECK");// find the end of this substringint end = valueListString.indexOf(delimitChar0, start);int termend = 0;if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend);String valueString;if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayListvalues.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loopif ((end+delimiterSize) >= valueListSize ) break; start = end;} else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayListvalues.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loopif ((termend+termDelimiterSize) >= valueListSize ) break; start = termend;} }} else if (termDelimiterSize > 0&& valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0) {// we hit record terminator(delimiter)start += termDelimiterSize;// we DONT repeat on record terminators (??)/* if (isNotRepeatable) { // gather values now.Log.errorln("ISNOTREPEATABLE CHECK");// find the end of this substringint end = valueListString.indexOf(delimitChar0, start);int termend = 0;if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend);String valueString;if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayListvalues.add(valueString);Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loopif ((end+delimiterSize) >= valueListSize ) break; start = end;} else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayListvalues.add(valueString);Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loopif ((termend+termDelimiterSize) >= valueListSize ) break; start = termend;}*/} else { // we didnt hit a delimiter, gather values // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null)termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) {// can happen if no terminating delimiterif (end < 0) end = valueListSize;// derive our value from stringvalueString = valueListString.substring(start, end);// add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString);// this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break;start = end; } else {// if (termend < 0) termend = valueListSize;valueString = valueListString.substring(start, termend);// add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString);// this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break;start = termend; }} } return values;}
3,532
private ArrayList splitStringIntoStringObjects ( String valueListString, String delimiter, String repeatable, String terminatingDelimiter ) { // the list we will return ArrayList values = new ArrayList(); // parameters int delimiterSize = delimiter.length(); char delimitChar0 = delimiter.charAt(0); int termDelimiterSize = 0; char termDelimitChar0; int valueListSize = valueListString.length(); boolean isNotRepeatable = repeatable.equals("yes") ? false : true; if(terminatingDelimiter != null) { termDelimiterSize = terminatingDelimiter.length(); termDelimitChar0 = terminatingDelimiter.charAt(0); } // loop over the valueListString and derive values int start = 0; while ( start < valueListSize ) { int stop = start + delimiterSize; // safety, can happen if(stop > valueListSize) stop = valueListSize; if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 ) { // we hit a delimiter start += delimiterSize; if (isNotRepeatable) { // gather a value now.// Log.errorln("ISNOTREPEATABLE CHECK"); // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; } } } else if (termDelimiterSize > 0 && valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0 ) { // we hit record terminator(delimiter) start += termDelimiterSize; // we DONT repeat on record terminators (??)/* if (isNotRepeatable) { // gather values now.Log.errorln("ISNOTREPEATABLE CHECK"); // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; }*/ } else { // we didnt hit a delimiter, gather values // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; } } } return values; }
private ArrayList splitStringIntoStringObjects ( String valueListString,String delimiter, String repeatable,String terminatingDelimiter ){ // the list we will return ArrayList values = new ArrayList(); // parametersint delimiterSize = delimiter.length(); char delimitChar0 = delimiter.charAt(0); int termDelimiterSize = 0; char termDelimitChar0; int valueListSize = valueListString.length();boolean isNotRepeatable = repeatable.equals("yes") ? false : true; if(terminatingDelimiter != null) {termDelimiterSize = terminatingDelimiter.length();termDelimitChar0 = terminatingDelimiter.charAt(0); } // loop over the valueListString and derive valuesint start = 0; while ( start < valueListSize ) {int stop = start + delimiterSize;// safety, can happenif(stop > valueListSize) stop = valueListSize;if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 ) {// we hit a delimiterstart += delimiterSize;if (isNotRepeatable) { // gather a value now.// Log.errorln("ISNOTREPEATABLE CHECK");// find the end of this substringint end = valueListString.indexOf(delimitChar0, start);int termend = 0;if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend);String valueString;if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayListvalues.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loopif ((end+delimiterSize) >= valueListSize ) break; start = end;} else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayListvalues.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loopif ((termend+termDelimiterSize) >= valueListSize ) break; start = termend;} }} else if (termDelimiterSize > 0&& valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0) {// we hit record terminator(delimiter)start += termDelimiterSize;// we DONT repeat on record terminators (??)/* if (isNotRepeatable) { // gather values now.Log.errorln("ISNOTREPEATABLE CHECK");// find the end of this substringint end = valueListString.indexOf(delimitChar0, start);int termend = 0;if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend);String valueString;if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayListvalues.add(valueString);Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loopif ((end+delimiterSize) >= valueListSize ) break; start = end;} else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayListvalues.add(valueString);Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loopif ((termend+termDelimiterSize) >= valueListSize ) break; start = termend;}*/} else { // we didnt hit a delimiter, gather values // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null)termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) {// can happen if no terminating delimiterif (end < 0) end = valueListSize;// derive our value from stringvalueString = valueListString.substring(start, end);// add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString);// this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break;start = end; } else {// if (termend < 0) termend = valueListSize;valueString = valueListString.substring(start, termend);// add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString);// this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break;start = termend; }} } return values;}
3,533
private ArrayList splitStringIntoStringObjects ( String valueListString, String delimiter, String repeatable, String terminatingDelimiter ) { // the list we will return ArrayList values = new ArrayList(); // parameters int delimiterSize = delimiter.length(); char delimitChar0 = delimiter.charAt(0); int termDelimiterSize = 0; char termDelimitChar0; int valueListSize = valueListString.length(); boolean isNotRepeatable = repeatable.equals("yes") ? false : true; if(terminatingDelimiter != null) { termDelimiterSize = terminatingDelimiter.length(); termDelimitChar0 = terminatingDelimiter.charAt(0); } // loop over the valueListString and derive values int start = 0; while ( start < valueListSize ) { int stop = start + delimiterSize; // safety, can happen if(stop > valueListSize) stop = valueListSize; if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 ) { // we hit a delimiter start += delimiterSize; if (isNotRepeatable) { // gather a value now.// Log.errorln("ISNOTREPEATABLE CHECK"); // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; } } } else if (termDelimiterSize > 0 && valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0 ) { // we hit record terminator(delimiter) start += termDelimiterSize; // we DONT repeat on record terminators (??)/* if (isNotRepeatable) { // gather values now.Log.errorln("ISNOTREPEATABLE CHECK"); // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; }*/ } else { // we didnt hit a delimiter, gather values // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; } } } return values; }
private ArrayList splitStringIntoStringObjects ( String valueListString,String delimiter, String repeatable,String terminatingDelimiter ){ // the list we will return ArrayList values = new ArrayList(); // parametersint delimiterSize = delimiter.length(); char delimitChar0 = delimiter.charAt(0); int termDelimiterSize = 0; char termDelimitChar0; int valueListSize = valueListString.length();boolean isNotRepeatable = repeatable.equals("yes") ? false : true; if(terminatingDelimiter != null) {termDelimiterSize = terminatingDelimiter.length();termDelimitChar0 = terminatingDelimiter.charAt(0); } // loop over the valueListString and derive valuesint start = 0; while ( start < valueListSize ) {int stop = start + delimiterSize;// safety, can happenif(stop > valueListSize) stop = valueListSize;if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 ) {// we hit a delimiterstart += delimiterSize;if (isNotRepeatable) { // gather a value now.// Log.errorln("ISNOTREPEATABLE CHECK");// find the end of this substringint end = valueListString.indexOf(delimitChar0, start);int termend = 0;if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend);String valueString;if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayListvalues.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loopif ((end+delimiterSize) >= valueListSize ) break; start = end;} else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayListvalues.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loopif ((termend+termDelimiterSize) >= valueListSize ) break; start = termend;} }} else if (termDelimiterSize > 0&& valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0) {// we hit record terminator(delimiter)start += termDelimiterSize;// we DONT repeat on record terminators (??)/* if (isNotRepeatable) { // gather values now.Log.errorln("ISNOTREPEATABLE CHECK");// find the end of this substringint end = valueListString.indexOf(delimitChar0, start);int termend = 0;if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend);String valueString;if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayListvalues.add(valueString);Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loopif ((end+delimiterSize) >= valueListSize ) break; start = end;} else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayListvalues.add(valueString);Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loopif ((termend+termDelimiterSize) >= valueListSize ) break; start = termend;}*/} else { // we didnt hit a delimiter, gather values // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null)termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) {// can happen if no terminating delimiterif (end < 0) end = valueListSize;// derive our value from stringvalueString = valueListString.substring(start, end);// add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString);// this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break;start = end; } else {// if (termend < 0) termend = valueListSize;valueString = valueListString.substring(start, termend);// add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString);// this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break;start = termend; }} } return values;}
3,534
private ArrayList splitStringIntoStringObjects ( String valueListString, String delimiter, String repeatable, String terminatingDelimiter ) { // the list we will return ArrayList values = new ArrayList(); // parameters int delimiterSize = delimiter.length(); char delimitChar0 = delimiter.charAt(0); int termDelimiterSize = 0; char termDelimitChar0; int valueListSize = valueListString.length(); boolean isNotRepeatable = repeatable.equals("yes") ? false : true; if(terminatingDelimiter != null) { termDelimiterSize = terminatingDelimiter.length(); termDelimitChar0 = terminatingDelimiter.charAt(0); } // loop over the valueListString and derive values int start = 0; while ( start < valueListSize ) { int stop = start + delimiterSize; // safety, can happen if(stop > valueListSize) stop = valueListSize; if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 ) { // we hit a delimiter start += delimiterSize; if (isNotRepeatable) { // gather a value now.// Log.errorln("ISNOTREPEATABLE CHECK"); // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; } } } else if (termDelimiterSize > 0 && valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0 ) { // we hit record terminator(delimiter) start += termDelimiterSize; // we DONT repeat on record terminators (??)/* if (isNotRepeatable) { // gather values now.Log.errorln("ISNOTREPEATABLE CHECK"); // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; }*/ } else { // we didnt hit a delimiter, gather values // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break; start = end; } else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break; start = termend; } } } return values; }
private ArrayList splitStringIntoStringObjects ( String valueListString,String delimiter, String repeatable,String terminatingDelimiter ){ // the list we will return ArrayList values = new ArrayList(); // parametersint delimiterSize = delimiter.length(); char delimitChar0 = delimiter.charAt(0); int termDelimiterSize = 0; char termDelimitChar0; int valueListSize = valueListString.length();boolean isNotRepeatable = repeatable.equals("yes") ? false : true; if(terminatingDelimiter != null) {termDelimiterSize = terminatingDelimiter.length();termDelimitChar0 = terminatingDelimiter.charAt(0); } // loop over the valueListString and derive valuesint start = 0; while ( start < valueListSize ) {int stop = start + delimiterSize;// safety, can happenif(stop > valueListSize) stop = valueListSize;if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 ) {// we hit a delimiterstart += delimiterSize;if (isNotRepeatable) { // gather a value now.// Log.errorln("ISNOTREPEATABLE CHECK");// find the end of this substringint end = valueListString.indexOf(delimitChar0, start);int termend = 0;if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend);String valueString;if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayListvalues.add(valueString);// Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loopif ((end+delimiterSize) >= valueListSize ) break; start = end;} else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayListvalues.add(valueString);// Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loopif ((termend+termDelimiterSize) >= valueListSize ) break; start = termend;} }} else if (termDelimiterSize > 0&& valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0) {// we hit record terminator(delimiter)start += termDelimiterSize;// we DONT repeat on record terminators (??)/* if (isNotRepeatable) { // gather values now.Log.errorln("ISNOTREPEATABLE CHECK");// find the end of this substringint end = valueListString.indexOf(delimitChar0, start);int termend = 0;if(terminatingDelimiter != null) termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend);String valueString;if(termend == 0 || end < termend) { // can happen if no terminating delimiter if (end < 0) end = valueListSize; // derive our value from string valueString = valueListString.substring(start, end); // add the value to arrayListvalues.add(valueString);Log.errorln(" DValue:"+valueString); // this is the last value so terminate the while loopif ((end+delimiterSize) >= valueListSize ) break; start = end;} else { // if (termend < 0) termend = valueListSize; valueString = valueListString.substring(start, termend); // add the value to arrayListvalues.add(valueString);Log.errorln(" TValue:"+valueString); // this is the last value so terminate the while loopif ((termend+termDelimiterSize) >= valueListSize ) break; start = termend;}*/} else { // we didnt hit a delimiter, gather values // find the end of this substring int end = valueListString.indexOf(delimitChar0, start); int termend = 0; if(terminatingDelimiter != null)termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);// Log.error("end:"+end+" termend:"+termend); String valueString; if(termend == 0 || end < termend) {// can happen if no terminating delimiterif (end < 0) end = valueListSize;// derive our value from stringvalueString = valueListString.substring(start, end);// add the value to arrayList values.add(valueString);// Log.errorln(" DValue:"+valueString);// this is the last value so terminate the while loop if ((end+delimiterSize) >= valueListSize ) break;start = end; } else {// if (termend < 0) termend = valueListSize;valueString = valueListString.substring(start, termend);// add the value to arrayList values.add(valueString);// Log.errorln(" TValue:"+valueString);// this is the last value so terminate the while loop if ((termend+termDelimiterSize) >= valueListSize ) break;start = termend; }} } return values;}
3,535
public void iterateRoot(FSDirectory root) { try { Iterator<FSEntry> rootIterator; rootIterator = root.iterator(); while(rootIterator.hasNext()) { FSEntry entry=rootIterator.next(); System.out.println(entry.getName()); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
public void iterateRoot(FSDirectory root) { try { Iterator<FSEntry> rootIterator; rootIterator = root.iterator(); while(rootIterator.hasNext()) { FSEntry entry=rootIterator.next(); System.out.println(entry.getName()); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
3,536
public String[] list(File directory, FilenameFilter filter) throws IOException { final FSEntry entry = NTFSfs.getRootEntry(); if (entry == null) { throw new FileNotFoundException(directory.getAbsolutePath()); } if (!entry.isDirectory()) { throw new IOException("Cannot list on non-directories " + directory); } final ArrayList<String> list = new ArrayList<String>(); for (Iterator<FSEntry> i = entry.getDirectory().iterator(); i.hasNext();) { final FSEntry child = i.next(); final String name = child.getName(); if ((filter == null) || (filter.accept(directory, name))) { list.add(name); } if(child.isDirectory()) child.getDirectory(); else child.getFile(); if(child.isFile()) System.out.println( "Name = \"" + name + "\" , Size = " + child.getFile().getLength() + ", IsDirectory = " + child.isDirectory()); else System.out.println( "Name = \"" + name + "\" , IsDirectory = " + child.isDirectory()); } return (String[])list.toArray(new String[list.size()]); }
public String[] list(File directory, FilenameFilter filter) throws IOException { final FSEntry entry = NTFSfs.getRootEntry(); if (entry == null) { throw new FileNotFoundException(directory.getAbsolutePath()); } if (!entry.isDirectory()) { throw new IOException("Cannot list on non-directories " + directory); } final ArrayList<String> list = new ArrayList<String>(); for (Iterator<FSEntry> i = entry.getDirectory().iterator(); i.hasNext();) { final FSEntry child = i.next(); final String name = child.getName(); if ((filter == null) || (filter.accept(directory, name))) { list.add(name); } if(child.isDirectory()) child.getDirectory(); else child.getFile(); if(child.isFile()) System.out.println( "Name = \"" + name + "\" , Size = " + child.getFile().getLength() + ", IsDirectory = " + child.isDirectory()); else System.out.println( "Name = \"" + name + "\" , IsDirectory = " + child.isDirectory()); } return (String[])list.toArray(new String[list.size()]); }
3,537
public void canceled(WizardEvent e) {// System.out.println("It is canceled!"); if (workingThread != null) { workingThread.interrupt(); workingThread = null; } this.hide(); this.dispose(); }
public void canceled(WizardEvent e) {// System.out.println("It is canceled!"); if (workingThread != null) { workingThread.interrupt(); workingThread = null; } this.setVisible(false); this.dispose(); }
3,538
public void add(int pc, int offset) { addressTable.add(pc, offset); }
public void add(int pc, int offset) { addressTable.add(pc, offset); }
3,539
public VmAddressMap() { }
public VmAddressMap() { }
3,540
public void add(int pc, int offset) { if (table != null) { throw new RuntimeException("Address table is locked"); } final AddressPcEntry entry = new AddressPcEntry(pc, offset); if (list == null) { list = entry; } else { AddressPcEntry p = list; while (p.next != null) { p = p.next; } p.next = entry; } }
public void add(int pc, int offset) { if (table != null) { throw new RuntimeException("Address table is locked"); } final AddressPcEntry entry = new AddressPcEntry(pc, offset); if (list == null) { list = entry; } else { AddressPcEntry p = list; while (p.next != null) { p = p.next; } p.next = entry; } }
3,541
public MediaSizeName getMediaSizeName() { return media; }
public MediaSizeName getMediaSizeName() { return mediaName; }
3,542
public boolean isConnected() { return vt.isConnected();// return connected; }
publicbooleanisConnected(){returnvt.isConnected();//returnconnected;}
3,543
private String getConnectSession () { Connect sc = new Connect(frame,LangTool.getString("ss.title"),sessions); // load the new session information from the session property file loadSessions(); return sc.getConnectKey(); }
private String getConnectSession () { Connect sc = new Connect(frame1,LangTool.getString("ss.title"),sessions); // load the new session information from the session property file loadSessions(); return sc.getConnectKey(); }
3,544
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
3,545
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
3,546
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame1.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame1.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
3,547
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
3,548
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame.setVisible(true); } } if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame.addSessionView(session,s); s.connect(); }
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame.setVisible(true); } } if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame.addSessionView(session,s); s.connect(); }
3,549
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame.setVisible(true); } } if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame.addSessionView(session,s); s.connect(); }
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame1.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame1.setVisible(true); } } if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame.addSessionView(session,s); s.connect(); }
3,550
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame.setVisible(true); } } if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame.addSessionView(session,s); s.connect(); }
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame.setVisible(true); } } if (isSpecified("-t",args)) frame1.addSessionView(sel,s); else frame.addSessionView(session,s); s.connect(); }
3,551
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame.setVisible(true); } } if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame.addSessionView(session,s); s.connect(); }
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame.setVisible(true); } } if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame1.addSessionView(session,s); s.connect(); }
3,552
void newView() { int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame = new Gui5250Frame(this, frames.size()); frame.setSize(width,height); frame.centerFrame(); frame.setIconImage(tnicon.getImage()); frame.setIcons(focused,unfocused); frames.add(frame); }
void newView() { int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame = new Gui5250Frame(this, frames.size()); frame.setSize(width,height); frame.centerFrame(); frame.setIconImage(tnicon.getImage()); frame.setIcons(focused,unfocused); frames.add(frame); }
3,553
void newView() { int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame = new Gui5250Frame(this, frames.size()); frame.setSize(width,height); frame.centerFrame(); frame.setIconImage(tnicon.getImage()); frame.setIcons(focused,unfocused); frames.add(frame); }
void newView() { int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame = new Gui5250Frame(this, frames.size()); frame.setSize(width,height); frame.centerFrame(); frame.setIconImage(tnicon.getImage()); frame.setIcons(focused,unfocused); frames.add(frame1); }
3,554
public void closeSession(Session sessionObject) { sessionObject.closeDown(); sessions.removeSession((Session)sessionObject); }
public void closeSession(String sessionName) { sessionObject.closeDown(); sessions.removeSession((Session)sessionObject); }
3,555
public void closeSession(Session sessionObject) { sessionObject.closeDown(); sessions.removeSession((Session)sessionObject); }
public void closeSession(Session sessionObject) { sessionObject.closeDown(); sessions.removeSession((Session)sessionObject); }
3,556
public TypeCode _type() { return t_object; }
public TypeCode _type() { return ObjectHelper.type(); }
3,557
public void closeDown() { if (defaultProps.containsKey("saveme")) { defaultProps.remove("saveme"); Object[] args = {propFileName}; String message = MessageFormat.format( LangTool.getString("messages.saveSettings"), args); int result = JOptionPane.showConfirmDialog(this,message); if (result == JOptionPane.OK_OPTION) { try { FileOutputStream out = new FileOutputStream(propFileName); // save off the width and height to be restored later defaultProps.store(out,"------ Defaults --------"); } catch (FileNotFoundException fnfe) {} catch (IOException ioe) {} } } vt.disconnect(); }
public void closeDown() { if (defaultProps.containsKey("saveme")) { defaultProps.remove("saveme"); Object[] args = {propFileName}; String message = MessageFormat.format( LangTool.getString("messages.saveSettings"), args); int result = JOptionPane.showConfirmDialog(getParent(),message); if (result == JOptionPane.OK_OPTION) { try { FileOutputStream out = new FileOutputStream(propFileName); // save off the width and height to be restored later defaultProps.store(out,"------ Defaults --------"); } catch (FileNotFoundException fnfe) {} catch (IOException ioe) {} } } vt.disconnect(); }
3,559
private void closeSession() { Object[] message = new Object[1]; message[0] = LangTool.getString("cs.message"); String[] options = {LangTool.getString("cs.optThis"), LangTool.getString("cs.optAll"), LangTool.getString("cs.optCancel")}; int result = JOptionPane.showOptionDialog( me.frame, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("cs.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); if (result == 0) { closeMe(); } if (result == 1) { me.closingDown(); } }
private void closeSession() { Object[] message = new Object[1]; message[0] = LangTool.getString("cs.message"); String[] options = {LangTool.getString("cs.optThis"), LangTool.getString("cs.optAll"), LangTool.getString("cs.optCancel")}; int result = JOptionPane.showOptionDialog( this.getParent(), // the parent that the dialog blocks message, // the dialog message array LangTool.getString("cs.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); if (result == 0) { closeMe(); } if (result == 1) { me.closingDown(); } }
3,560
private void closeSession() { Object[] message = new Object[1]; message[0] = LangTool.getString("cs.message"); String[] options = {LangTool.getString("cs.optThis"), LangTool.getString("cs.optAll"), LangTool.getString("cs.optCancel")}; int result = JOptionPane.showOptionDialog( me.frame, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("cs.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); if (result == 0) { closeMe(); } if (result == 1) { me.closingDown(); } }
private void closeSession() { Object[] message = new Object[1]; message[0] = LangTool.getString("cs.message"); String[] options = {LangTool.getString("cs.optThis"), LangTool.getString("cs.optAll"), LangTool.getString("cs.optCancel")}; int result = JOptionPane.showOptionDialog( me.frame, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("cs.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); if (result == 0) { closeMe(); } if (result == 1) { me.closingDown((Session)this); } }
3,561
private void doAttributes() { SessionAttributes sa = new SessionAttributes(propFileName, defaultProps, me.frame); sa.addPropertyChangeListener(screen); sa.addPropertyChangeListener(this); sa.showIt(); defaultProps = sa.getProperties(); sa.removePropertyChangeListener(screen); sa.removePropertyChangeListener(this); getFocusForMe(); sa = null; }
private void doAttributes() { SessionAttributes sa = new SessionAttributes(propFileName, defaultProps, (Frame)me.frame); sa.addPropertyChangeListener(screen); sa.addPropertyChangeListener(this); sa.showIt(); defaultProps = sa.getProperties(); sa.removePropertyChangeListener(screen); sa.removePropertyChangeListener(this); getFocusForMe(); sa = null; }
3,562
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false); setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(true); loadProps(); screen = new Screen5250(this,defaultProps); this.addComponentListener(this); if (!defaultProps.containsKey("width") || !defaultProps.containsKey("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(Integer.parseInt((String)defaultProps.get("width")), Integer.parseInt((String)defaultProps.get("height")) ); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); addKeyListener(new KeyAdapter() { public void keyTyped(KeyEvent e) { processVTKeyTyped(e); } public void keyPressed(KeyEvent ke) { processVTKeyPressed(ke); } public void keyReleased(KeyEvent e) { processVTKeyReleased(e); } }); keyMap = new KeyMapper(); keyMap.init(); /** * this is taken out right now look at the method for description */// initKeyBindings(); macros = new Macronizer(); macros.init(); keyPad.addActionListener(this); if (getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); }
jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); privatejumpEvent = new SessionJumpEvent(this); voidjumpEvent = new SessionJumpEvent(this); jbInit()jumpEvent = new SessionJumpEvent(this); throwsjumpEvent = new SessionJumpEvent(this); ExceptionjumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); {jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); this.setLayout(borderLayout1);//jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); this.setOpaque(false);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); setDoubleBuffered(true);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); s.setOpaque(false);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); s.setDoubleBuffered(true);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); loadProps();jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); screenjumpEvent = new SessionJumpEvent(this); =jumpEvent = new SessionJumpEvent(this); newjumpEvent = new SessionJumpEvent(this); Screen5250(this,defaultProps);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); this.addComponentListener(this);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); ifjumpEvent = new SessionJumpEvent(this); (!defaultProps.containsKey("width")jumpEvent = new SessionJumpEvent(this); ||jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); !defaultProps.containsKey("height"))jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); //jumpEvent = new SessionJumpEvent(this); setjumpEvent = new SessionJumpEvent(this); thejumpEvent = new SessionJumpEvent(this); initializejumpEvent = new SessionJumpEvent(this); sizejumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); this.setSize(screen.getPreferredSize());jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); elsejumpEvent = new SessionJumpEvent(this); {jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); this.setSize(Integer.parseInt((String)defaultProps.get("width")),jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); Integer.parseInt((String)defaultProps.get("height"))jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); );jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); }jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); addMouseListener(newjumpEvent = new SessionJumpEvent(this); MouseAdapter()jumpEvent = new SessionJumpEvent(this); {jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); publicjumpEvent = new SessionJumpEvent(this); voidjumpEvent = new SessionJumpEvent(this); mousePressed(MouseEventjumpEvent = new SessionJumpEvent(this); e)jumpEvent = new SessionJumpEvent(this); {jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); /**jumpEvent = new SessionJumpEvent(this); @todojumpEvent = new SessionJumpEvent(this); checkjumpEvent = new SessionJumpEvent(this); forjumpEvent = new SessionJumpEvent(this); popupjumpEvent = new SessionJumpEvent(this); triggerjumpEvent = new SessionJumpEvent(this); onjumpEvent = new SessionJumpEvent(this); linuxjumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); *jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); *///jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); ifjumpEvent = new SessionJumpEvent(this); (e.isPopupTrigger())jumpEvent = new SessionJumpEvent(this); {jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); //jumpEvent = new SessionJumpEvent(this); usingjumpEvent = new SessionJumpEvent(this); SwingUtilitiesjumpEvent = new SessionJumpEvent(this); becausejumpEvent = new SessionJumpEvent(this); popuptriggerjumpEvent = new SessionJumpEvent(this); doesjumpEvent = new SessionJumpEvent(this); notjumpEvent = new SessionJumpEvent(this); workjumpEvent = new SessionJumpEvent(this); onjumpEvent = new SessionJumpEvent(this); linuxjumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); ifjumpEvent = new SessionJumpEvent(this); (SwingUtilities.isRightMouseButton(e))jumpEvent = new SessionJumpEvent(this); {jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); doPopup(e);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); }jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); }jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); publicjumpEvent = new SessionJumpEvent(this); voidjumpEvent = new SessionJumpEvent(this); mouseReleased(MouseEventjumpEvent = new SessionJumpEvent(this); e)jumpEvent = new SessionJumpEvent(this); {//jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); System.out.println("MousejumpEvent = new SessionJumpEvent(this); Released");jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); }jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); publicjumpEvent = new SessionJumpEvent(this); voidjumpEvent = new SessionJumpEvent(this); mouseClicked(MouseEventjumpEvent = new SessionJumpEvent(this); e)jumpEvent = new SessionJumpEvent(this); {jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); ifjumpEvent = new SessionJumpEvent(this); (e.getClickCount()jumpEvent = new SessionJumpEvent(this); ==jumpEvent = new SessionJumpEvent(this); 2)jumpEvent = new SessionJumpEvent(this); {jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); screen.sendKeys("[enter]");jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); }jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); elsejumpEvent = new SessionJumpEvent(this); {jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); screen.moveCursor(e);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); repaint();jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); getFocusForMe();jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); }jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); }jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); });jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); addKeyListener(newjumpEvent = new SessionJumpEvent(this); KeyAdapter()jumpEvent = new SessionJumpEvent(this); {jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); publicjumpEvent = new SessionJumpEvent(this); voidjumpEvent = new SessionJumpEvent(this); keyTyped(KeyEventjumpEvent = new SessionJumpEvent(this); e)jumpEvent = new SessionJumpEvent(this); {jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); processVTKeyTyped(e);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); }jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); publicjumpEvent = new SessionJumpEvent(this); voidjumpEvent = new SessionJumpEvent(this); keyPressed(KeyEventjumpEvent = new SessionJumpEvent(this); ke)jumpEvent = new SessionJumpEvent(this); {jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); processVTKeyPressed(ke);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); }jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); publicjumpEvent = new SessionJumpEvent(this); voidjumpEvent = new SessionJumpEvent(this); keyReleased(KeyEventjumpEvent = new SessionJumpEvent(this); e)jumpEvent = new SessionJumpEvent(this); {jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); processVTKeyReleased(e);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); }jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); });jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); keyMapjumpEvent = new SessionJumpEvent(this); =jumpEvent = new SessionJumpEvent(this); newjumpEvent = new SessionJumpEvent(this); KeyMapper();jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); keyMap.init();jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); /**jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); *jumpEvent = new SessionJumpEvent(this); thisjumpEvent = new SessionJumpEvent(this); isjumpEvent = new SessionJumpEvent(this); takenjumpEvent = new SessionJumpEvent(this); outjumpEvent = new SessionJumpEvent(this); rightjumpEvent = new SessionJumpEvent(this); nowjumpEvent = new SessionJumpEvent(this); lookjumpEvent = new SessionJumpEvent(this); atjumpEvent = new SessionJumpEvent(this); thejumpEvent = new SessionJumpEvent(this); methodjumpEvent = new SessionJumpEvent(this); forjumpEvent = new SessionJumpEvent(this); descriptionjumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); *///jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); initKeyBindings();jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); macrosjumpEvent = new SessionJumpEvent(this); =jumpEvent = new SessionJumpEvent(this); newjumpEvent = new SessionJumpEvent(this); Macronizer();jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); macros.init();jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); keyPad.addActionListener(this);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); ifjumpEvent = new SessionJumpEvent(this); (getStringProperty("keypad").equals("Yes"))jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); keyPad.setVisible(true);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); elsejumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); keyPad.setVisible(false);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); //jumpEvent = new SessionJumpEvent(this); WarningjumpEvent = new SessionJumpEvent(this); dojumpEvent = new SessionJumpEvent(this); notjumpEvent = new SessionJumpEvent(this); changejumpEvent = new SessionJumpEvent(this); thejumpEvent = new SessionJumpEvent(this); thejumpEvent = new SessionJumpEvent(this); orderjumpEvent = new SessionJumpEvent(this); ofjumpEvent = new SessionJumpEvent(this); thejumpEvent = new SessionJumpEvent(this); addingjumpEvent = new SessionJumpEvent(this); ofjumpEvent = new SessionJumpEvent(this); keypadjumpEvent = new SessionJumpEvent(this); andjumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); //jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); thejumpEvent = new SessionJumpEvent(this); screen.jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); ThisjumpEvent = new SessionJumpEvent(this); willjumpEvent = new SessionJumpEvent(this); causejumpEvent = new SessionJumpEvent(this); resizingjumpEvent = new SessionJumpEvent(this); problemsjumpEvent = new SessionJumpEvent(this); becausejumpEvent = new SessionJumpEvent(this); itjumpEvent = new SessionJumpEvent(this); willjumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); //jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); resizejumpEvent = new SessionJumpEvent(this); thejumpEvent = new SessionJumpEvent(this); screenjumpEvent = new SessionJumpEvent(this); firstjumpEvent = new SessionJumpEvent(this); andjumpEvent = new SessionJumpEvent(this); duringjumpEvent = new SessionJumpEvent(this); thejumpEvent = new SessionJumpEvent(this); resizejumpEvent = new SessionJumpEvent(this); wejumpEvent = new SessionJumpEvent(this); needjumpEvent = new SessionJumpEvent(this); tojumpEvent = new SessionJumpEvent(this); calculatejumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); //jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); thejumpEvent = new SessionJumpEvent(this); boudingjumpEvent = new SessionJumpEvent(this); areajumpEvent = new SessionJumpEvent(this); basedjumpEvent = new SessionJumpEvent(this); onjumpEvent = new SessionJumpEvent(this); thejumpEvent = new SessionJumpEvent(this); heightjumpEvent = new SessionJumpEvent(this); ofjumpEvent = new SessionJumpEvent(this); thejumpEvent = new SessionJumpEvent(this); keyPad.jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); //jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); SeejumpEvent = new SessionJumpEvent(this); resizeMe()jumpEvent = new SessionJumpEvent(this); andjumpEvent = new SessionJumpEvent(this); getDrawingBounds()jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); this.add(keyPad,BorderLayout.SOUTH);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); this.add(s,BorderLayout.CENTER);jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); setRubberBand(newjumpEvent = new SessionJumpEvent(this); TNRubberBand(this));jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); this.requestFocus();jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); jumpEvent = new SessionJumpEvent(this); }
3,563
protected void nextSession() { me.nextSession(); }
protected void nextSession() { fireSessionJump(JUMP_NEXT); }
3,564
protected void prevSession() { me.prevSession(); }
protected void prevSession() { fireSessionJump(JUMP_PREVIOUS); }
3,565
private void sendScreenEMail() { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JTextField tot = new JTextField(30); JLabel subl = new JLabel(LangTool.getString("em.subject")); JTextField subt = new JTextField(30); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); JTextField fnt = new JTextField("tn5250j.txt",30); semp.add(tol); semp.add(tot); semp.add(subl); semp.add(subt); semp.add(fnl); semp.add(fnt); Object[] message = new Object[1]; message[0] = semp; String[] options = {LangTool.getString("em.optSendLabel"), LangTool.getString("em.optCancelLabel"), LangTool.getString("em.optConfigureLabel")}; int result = 0; result = JOptionPane.showOptionDialog( me.frame, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo(tot.getText()); sem.setSubject(subt.getText()); if (fnt.getText().length() > 0) sem.setFileName(fnt.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setMessage(sb.toString()); try { sem.send(); } catch (IOException ioe) { System.out.println(ioe.getMessage()); } sem.release(); sem = null; System.out.println("Message sent"); break; case 1: // Cancel // System.out.println("Cancel"); break; default: break; } }
private void sendScreenEMail() { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JTextField tot = new JTextField(30); JLabel subl = new JLabel(LangTool.getString("em.subject")); JTextField subt = new JTextField(30); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); JTextField fnt = new JTextField("tn5250j.txt",30); semp.add(tol); semp.add(tot); semp.add(subl); semp.add(subt); semp.add(fnl); semp.add(fnt); Object[] message = new Object[1]; message[0] = semp; String[] options = {LangTool.getString("em.optSendLabel"), LangTool.getString("em.optCancelLabel"), LangTool.getString("em.optConfigureLabel")}; int result = 0; result = JOptionPane.showOptionDialog( this.getParent(), // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo(tot.getText()); sem.setSubject(subt.getText()); if (fnt.getText().length() > 0) sem.setFileName(fnt.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setMessage(sb.toString()); try { sem.send(); } catch (IOException ioe) { System.out.println(ioe.getMessage()); } sem.release(); sem = null; System.out.println("Message sent"); break; case 1: // Cancel // System.out.println("Cancel"); break; default: break; } }
3,566
private void showHexMap() { JPanel srp = new JPanel(); srp.setLayout(new BorderLayout()); DefaultListModel listModel = new DefaultListModel(); StringBuffer sb = new StringBuffer(); // we will use a collator here so that we can take advantage of the locales Collator collator = Collator.getInstance(); CollationKey key = null; Set set = new TreeSet(); for (int x =0;x < 256; x++) { char c = vt.ebcdic2uni(x); char ac = vt.getASCIIChar(x); if (!Character.isISOControl(ac)) { sb.setLength(0); if (Integer.toHexString(ac).length() == 1){ sb.append("0x0" + Integer.toHexString(ac).toUpperCase()); } else { sb.append("0x" + Integer.toHexString(ac).toUpperCase()); } sb.append(" - " + c); key = collator.getCollationKey(sb.toString()); set.add(key); } } Iterator iterator = set.iterator(); while (iterator.hasNext()) { CollationKey keyc = (CollationKey)iterator.next(); listModel.addElement(keyc.getSourceString()); } //Create the list and put it in a scroll pane JList hm = new JList(listModel); hm.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); hm.setSelectedIndex(0); JScrollPane listScrollPane = new JScrollPane(hm); listScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); listScrollPane.setSize(40,100); srp.add(listScrollPane,BorderLayout.CENTER); Object[] message = new Object[1]; message[0] = srp; String[] options = {LangTool.getString("hm.optInsert"), LangTool.getString("hm.optCancel")}; int result = 0; result = JOptionPane.showOptionDialog( null, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("hm.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.INFORMATION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Insert character String k = ""; k += ((String)hm.getSelectedValue()).charAt(7); screen.sendKeys(k); break; case 1: // Cancel// System.out.println("Cancel"); break; default: break; } }
private void showHexMap() { JPanel srp = new JPanel(); srp.setLayout(new BorderLayout()); DefaultListModel listModel = new DefaultListModel(); StringBuffer sb = new StringBuffer(); // we will use a collator here so that we can take advantage of the locales Collator collator = Collator.getInstance(); CollationKey key = null; Set set = new TreeSet(); for (int x =0;x < 256; x++) { char c = vt.ebcdic2uni(x); char ac = vt.getASCIIChar(x); if (!Character.isISOControl(ac)) { sb.setLength(0); if (Integer.toHexString(ac).length() == 1){ sb.append("0x0" + Integer.toHexString(ac).toUpperCase()); } else { sb.append("0x" + Integer.toHexString(ac).toUpperCase()); } sb.append(" - " + c); key = collator.getCollationKey(sb.toString()); set.add(key); } } Iterator iterator = set.iterator(); while (iterator.hasNext()) { CollationKey keyc = (CollationKey)iterator.next(); listModel.addElement(keyc.getSourceString()); } //Create the list and put it in a scroll pane JList hm = new JList(listModel); hm.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); hm.setSelectedIndex(0); JScrollPane listScrollPane = new JScrollPane(hm); listScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); listScrollPane.setSize(40,100); srp.add(listScrollPane,BorderLayout.CENTER); Object[] message = new Object[1]; message[0] = srp; String[] options = {LangTool.getString("hm.optInsert"), LangTool.getString("hm.optCancel")}; int result = 0; result = JOptionPane.showOptionDialog( me.frame, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("hm.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.INFORMATION_MESSAGE, // message type me.frame, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Insert character String k = ""; k += ((String)hm.getSelectedValue()).charAt(7); screen.sendKeys(k); break; case 1: // Cancel// System.out.println("Cancel"); break; default: break; } }
3,567
public TN5250jSplashScreen(String image_location) { // get the URL given the image location URL url = getClass().getResource(image_location); if (url == null) { throw new IllegalArgumentException("Image could not be found: " + image_location); } // convert URL to Image icon ImageIcon image = new ImageIcon(url); initialize(image); }
public TN5250jSplashScreen(String image_location) { // get the URL given the image location URL file=null; try { file = My5250.classLoader.getResource(image_location); if (url == null) { throw new IllegalArgumentException("Image could not be found: " + image_location); } // convert URL to Image icon ImageIcon image = new ImageIcon(url); initialize(image); }
3,568
public TN5250jSplashScreen(String image_location) { // get the URL given the image location URL url = getClass().getResource(image_location); if (url == null) { throw new IllegalArgumentException("Image could not be found: " + image_location); } // convert URL to Image icon ImageIcon image = new ImageIcon(url); initialize(image); }
public TN5250jSplashScreen(String image_location) { // get the URL given the image location URL url = getClass().getResource(image_location); if (url == null) { throw new IllegalArgumentException("Image could not be found: " + image_location); } // convert URL to Image icon ImageIcon image = new ImageIcon(url); initialize(image); }
3,569
public TN5250jSplashScreen(String image_location) { // get the URL given the image location URL url = getClass().getResource(image_location); if (url == null) { throw new IllegalArgumentException("Image could not be found: " + image_location); } // convert URL to Image icon ImageIcon image = new ImageIcon(url); initialize(image); }
public TN5250jSplashScreen(String image_location) { // get the URL given the image location URL url = getClass().getResource(image_location); if (url == null) { throw new IllegalArgumentException("Image could not be found: " + image_location); } // convert URL to Image icon catch (Exception e) { System.err.println(e); } ImageIcon image = new ImageIcon(file); initialize(image); }
3,570
public void onConfigChanged(SessionConfigEvent pce) { String pn = pce.getPropertyName(); if (pn.equals("keypad")) { if (((String)pce.getNewValue()).equals("Yes")) { keyPad.setVisible(true); } else { keyPad.setVisible(false); } this.validate(); } if (pn.equals("doubleClick")) { if (((String)pce.getNewValue()).equals("Yes")) { doubleClick = true; } else { doubleClick = false; } } if (pn.equals("mouseWheel")) { if (((String)pce.getNewValue()).equals("Yes")) { scroller.addMouseWheelListener((SessionGUI)this); } else { scroller.removeMouseWheelListener((SessionGUI)this); } }// screen.propertyChange(pce); resizeMe(); repaint(); }
public void onConfigChanged(SessionConfigEvent pce) {String pn = pce.getPropertyName();if (pn.equals("keypad")) { if (((String)pce.getNewValue()).equals("Yes")) {keyPad.setVisible(true); } else {keyPad.setVisible(false); } this.validate();}if (pn.equals("doubleClick")) { if (((String)pce.getNewValue()).equals("Yes")) {doubleClick = true; } else {doubleClick = false; }}if (pn.equals("mouseWheel")) { if (((String)pce.getNewValue()).equals("Yes")) {scroller.addMouseWheelListener((SessionGUI)this); } else {scroller.removeMouseWheelListener((SessionGUI)this); }}//screen.propertyChange(pce);resizeMe();repaint(); }
3,571
protected void paintComponent(Graphics g) { log.debug("paint from screen"); if (bi == null) { checkOffScreenImage(); }// screen.paintComponent3(g); Graphics2D g2 = (Graphics2D) g; //Rectangle r = g.getClipBounds(); g2.setColor(bi.colorBg); g2.fillRect(0, 0, getWidth(), getHeight()); bi.drawImageBuffer(g2); if (rubberband.isAreaSelected() && !rubberband.isDragging()) { rubberband.erase(); rubberband.draw(); } // this was a fix for a keypad drawing problem under JDK1.2/1.3 // but caused problems under Linux/JDK1.4 //keyPad.repaint(); }
protected void paintComponent(Graphics g) { log.debug("paint from screen"); if (bi == null) { checkOffScreenImage(); }// screen.paintComponent3(g); Graphics2D g2 = (Graphics2D) g; //Rectangle r = g.getClipBounds(); g2.setColor(bi.colorBg); g2.fillRect(0, 0, getWidth(), getHeight()); bi.drawImageBuffer(g2); if (rubberband.isAreaSelected() && !rubberband.isDragging()) { rubberband.erase(); rubberband.draw(); } // this was a fix for a keypad drawing problem under JDK1.2/1.3 // but caused problems under Linux/JDK1.4 //keyPad.repaint(); }
3,572
public final void writeTo(SocketBuffer skbuf, int skbufOffset) { skbuf.set(skbufOffset, address, 0, length); }
public final void writeTo(SocketBuffer skbuf, int skbufOffset) { skbuf.set(skbufOffset, address, 0, length); }
3,573
public void insertItemAt(Object element, int index) { if(dataModel instanceof MutableComboBoxModel) { ((MutableComboBoxModel) dataModel).insertElementAt(element, index); } else { throw new RuntimeException("Unable to insert the item because the data model it is not an instance of MutableComboBoxModel."); } }
public void insertItemAt(Object element, int index) { if (dataModel instanceof MutableComboBoxModel) ((MutableComboBoxModel) dataModel).insertElementAt(element, index); } else { throw new RuntimeException("Unable to insert the item because the data model it is not an instance of MutableComboBoxModel."); } }
3,574
public void insertItemAt(Object element, int index) { if(dataModel instanceof MutableComboBoxModel) { ((MutableComboBoxModel) dataModel).insertElementAt(element, index); } else { throw new RuntimeException("Unable to insert the item because the data model it is not an instance of MutableComboBoxModel."); } }
public void insertItemAt(Object element, int index) { if(dataModel instanceof MutableComboBoxModel) { ((MutableComboBoxModel) dataModel).insertElementAt(element, index); } else { throw new RuntimeException("Unable to insert the item because the data model it is not an instance of MutableComboBoxModel."); } }
3,575
public void removeItem(Object element) { if(dataModel instanceof MutableComboBoxModel) { ((MutableComboBoxModel) dataModel).removeElement(element); } else { throw new RuntimeException("Unable to remove the item because the data model it is not an instance of MutableComboBoxModel."); } }
public void removeItem(Object element) { if (dataModel instanceof MutableComboBoxModel) ((MutableComboBoxModel) dataModel).removeElement(element); } else { throw new RuntimeException("Unable to remove the item because the data model it is not an instance of MutableComboBoxModel."); } }
3,576
public void removeItem(Object element) { if(dataModel instanceof MutableComboBoxModel) { ((MutableComboBoxModel) dataModel).removeElement(element); } else { throw new RuntimeException("Unable to remove the item because the data model it is not an instance of MutableComboBoxModel."); } }
public void removeItem(Object element) { if(dataModel instanceof MutableComboBoxModel) { ((MutableComboBoxModel) dataModel).removeElement(element); } else { throw new RuntimeException("Unable to remove the item because the data model it is not an instance of MutableComboBoxModel."); } }
3,577
public void removeItemAt(int index) { if(dataModel instanceof MutableComboBoxModel) { ((MutableComboBoxModel) dataModel).removeElementAt(index); } else { throw new RuntimeException("Unable to remove the item because the data model it is not an instance of MutableComboBoxModel."); } }
public void removeItemAt(int index) { if (dataModel instanceof MutableComboBoxModel) ((MutableComboBoxModel) dataModel).removeElementAt(index); } else { throw new RuntimeException("Unable to remove the item because the data model it is not an instance of MutableComboBoxModel."); } }
3,578
public void removeItemAt(int index) { if(dataModel instanceof MutableComboBoxModel) { ((MutableComboBoxModel) dataModel).removeElementAt(index); } else { throw new RuntimeException("Unable to remove the item because the data model it is not an instance of MutableComboBoxModel."); } }
public void removeItemAt(int index) { if(dataModel instanceof MutableComboBoxModel) { ((MutableComboBoxModel) dataModel).removeElementAt(index); } else { throw new RuntimeException("Unable to remove the item because the data model it is not an instance of MutableComboBoxModel."); } }
3,579
public void setMaximumRowCount(int rowCount) { if (maximumRowCount != rowCount) { int oldMaximumRowCount = maximumRowCount; maximumRowCount = rowCount; firePropertyChange("maximumRowCount", oldMaximumRowCount, maximumRowCount); } }
public void setMaximumRowCount(int rowCount) { if (maximumRowCount != rowCount) { int oldMaximumRowCount = maximumRowCount; maximumRowCount = rowCount; firePropertyChange("maximumRowCount", oldMaximumRowCount, maximumRowCount); } }
3,580
public void setModel(ComboBoxModel newDataModel) { // dataModel is null if it this method is called from inside the constructors. if(dataModel != null) { // Prevents unneccessary updates. if (dataModel == newDataModel) return; // Removes itself (as DataListener) from the to-be-replaced model. dataModel.removeListDataListener(this); } /* Adds itself as a DataListener to the new model. * It is intentioned that this operation will fail with a NullPointerException if the * caller delivered a null argument. */ newDataModel.addListDataListener(this); // Stores old data model for event notification. ComboBoxModel oldDataModel = dataModel; dataModel = newDataModel; // Notifies the listeners of the model change. firePropertyChange("model", oldDataModel, dataModel); }
publicvoidsetModel(ComboBoxModelnewDataModel){//dataModelisnullifitthismethodiscalledfrominsidetheconstructors.if(dataModel!=null){ //Preventsunneccessaryupdates. if(dataModel==newDataModel)return; //Removesitself(asDataListener)fromtheto-be-replacedmodel.dataModel.removeListDataListener(this);}/*AddsitselfasaDataListenertothenewmodel.*ItisintentionedthatthisoperationwillfailwithaNullPointerExceptionifthe*callerdeliveredanullargument.*/newDataModel.addListDataListener(this);//Storesolddatamodelforeventnotification.ComboBoxModeloldDataModel=dataModel;dataModel=newDataModel;//Notifiesthelistenersofthemodelchange.firePropertyChange("model",oldDataModel,dataModel);}
3,581
public void setModel(ComboBoxModel newDataModel) { // dataModel is null if it this method is called from inside the constructors. if(dataModel != null) { // Prevents unneccessary updates. if (dataModel == newDataModel) return; // Removes itself (as DataListener) from the to-be-replaced model. dataModel.removeListDataListener(this); } /* Adds itself as a DataListener to the new model. * It is intentioned that this operation will fail with a NullPointerException if the * caller delivered a null argument. */ newDataModel.addListDataListener(this); // Stores old data model for event notification. ComboBoxModel oldDataModel = dataModel; dataModel = newDataModel; // Notifies the listeners of the model change. firePropertyChange("model", oldDataModel, dataModel); }
public void setModel(ComboBoxModel newDataModel) { // dataModel is null if it this method is called from inside the constructors. if(dataModel != null) { // Prevents unneccessary updates. if (dataModel == newDataModel) return; // Removes itself (as DataListener) from the to-be-replaced model. dataModel.removeListDataListener(this); } /* Adds itself as a DataListener to the new model. * It is intentioned that this operation will fail with a NullPointerException if the * caller delivered a null argument. */ newDataModel.addListDataListener(this); // Stores old data model for event notification. ComboBoxModel oldDataModel = dataModel; dataModel = newDataModel; // Notifies the listeners of the model change. firePropertyChange("model", oldDataModel, dataModel); }
3,582
public Statement(Object target, String methodName, Object[] arguments) { this.target = target; this.methodName = methodName; this.arguments = (arguments != null) ? arguments : new Object[0]; storeTargetName(target); }
public Statement(Object target, String methodName, Object[] arguments) { this.target = target; this.methodName = methodName; this.arguments = (arguments != null) ? arguments : new Object[0]; }
3,583
final Object doExecute() throws Exception { Class klazz = (target instanceof Class) ? (Class) target : target.getClass(); Object args[] = (arguments == null) ? new Object[0] : arguments; Class argTypes[] = new Class[args.length]; for (int i = 0; i < args.length; i++) argTypes[i] = args[i].getClass(); if (target.getClass().isArray()) { // FIXME: invoke may have to be used. For now, cast to Number // and hope for the best. If caller didn't behave, we go boom // and throw the exception. if (methodName.equals("get") && argTypes.length == 1) return Array.get(target, ((Number)args[0]).intValue()); if (methodName.equals("set") && argTypes.length == 2) { Object obj = Array.get(target, ((Number)args[0]).intValue()); Array.set(target, ((Number)args[0]).intValue(), args[1]); return obj; } throw new NoSuchMethodException("No matching method for statement " + toString()); } // If we already cached the method, just use it. if (method != null) return method.invoke(target, args); else if (ctor != null) return ctor.newInstance(args); // Find a matching method to call. JDK seems to go through all // this to find the method to call. // if method name or length don't match, skip // Need to go through each arg // If arg is wrapper - check if method arg is matchable builtin // or same type or super // - check that method arg is same or super if (methodName.equals("new") && target instanceof Class) { Constructor ctors[] = klazz.getConstructors(); for (int i = 0; i < ctors.length; i++) { // Skip methods with wrong number of args. Class ptypes[] = ctors[i].getParameterTypes(); if (ptypes.length != args.length) continue; // Check if method matches if (!compatible(ptypes, argTypes)) continue; // Use method[i] if it is more specific. // FIXME: should this check both directions and throw if // neither is more specific? if (ctor == null) { ctor = ctors[i]; continue; } Class mptypes[] = ctor.getParameterTypes(); if (moreSpecific(ptypes, mptypes)) ctor = ctors[i]; } if (ctor == null) throw new InstantiationException("No matching constructor for statement " + toString()); return ctor.newInstance(args); } Method methods[] = klazz.getMethods(); for (int i = 0; i < methods.length; i++) { // Skip methods with wrong name or number of args. if (!methods[i].getName().equals(methodName)) continue; Class ptypes[] = methods[i].getParameterTypes(); if (ptypes.length != args.length) continue; // Check if method matches if (!compatible(ptypes, argTypes)) continue; // Use method[i] if it is more specific. // FIXME: should this check both directions and throw if // neither is more specific? if (method == null) { method = methods[i]; continue; } Class mptypes[] = method.getParameterTypes(); if (moreSpecific(ptypes, mptypes)) method = methods[i]; } if (method == null) throw new NoSuchMethodException("No matching method for statement " + toString()); return method.invoke(target, args); }
final Object doExecute() throws Exception { Class klazz = (target instanceof Class) ? (Class) target : target.getClass(); Object args[] = (arguments == null) ? new Object[0] : arguments; Class argTypes[] = new Class[args.length]; for (int i = 0; i < args.length; i++) argTypes[i] = (args[i] != null) ? args[i].getClass() : null; if (target.getClass().isArray()) { // FIXME: invoke may have to be used. For now, cast to Number // and hope for the best. If caller didn't behave, we go boom // and throw the exception. if (methodName.equals("get") && argTypes.length == 1) return Array.get(target, ((Number)args[0]).intValue()); if (methodName.equals("set") && argTypes.length == 2) { Object obj = Array.get(target, ((Number)args[0]).intValue()); Array.set(target, ((Number)args[0]).intValue(), args[1]); return obj; } throw new NoSuchMethodException("No matching method for statement " + toString()); } // If we already cached the method, just use it. if (method != null) return method.invoke(target, args); else if (ctor != null) return ctor.newInstance(args); // Find a matching method to call. JDK seems to go through all // this to find the method to call. // if method name or length don't match, skip // Need to go through each arg // If arg is wrapper - check if method arg is matchable builtin // or same type or super // - check that method arg is same or super if (methodName.equals("new") && target instanceof Class) { Constructor ctors[] = klazz.getConstructors(); for (int i = 0; i < ctors.length; i++) { // Skip methods with wrong number of args. Class ptypes[] = ctors[i].getParameterTypes(); if (ptypes.length != args.length) continue; // Check if method matches if (!compatible(ptypes, argTypes)) continue; // Use method[i] if it is more specific. // FIXME: should this check both directions and throw if // neither is more specific? if (ctor == null) { ctor = ctors[i]; continue; } Class mptypes[] = ctor.getParameterTypes(); if (moreSpecific(ptypes, mptypes)) ctor = ctors[i]; } if (ctor == null) throw new InstantiationException("No matching constructor for statement " + toString()); return ctor.newInstance(args); } Method methods[] = klazz.getMethods(); for (int i = 0; i < methods.length; i++) { // Skip methods with wrong name or number of args. if (!methods[i].getName().equals(methodName)) continue; Class ptypes[] = methods[i].getParameterTypes(); if (ptypes.length != args.length) continue; // Check if method matches if (!compatible(ptypes, argTypes)) continue; // Use method[i] if it is more specific. // FIXME: should this check both directions and throw if // neither is more specific? if (method == null) { method = methods[i]; continue; } Class mptypes[] = method.getParameterTypes(); if (moreSpecific(ptypes, mptypes)) method = methods[i]; } if (method == null) throw new NoSuchMethodException("No matching method for statement " + toString()); return method.invoke(target, args); }
3,585
public String toString() { StringBuffer result = new StringBuffer(); Class klass = target.getClass(); result.append( ((WeakHashMap) classMaps.get(klass)).get(target)); result.append("."); result.append(methodName); result.append("("); String sep = ""; for (int i = 0; i < arguments.length; i++) { result.append(sep); result.append(arguments[i].getClass().getName()); sep = ", "; } result.append(")"); return result.toString(); }
public String toString() { StringBuffer result = new StringBuffer(); String targetName = target.getClass().getName(); if ( targetName.startsWith("java")) { targetName = targetName.substring(targetName.lastIndexOf('.') + 1); } result.append( ((WeakHashMap) classMaps.get(klass)).get(target)); result.append("."); result.append(methodName); result.append("("); String sep = ""; for (int i = 0; i < arguments.length; i++) { result.append(sep); result.append(arguments[i].getClass().getName()); sep = ", "; } result.append(")"); return result.toString(); }
3,587
public String toString() { StringBuffer result = new StringBuffer(); Class klass = target.getClass(); result.append( ((WeakHashMap) classMaps.get(klass)).get(target)); result.append("."); result.append(methodName); result.append("("); String sep = ""; for (int i = 0; i < arguments.length; i++) { result.append(sep); result.append(arguments[i].getClass().getName()); sep = ", "; } result.append(")"); return result.toString(); }
public String toString() { StringBuffer result = new StringBuffer(); Class klass = target.getClass(); result.append(targetName); result.append("."); result.append(methodName); result.append("("); String sep = ""; for (int i = 0; i < arguments.length; i++) { result.append(sep); result.append(arguments[i].getClass().getName()); sep = ", "; } result.append(")"); return result.toString(); }
3,588
public String toString() { StringBuffer result = new StringBuffer(); Class klass = target.getClass(); result.append( ((WeakHashMap) classMaps.get(klass)).get(target)); result.append("."); result.append(methodName); result.append("("); String sep = ""; for (int i = 0; i < arguments.length; i++) { result.append(sep); result.append(arguments[i].getClass().getName()); sep = ", "; } result.append(")"); return result.toString(); }
public String toString() { StringBuffer result = new StringBuffer(); Class klass = target.getClass(); result.append( ((WeakHashMap) classMaps.get(klass)).get(target)); result.append("."); result.append(methodName); result.append("("); String sep = ""; for (int i = 0; i < arguments.length; i++) { result.append(sep); result.append(arguments[i].getClass().getName()); sep = ", "; } result.append(")"); return result.toString(); }
3,589
protected void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else if (irnd != null) { try { irnd.nextBytes(buffer, 0, buffer.length); } catch (LimitReachedException lre) { irnd = null; new SecureRandom ().nextBytes(buffer); } } else { new SecureRandom ().nextBytes(buffer); } }
protected void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else if (irnd != null) { try { irnd.nextBytes(buffer, 0, buffer.length); } catch (LimitReachedException lre) { irnd = null; getDefaultPRNG().nextBytes(buffer); } } else { getDefaultPRNG().nextBytes(buffer); } }
3,591
protected void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else if (irnd != null) { try { irnd.nextBytes(buffer, 0, buffer.length); } catch (LimitReachedException lre) { irnd = null; new SecureRandom ().nextBytes(buffer); } } else { new SecureRandom ().nextBytes(buffer); } }
protected void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else if (irnd != null) { try { irnd.nextBytes(buffer, 0, buffer.length); } catch (LimitReachedException lre) { irnd = null; new SecureRandom ().nextBytes(buffer); } } else { new SecureRandom ().nextBytes(buffer); } }
3,592
protected void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else if (irnd != null) { try { irnd.nextBytes(buffer, 0, buffer.length); } catch (LimitReachedException lre) { irnd = null; new SecureRandom ().nextBytes(buffer); } } else { new SecureRandom ().nextBytes(buffer); } }
protected void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); else if (irnd != null) { try { irnd.nextBytes(buffer, 0, buffer.length); catch (LimitReachedException lre) { irnd = null; new SecureRandom ().nextBytes(buffer); else { new SecureRandom ().nextBytes(buffer); }
3,593
public void extensionRemoved(ExtensionPoint point, Extension extension) { final ConfigurationElement[] elements = extension.getConfigurationElements(); for (int j = 0; j < elements.length; j++) { final String className = elements[j].getAttribute("class"); log.debug("Removed provider: class=" + className); if (className != null) { providers.remove(className); } } }
public void extensionRemoved(ExtensionPoint point, Extension extension) { final ConfigurationElement[] elements = extension.getConfigurationElements(); for (int j = 0; j < elements.length; j++) { final String className = elements[j].getAttribute("class"); log.debug("Removed provider: class=" + className); if (className != null) { FontProvider prv = providers.remove(className); if(firstProvider == prv) { firstProvider = null; } } } }
3,594
public void setDisabledIcon(Icon newIcon) { if (disabledIcon != newIcon) { Icon oldIcon = disabledIcon; disabledIcon = newIcon; firePropertyChange(DISABLED_ICON_CHANGED_PROPERTY, oldIcon, newIcon); } }
public void setDisabledIcon(Icon newIcon) { if (disabledIcon != newIcon) { Icon oldIcon = disabledIcon; disabledIcon = newIcon; firePropertyChange("disabledIcon", oldIcon, newIcon); } }
3,596
public void setDisplayedMnemonic(int mnemonic) { if (displayedMnemonic != mnemonic) { firePropertyChange(DISPLAYED_MNEMONIC_CHANGED_PROPERTY, displayedMnemonic, mnemonic); displayedMnemonic = mnemonic; if (text != null) setDisplayedMnemonicIndex(text.toUpperCase().indexOf(mnemonic)); } }
public void setDisplayedMnemonic(int mnemonic) { if (displayedMnemonic != mnemonic) { firePropertyChange(DISPLAYED_MNEMONIC_CHANGED_PROPERTY, displayedMnemonic, mnemonic); displayedMnemonic = mnemonic; if (text != null) setDisplayedMnemonicIndex(text.toUpperCase().indexOf(mnemonic)); } }
3,597
public void setDisplayedMnemonicIndex(int newIndex) throws IllegalArgumentException { if (newIndex < -1 || (text != null && newIndex >= text.length())) throw new IllegalArgumentException(); if (newIndex == -1 || text == null || text.charAt(newIndex) != displayedMnemonic) newIndex = -1; if (newIndex != displayedMnemonicIndex) { int oldIndex = displayedMnemonicIndex; displayedMnemonicIndex = newIndex; firePropertyChange(DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY, oldIndex, newIndex); } }
public void setDisplayedMnemonicIndex(int newIndex) throws IllegalArgumentException { if (newIndex < -1 || (text != null && newIndex >= text.length())) throw new IllegalArgumentException(); if (newIndex == -1 || text == null || text.charAt(newIndex) != displayedMnemonic) newIndex = -1; if (newIndex != displayedMnemonicIndex) { int oldIndex = displayedMnemonicIndex; displayedMnemonicIndex = newIndex; firePropertyChange(DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY, oldIndex, newIndex); } }
3,598
public void setHorizontalAlignment(int alignment) { if (horizontalAlignment == alignment) return; int oldAlignment = horizontalAlignment; horizontalAlignment = checkHorizontalKey(alignment, "horizontalAlignment"); firePropertyChange(HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, oldAlignment, horizontalAlignment); }
public void setHorizontalAlignment(int alignment) { if (horizontalAlignment == alignment) return; int oldAlignment = horizontalAlignment; horizontalAlignment = checkHorizontalKey(alignment, "horizontalAlignment"); firePropertyChange("horizontalAlignment", oldAlignment, horizontalAlignment); }
3,599
public void setHorizontalTextPosition(int textPosition) { if (textPosition != horizontalTextPosition) { int oldPos = horizontalTextPosition; horizontalTextPosition = checkHorizontalKey(textPosition, "horizontalTextPosition"); firePropertyChange(HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, oldPos, horizontalTextPosition); } }
public void setHorizontalTextPosition(int textPosition) { if (textPosition != horizontalTextPosition) { int oldPos = horizontalTextPosition; horizontalTextPosition = checkHorizontalKey(textPosition, "horizontalTextPosition"); firePropertyChange(HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, oldPos, horizontalTextPosition); } }
3,600
public void setIcon(Icon newIcon) { if (icon != newIcon) { Icon oldIcon = icon; icon = newIcon; firePropertyChange(ICON_CHANGED_PROPERTY, oldIcon, newIcon); } }
public void setIcon(Icon newIcon) { if (icon != newIcon) { Icon oldIcon = icon; icon = newIcon; firePropertyChange("icon", oldIcon, newIcon); } }
3,601
public void setIconTextGap(int newGap) { if (iconTextGap != newGap) { firePropertyChange(ICON_TEXT_GAP_CHANGED_PROPERTY, iconTextGap, newGap); iconTextGap = newGap; } }
public void setIconTextGap(int newGap) { if (iconTextGap != newGap) { firePropertyChange(ICON_TEXT_GAP_CHANGED_PROPERTY, iconTextGap, newGap); iconTextGap = newGap; } }
3,602
public void setLabelFor(Component c) { if (c != labelFor) { firePropertyChange(LABEL_FOR_CHANGED_PROPERTY, labelFor, c); labelFor = c; } }
public void setLabelFor(Component c) { if (c != labelFor) { firePropertyChange(LABEL_FOR_CHANGED_PROPERTY, labelFor, c); labelFor = c; } }
3,603
public void setText(String newText) { if (text != newText) { String oldText = text; text = newText; firePropertyChange(TEXT_CHANGED_PROPERTY, oldText, newText); if (text != null && text.length() <= displayedMnemonicIndex) setDisplayedMnemonicIndex(text.length() - 1); } }
public void setText(String newText) { if (text != newText) { String oldText = text; text = newText; firePropertyChange(TEXT_CHANGED_PROPERTY, oldText, newText); if (text != null && text.length() <= displayedMnemonicIndex) setDisplayedMnemonicIndex(text.length() - 1); } }
3,605