bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
public UID() { synchronized (lock) { if (nextCount == Short.MAX_VALUE) { long newtime; for (;;) { newtime = System.currentTimeMillis(); if (newtime - baseTime > 1000) { break; } try { Thread.sleep(1000); } catch (InterruptedException _) { } } baseTime = newtime; nextCount = Short.MIN_VALUE; } count = nextCount++; unique = uniqueNr; time = baseTime; }}
public UID() { synchronized (lock) { if (nextCount == Short.MAX_VALUE) { long newtime; for (;;) { newtime = System.currentTimeMillis(); if (newtime - baseTime > 1000) { break; } try { Thread.sleep(1000); } catch (InterruptedException _) { } } baseTime = newtime; nextCount = Short.MIN_VALUE; } count = nextCount++; unique = uniqueNr; time = baseTime; }}
432
public UID() { synchronized (lock) { if (nextCount == Short.MAX_VALUE) { long newtime; for (;;) { newtime = System.currentTimeMillis(); if (newtime - baseTime > 1000) { break; } try { Thread.sleep(1000); } catch (InterruptedException _) { } } baseTime = newtime; nextCount = Short.MIN_VALUE; } count = nextCount++; unique = uniqueNr; time = baseTime; }}
public UID() { synchronized (lock) { if (nextCount == Short.MAX_VALUE) { long newtime; for (;;) { newtime = System.currentTimeMillis(); if (newtime - baseTime > 1000) { break; try { Thread.sleep(1000); catch (InterruptedException _) { baseTime = newtime; nextCount = Short.MIN_VALUE; count = nextCount++; unique = uniqueNr; time = baseTime;
433
public Array addArray(Array array) { if (array == null) { Log.warn("in Structure.addArray(), Array passed in is null"); return null; } getArrayList().add(array); return array; }
public Array addArray(Array array) { if (array == null) { Log.warn("in Structure.addArray(), Array passed in is null"); return null; } getArrayList().add(array); return array; }
434
public Note addNote(Note n) { if (n == null) { Log.warn("in Structure.addNote(), the Note passed in is null"); return null; } getNoteList().add(n); return n; }
public Note addNote(Note n) { if (n == null) { Log.warn("in Structure.addNote(), the Note passed in is null"); return null; } getNoteList().add(n); return n; }
435
public ParameterGroup addParamGroup (ParameterGroup group) { if (group !=null) { //add the group to the groupOwnedHash paramGroupOwnedHash.add(group); return group; } else { Log.warn("in Structure.addParamGroup(). ParameterGroup passed in is null"); return null; } }
public ParameterGroup addParamGroup (ParameterGroup group) { if (group !=null) { //add the group to the groupOwnedHash paramGroupOwnedHash.add(group); return group; } else { Log.warn("in Structure.addParamGroup(). ParameterGroup passed in is null"); return null; } }
436
public Parameter addParameter(Parameter p) { if (p == null) { Log.warn("in Structure.addParameter, Parameter passed in is null"); return null; } getParamList().add(p); return p; }
public Parameter addParameter(Parameter p) { if (p == null) { Log.warn("in Structure.addParameter, Parameter passed in is null"); return null; } getParamList().add(p); return p; }
437
public Structure addStructure(Structure s) { if (s == null) { Log.warn("in Structure.addStructure(), Structure passed in is null"); return null; } getStructList().add(s); return s; }
public Structure addStructure(Structure s) { if (s == null) { Log.warn("in Structure.addStructure(), Structure passed in is null"); return null; } getStructList().add(s); return s; }
438
public Object clone() throws CloneNotSupportedException{ Structure cloneObj = (Structure) super.clone(); //deep copy of the paramGroupOwnedHash synchronized (this.paramGroupOwnedHash) { synchronized(cloneObj.paramGroupOwnedHash) { cloneObj.paramGroupOwnedHash = Collections.synchronizedSet(new HashSet(this.paramGroupOwnedHash.size())); Iterator iter = this.paramGroupOwnedHash.iterator(); while (iter.hasNext()) { cloneObj.paramGroupOwnedHash.add(iter.next()); } } } return cloneObj; }
public Object clone() throws CloneNotSupportedException{ Structure cloneObj = (Structure) super.clone(); //deep copy of the paramGroupOwnedHash synchronized (this.paramGroupOwnedHash) { synchronized(cloneObj.paramGroupOwnedHash) { cloneObj.paramGroupOwnedHash = Collections.synchronizedSet(new HashSet(this.paramGroupOwnedHash.size())); Iterator iter = this.paramGroupOwnedHash.iterator(); while (iter.hasNext()) { cloneObj.paramGroupOwnedHash.add(((Group)iter.next()).clone()); } } } return cloneObj; }
439
public boolean removeParamGroup(ParameterGroup group) { if (group == null) { Log.warn("in Structure.removeParamGroup(). ParameterGroup passed in is null"); return false; } return paramGroupOwnedHash.remove(group); }
public boolean removeParamGroup(ParameterGroup group) { if (group == null) { Log.warn("in Structure.removeParamGroup(). ParameterGroup passed in is null"); return false; } return paramGroupOwnedHash.remove(group); }
440
public Object clone () throws CloneNotSupportedException{ //shallow copy for fields BaseObject cloneObj = (BaseObject) super.clone(); // Clone the fields cloneObj.attribOrder = Collections.synchronizedList(new ArrayList()); int stop = this.attribOrder.size(); for (int i = 0; i < stop; i++) { cloneObj.attribOrder.add(new String((String) this.attribOrder.get(i))); } // XMLAttributes Clone cloneObj.attribHash = new Hashtable(); Enumeration keys = this.attribHash.keys(); synchronized (this.attribHash) { for (int i = 0; i < stop; i++) { String key = (String) cloneObj.attribOrder.get(i); XMLAttribute XMLAttributeValue = (XMLAttribute) this.attribHash.get(key); cloneObj.attribHash.put(key, XMLAttributeValue.clone()); } }// cloneObj.classXDFNodeName = this.classXDFNodeName;// cloneObj.attribOrder = this.attribOrder;// cloneObj.groupMemberHash = Collections.synchronizedSet(new HashSet());// cloneObj.openGroupNodeHash = Collections.synchronizedSet(new HashSet()); /** This field stores object references to those group objects to which a given object belongs. */ return (Object) cloneObj; }
protected Object clone () throws CloneNotSupportedException{ //shallow copy for fields BaseObject cloneObj = (BaseObject) super.clone(); // Clone the fields cloneObj.attribOrder = Collections.synchronizedList(new ArrayList()); int stop = this.attribOrder.size(); for (int i = 0; i < stop; i++) { cloneObj.attribOrder.add(new String((String) this.attribOrder.get(i))); } // XMLAttributes Clone cloneObj.attribHash = new Hashtable(); Enumeration keys = this.attribHash.keys(); synchronized (this.attribHash) { for (int i = 0; i < stop; i++) { String key = (String) cloneObj.attribOrder.get(i); XMLAttribute XMLAttributeValue = (XMLAttribute) this.attribHash.get(key); cloneObj.attribHash.put(key, XMLAttributeValue.clone()); } }// cloneObj.classXDFNodeName = this.classXDFNodeName;// cloneObj.attribOrder = this.attribOrder;// cloneObj.groupMemberHash = Collections.synchronizedSet(new HashSet());// cloneObj.openGroupNodeHash = Collections.synchronizedSet(new HashSet()); /** This field stores object references to those group objects to which a given object belongs. */ return (Object) cloneObj; }
441
public Object clone () throws CloneNotSupportedException{ //shallow copy for fields BaseObject cloneObj = (BaseObject) super.clone(); // Clone the fields cloneObj.attribOrder = Collections.synchronizedList(new ArrayList()); int stop = this.attribOrder.size(); for (int i = 0; i < stop; i++) { cloneObj.attribOrder.add(new String((String) this.attribOrder.get(i))); } // XMLAttributes Clone cloneObj.attribHash = new Hashtable(); Enumeration keys = this.attribHash.keys(); synchronized (this.attribHash) { for (int i = 0; i < stop; i++) { String key = (String) cloneObj.attribOrder.get(i); XMLAttribute XMLAttributeValue = (XMLAttribute) this.attribHash.get(key); cloneObj.attribHash.put(key, XMLAttributeValue.clone()); } }// cloneObj.classXDFNodeName = this.classXDFNodeName;// cloneObj.attribOrder = this.attribOrder;// cloneObj.groupMemberHash = Collections.synchronizedSet(new HashSet());// cloneObj.openGroupNodeHash = Collections.synchronizedSet(new HashSet()); /** This field stores object references to those group objects to which a given object belongs. */ return (Object) cloneObj; }
public Object clone () throws CloneNotSupportedException{ //shallow copy for fields BaseObject cloneObj = (BaseObject) super.clone(); // Clone the fields cloneObj.attribOrder = Collections.synchronizedList(new ArrayList()); int stop = this.attribOrder.size(); for (int i = 0; i < stop; i++) { cloneObj.attribOrder.add(new String((String) this.attribOrder.get(i))); } // XMLAttributes Clone cloneObj.attribHash = new Hashtable(); Enumeration keys = this.attribHash.keys(); synchronized (this.attribHash) { for (int i = 0; i < stop; i++) { String key = (String) cloneObj.attribOrder.get(i); XMLAttribute XMLAttributeValue = (XMLAttribute) this.attribHash.get(key); cloneObj.attribHash.put(key, XMLAttributeValue.clone()); } }// cloneObj.classXDFNodeName = this.classXDFNodeName;// cloneObj.attribOrder = this.attribOrder;// cloneObj.groupMemberHash = Collections.synchronizedSet(new HashSet());// cloneObj.openGroupNodeHash = Collections.synchronizedSet(new HashSet()); /** This field stores object references to those group objects to which a given object belongs. */ return (Object) cloneObj; }
442
public Object clone () throws CloneNotSupportedException{ //shallow copy for fields BaseObject cloneObj = (BaseObject) super.clone(); // Clone the fields cloneObj.attribOrder = Collections.synchronizedList(new ArrayList()); int stop = this.attribOrder.size(); for (int i = 0; i < stop; i++) { cloneObj.attribOrder.add(new String((String) this.attribOrder.get(i))); } // XMLAttributes Clone cloneObj.attribHash = new Hashtable(); Enumeration keys = this.attribHash.keys(); synchronized (this.attribHash) { for (int i = 0; i < stop; i++) { String key = (String) cloneObj.attribOrder.get(i); XMLAttribute XMLAttributeValue = (XMLAttribute) this.attribHash.get(key); cloneObj.attribHash.put(key, XMLAttributeValue.clone()); } }// cloneObj.classXDFNodeName = this.classXDFNodeName;// cloneObj.attribOrder = this.attribOrder;// cloneObj.groupMemberHash = Collections.synchronizedSet(new HashSet());// cloneObj.openGroupNodeHash = Collections.synchronizedSet(new HashSet()); /** This field stores object references to those group objects to which a given object belongs. */ return (Object) cloneObj; }
public Object clone () throws CloneNotSupportedException{ //shallow copy for fields BaseObject cloneObj = (BaseObject) super.clone(); // Clone the fields cloneObj.attribOrder = Collections.synchronizedList(new ArrayList()); int stop = this.attribOrder.size(); for (int i = 0; i < stop; i++) { cloneObj.attribOrder.add(new String((String) this.attribOrder.get(i))); } // XMLAttributes Clone cloneObj.attribHash = new Hashtable(); Enumeration keys = this.attribHash.keys(); synchronized (this.attribHash) { for (int i = 0; i < stop; i++) { String key = (String) cloneObj.attribOrder.get(i); XMLAttribute XMLAttributeValue = (XMLAttribute) this.attribHash.get(key); cloneObj.attribHash.put(key, XMLAttributeValue.clone()); } }// cloneObj.classXDFNodeName = this.classXDFNodeName;// cloneObj.attribOrder = this.attribOrder;// cloneObj.groupMemberHash = Collections.synchronizedSet(new HashSet());// cloneObj.openGroupNodeHash = Collections.synchronizedSet(new HashSet()); /** This field stores object references to those group objects to which a given object belongs. */ return (Object) cloneObj; }
443
public Object clone () throws CloneNotSupportedException{ //shallow copy for fields BaseObject cloneObj = (BaseObject) super.clone(); // Clone the fields cloneObj.attribOrder = Collections.synchronizedList(new ArrayList()); int stop = this.attribOrder.size(); for (int i = 0; i < stop; i++) { cloneObj.attribOrder.add(new String((String) this.attribOrder.get(i))); } // XMLAttributes Clone cloneObj.attribHash = new Hashtable(); Enumeration keys = this.attribHash.keys(); synchronized (this.attribHash) { for (int i = 0; i < stop; i++) { String key = (String) cloneObj.attribOrder.get(i); XMLAttribute XMLAttributeValue = (XMLAttribute) this.attribHash.get(key); cloneObj.attribHash.put(key, XMLAttributeValue.clone()); } }// cloneObj.classXDFNodeName = this.classXDFNodeName;// cloneObj.attribOrder = this.attribOrder;// cloneObj.groupMemberHash = Collections.synchronizedSet(new HashSet());// cloneObj.openGroupNodeHash = Collections.synchronizedSet(new HashSet()); /** This field stores object references to those group objects to which a given object belongs. */ return (Object) cloneObj; }
public Object clone () throws CloneNotSupportedException{ //shallow copy for fields BaseObject cloneObj = (BaseObject) super.clone(); // Clone the fields cloneObj.attribOrder = Collections.synchronizedList(new ArrayList()); int stop = this.attribOrder.size(); for (int i = 0; i < stop; i++) { cloneObj.attribOrder.add(new String((String) this.attribOrder.get(i))); } // XMLAttributes Clone cloneObj.attribHash = new Hashtable(); Enumeration keys = this.attribHash.keys(); synchronized (this.attribHash) { for (int i = 0; i < stop; i++) { String key = (String) cloneObj.attribOrder.get(i); XMLAttribute XMLAttributeValue = (XMLAttribute) this.attribHash.get(key); cloneObj.attribHash.put(key, XMLAttributeValue.clone()); } }// cloneObj.classXDFNodeName = this.classXDFNodeName;// cloneObj.attribOrder = this.attribOrder;// cloneObj.groupMemberHash = Collections.synchronizedSet(new HashSet());// cloneObj.openGroupNodeHash = Collections.synchronizedSet(new HashSet()); /** This field stores object references to those group objects to which a given object belongs. */ return (Object) cloneObj; }
444
public Object clone () throws CloneNotSupportedException{ //shallow copy for fields BaseObject cloneObj = (BaseObject) super.clone(); // Clone the fields cloneObj.attribOrder = Collections.synchronizedList(new ArrayList()); int stop = this.attribOrder.size(); for (int i = 0; i < stop; i++) { cloneObj.attribOrder.add(new String((String) this.attribOrder.get(i))); } // XMLAttributes Clone cloneObj.attribHash = new Hashtable(); Enumeration keys = this.attribHash.keys(); synchronized (this.attribHash) { for (int i = 0; i < stop; i++) { String key = (String) cloneObj.attribOrder.get(i); XMLAttribute XMLAttributeValue = (XMLAttribute) this.attribHash.get(key); cloneObj.attribHash.put(key, XMLAttributeValue.clone()); } }// cloneObj.classXDFNodeName = this.classXDFNodeName;// cloneObj.attribOrder = this.attribOrder;// cloneObj.groupMemberHash = Collections.synchronizedSet(new HashSet());// cloneObj.openGroupNodeHash = Collections.synchronizedSet(new HashSet()); /** This field stores object references to those group objects to which a given object belongs. */ return (Object) cloneObj; }
public Object clone () throws CloneNotSupportedException{ //shallow copy for fields BaseObject cloneObj = (BaseObject) super.clone(); // Clone the fields cloneObj.attribOrder = Collections.synchronizedList(new ArrayList()); int stop = this.attribOrder.size(); for (int i = 0; i < stop; i++) { cloneObj.attribOrder.add(new String((String) this.attribOrder.get(i))); } // XMLAttributes Clone cloneObj.attribHash = new Hashtable(); Enumeration keys = this.attribHash.keys(); synchronized (this.attribHash) { for (int i = 0; i < stop; i++) { String key = (String) cloneObj.attribOrder.get(i); XMLAttribute XMLAttributeValue = (XMLAttribute) this.attribHash.get(key); cloneObj.attribHash.put(key, XMLAttributeValue.clone()); } }// cloneObj.classXDFNodeName = this.classXDFNodeName;// cloneObj.attribOrder = this.attribOrder;// cloneObj.groupMemberHash = Collections.synchronizedSet(new HashSet());// cloneObj.openGroupNodeHash = Collections.synchronizedSet(new HashSet()); /** This field stores object references to those group objects to which a given object belongs. */ return cloneObj; }
445
protected void displayInfo(KeyEvent e, String s){ String charString, keyCodeString, modString, tmpString,isString; char c = e.getKeyChar(); int keyCode = e.getKeyCode(); int modifiers = e.getModifiers(); if (Character.isISOControl(c)) { charString = "key character = " + "(an unprintable control character)"; } else { charString = "key character = '" + c + "'"; } keyCodeString = "key code = " + keyCode + " (" + KeyEvent.getKeyText(keyCode) + ")"; if(keyCode == KeyEvent.VK_PREVIOUS_CANDIDATE) { keyCodeString += " previous candidate "; } if(keyCode == KeyEvent.VK_DEAD_ABOVEDOT || keyCode == KeyEvent.VK_DEAD_ABOVERING || keyCode == KeyEvent.VK_DEAD_ACUTE || keyCode == KeyEvent.VK_DEAD_BREVE || keyCode == KeyEvent.VK_DEAD_CIRCUMFLEX ) { keyCodeString += " dead key "; } modString = "modifiers = " + modifiers; tmpString = KeyEvent.getKeyModifiersText(modifiers); if (tmpString.length() > 0) { modString += " (" + tmpString + ")"; } else { modString += " (no modifiers)"; } isString = "isKeys = isActionKey (" + e.isActionKey() + ")" + " isAltDown (" + e.isAltDown() + ")" + " isAltGraphDown (" + e.isAltGraphDown() + ")" + " isAltGraphDownLinux (" + isAltGr + ")" + " isControlDown (" + e.isControlDown() + ")" + " isMetaDown (" + e.isMetaDown() + ")" + " isShiftDown (" + e.isShiftDown() + ")"; String newline = "\n"; System.out.println(s + newline + " " + charString + newline + " " + keyCodeString + newline + " " + modString + newline + " " + isString + newline); }
protected void displayInfo(KeyEvent e, String s){ String charString, keyCodeString, modString, tmpString,isString,locString; char c = e.getKeyChar(); int keyCode = e.getKeyCode(); int modifiers = e.getModifiers(); if (Character.isISOControl(c)) { charString = "key character = " + "(an unprintable control character)"; } else { charString = "key character = '" + c + "'"; } keyCodeString = "key code = " + keyCode + " (" + KeyEvent.getKeyText(keyCode) + ")"; if(keyCode == KeyEvent.VK_PREVIOUS_CANDIDATE) { keyCodeString += " previous candidate "; } if(keyCode == KeyEvent.VK_DEAD_ABOVEDOT || keyCode == KeyEvent.VK_DEAD_ABOVERING || keyCode == KeyEvent.VK_DEAD_ACUTE || keyCode == KeyEvent.VK_DEAD_BREVE || keyCode == KeyEvent.VK_DEAD_CIRCUMFLEX ) { keyCodeString += " dead key "; } modString = "modifiers = " + modifiers; tmpString = KeyEvent.getKeyModifiersText(modifiers); if (tmpString.length() > 0) { modString += " (" + tmpString + ")"; } else { modString += " (no modifiers)"; } isString = "isKeys = isActionKey (" + e.isActionKey() + ")" + " isAltDown (" + e.isAltDown() + ")" + " isAltGraphDown (" + e.isAltGraphDown() + ")" + " isAltGraphDownLinux (" + isAltGr + ")" + " isControlDown (" + e.isControlDown() + ")" + " isMetaDown (" + e.isMetaDown() + ")" + " isShiftDown (" + e.isShiftDown() + ")"; String newline = "\n"; System.out.println(s + newline + " " + charString + newline + " " + keyCodeString + newline + " " + modString + newline + " " + isString + newline); }
446
private void loadList(String which) { lm.clear(); lm.removeAllElements(); if (which.equals(LangTool.getString("key.labelKeys"))) { Vector lk = new Vector(mnemonicData.length); for (int x = 0; x < mnemonicData.length; x++) { lk.addElement(new KeyDescription(LangTool.getString("key."+mnemonicData[x]),x)); } Collections.sort(lk,new KeyDescriptionCompare()); for (int x = 0; x < mnemonicData.length; x++) { lm.addElement(lk.get(x)); } macros = false; special = false; } else { if (which.equals(LangTool.getString("key.labelMacros"))) { Vector macrosVector = new Vector(); if (macrosList != null) for (int x = 0; x < macrosList.length; x++) { macrosVector.add(macrosList[x]); } scriptDir("scripts",macrosVector); loadListModel(lm,macrosVector,null,0); macros = true; special = false; } else { // we will use a collator here so that we can take advantage of the locales Collator collator = Collator.getInstance(); CollationKey key = null; StringBuffer sb = new StringBuffer(); Set set = new TreeSet(); for (int x =0;x < 256; x++) { char c = codePage.ebcdic2uni(x); char ac = codePage.getASCIIChar(x); if (!Character.isISOControl(c)) { 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 + " - " + getUnicodeString(c)); key = collator.getCollationKey(sb.toString()); set.add(key); } } Iterator iterator = set.iterator(); while (iterator.hasNext()) { CollationKey keyc = (CollationKey)iterator.next(); lm.addElement(keyc.getSourceString()); } macros = false; special = true; } } if (!lm.isEmpty()) functions.setSelectedIndex(0); }
private void loadList(String which) { lm.clear(); lm.removeAllElements(); if (which.equals(LangTool.getString("key.labelKeys"))) { Vector lk = new Vector(mnemonicData.length); for (int x = 0; x < mnemonicData.length; x++) { lk.addElement(new KeyDescription(LangTool.getString("key."+mnemonicData[x]),x)); } Collections.sort(lk,new KeyDescriptionCompare()); for (int x = 0; x < mnemonicData.length; x++) { lm.addElement(lk.get(x)); } macros = false; special = false; } else { if (which.equals(LangTool.getString("key.labelMacros"))) { Vector macrosVector = new Vector(); if (macrosList != null) for (int x = 0; x < macrosList.length; x++) { macrosVector.add(macrosList[x]); } scriptDir("scripts",macrosVector); loadListModel(lm,macrosVector,null,0); macros = true; special = false; } else { // we will use a collator here so that we can take advantage of the locales Collator collator = Collator.getInstance(); CollationKey key = null; StringBuffer sb = new StringBuffer(); Set set = new TreeSet(); for (int x =0;x < 256; x++) { char c = codePage.ebcdic2uni(x); char ac = codePage.ebcdic2uni(x); if (!Character.isISOControl(c)) { 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 + " - " + getUnicodeString(c)); key = collator.getCollationKey(sb.toString()); set.add(key); } } Iterator iterator = set.iterator(); while (iterator.hasNext()) { CollationKey keyc = (CollationKey)iterator.next(); lm.addElement(keyc.getSourceString()); } macros = false; special = true; } } if (!lm.isEmpty()) functions.setSelectedIndex(0); }
451
public JButton(String text) { this(text, null); }
public JButton() { this(text, null); }
452
public JButton(String text) { this(text, null); }
public JButton(String text) { this(null, null); }
453
public JComboBox() { this(new DefaultComboBoxModel()); }
public JComboBox(ComboBoxModel model) { this(new DefaultComboBoxModel()); }
454
public JComboBox() { this(new DefaultComboBoxModel()); }
public JComboBox() { setEditable(false); setEnabled(true); setMaximumRowCount(DEFAULT_MAXIMUM_ROW_COUNT); setModel(model); setActionCommand("comboBoxChanged"); lightWeightPopupEnabled = true; isEditable = false; updateUI(); }
455
public void addItem(Object element) { if(dataModel instanceof MutableComboBoxModel) { ((MutableComboBoxModel) dataModel).addElement(element); } else { throw new RuntimeException("Unable to add the item because the data model it is not an instance of MutableComboBoxModel."); } }
public void addItem(Object element) { if (dataModel instanceof MutableComboBoxModel) ((MutableComboBoxModel) dataModel).addElement(element); } else { throw new RuntimeException("Unable to add the item because the data model it is not an instance of MutableComboBoxModel."); } }
456
public void addItem(Object element) { if(dataModel instanceof MutableComboBoxModel) { ((MutableComboBoxModel) dataModel).addElement(element); } else { throw new RuntimeException("Unable to add the item because the data model it is not an instance of MutableComboBoxModel."); } }
public void addItem(Object element) { if(dataModel instanceof MutableComboBoxModel) { ((MutableComboBoxModel) dataModel).addElement(element); } else { throw new RuntimeException("Unable to add the item because the data model it is not an instance of MutableComboBoxModel."); } }
457
public void setColumns(int columns) { if (columns < 0) throw new IllegalArgumentException(); this.columns = columns; }
public void setColumns(int columns) { if (columns < 0) throw new IllegalArgumentException(); if (columns != this.columns) { this.columns = columns; revalidate(); } }
458
public JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue) { this.message = message; if (! validMessageType(messageType)) throw new IllegalArgumentException("Message Type not legal value."); this.messageType = messageType; if (! validOptionType(optionType)) throw new IllegalArgumentException("Option Type not legal value."); this.optionType = optionType; this.icon = icon; this.options = options; this.initialValue = initialValue; setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); updateUI(); invalidate(); repaint(); }
public JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue) { this.message = message; if (! validMessageType(messageType)) throw new IllegalArgumentException("Message Type not legal value."); this.messageType = messageType; if (! validOptionType(optionType)) throw new IllegalArgumentException("Option Type not legal value."); this.optionType = optionType; this.icon = icon; this.options = options; this.initialValue = initialValue; setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); updateUI(); invalidate(); repaint(); }
459
public JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue) { this.message = message; if (! validMessageType(messageType)) throw new IllegalArgumentException("Message Type not legal value."); this.messageType = messageType; if (! validOptionType(optionType)) throw new IllegalArgumentException("Option Type not legal value."); this.optionType = optionType; this.icon = icon; this.options = options; this.initialValue = initialValue; setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); updateUI(); invalidate(); repaint(); }
public JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue) { this.message = message; if (! validMessageType(messageType)) throw new IllegalArgumentException("Message Type not legal value."); this.messageType = messageType; if (! validOptionType(optionType)) throw new IllegalArgumentException("Option Type not legal value."); this.optionType = optionType; this.icon = icon; this.options = options; this.initialValue = initialValue; setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); updateUI(); invalidate(); repaint(); }
460
public final static void setKeyStroke(String which, KeyEvent ke, boolean isAltGr) { if (ke == null) return; Collection v = mappedKeys.values(); Set o = mappedKeys.keySet(); Iterator k = o.iterator(); Iterator i = v.iterator(); while (k.hasNext()) { KeyStroker ks = (KeyStroker)k.next(); String keyVal = (String)i.next(); if (keyVal.equals(which)) { mappedKeys.remove(ks); mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),keyVal); return; } } // if we got here it was a dead key and we need to add it. mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),which); }
public final static void setKeyStroke(String which, KeyEvent ke) { if (ke == null) return; Collection v = mappedKeys.values(); Set o = mappedKeys.keySet(); Iterator k = o.iterator(); Iterator i = v.iterator(); while (k.hasNext()) { KeyStroker ks = (KeyStroker)k.next(); String keyVal = (String)i.next(); if (keyVal.equals(which)) { mappedKeys.remove(ks); mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),keyVal); return; } } // if we got here it was a dead key and we need to add it. mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),which); }
461
public final static void setKeyStroke(String which, KeyEvent ke, boolean isAltGr) { if (ke == null) return; Collection v = mappedKeys.values(); Set o = mappedKeys.keySet(); Iterator k = o.iterator(); Iterator i = v.iterator(); while (k.hasNext()) { KeyStroker ks = (KeyStroker)k.next(); String keyVal = (String)i.next(); if (keyVal.equals(which)) { mappedKeys.remove(ks); mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),keyVal); return; } } // if we got here it was a dead key and we need to add it. mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),which); }
public final static void setKeyStroke(String which, KeyEvent ke, boolean isAltGr) { if (ke == null) return; Collection v = mappedKeys.values(); Set o = mappedKeys.keySet(); Iterator k = o.iterator(); Iterator i = v.iterator(); while (k.hasNext()) { KeyStroker ks = (KeyStroker)k.next(); String keyVal = (String)i.next(); if (keyVal.equals(which)) { mappedKeys.remove(ks); mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), ke.isAltGraphDown()),keyVal); return; } } // if we got here it was a dead key and we need to add it. mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),which); }
462
public final static void setKeyStroke(String which, KeyEvent ke, boolean isAltGr) { if (ke == null) return; Collection v = mappedKeys.values(); Set o = mappedKeys.keySet(); Iterator k = o.iterator(); Iterator i = v.iterator(); while (k.hasNext()) { KeyStroker ks = (KeyStroker)k.next(); String keyVal = (String)i.next(); if (keyVal.equals(which)) { mappedKeys.remove(ks); mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),keyVal); return; } } // if we got here it was a dead key and we need to add it. mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),which); }
public final static void setKeyStroke(String which, KeyEvent ke, boolean isAltGr) { if (ke == null) return; Collection v = mappedKeys.values(); Set o = mappedKeys.keySet(); Iterator k = o.iterator(); Iterator i = v.iterator(); while (k.hasNext()) { KeyStroker ks = (KeyStroker)k.next(); String keyVal = (String)i.next(); if (keyVal.equals(which)) { mappedKeys.remove(ks); mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),keyVal); return; } } // if we got here it was a dead key and we need to add it. mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), ke.isAltGraphDown()),which); }
463
public void installListeners(AbstractButton b) { listener = createButtonListener(b); b.addChangeListener(listener); b.addPropertyChangeListener(listener); b.addFocusListener(listener); b.addMouseListener(listener); b.addMouseMotionListener(listener); }
protected void installListeners(AbstractButton b) { listener = createButtonListener(b); b.addChangeListener(listener); b.addPropertyChangeListener(listener); b.addFocusListener(listener); b.addMouseListener(listener); b.addMouseMotionListener(listener); }
464
public void uninstallListeners(AbstractButton b) { b.removeChangeListener(listener); b.removePropertyChangeListener(listener); b.removeFocusListener(listener); b.removeMouseListener(listener); b.removeMouseMotionListener(listener); }
protected void uninstallListeners(AbstractButton b) { b.removeChangeListener(listener); b.removePropertyChangeListener(listener); b.removeFocusListener(listener); b.removeMouseListener(listener); b.removeMouseMotionListener(listener); }
465
public Icon getDisabledIcon() { if (disabeldIcon == null && default_icon instanceof ImageIcon) disabeldIcon = new ImageIcon(GrayFilter.createDisabledImage(((ImageIcon) default_icon).getImage())); return disabeldIcon; }
public Icon getDisabledIcon() { if (disabeldIcon == null && default_icon instanceof ImageIcon) disabeldIcon = new ImageIcon(GrayFilter.createDisabledImage(((ImageIcon) default_icon).getImage())); return disabeldIcon; }
466
public JScrollBar(int orientation) { this(orientation, 0, 10, 0, 100); }
public JScrollBar() { this(orientation, 0, 10, 0, 100); }
467
public JScrollBar(int orientation) { this(orientation, 0, 10, 0, 100); }
public JScrollBar(int orientation) { this(SwingConstants.VERTICAL, 0, 10, 0, 100); }
468
public static boolean isValidValueSpecial(String strValueSpecial) { if (strValueSpecial == null) return true; String[] valueSpecialList = Constants.VALUE_SPECIAL_LIST; int stop = valueSpecialList.length; for (int i = 0; i < stop; i++) { if (valueSpecialList.equals(valueSpecialList[i])) return true; } return false; }
public static boolean isValidValueSpecial(String strValueSpecial) { if (strValueSpecial == null) return true; String[] valueSpecialList = Constants.VALUE_SPECIAL_LIST; int stop = valueSpecialList.length; for (int i = 0; i < stop; i++) { if (strValueSpecial.equals(valueSpecialList[i])) return true; } return false; }
469
public void removeSessionView(SessionGUI targetSession) { if (hideTabBar && sessionPane.getTabCount() == 0) { for (int x=0; x < getContentPane().getComponentCount(); x++) { if (getContentPane().getComponent(x) instanceof SessionGUI) { getContentPane().remove(x); } } } else { int index = sessionPane.indexOfComponent(targetSession); log.info("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getTabCount(); sessionPane.remove(index); tabs--; if (tabs > 0 && index <= tabs) { sessionPane.setSelectedIndex(index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(focused,index); ((SessionGUI)sessionPane.getComponentAt(index)).requestFocus(); } else { if (tabs > 0) { sessionPane.setSelectedIndex(0); sessionPane.setForegroundAt(0,Color.blue); sessionPane.setIconAt(focused,0); ((SessionGUI)sessionPane.getComponentAt(0)).requestFocus(); } } } }
public void removeSessionView(SessionGUI targetSession) { if (hideTabBar && sessionPane.getTabCount() == 0) { for (int x=0; x < getContentPane().getComponentCount(); x++) { if (getContentPane().getComponent(x) instanceof SessionGUI) { getContentPane().remove(x); } } } else { int index = sessionPane.indexOfComponent(targetSession); log.info("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getTabCount(); sessionPane.remove(index); tabs--; if (tabs > 0 && index <= tabs) { sessionPane.setSelectedIndex(index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(focused,index); ((SessionGUI)sessionPane.getComponentAt(index)).requestFocus(); } else { if (tabs > 0) { sessionPane.setSelectedIndex(0); sessionPane.setForegroundAt(0,Color.blue); sessionPane.setIconAt(focused,0); ((SessionGUI)sessionPane.getComponentAt(0)).requestFocus(); } } } }
470
public void removeSessionView(SessionGUI targetSession) { if (hideTabBar && sessionPane.getTabCount() == 0) { for (int x=0; x < getContentPane().getComponentCount(); x++) { if (getContentPane().getComponent(x) instanceof SessionGUI) { getContentPane().remove(x); } } } else { int index = sessionPane.indexOfComponent(targetSession); log.info("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getTabCount(); sessionPane.remove(index); tabs--; if (tabs > 0 && index <= tabs) { sessionPane.setSelectedIndex(index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(focused,index); ((SessionGUI)sessionPane.getComponentAt(index)).requestFocus(); } else { if (tabs > 0) { sessionPane.setSelectedIndex(0); sessionPane.setForegroundAt(0,Color.blue); sessionPane.setIconAt(focused,0); ((SessionGUI)sessionPane.getComponentAt(0)).requestFocus(); } } } }
public void removeSessionView(SessionGUI targetSession) { if (hideTabBar && sessionPane.getTabCount() == 0) { for (int x=0; x < getContentPane().getComponentCount(); x++) { if (getContentPane().getComponent(x) instanceof SessionGUI) { getContentPane().remove(x); } } } else { int index = sessionPane.indexOfComponent(targetSession); log.info("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getTabCount(); sessionPane.remove(index); tabs--; if (tabs > 0 && index < tabs) { sessionPane.setSelectedIndex(index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(focused,index); ((SessionGUI)sessionPane.getComponentAt(index)).requestFocus(); } else { if (tabs > 0) { sessionPane.setSelectedIndex(0); sessionPane.setForegroundAt(0,Color.blue); sessionPane.setIconAt(focused,0); ((SessionGUI)sessionPane.getComponentAt(0)).requestFocus(); } } } }
471
public void setSelectedIndex(int index) { checkIndex(index, -1, tabs.size()); if (index != getSelectedIndex()) { if (getSelectedIndex() != -1 && getSelectedComponent() != null) getSelectedComponent().hide(); if (index != -1 && getComponentAt(index) != null) getComponentAt(index).show(); model.setSelectedIndex(index); } }
public void setSelectedIndex(int index) { checkIndex(index, -1, tabs.size()); if (index != getSelectedIndex()) { if (getSelectedIndex() != -1 && getSelectedComponent() != null) getSelectedComponent().hide(); if (index != -1 && getComponentAt(index) != null) getComponentAt(index).show(); model.setSelectedIndex(index); } } }
472
public void setSelectedIndex(int index) { checkIndex(index, -1, tabs.size()); if (index != getSelectedIndex()) { if (getSelectedIndex() != -1 && getSelectedComponent() != null) getSelectedComponent().hide(); if (index != -1 && getComponentAt(index) != null) getComponentAt(index).show(); model.setSelectedIndex(index); } }
public void setSelectedIndex(int index) { checkIndex(index, -1, tabs.size()); if (index != getSelectedIndex()) { if (getSelectedIndex() != -1 && getSelectedComponent() != null) getSelectedComponent().hide(); if (index != -1 && getComponentAt(index) != null) getComponentAt(index).show(); model.setSelectedIndex(index);
473
public void remove(int index) { removeTabAt(index); }
public void remove(Component component) { removeTabAt(index); }
474
public void remove(int index) { removeTabAt(index); }
public void remove(int index) { int index = indexOfComponent(component); super.remove(component); component.show(); setComponentAt(index, null); }
475
protected final boolean negotiate(byte abyte0[]) throws IOException { int i = 0; // from server negotiations if (abyte0[i] == IAC) { // -1 while (i < abyte0.length && abyte0[i++] == -1) // while(i < abyte0.length && (abyte0[i] == -1 || abyte0[i++] == // 0x20)) switch (abyte0[i++]) { // we will not worry about what it WONT do case WONT: // -4 default: break; case DO: //-3 switch (abyte0[i]) { case TERMINAL_TYPE: // 24 baosp.write(IAC); baosp.write(WILL); baosp.write(TERMINAL_TYPE); writeByte(baosp.toByteArray()); baosp.reset(); break; case OPT_END_OF_RECORD: // 25 baosp.write(IAC); baosp.write(WILL); baosp.write(OPT_END_OF_RECORD); writeByte(baosp.toByteArray()); baosp.reset(); break; case TRANSMIT_BINARY: // 0 baosp.write(IAC); baosp.write(WILL); baosp.write(TRANSMIT_BINARY); writeByte(baosp.toByteArray()); baosp.reset(); break; case TIMING_MARK: // 6 rfc860 // System.out.println("Timing Mark Received and notifying " // + // "the server that we will not do it"); baosp.write(IAC); baosp.write(WONT); baosp.write(TIMING_MARK); writeByte(baosp.toByteArray()); baosp.reset(); break; case NEW_ENVIRONMENT: // 39 rfc1572 if (devName == null && user == null) { baosp.write(IAC); baosp.write(WONT); baosp.write(NEW_ENVIRONMENT); writeByte(baosp.toByteArray()); baosp.reset(); } else { baosp.write(IAC); baosp.write(WILL); baosp.write(NEW_ENVIRONMENT); writeByte(baosp.toByteArray()); baosp.reset(); } break; default: // every thing else we will not do at this time baosp.write(IAC); baosp.write(WONT); baosp.write(abyte0[i]); // either writeByte(baosp.toByteArray()); baosp.reset(); break; } i++; break; case WILL: switch (abyte0[i]) { case OPT_END_OF_RECORD: // 25 baosp.write(IAC); baosp.write(DO); baosp.write(OPT_END_OF_RECORD); writeByte(baosp.toByteArray()); baosp.reset(); break; case TRANSMIT_BINARY: // '\0' baosp.write(IAC); baosp.write(DO); baosp.write(TRANSMIT_BINARY); writeByte(baosp.toByteArray()); baosp.reset(); break; } i++; break; case SB: // -6 if (abyte0[i] == NEW_ENVIRONMENT && abyte0[i + 1] == 1) { negNewEnvironment(); while (++i < abyte0.length && abyte0[i + 1] != IAC) ; } if (abyte0[i] == TERMINAL_TYPE && abyte0[i + 1] == 1) { baosp.write(IAC); baosp.write(SB); baosp.write(TERMINAL_TYPE); baosp.write(QUAL_IS); if (!support132) baosp.write("IBM-3179-2".getBytes()); else baosp.write("IBM-3477-FC".getBytes()); baosp.write(IAC); baosp.write(SE); writeByte(baosp.toByteArray()); baosp.reset(); i++; } i++; break; } return true; } else { return false; } }
protected final boolean negotiate(byte abyte0[]) throws IOException { int i = 0; // from server negotiations if (abyte0[i] == IAC) { // -1 while (i < abyte0.length && abyte0[i++] == -1) // while(i < abyte0.length && (abyte0[i] == -1 || abyte0[i++] == // 0x20)) switch (abyte0[i++]) { // we will not worry about what it WONT do case WONT: // -4 default: break; case DO: //-3 if (i < abyte0.length) { switch(abyte0[i]) { case TERMINAL_TYPE: // 24 baosp.write(IAC); baosp.write(WILL); baosp.write(TERMINAL_TYPE); writeByte(baosp.toByteArray()); baosp.reset(); break; case OPT_END_OF_RECORD: // 25 baosp.write(IAC); baosp.write(WILL); baosp.write(OPT_END_OF_RECORD); writeByte(baosp.toByteArray()); baosp.reset(); break; case TRANSMIT_BINARY: // 0 baosp.write(IAC); baosp.write(WILL); baosp.write(TRANSMIT_BINARY); writeByte(baosp.toByteArray()); baosp.reset(); break; case TIMING_MARK: // 6 rfc860 // System.out.println("Timing Mark Received and notifying " // + // "the server that we will not do it"); baosp.write(IAC); baosp.write(WONT); baosp.write(TIMING_MARK); writeByte(baosp.toByteArray()); baosp.reset(); break; case NEW_ENVIRONMENT: // 39 rfc1572 if (devName == null && user == null) { baosp.write(IAC); baosp.write(WONT); baosp.write(NEW_ENVIRONMENT); writeByte(baosp.toByteArray()); baosp.reset(); } else { baosp.write(IAC); baosp.write(WILL); baosp.write(NEW_ENVIRONMENT); writeByte(baosp.toByteArray()); baosp.reset(); } break; default: // every thing else we will not do at this time baosp.write(IAC); baosp.write(WONT); baosp.write(abyte0[i]); // either writeByte(baosp.toByteArray()); baosp.reset(); break; } i++; break; case WILL: if (i < abyte0.length) { switch(abyte0[i]) { case OPT_END_OF_RECORD: // 25 baosp.write(IAC); baosp.write(DO); baosp.write(OPT_END_OF_RECORD); writeByte(baosp.toByteArray()); baosp.reset(); break; case TRANSMIT_BINARY: // '\0' baosp.write(IAC); baosp.write(DO); baosp.write(TRANSMIT_BINARY); writeByte(baosp.toByteArray()); baosp.reset(); break; } i++; break; case SB: // -6 if (abyte0[i] == NEW_ENVIRONMENT && abyte0[i + 1] == 1) { negNewEnvironment(); while (++i < abyte0.length && abyte0[i + 1] != IAC) ; } if (abyte0[i] == TERMINAL_TYPE && abyte0[i + 1] == 1) { baosp.write(IAC); baosp.write(SB); baosp.write(TERMINAL_TYPE); baosp.write(QUAL_IS); if (!support132) baosp.write("IBM-3179-2".getBytes()); else baosp.write("IBM-3477-FC".getBytes()); baosp.write(IAC); baosp.write(SE); writeByte(baosp.toByteArray()); baosp.reset(); i++; } i++; break; } return true; } else { return false; } }
476
public Socket createSocket(String destination, int port) { try { if (sslType.equals(SSLConstants.SSL_TYPE_NONE)) { System.out.println("Creating Socket"); // for jdk 1.4// return SocketFactory.getDefault().createSocket(destination,port); return new Socket(destination,port); } //Using SSL Socket SSLInterface o = null; try { Class c = this.getClass().forName("org.tn5250j.transport.SSL.SSLImplementation"); o = (SSLInterface)c.newInstance(); o.setSSLType(sslType); return o.createSSLSocket(destination,port); } catch (Exception e) { System.err.println(e); } } catch (Exception e) { System.err.println("SocketConnector: createSocket: " + e.getMessage()); } return null; }
public Socket createSocket(String destination, int port) { try { if (sslType.equals(SSLConstants.SSL_TYPE_NONE)) { System.out.println("Creating Socket"); // for jdk 1.4// return SocketFactory.getDefault().createSocket(destination,port); return new Socket(destination,port); } //Using SSL Socket SSLInterface o = null; try { Class c = Class.forName("org.tn5250j.transport.SSL.SSLImplementation"); o = (SSLInterface)c.newInstance(); o.setSSLType(sslType); return o.createSSLSocket(destination,port); } catch (Exception e) { System.err.println(e); } } catch (Exception e) { System.err.println("SocketConnector: createSocket: " + e.getMessage()); } return null; }
477
public void goto_XY(int pos) {// setCursorOff(); updateCursorLoc(); lastPos = pos;// setCursorOn(); updateCursorLoc(); }
public void goto_XY(int pos) {// setCursorOff(); updateCursorLoc(); lastPos = pos;// setCursorOn(); updateCursorLoc(); }
478
public void handleEvent(Tn5250jEvent e) { log.info("Received event: " + e.getClass().toString()); if (e instanceof Tn5250jKeyEvents) { log.info("Keys: " + ((Tn5250jKeyEvents) e).getKeystrokes()); } eventList.add(e); synchronized (eventList) { eventList.notify(); } }
public void handleEvent(Tn5250jEvent e) { log.debug("Received event: " + e.getClass().toString()); if (e instanceof Tn5250jKeyEvents) { log.info("Keys: " + ((Tn5250jKeyEvents) e).getKeystrokes()); } eventList.add(e); synchronized (eventList) { eventList.notify(); } }
479
public void handleEvent(Tn5250jEvent e) { log.info("Received event: " + e.getClass().toString()); if (e instanceof Tn5250jKeyEvents) { log.info("Keys: " + ((Tn5250jKeyEvents) e).getKeystrokes()); } eventList.add(e); synchronized (eventList) { eventList.notify(); } }
public void handleEvent(Tn5250jEvent e) { log.info("Received event: " + e.getClass().toString()); if (e instanceof Tn5250jKeyEvents) { log.debug("Keys: " + ((Tn5250jKeyEvents) e).getKeystrokes()); } eventList.add(e); synchronized (eventList) { eventList.notify(); } }
480
public void setPendingInsert(boolean flag) { if (homePos != -1) pendingInsert = flag; }
public void setPendingInsert(boolean flag) { if (homePos != -1) pendingInsert = flag; }
481
public ScreenField setField(int attr, int row, int col, int len, int ffw1, int ffw2, int fcw1, int fcw2) { ScreenField sf = null; screenFields[nextField] = new ScreenField(screen); screenFields[nextField].setField(attr,row,col,len,ffw1,ffw2,fcw1,fcw2); sf = screenFields[nextField++]; sizeFields++; // set the field id if it is not a bypass field // this is used for cursor progression if (!sf.isBypassField()) sf.setFieldId(++fieldIds); // check if the cursor progression field flag should be set.// if ((fcw1 & 0x88) == 0x88) if (fcw1 == 0x88) cpfExists = true; if (currentField != null) { currentField.next = sf; sf.prev = currentField; } currentField = sf; // check if the Modified Data Tag was set while creating the field if (!masterMDT) masterMDT = currentField.mdt; return currentField; }
public ScreenField setField(int attr, int row, int col, int len, int ffw1, int ffw2, int fcw1, int fcw2) { ScreenField sf = null; screenFields[nextField] = new ScreenField(screen); screenFields[nextField].setField(attr,row,col,len,ffw1,ffw2,fcw1,fcw2); sf = screenFields[nextField++]; sizeFields++; // set the field id if it is not a bypass field // this is used for cursor progression if (!sf.isBypassField()) sf.setFieldId(++fieldIds); // check if the cursor progression field flag should be set.// if ((fcw1 & 0x88) == 0x88) if (fcw1 == 0x88) cpfExists = true; if (currentField != null) { currentField.next = sf; sf.prev = currentField; } currentField = sf; // check if the Modified Data Tag was set while creating the field if (!masterMDT) masterMDT = currentField.mdt; return currentField; }
482
public Object get() throws InterruptedException { synchronized (lock) { // wait until there is something to read while (isEmpty()) lock.wait(); // just something here to try. if (vector.size() >= 5) { vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); } // we have the lock and state we're seeking return vector.remove(0); } }
public Object get() throws InterruptedException { synchronized (lock) { // wait until there is something to read while (isEmpty()) lock.wait(); // just something here to try. if (vector.size() >= 10) { vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); } // we have the lock and state we're seeking return vector.remove(0); } }
483
protected final void toggleDebug (CodePage cp) { if (codePage == null) codePage = cp; dumpBytes = !dumpBytes; if (dumpBytes) { try { if (fw == null) { fw = new FileOutputStream("log.txt"); dw = new BufferedOutputStream(fw); } } catch (FileNotFoundException fnfe) { System.out.println(fnfe.getMessage()); } } else { try { if (dw != null) dw.close(); if (fw != null) fw.close(); dw = null; fw = null; codePage = null; } catch(IOException ioe) { System.out.println(ioe.getMessage()); } } System.out.println("Data Stream output is now " + dumpBytes); }
protected final void toggleDebug (CodePage cp) { if (codePage == null) codePage = cp; dumpBytes = !dumpBytes; if (dumpBytes) { try { if (fw == null) { fw = new FileOutputStream("log.txt"); dw = new BufferedOutputStream(fw); } } catch (FileNotFoundException fnfe) { log.warn(fnfe.getMessage()); } } else { try { if (dw != null) dw.close(); if (fw != null) fw.close(); dw = null; fw = null; codePage = null; } catch(IOException ioe) { System.out.println(ioe.getMessage()); } } System.out.println("Data Stream output is now " + dumpBytes); }
484
protected final void toggleDebug (CodePage cp) { if (codePage == null) codePage = cp; dumpBytes = !dumpBytes; if (dumpBytes) { try { if (fw == null) { fw = new FileOutputStream("log.txt"); dw = new BufferedOutputStream(fw); } } catch (FileNotFoundException fnfe) { System.out.println(fnfe.getMessage()); } } else { try { if (dw != null) dw.close(); if (fw != null) fw.close(); dw = null; fw = null; codePage = null; } catch(IOException ioe) { System.out.println(ioe.getMessage()); } } System.out.println("Data Stream output is now " + dumpBytes); }
protected final void toggleDebug (CodePage cp) { if (codePage == null) codePage = cp; dumpBytes = !dumpBytes; if (dumpBytes) { try { if (fw == null) { fw = new FileOutputStream("log.txt"); dw = new BufferedOutputStream(fw); } } catch (FileNotFoundException fnfe) { System.out.println(fnfe.getMessage()); } } else { try { if (dw != null) dw.close(); if (fw != null) fw.close(); dw = null; fw = null; codePage = null; } catch(IOException ioe) { log.warn(ioe.getMessage()); } } System.out.println("Data Stream output is now " + dumpBytes); }
485
protected final void toggleDebug (CodePage cp) { if (codePage == null) codePage = cp; dumpBytes = !dumpBytes; if (dumpBytes) { try { if (fw == null) { fw = new FileOutputStream("log.txt"); dw = new BufferedOutputStream(fw); } } catch (FileNotFoundException fnfe) { System.out.println(fnfe.getMessage()); } } else { try { if (dw != null) dw.close(); if (fw != null) fw.close(); dw = null; fw = null; codePage = null; } catch(IOException ioe) { System.out.println(ioe.getMessage()); } } System.out.println("Data Stream output is now " + dumpBytes); }
protected final void toggleDebug (CodePage cp) { if (codePage == null) codePage = cp; dumpBytes = !dumpBytes; if (dumpBytes) { try { if (fw == null) { fw = new FileOutputStream("log.txt"); dw = new BufferedOutputStream(fw); } } catch (FileNotFoundException fnfe) { System.out.println(fnfe.getMessage()); } } else { try { if (dw != null) dw.close(); if (fw != null) fw.close(); dw = null; fw = null; codePage = null; } catch(IOException ioe) { System.out.println(ioe.getMessage()); } } log.info("Data Stream output is now " + dumpBytes); }
486
protected VmType<?>[] createSuperClassesArray(HashSet<VmInterfaceClass<?>> allInterfaces) { final VmType[] compSuperClasses = componentType.getSuperClassesArray(); final int compLength = compSuperClasses.length; final int length = compLength + 2 + allInterfaces.size(); final VmType<?>[] array = new VmType[length]; array[0] = this; array[1] = this.getSuperClass(); for (int i = 0; i < compLength; i++) { array[2 + i] = compSuperClasses[i].getArrayClass(false); } int index = compLength + 2; for (VmInterfaceClass intfClass : allInterfaces) { array[index++] = intfClass; } if (false) { System.out.println("SuperClassesArray for " + getName() + ": " + getSuperClassDepth()); for (int i = 0; i < length; i++) { System.out.println("[" + i + "]\t" + array[i].getName()); } } return array; }
protected VmType<?>[] createSuperClassesArray(HashSet<VmInterfaceClass<?>> allInterfaces) { final VmType[] compSuperClasses = componentType.getSuperClassesArray(); final int compLength = compSuperClasses.length; final int length = compLength + 2 + allInterfaces.size(); final VmType<?>[] array = new VmType[length]; array[0] = this; array[1] = this.getSuperClass(); for (int i = 0; i < compLength; i++) { array[2 + i] = compSuperClasses[i].getArrayClass(false); } int index = compLength + 2; for (VmInterfaceClass intfClass : allInterfaces) { array[index++] = intfClass; } if (false) { System.out.println("SuperClassesArray for " + getName() + ": " + getSuperClassDepth()); for (int i = 0; i < length; i++) { System.out.println("[" + i + "]\t" + array[i].getName()); } } return array; }
487
public VmClassType( String name, VmNormalClass superClass, VmClassLoader loader, int typeSize, ProtectionDomain protectionDomain) { super(name, superClass, loader, typeSize, protectionDomain); }
public VmClassType( String name, String superClassName, VmClassLoader loader, int typeSize, ProtectionDomain protectionDomain) { super(name, superClass, loader, typeSize, protectionDomain); }
488
public VmClassType( String name, VmNormalClass superClass, VmClassLoader loader, int typeSize, ProtectionDomain protectionDomain) { super(name, superClass, loader, typeSize, protectionDomain); }
public VmClassType( String name, VmNormalClass superClass, VmClassLoader loader, int typeSize, ProtectionDomain protectionDomain) { super(name, superClass, loader, typeSize, protectionDomain); }
489
final VmArrayClass getArrayClass(boolean link) { if (arrayClass == null) { arrayClass = createArrayClass(link, null); } return arrayClass; }
final VmArrayClass getArrayClass(String arrayClassName) { if (arrayClass == null) { arrayClass = createArrayClass(link, null); } return arrayClass; }
490
final VmArrayClass getArrayClass(boolean link) { if (arrayClass == null) { arrayClass = createArrayClass(link, null); } return arrayClass; }
final VmArrayClass getArrayClass(boolean link) { if (arrayClass == null) { arrayClass = createArrayClass(true, arrayClassName); } else { arrayClass.link(); } return arrayClass; }
491
public void addElement(Object object) { list.add(object); fireIntervalAdded(this, list.size() - 1, list.size()); }
public void addElement(Object object) { list.add(object); fireIntervalAdded(this, list.size() - 1, list.size()); }
492
public void removeAllElements() { list.clear(); int listSize = getSize(); fireIntervalAdded(this, 0, listSize); }
public void removeAllElements() { list.clear(); int listSize = getSize(); fireIntervalAdded(this, 0, listSize); }
494
public void setSelectedItem(Object object) { // Updates the selected item only if the given object // is null or in the list (this is how the JDK behaves). if(object == null || list.contains(object)) { selectedItem = object; fireContentsChanged(this, -1, -1); } }
public void setSelectedItem(Object object) { // Updates the selected item only if the given object // is null or in the list (this is how the JDK behaves). selectedItem = object; fireContentsChanged(this, -1, -1); } }
496
public void setSelectedItem(Object object) { // Updates the selected item only if the given object // is null or in the list (this is how the JDK behaves). if(object == null || list.contains(object)) { selectedItem = object; fireContentsChanged(this, -1, -1); } }
public void setSelectedItem(Object object) { // Updates the selected item only if the given object // is null or in the list (this is how the JDK behaves). if(object == null || list.contains(object)) { selectedItem = object; fireContentsChanged(this, -1, -1); } }
497
public abstract MemoryResource claimChildResource(int offset, int size, boolean allowOverlaps) throws IndexOutOfBoundsException, ResourceNotFreeException;
public abstract MemoryResource claimChildResource(Extent size, int align) throws IndexOutOfBoundsException, ResourceNotFreeException;
498
public abstract void setByte(int memPtr, byte value, int count);
public abstract void setByte(int memPtr, byte value);
499
public abstract void setShort(int memPtr, short value, int count);
public abstract void setShort(int memPtr, short value);
500
public IllegalStateException(String s) { super(s); }
public IllegalStateException() { super(s); }
501
public IllegalStateException(String s) { super(s); }
public IllegalStateException(String s) { }
502
public IncompatibleClassChangeError(String s) { super(s); }
public IncompatibleClassChangeError(String s) { super(s); }
503
public final VmMethod getMethod(String name, String signature) { return getMethod(name, signature, false, true, VmMember.calcHashCode( name, signature)); }
public final VmMethod getMethod(String name, String signature) { return getMethod(name, signature, false, true, VmMember.calcHashCode( name, signature)); }
504
public NoSuchMethodError(String s) { super(s); }
public NoSuchMethodError(String s) { super(s); }
505
public AbstractMethodError(String s) { super(s); }
public AbstractMethodError(String s) { super(s); }
506
public NotResolvedYetException(String s) { super(s); }
public NotResolvedYetException(String s) { super(s); }
507
Item pop(int type) { // if (tos == 0) { // // the item requested in not on the virtual stack // // but already on the operand stack (it was pushed // // outside the current basic block) // // thus create a new stack item // Item it = createStack(type); // if (checkOperandStack) { // // insert at the begin of stack // // even if the vstack is empty, there // // may still be items popped from vstack // // that are not popped from operand stack // prependToOperandStack(it); // } // return it; // // pushStack(type); // } tos--; Item i = stack[tos]; stack[tos] = null; if (i.getType() != type) throw new VerifyError("Expected:" + Integer.toString(type) + " Actual:" + Integer.toString(i.getType())); return i; }
Item pop() { // if (tos == 0) { // // the item requested in not on the virtual stack // // but already on the operand stack (it was pushed // // outside the current basic block) // // thus create a new stack item // Item it = createStack(type); // if (checkOperandStack) { // // insert at the begin of stack // // even if the vstack is empty, there // // may still be items popped from vstack // // that are not popped from operand stack // prependToOperandStack(it); // } // return it; // // pushStack(type); // } tos--; Item i = stack[tos]; stack[tos] = null; if (i.getType() != type) throw new VerifyError("Expected:" + Integer.toString(type) + " Actual:" + Integer.toString(i.getType())); return i; }
508
Item pop(int type) { // if (tos == 0) { // // the item requested in not on the virtual stack // // but already on the operand stack (it was pushed // // outside the current basic block) // // thus create a new stack item // Item it = createStack(type); // if (checkOperandStack) { // // insert at the begin of stack // // even if the vstack is empty, there // // may still be items popped from vstack // // that are not popped from operand stack // prependToOperandStack(it); // } // return it; // // pushStack(type); // } tos--; Item i = stack[tos]; stack[tos] = null; if (i.getType() != type) throw new VerifyError("Expected:" + Integer.toString(type) + " Actual:" + Integer.toString(i.getType())); return i; }
Item pop(int type) { // if (tos == 0) { // // the item requested in not on the virtual stack // // but already on the operand stack (it was pushed // // outside the current basic block) // // thus create a new stack item // Item it = createStack(type); // if (checkOperandStack) { // // insert at the begin of stack // // even if the vstack is empty, there // // may still be items popped from vstack // // that are not popped from operand stack // prependToOperandStack(it); // } // return it; // // pushStack(type); // } tos--; Item i = stack[tos]; stack[tos] = null; if (i.getType() != type) throw new VerifyError("Expected:" + Integer.toString(type) + " Actual:" + Integer.toString(i.getType())); return i; }
509
public boolean request(Register register) { return request(register, null); }
public boolean request(Register register) { return request(register, null); }
510
public StackException(String s) { super(s); }
public StackException(String s) { super(s); }
511
protected void initMain(X86Stream os, PluginRegistry registry) throws BuildException, ClassNotFoundException { os.setObjectRef(new Label("$$Initialize Main")); VmType mainClass = loadClass(Main.class); VmStaticField registryField = (VmStaticField) mainClass.getField(Main.REGISTRY_FIELD_NAME); // Setup STATICS register (EDI) os.writeMOV_Const(Register.EDI, statics.getTable()); /* Set Main.pluginRegistry */ os.writeMOV_Const(Register.EBX, registry); final int rfOffset = (VmArray.DATA_OFFSET + registryField.getStaticsIndex()) << 2; os.writeMOV(INTSIZE, Register.EDI, rfOffset, Register.EBX); }
protected void initMain(X86Stream os, PluginRegistry registry) throws BuildException, ClassNotFoundException { os.setObjectRef(new Label("$$Initialize Main")); VmType mainClass = loadClass(Main.class); VmStaticField registryField = (VmStaticField) mainClass.getField(Main.REGISTRY_FIELD_NAME); // Setup STATICS register (EDI) os.writeMOV_Const(Register.EDI, statics.getTable()); /* Set Main.pluginRegistry */ os.writeMOV_Const(Register.EBX, registry); final int rfOffset = (VmArray.DATA_OFFSET + registryField.getStaticsIndex()) << 2; os.writeMOV(INTSIZE, Register.EDI, rfOffset, Register.EBX); }
513
public final VmField getField(String name) { return getField(name, null); }
public final VmField getField(String name) { return getField(name, null); }
516
public ServerSocket() throws IOException { if (factory != null) impl = factory.createSocketImpl(); else impl = new PlainSocketImpl(); impl.create(true); }
ServerSocket(SocketImpl impl) throws IOException { if (factory != null) impl = factory.createSocketImpl(); else impl = new PlainSocketImpl(); impl.create(true); }
517
public ServerSocket() throws IOException { if (factory != null) impl = factory.createSocketImpl(); else impl = new PlainSocketImpl(); impl.create(true); }
public ServerSocket() throws IOException { if (factory != null) impl = factory.createSocketImpl(); else impl = new PlainSocketImpl(); impl.create(true); }
518
public ServerSocket() throws IOException { if (factory != null) impl = factory.createSocketImpl(); else impl = new PlainSocketImpl(); impl.create(true); }
public ServerSocket() throws IOException { if (factory != null) impl = factory.createSocketImpl(); else impl = new PlainSocketImpl(); this.impl = impl; this.impl.create(true); }
519
public static void main(String args[]) throws SecurityException, IOException, ClassNotFoundException { X86CpuID cpuId = X86CpuID.createID("p5"); TextX86Stream os = new TextX86Stream(new OutputStreamWriter(System.out), cpuId); X86CodeGenerator x86cg = new X86CodeGenerator(os); VmByteCode code = loadByteCode(args); IRControlFlowGraph cfg = new IRControlFlowGraph(code); IRGenerator irg = new IRGenerator(cfg); BytecodeParser.parse(code, irg); BootableArrayList quads = irg.getQuadList(); int n = quads.size(); BootableHashMap liveVariables = new BootableHashMap(); for (int i=0; i<n; i+=1) { Quad quad = (Quad) quads.get(i); quad.doPass2(liveVariables); } Collection lv = liveVariables.values(); n = lv.size(); LiveRange[] liveRanges = new LiveRange[n]; Iterator it = lv.iterator(); for (int i=0; i<n; i+=1) { Variable v = (Variable) it.next(); liveRanges[i] = new LiveRange(v); } Arrays.sort(liveRanges); LinearScanAllocator lsa = new LinearScanAllocator(liveRanges); lsa.allocate(); x86cg.setArgumentVariables(irg.getVariables(), irg.getNoArgs()); x86cg.setSpilledVariables(lsa.getSpilledVariables()); x86cg.emitHeader(); n = quads.size(); for (int i=0; i<n; i+=1) { Quad quad = (Quad) quads.get(i); if (!quad.isDeadCode()) { quad.generateCode(x86cg); } } os.flush();/* BytecodeViewer bv = new BytecodeViewer(); BytecodeParser.parse(code, bv); // System.out.println(cfg.toString()); // System.out.println(); boolean printDeadCode = false; boolean printDetail = false; IRBasicBlock currentBlock = null; for (int i=0; i<n; i+=1) { Quad quad = (Quad) quads.get(i); if (currentBlock != quad.getBasicBlock()) { currentBlock = quad.getBasicBlock(); System.out.println(); System.out.println(currentBlock); } if (printDeadCode && quad.isDeadCode()) { if (printDetail) { printQuadDetail(quad); } System.out.println(quad); } if (!quad.isDeadCode()) { if (printDetail) { printQuadDetail(quad); } System.out.println(quad); } } System.out.println(); System.out.println("Live ranges:"); n = lv.size(); for (int i=0; i<n; i+=1) { System.out.println(liveRanges[i]); }*/ }
public static void main(String args[]) throws SecurityException, IOException, ClassNotFoundException { X86CpuID cpuId = X86CpuID.createID("p5"); TextX86Stream os = new TextX86Stream(new OutputStreamWriter(System.out), cpuId); X86CodeGenerator x86cg = new X86CodeGenerator(os); VmByteCode code = loadByteCode(args); IRControlFlowGraph cfg = new IRControlFlowGraph(code); IRGenerator irg = new IRGenerator(cfg); BytecodeParser.parse(code, irg); BootableArrayList quads = irg.getQuadList(); int n = quads.size(); BootableHashMap liveVariables = new BootableHashMap(); for (int i=0; i<n; i+=1) { Quad quad = (Quad) quads.get(i); quad.doPass2(liveVariables); } Collection lv = liveVariables.values(); n = lv.size(); LiveRange[] liveRanges = new LiveRange[n]; Iterator it = lv.iterator(); for (int i=0; i<n; i+=1) { Variable v = (Variable) it.next(); liveRanges[i] = new LiveRange(v); } Arrays.sort(liveRanges); LinearScanAllocator lsa = new LinearScanAllocator(liveRanges); lsa.allocate(); x86cg.setArgumentVariables(irg.getVariables(), irg.getNoArgs()); x86cg.setSpilledVariables(lsa.getSpilledVariables()); x86cg.emitHeader(); n = quads.size(); for (int i=0; i<n; i+=1) { Quad quad = (Quad) quads.get(i); if (!quad.isDeadCode()) { quad.generateCode(x86cg); } } os.flush();/* BytecodeViewer bv = new BytecodeViewer(); BytecodeParser.parse(code, bv); // System.out.println(cfg.toString()); // System.out.println(); boolean printDeadCode = false; boolean printDetail = false; IRBasicBlock currentBlock = null; for (int i=0; i<n; i+=1) { Quad quad = (Quad) quads.get(i); if (currentBlock != quad.getBasicBlock()) { currentBlock = quad.getBasicBlock(); System.out.println(); System.out.println(currentBlock); } if (printDeadCode && quad.isDeadCode()) { if (printDetail) { printQuadDetail(quad); } System.out.println(quad); } if (!quad.isDeadCode()) { if (printDetail) { printQuadDetail(quad); } System.out.println(quad); } } System.out.println(); System.out.println("Live ranges:"); n = lv.size(); for (int i=0; i<n; i+=1) { System.out.println(liveRanges[i]); }*/ }
520
public static int simple(int a0, int a1) { return -10; }
public static int simple(int a0, int a1) { int l0 = a1; return -l0; }
522
public Font deriveFont (float size){ return peer.deriveFont (this, size);}
public Font deriveFont (float size){ return peer.deriveFont (this, size);}
525
public LineMetrics getLineMetrics(String str, FontRenderContext frc) { return getLineMetrics (str, 0, str.length () - 1, frc); }
public LineMetrics getLineMetrics(String text, int begin, int limit, FontRenderContext rc) { return getLineMetrics (str, 0, str.length () - 1, frc); }
526
public LineMetrics getLineMetrics(String str, FontRenderContext frc) { return getLineMetrics (str, 0, str.length () - 1, frc); }
public LineMetrics getLineMetrics(String str, FontRenderContext frc) { return getLineMetrics (str, 0, str.length () - 1, frc); }
527
public void stateChanged(ChangeEvent event) throws NotImplementedException { // TODO: What should be done here, if anything? }
public void stateChanged(ChangeEvent event) { // TODO: What should be done here, if anything? }
528
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJMenuItem(); return accessibleContext; }
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { AccessibleJMenuItem ctx = new AccessibleJMenuItem(); addChangeListener(ctx); accessibleContext = ctx; } return accessibleContext; }
530
public void setMnemonic(int mne) { int old = getModel().getMnemonic(); if (old != mne) { getModel().setMnemonic(mne); if (text != null && ! text.equals("")) { // Since lower case char = upper case char for // mnemonic, we will convert both text and mnemonic // to upper case before checking if mnemonic character occurs // in the menu item text. int upperCaseMne = Character.toUpperCase((char) mne); String upperCaseText = text.toUpperCase(); setDisplayedMnemonicIndex(upperCaseText.indexOf(upperCaseMne)); } firePropertyChange(MNEMONIC_CHANGED_PROPERTY, old, mne); revalidate(); repaint(); } }
public void setMnemonic(char mne) { int old = getModel().getMnemonic(); if (old != mne) { getModel().setMnemonic(mne); if (text != null && ! text.equals("")) { // Since lower case char = upper case char for // mnemonic, we will convert both text and mnemonic // to upper case before checking if mnemonic character occurs // in the menu item text. int upperCaseMne = Character.toUpperCase((char) mne); String upperCaseText = text.toUpperCase(); setDisplayedMnemonicIndex(upperCaseText.indexOf(upperCaseMne)); } firePropertyChange(MNEMONIC_CHANGED_PROPERTY, old, mne); revalidate(); repaint(); } }
531
public void setMnemonic(int mne) { int old = getModel().getMnemonic(); if (old != mne) { getModel().setMnemonic(mne); if (text != null && ! text.equals("")) { // Since lower case char = upper case char for // mnemonic, we will convert both text and mnemonic // to upper case before checking if mnemonic character occurs // in the menu item text. int upperCaseMne = Character.toUpperCase((char) mne); String upperCaseText = text.toUpperCase(); setDisplayedMnemonicIndex(upperCaseText.indexOf(upperCaseMne)); } firePropertyChange(MNEMONIC_CHANGED_PROPERTY, old, mne); revalidate(); repaint(); } }
public void setMnemonic(int mne) { int old = getModel().getMnemonic(); if (old != mne) { getModel().setMnemonic(mne); if (text != null && ! text.equals("")) { // Since lower case char = upper case char for // mnemonic, we will convert both text and mnemonic // to upper case before checking if mnemonic character occurs // in the menu item text. int upperCaseMne = Character.toUpperCase((char) mne); String upperCaseText = text.toUpperCase(); setDisplayedMnemonicIndex(upperCaseText.indexOf(upperCaseMne)); } firePropertyChange(MNEMONIC_CHANGED_PROPERTY, old, mne); revalidate(); repaint(); } }
532
public String getHref() { return (String) ((XMLAttribute) attribHash.get("href")).getAttribValue(); }
public Href getHref() { return (String) ((XMLAttribute) attribHash.get("href")).getAttribValue(); }
533
public String getHref() { return (String) ((XMLAttribute) attribHash.get("href")).getAttribValue(); }
public String getHref() { return (Href) ((XMLAttribute) attribHash.get("href")).getAttribValue(); }
534
private void init() { classXDFNodeName = "data"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"compression"); attribOrder.add(0, "encoding"); attribOrder.add(0,"checksum"); attribOrder.add(0,"href"); //set up the attribute hashtable key with the default initial value attribHash.put("compression", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("encoding", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("checksum", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("href", new XMLAttribute(null, Constants.STRING_TYPE)); };
private void init() { classXDFNodeName = "data"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"compression"); attribOrder.add(0, "encoding"); attribOrder.add(0,"checksum"); attribOrder.add(0,"href"); //set up the attribute hashtable key with the default initial value attribHash.put("compression", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("encoding", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("checksum", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("href", new XMLAttribute(null, Constants.OBJECT_TYPE)); };
535
public void setHref (String strHref) { ((XMLAttribute) attribHash.get("href")).setAttribValue(strHref); }
public void setHref (Href hrefObj) { ((XMLAttribute) attribHash.get("href")).setAttribValue(strHref); }
536
public void setHref (String strHref) { ((XMLAttribute) attribHash.get("href")).setAttribValue(strHref); }
public void setHref (String strHref) { ((XMLAttribute) attribHash.get("href")).setAttribValue(hrefObj); }
537
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
538
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
539
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
540
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues, writeHrefAttribute ? false : true ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
541
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
542
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (!writeHrefAttribute && niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
543
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } if (!writeHrefAttribute) writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
544