bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public int getKeyPos(int pos) { int y = pos - startPos(); cursorPos = pos; return y; }
public int getKeyPos(int pos) { int y = pos - startPos(); cursorPos = pos; return y; }
1,152
public boolean isInField(int pos, boolean chgToField) { ScreenField sf; for (int x = 0;x < sizeFields; x++) { sf = screenFields[x]; if (sf.withinField(pos)) { if (chgToField) { currentField = sf; } return true; } } return false; }
public boolean isInField(int pos, boolean chgToField) { ScreenField sf; for (int x = 0;x < sizeFields; x++) { sf = screenFields[x]; if (sf.withinField(pos)) { if (chgToField) { currentField = sf; } return true; } } return false; }
1,153
public synchronized void drawImageBuffer(Graphics2D gg2d) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { System.out.println(" we got a null graphic object "); return; } synchronized (lock) { gg2d.drawImage(bi,null,0,0); // tell waiting threads to wake up lock.notifyAll(); } }
public synchronized void drawImageBuffer(Graphics2D gg2d,int x, int y, int width, int height) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { System.out.println(" we got a null graphic object "); return; } synchronized (lock) { gg2d.drawImage(bi,null,0,0); // tell waiting threads to wake up lock.notifyAll(); } }
1,154
public synchronized void drawImageBuffer(Graphics2D gg2d) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { System.out.println(" we got a null graphic object "); return; } synchronized (lock) { gg2d.drawImage(bi,null,0,0); // tell waiting threads to wake up lock.notifyAll(); } }
public synchronized void drawImageBuffer(Graphics2D gg2d) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { System.out.println(" we got a null graphic object "); return; } synchronized (lock) { gg2d.drawImage(bi.getSubimage(x,y,width,height),null,x + offLeft,y+ offTop); // tell waiting threads to wake up lock.notifyAll(); } }
1,155
public synchronized void drawImageBuffer(Graphics2D gg2d) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { System.out.println(" we got a null graphic object "); return; } synchronized (lock) { gg2d.drawImage(bi,null,0,0); // tell waiting threads to wake up lock.notifyAll(); } }
publicsynchronizedvoiddrawImageBuffer(Graphics2Dgg2d){/***@todothisisahackandshouldbefixedattherootoftheproblem*/if(gg2d==null){System.out.println("wegotanullgraphicobject");return;}synchronized(lock){gg2d.drawImage(bi,null,0,0);//tellwaitingthreadstowakeuplock.notifyAll();}}
1,156
public void setKeyStrokes (String strokes) { if (strokes != null) { keyStrokes.setLength(0);// System.out.println("set "+ keyStrokes); length = strokes.length(); } else { keyStrokes = new StringBuffer(); length = 0; } keyStrokes.append(strokes); index = 0; }
log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); publiclog.debug("set "+ keyStrokes); voidlog.debug("set "+ keyStrokes); setKeyStrokeslog.debug("set "+ keyStrokes); (Stringlog.debug("set "+ keyStrokes); strokes)log.debug("set "+ keyStrokes); {log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); iflog.debug("set "+ keyStrokes); (strokeslog.debug("set "+ keyStrokes); !=log.debug("set "+ keyStrokes); null)log.debug("set "+ keyStrokes); {log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); keyStrokes.setLength(0);//log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); System.out.println("setlog.debug("set "+ keyStrokes); "+log.debug("set "+ keyStrokes); keyStrokes);log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); lengthlog.debug("set "+ keyStrokes); =log.debug("set "+ keyStrokes); strokes.length();log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); }log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); elselog.debug("set "+ keyStrokes); {log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); keyStrokeslog.debug("set "+ keyStrokes); =log.debug("set "+ keyStrokes); newlog.debug("set "+ keyStrokes); StringBuffer();log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); lengthlog.debug("set "+ keyStrokes); =log.debug("set "+ keyStrokes); 0;log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); }log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); keyStrokes.append(strokes);log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); indexlog.debug("set "+ keyStrokes); =log.debug("set "+ keyStrokes); 0;log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); log.debug("set "+ keyStrokes); }
1,158
public String nextKeyStroke() { String s = ""; boolean gotOne = false; int start = index; if(length > index) { sb.setLength(0); char c = keyStrokes.charAt(index); switch(c) { case '[': sb.append(c); index++; // we need to throw an error here if(index >= length) { System.out.println(" mnemonic key was incomplete :1 " + "at position " + index + " len " + length ); } else { c = keyStrokes.charAt(index); if(c == '[') index++; else { while(!gotOne) { if(c == ']') { // did we find an ending sb.append(c); index++; gotOne = true; } else { sb.append(c); index++; // we need to throw an error here because we did not // find an ending for the potential mnemonic if(index >= length) { System.out.println( " mnemonic key was incomplete ending not found :2 " + "at position " + index); } c = keyStrokes.charAt(index); } } } } break; case ']': index++; if(index >= length) { System.out.println( " mnemonic key was incomplete ending not found :3 " + "at position " + index); sb.append(c); index++; } else { c = keyStrokes.charAt(index); if(c == ']') { sb.append(c); index++; } else { System.out.println( " mnemonic key was incomplete beginning not found :4 " + "at position " + index); } } break; default: sb.append(c); index++; break; } if(sb != null) { s = new String(sb); } }// System.out.println("next "+ keyStrokes); return s; }
public String nextKeyStroke() { String s = ""; boolean gotOne = false; int start = index; if(length > index) { sb.setLength(0); char c = keyStrokes.charAt(index); switch(c) { case '[': sb.append(c); index++; // we need to throw an error here if(index >= length) { log.warn(" mnemonic key was incomplete :1 " + "at position " + index + " len " + length ); } else { c = keyStrokes.charAt(index); if(c == '[') index++; else { while(!gotOne) { if(c == ']') { // did we find an ending sb.append(c); index++; gotOne = true; } else { sb.append(c); index++; // we need to throw an error here because we did not // find an ending for the potential mnemonic if(index >= length) { System.out.println( " mnemonic key was incomplete ending not found :2 " + "at position " + index); } c = keyStrokes.charAt(index); } } } } break; case ']': index++; if(index >= length) { System.out.println( " mnemonic key was incomplete ending not found :3 " + "at position " + index); sb.append(c); index++; } else { c = keyStrokes.charAt(index); if(c == ']') { sb.append(c); index++; } else { System.out.println( " mnemonic key was incomplete beginning not found :4 " + "at position " + index); } } break; default: sb.append(c); index++; break; } if(sb != null) { s = new String(sb); } }// System.out.println("next "+ keyStrokes); return s; }
1,159
public String nextKeyStroke() { String s = ""; boolean gotOne = false; int start = index; if(length > index) { sb.setLength(0); char c = keyStrokes.charAt(index); switch(c) { case '[': sb.append(c); index++; // we need to throw an error here if(index >= length) { System.out.println(" mnemonic key was incomplete :1 " + "at position " + index + " len " + length ); } else { c = keyStrokes.charAt(index); if(c == '[') index++; else { while(!gotOne) { if(c == ']') { // did we find an ending sb.append(c); index++; gotOne = true; } else { sb.append(c); index++; // we need to throw an error here because we did not // find an ending for the potential mnemonic if(index >= length) { System.out.println( " mnemonic key was incomplete ending not found :2 " + "at position " + index); } c = keyStrokes.charAt(index); } } } } break; case ']': index++; if(index >= length) { System.out.println( " mnemonic key was incomplete ending not found :3 " + "at position " + index); sb.append(c); index++; } else { c = keyStrokes.charAt(index); if(c == ']') { sb.append(c); index++; } else { System.out.println( " mnemonic key was incomplete beginning not found :4 " + "at position " + index); } } break; default: sb.append(c); index++; break; } if(sb != null) { s = new String(sb); } }// System.out.println("next "+ keyStrokes); return s; }
public String nextKeyStroke() { String s = ""; boolean gotOne = false; int start = index; if(length > index) { sb.setLength(0); char c = keyStrokes.charAt(index); switch(c) { case '[': sb.append(c); index++; // we need to throw an error here if(index >= length) { System.out.println(" mnemonic key was incomplete :1 " + "at position " + index + " len " + length ); } else { c = keyStrokes.charAt(index); if(c == '[') index++; else { while(!gotOne) { if(c == ']') { // did we find an ending sb.append(c); index++; gotOne = true; } else { sb.append(c); index++; // we need to throw an error here because we did not // find an ending for the potential mnemonic if(index >= length) { log.warn( " mnemonic key was incomplete ending not found :2 " + "at position " + index); } c = keyStrokes.charAt(index); } } } } break; case ']': index++; if(index >= length) { log.warn( " mnemonic key was incomplete ending not found :3 " + "at position " + index); sb.append(c); index++; } else { c = keyStrokes.charAt(index); if(c == ']') { sb.append(c); index++; } else { log.warn( " mnemonic key was incomplete beginning not found :4 " + "at position " + index); } } break; default: sb.append(c); index++; break; } if(sb != null) { s = new String(sb); } }// System.out.println("next "+ keyStrokes); return s; }
1,160
public String nextKeyStroke() { String s = ""; boolean gotOne = false; int start = index; if(length > index) { sb.setLength(0); char c = keyStrokes.charAt(index); switch(c) { case '[': sb.append(c); index++; // we need to throw an error here if(index >= length) { System.out.println(" mnemonic key was incomplete :1 " + "at position " + index + " len " + length ); } else { c = keyStrokes.charAt(index); if(c == '[') index++; else { while(!gotOne) { if(c == ']') { // did we find an ending sb.append(c); index++; gotOne = true; } else { sb.append(c); index++; // we need to throw an error here because we did not // find an ending for the potential mnemonic if(index >= length) { System.out.println( " mnemonic key was incomplete ending not found :2 " + "at position " + index); } c = keyStrokes.charAt(index); } } } } break; case ']': index++; if(index >= length) { System.out.println( " mnemonic key was incomplete ending not found :3 " + "at position " + index); sb.append(c); index++; } else { c = keyStrokes.charAt(index); if(c == ']') { sb.append(c); index++; } else { System.out.println( " mnemonic key was incomplete beginning not found :4 " + "at position " + index); } } break; default: sb.append(c); index++; break; } if(sb != null) { s = new String(sb); } }// System.out.println("next "+ keyStrokes); return s; }
public String nextKeyStroke() { String s = ""; boolean gotOne = false; int start = index; if(length > index) { sb.setLength(0); char c = keyStrokes.charAt(index); switch(c) { case '[': sb.append(c); index++; // we need to throw an error here if(index >= length) { System.out.println(" mnemonic key was incomplete :1 " + "at position " + index + " len " + length ); } else { c = keyStrokes.charAt(index); if(c == '[') index++; else { while(!gotOne) { if(c == ']') { // did we find an ending sb.append(c); index++; gotOne = true; } else { sb.append(c); index++; // we need to throw an error here because we did not // find an ending for the potential mnemonic if(index >= length) { log.warn( " mnemonic key was incomplete ending not found :2 " + "at position " + index); } c = keyStrokes.charAt(index); } } } } break; case ']': index++; if(index >= length) { log.warn( " mnemonic key was incomplete ending not found :3 " + "at position " + index); sb.append(c); index++; } else { c = keyStrokes.charAt(index); if(c == ']') { sb.append(c); index++; } else { log.warn( " mnemonic key was incomplete beginning not found :4 " + "at position " + index); } } break; default: sb.append(c); index++; break; } if(sb != null) { s = new String(sb); } }// System.out.println("next "+ keyStrokes); return s; }
1,161
public String nextKeyStroke() { String s = ""; boolean gotOne = false; int start = index; if(length > index) { sb.setLength(0); char c = keyStrokes.charAt(index); switch(c) { case '[': sb.append(c); index++; // we need to throw an error here if(index >= length) { System.out.println(" mnemonic key was incomplete :1 " + "at position " + index + " len " + length ); } else { c = keyStrokes.charAt(index); if(c == '[') index++; else { while(!gotOne) { if(c == ']') { // did we find an ending sb.append(c); index++; gotOne = true; } else { sb.append(c); index++; // we need to throw an error here because we did not // find an ending for the potential mnemonic if(index >= length) { System.out.println( " mnemonic key was incomplete ending not found :2 " + "at position " + index); } c = keyStrokes.charAt(index); } } } } break; case ']': index++; if(index >= length) { System.out.println( " mnemonic key was incomplete ending not found :3 " + "at position " + index); sb.append(c); index++; } else { c = keyStrokes.charAt(index); if(c == ']') { sb.append(c); index++; } else { System.out.println( " mnemonic key was incomplete beginning not found :4 " + "at position " + index); } } break; default: sb.append(c); index++; break; } if(sb != null) { s = new String(sb); } }// System.out.println("next "+ keyStrokes); return s; }
public String nextKeyStroke() { String s = ""; boolean gotOne = false; int start = index; if(length > index) { sb.setLength(0); char c = keyStrokes.charAt(index); switch(c) { case '[': sb.append(c); index++; // we need to throw an error here if(index >= length) { System.out.println(" mnemonic key was incomplete :1 " + "at position " + index + " len " + length ); } else { c = keyStrokes.charAt(index); if(c == '[') index++; else { while(!gotOne) { if(c == ']') { // did we find an ending sb.append(c); index++; gotOne = true; } else { sb.append(c); index++; // we need to throw an error here because we did not // find an ending for the potential mnemonic if(index >= length) { log.warn( " mnemonic key was incomplete ending not found :2 " + "at position " + index); } c = keyStrokes.charAt(index); } } } } break; case ']': index++; if(index >= length) { log.warn( " mnemonic key was incomplete ending not found :3 " + "at position " + index); sb.append(c); index++; } else { c = keyStrokes.charAt(index); if(c == ']') { sb.append(c); index++; } else { log.warn( " mnemonic key was incomplete beginning not found :4 " + "at position " + index); } } break; default: sb.append(c); index++; break; } if(sb != null) { s = new String(sb); } }// System.out.println("next "+ keyStrokes); return s; }
1,162
public String nextKeyStroke() { String s = ""; boolean gotOne = false; int start = index; if(length > index) { sb.setLength(0); char c = keyStrokes.charAt(index); switch(c) { case '[': sb.append(c); index++; // we need to throw an error here if(index >= length) { System.out.println(" mnemonic key was incomplete :1 " + "at position " + index + " len " + length ); } else { c = keyStrokes.charAt(index); if(c == '[') index++; else { while(!gotOne) { if(c == ']') { // did we find an ending sb.append(c); index++; gotOne = true; } else { sb.append(c); index++; // we need to throw an error here because we did not // find an ending for the potential mnemonic if(index >= length) { System.out.println( " mnemonic key was incomplete ending not found :2 " + "at position " + index); } c = keyStrokes.charAt(index); } } } } break; case ']': index++; if(index >= length) { System.out.println( " mnemonic key was incomplete ending not found :3 " + "at position " + index); sb.append(c); index++; } else { c = keyStrokes.charAt(index); if(c == ']') { sb.append(c); index++; } else { System.out.println( " mnemonic key was incomplete beginning not found :4 " + "at position " + index); } } break; default: sb.append(c); index++; break; } if(sb != null) { s = new String(sb); } }// System.out.println("next "+ keyStrokes); return s; }
log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); publiclog.debug("next "+ keyStrokes); Stringlog.debug("next "+ keyStrokes); nextKeyStroke()log.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); Stringlog.debug("next "+ keyStrokes); slog.debug("next "+ keyStrokes); =log.debug("next "+ keyStrokes); "";log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); booleanlog.debug("next "+ keyStrokes); gotOnelog.debug("next "+ keyStrokes); =log.debug("next "+ keyStrokes); false;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); intlog.debug("next "+ keyStrokes); startlog.debug("next "+ keyStrokes); =log.debug("next "+ keyStrokes); index;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); if(lengthlog.debug("next "+ keyStrokes); >log.debug("next "+ keyStrokes); index)log.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); sb.setLength(0);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); charlog.debug("next "+ keyStrokes); clog.debug("next "+ keyStrokes); =log.debug("next "+ keyStrokes); keyStrokes.charAt(index);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); switch(c)log.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); caselog.debug("next "+ keyStrokes); '[':log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); sb.append(c);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); index++;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); //log.debug("next "+ keyStrokes); welog.debug("next "+ keyStrokes); needlog.debug("next "+ keyStrokes); tolog.debug("next "+ keyStrokes); throwlog.debug("next "+ keyStrokes); anlog.debug("next "+ keyStrokes); errorlog.debug("next "+ keyStrokes); herelog.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); if(indexlog.debug("next "+ keyStrokes); >=log.debug("next "+ keyStrokes); length)log.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); System.out.println("log.debug("next "+ keyStrokes); mnemoniclog.debug("next "+ keyStrokes); keylog.debug("next "+ keyStrokes); waslog.debug("next "+ keyStrokes); incompletelog.debug("next "+ keyStrokes); :1log.debug("next "+ keyStrokes); "log.debug("next "+ keyStrokes); +log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); "atlog.debug("next "+ keyStrokes); positionlog.debug("next "+ keyStrokes); "log.debug("next "+ keyStrokes); +log.debug("next "+ keyStrokes); indexlog.debug("next "+ keyStrokes); +log.debug("next "+ keyStrokes); "log.debug("next "+ keyStrokes); lenlog.debug("next "+ keyStrokes); "log.debug("next "+ keyStrokes); +log.debug("next "+ keyStrokes); lengthlog.debug("next "+ keyStrokes); );log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); elselog.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); clog.debug("next "+ keyStrokes); =log.debug("next "+ keyStrokes); keyStrokes.charAt(index);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); if(clog.debug("next "+ keyStrokes); ==log.debug("next "+ keyStrokes); '[')log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); index++;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); elselog.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); while(!gotOne)log.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); if(clog.debug("next "+ keyStrokes); ==log.debug("next "+ keyStrokes); ']')log.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); //log.debug("next "+ keyStrokes); didlog.debug("next "+ keyStrokes); welog.debug("next "+ keyStrokes); findlog.debug("next "+ keyStrokes); anlog.debug("next "+ keyStrokes); endinglog.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); sb.append(c);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); index++;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); gotOnelog.debug("next "+ keyStrokes); =log.debug("next "+ keyStrokes); true;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); elselog.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); sb.append(c);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); index++;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); //log.debug("next "+ keyStrokes); welog.debug("next "+ keyStrokes); needlog.debug("next "+ keyStrokes); tolog.debug("next "+ keyStrokes); throwlog.debug("next "+ keyStrokes); anlog.debug("next "+ keyStrokes); errorlog.debug("next "+ keyStrokes); herelog.debug("next "+ keyStrokes); becauselog.debug("next "+ keyStrokes); welog.debug("next "+ keyStrokes); didlog.debug("next "+ keyStrokes); notlog.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); //log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); findlog.debug("next "+ keyStrokes); anlog.debug("next "+ keyStrokes); endinglog.debug("next "+ keyStrokes); forlog.debug("next "+ keyStrokes); thelog.debug("next "+ keyStrokes); potentiallog.debug("next "+ keyStrokes); mnemoniclog.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); if(indexlog.debug("next "+ keyStrokes); >=log.debug("next "+ keyStrokes); length)log.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); System.out.println(log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); "log.debug("next "+ keyStrokes); mnemoniclog.debug("next "+ keyStrokes); keylog.debug("next "+ keyStrokes); waslog.debug("next "+ keyStrokes); incompletelog.debug("next "+ keyStrokes); endinglog.debug("next "+ keyStrokes); notlog.debug("next "+ keyStrokes); foundlog.debug("next "+ keyStrokes); :2log.debug("next "+ keyStrokes); "log.debug("next "+ keyStrokes); +log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); "atlog.debug("next "+ keyStrokes); positionlog.debug("next "+ keyStrokes); "log.debug("next "+ keyStrokes); +log.debug("next "+ keyStrokes); index);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); clog.debug("next "+ keyStrokes); =log.debug("next "+ keyStrokes); keyStrokes.charAt(index);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); break;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); caselog.debug("next "+ keyStrokes); ']':log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); index++;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); if(indexlog.debug("next "+ keyStrokes); >=log.debug("next "+ keyStrokes); length)log.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); System.out.println(log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); "log.debug("next "+ keyStrokes); mnemoniclog.debug("next "+ keyStrokes); keylog.debug("next "+ keyStrokes); waslog.debug("next "+ keyStrokes); incompletelog.debug("next "+ keyStrokes); endinglog.debug("next "+ keyStrokes); notlog.debug("next "+ keyStrokes); foundlog.debug("next "+ keyStrokes); :3log.debug("next "+ keyStrokes); "log.debug("next "+ keyStrokes); +log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); "atlog.debug("next "+ keyStrokes); positionlog.debug("next "+ keyStrokes); "log.debug("next "+ keyStrokes); +log.debug("next "+ keyStrokes); index);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); sb.append(c);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); index++;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); elselog.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); clog.debug("next "+ keyStrokes); =log.debug("next "+ keyStrokes); keyStrokes.charAt(index);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); if(clog.debug("next "+ keyStrokes); ==log.debug("next "+ keyStrokes); ']')log.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); sb.append(c);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); index++;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); elselog.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); System.out.println(log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); "log.debug("next "+ keyStrokes); mnemoniclog.debug("next "+ keyStrokes); keylog.debug("next "+ keyStrokes); waslog.debug("next "+ keyStrokes); incompletelog.debug("next "+ keyStrokes); beginninglog.debug("next "+ keyStrokes); notlog.debug("next "+ keyStrokes); foundlog.debug("next "+ keyStrokes); :4log.debug("next "+ keyStrokes); "log.debug("next "+ keyStrokes); +log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); "atlog.debug("next "+ keyStrokes); positionlog.debug("next "+ keyStrokes); "log.debug("next "+ keyStrokes); +log.debug("next "+ keyStrokes); index);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); break;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); default:log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); sb.append(c);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); index++;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); break;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); if(sblog.debug("next "+ keyStrokes); !=log.debug("next "+ keyStrokes); null)log.debug("next "+ keyStrokes); {log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); slog.debug("next "+ keyStrokes); =log.debug("next "+ keyStrokes); newlog.debug("next "+ keyStrokes); String(sb);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }//log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); System.out.println("nextlog.debug("next "+ keyStrokes); "+log.debug("next "+ keyStrokes); keyStrokes);log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); returnlog.debug("next "+ keyStrokes); s;log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); log.debug("next "+ keyStrokes); }
1,163
public synchronized StringBuffer insert(int offset, char ch) { if (offset < 0 || offset > count) throw new StringIndexOutOfBoundsException(offset); ensureCapacity_unsynchronized(count + 1); VMSystem.arraycopy(value, offset, value, offset + 1, count - offset); value[offset] = ch; count++; return this; }
public synchronized StringBuffer insert(int offset, char[] str, int str_offset, int len) { if (offset < 0 || offset > count) throw new StringIndexOutOfBoundsException(offset); ensureCapacity_unsynchronized(count + 1); VMSystem.arraycopy(value, offset, value, offset + 1, count - offset); value[offset] = ch; count++; return this; }
1,164
public synchronized StringBuffer insert(int offset, char ch) { if (offset < 0 || offset > count) throw new StringIndexOutOfBoundsException(offset); ensureCapacity_unsynchronized(count + 1); VMSystem.arraycopy(value, offset, value, offset + 1, count - offset); value[offset] = ch; count++; return this; }
public synchronized StringBuffer insert(int offset, char ch) { if (offset < 0 || offset > count) throw new StringIndexOutOfBoundsException(offset); ensureCapacity_unsynchronized(count + 1); VMSystem.arraycopy(value, offset, value, offset + 1, count - offset); value[offset] = ch; count++; return this; }
1,165
public int getHeight(ImageObserver io) { synchronized (lock) { // tell waiting threads to wake up lock.notifyAll(); return bi.getHeight(io); } }
public int getHeight() { synchronized (lock) { // tell waiting threads to wake up lock.notifyAll(); return bi.getHeight(io); } }
1,166
public int getHeight(ImageObserver io) { synchronized (lock) { // tell waiting threads to wake up lock.notifyAll(); return bi.getHeight(io); } }
public int getHeight(ImageObserver io) { synchronized (lock) { // tell waiting threads to wake up lock.notifyAll(); return bi.getHeight(); } }
1,167
protected final int getDataLength(int status) throws InvalidMidiDataException { int originalStatus = status; if ((status & 0xF0) != 0xF0) status &= 0xF0; switch (status) { case NOTE_OFF: case NOTE_ON: case POLY_PRESSURE: case CONTROL_CHANGE: case PITCH_BEND: case SONG_POSITION_POINTER: return 2; case PROGRAM_CHANGE: case CHANNEL_PRESSURE: case SONG_SELECT: case 0xF5: // FIXME: unofficial bus select. Not in spec?? return 1; case SYSTEM_EXCLUSIVE: return 0; // FIXME: is this correct? case TUNE_REQUEST: case END_OF_EXCLUSIVE: case TIMING_CLOCK: case START: case CONTINUE: case STOP: case ACTIVE_SENSING: case SYSTEM_RESET: return 0; default: throw new InvalidMidiDataException ("Invalid status: 0x" + Integer.toHexString(originalStatus)); } }
protected final int getDataLength(int status) throws InvalidMidiDataException { int originalStatus = status; if ((status & 0xF0) != 0xF0) status &= 0xF0; switch (status) { case NOTE_OFF: case NOTE_ON: case POLY_PRESSURE: case CONTROL_CHANGE: case PITCH_BEND: case SONG_POSITION_POINTER: return 2; case PROGRAM_CHANGE: case CHANNEL_PRESSURE: case SONG_SELECT: case 0xF5: // FIXME: unofficial bus select. Not in spec?? return 1; case SYSTEM_EXCLUSIVE: return 0; // FIXME: is this correct? case TUNE_REQUEST: case END_OF_EXCLUSIVE: case TIMING_CLOCK: case START: case CONTINUE: case STOP: case ACTIVE_SENSING: case SYSTEM_RESET: return 0; default: throw new InvalidMidiDataException ("Invalid status: 0x" + Integer.toHexString(originalStatus)); } }
1,168
public TTFFileInput(RandomAccessFile file) throws IOException { this(file, 0, file.length()); }
public TTFFileInput(RandomAccessFile file) throws IOException { this(file, 0, file.length()); }
1,169
public GrubBootSector(byte[] src) { super(src); }
public GrubBootSector(byte[] src) { super(src); }
1,170
public void actionPerformed(ActionEvent event) { showTip(); if (insideTimer != null) insideTimer.start(); }
public void actionPerformed(ActionEvent event) { showTip(); if (insideTimer != null) insideTimer.start(); }
1,171
void hideTip() { if (currentTip == null || ! currentTip.isVisible() || ! enabled) return; currentTip.setVisible(false); if (containerPanel != null) { Container parent = containerPanel.getParent(); if (parent == null) return; parent.remove(containerPanel); parent.invalidate(); parent.validate(); parent.repaint(); parent = currentTip.getParent(); if (parent == null) return; parent.remove(currentTip); containerPanel = null; } if (tooltipWindow != null) { tooltipWindow.hide(); tooltipWindow.dispose(); tooltipWindow = null; } }
void hideTip() { if (currentTip == null || ! currentTip.isVisible() || ! enabled) return; currentTip.setVisible(false); if (containerPanel != null) { Container parent = containerPanel.getParent(); if (parent == null) return; parent.remove(containerPanel); parent.invalidate(); parent.validate(); parent.repaint(); parent = currentTip.getParent(); if (parent == null) return; parent.remove(currentTip); containerPanel = null; } if (tooltipWindow != null) { tooltipWindow.hide(); tooltipWindow.dispose(); tooltipWindow = null; } }
1,172
public void mouseEntered(MouseEvent event) { if (currentComponent != null && getContentPaneDeepestComponent(event) == currentComponent) return; currentPoint = event.getPoint(); currentComponent = (Component) event.getSource(); if (exitTimer.isRunning()) { exitTimer.stop(); showTip(); insideTimer.start(); return; } // This should always be stopped unless we have just fake-exited. if (! enterTimer.isRunning()) enterTimer.start(); }
public void mouseEntered(MouseEvent event) { if (currentComponent != null && getContentPaneDeepestComponent(event) == currentComponent) return; currentPoint = event.getPoint(); currentComponent = (Component) event.getSource(); if (exitTimer.isRunning()) { exitTimer.stop(); showTip(); insideTimer.start(); return; } // This should always be stopped unless we have just fake-exited. if (! enterTimer.isRunning()) enterTimer.start(); }
1,173
public void mouseMoved(MouseEvent event) { currentPoint = event.getPoint(); if (currentTip != null) { if (currentComponent == null) currentComponent = (Component) event.getSource(); String text = ((JComponent) currentComponent).getToolTipText(event); currentTip.setTipText(text); } if (enterTimer.isRunning()) enterTimer.restart(); }
public void mouseMoved(MouseEvent event) { currentPoint = event.getPoint(); if (currentTip != null) { if (currentComponent == null) currentComponent = (Component) event.getSource(); String text = ((JComponent) currentComponent).getToolTipText(event); currentTip.setTipText(text); } if (enterTimer.isRunning()) enterTimer.restart(); }
1,174
public void mouseMoved(MouseEvent event) { currentPoint = event.getPoint(); if (currentTip != null) { if (currentComponent == null) currentComponent = (Component) event.getSource(); String text = ((JComponent) currentComponent).getToolTipText(event); currentTip.setTipText(text); } if (enterTimer.isRunning()) enterTimer.restart(); }
public void mouseMoved(MouseEvent event) { currentPoint = event.getPoint(); if (currentTip != null) { if (currentComponent == null) currentComponent = (Component) event.getSource(); String text = ((JComponent) currentComponent).getToolTipText(event); currentTip.setTipText(text); } if (enterTimer.isRunning()) enterTimer.restart(); }
1,175
public void mousePressed(MouseEvent event) { currentPoint = event.getPoint(); if (enterTimer.isRunning()) enterTimer.restart(); else if (insideTimer.isRunning()) { insideTimer.stop(); hideTip(); } if (currentComponent == null) currentComponent = (Component) event.getSource(); currentComponent.invalidate(); currentComponent.validate(); currentComponent.repaint(); }
public void mousePressed(MouseEvent event) { currentPoint = event.getPoint(); if (enterTimer.isRunning()) enterTimer.restart(); else if (insideTimer.isRunning()) { insideTimer.stop(); hideTip(); } if (currentComponent == null) currentComponent = (Component) event.getSource(); currentComponent.invalidate(); currentComponent.validate(); currentComponent.repaint(); }
1,176
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
void showTip() { if (!enabled || currentComponent == null || !currentComponent.isEnabled() || (currentTip != null && currentTip.isVisible())) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
1,177
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
1,178
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (parent instanceof JPopupMenu) setLightWeightPopupEnabled(((JPopupMenu) parent).isLightWeightPopupEnabled()); else setLightWeightPopupEnabled(true); if (isLightWeightPopupEnabled()) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
1,179
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
1,180
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
1,181
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
1,182
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
1,183
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
void showTip() { if (! enabled || currentComponent == null) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JComponent) currentComponent).createToolTip(); Point p = currentPoint; Dimension dims = currentTip.getPreferredSize(); if (canToolTipFit(currentTip)) { JLayeredPane pane = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class, currentComponent)) .getLayeredPane(); // This should never happen, but just in case. if (pane == null) return; if (containerPanel != null) hideTip(); if (isLightWeightPopupEnabled()) { containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); } else { containerPanel = new JPanel(); containerPanel.add(currentTip); } LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = getGoodPoint(p, pane, currentTip, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.height); currentTip.setBounds(0, 0, dims.width, dims.height); pane.revalidate(); pane.repaint(); } else { SwingUtilities.convertPointToScreen(p, currentComponent); tooltipWindow = new JWindow(); tooltipWindow.getContentPane().add(currentTip); tooltipWindow.setFocusable(false); tooltipWindow.pack(); tooltipWindow.setBounds(p.x, p.y, dims.width, dims.height); tooltipWindow.show(); } currentTip.setVisible(true); }
1,184
private void loadConfigurationResource() { sesProps = new Properties(); try { FileInputStream in = new FileInputStream(getConfigurationResource()); sesProps.load(in); if (sesProps.size() == 0) loadDefaults(); } catch (IOException ioe) { System.out.println("Information Message: Properties file is being " + "created for first time use: File name " + getConfigurationResource()); loadDefaults(); } catch (SecurityException se) { System.out.println(se.getMessage()); } }
private void loadConfigurationResource() { sesProps = new Properties(); try { FileInputStream in = new FileInputStream(settingsDirectory() + getConfigurationResource()); sesProps.load(in); if (sesProps.size() == 0) loadDefaults(); } catch (IOException ioe) { System.out.println("Information Message: Properties file is being " + "created for first time use: File name " + getConfigurationResource()); loadDefaults(); } catch (SecurityException se) { System.out.println(se.getMessage()); } }
1,186
abstract public void saveSettings(String regKey, String fileName, String header);
abstract public void saveSettings(String regKey, String fileName, String header);
1,187
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if (!XMLDeclAttribs.isEmpty()) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } else { Log.warn("Warning: XMLDeclAttribs NOT currently supported."); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) { writeOut(outputstream,"<" + sXDFRootNodeName); // print opening root node statement } else { writeOut(outputstream,"<" + nodeNameString); // print opening statement } } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { for (int i = 0; i < attribs.size(); i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list for (int i = 0; i < childObjs.size(); i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) String newindent = indent + sPrettyXDFOutputIndentation; dealWithOpeningGroupNodes(containedObj, outputstream, indent); dealWithClosingGroupNodes(containedObj, outputstream, indent); containedObj.toXDFOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { String newindent = indent + sPrettyXDFOutputIndentation; dealWithOpeningGroupNodes(containedObj, outputstream, indent); dealWithClosingGroupNodes(containedObj, outputstream, indent); containedObj.toXDFOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.error("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) writeOut(outputstream, pcdata); // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { // Needed?? //dealWithClosingGroupNodes(containedObj, outputstream, indent); //Brian: we have to fix this, no whitespace should be allowed between //PCDATA and closing node if (sPrettyXDFOutput) writeOut(outputstream, indent); if (!dontCloseNode) if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) { writeOut(outputstream, "</"+sXDFRootNodeName+">"); } else { writeOut(outputstream, "</"+nodeNameString+">"); } } } else { if(dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if (!XMLDeclAttribs.isEmpty()) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } else { Log.warn("Warning: XMLDeclAttribs NOT currently supported."); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) { writeOut(outputstream,"<" + sXDFRootNodeName); // print opening root node statement } else { writeOut(outputstream,"<" + nodeNameString); // print opening statement } } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { for (int i = 0; i < attribs.size(); i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list for (int i = 0; i < childObjs.size(); i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) String newindent = indent + sPrettyXDFOutputIndentation; dealWithOpeningGroupNodes(containedObj, outputstream, indent); dealWithClosingGroupNodes(containedObj, outputstream, indent); containedObj.toXDFOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { String newindent = indent + sPrettyXDFOutputIndentation; dealWithOpeningGroupNodes(containedObj, outputstream, indent); dealWithClosingGroupNodes(containedObj, outputstream, indent); containedObj.toXDFOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.error("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); if (!dontCloseNode) if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) { writeOut(outputstream, "</"+sXDFRootNodeName+">"); } else { writeOut(outputstream, "</"+nodeNameString+">"); } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); return ; }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { // Needed?? //dealWithClosingGroupNodes(containedObj, outputstream, indent); //Brian: we have to fix this, no whitespace should be allowed between //PCDATA and closing node if (sPrettyXDFOutput) writeOut(outputstream, indent); if (!dontCloseNode) if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) { writeOut(outputstream, "</"+sXDFRootNodeName+">"); } else { writeOut(outputstream, "</"+nodeNameString+">"); } } } else { if(dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
1,189
public void toXDFOutputStream (OutputStream outputstream, String indent) { // prepare XMLDeclaration Hashtable XMLDeclAttribs = new Hashtable(); XMLDeclAttribs.put("standalone", new String("no")); XMLDeclAttribs.put("version", (String) sXMLSpecVersion); toXDFOutputStream(outputstream, XMLDeclAttribs, indent); }
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { // prepare XMLDeclaration Hashtable XMLDeclAttribs = new Hashtable(); XMLDeclAttribs.put("standalone", new String("no")); XMLDeclAttribs.put("version", (String) sXMLSpecVersion); toXDFOutputStream(outputstream, XMLDeclAttribs, indent); }
1,191
public void toXDFOutputStream (OutputStream outputstream, String indent) { // prepare XMLDeclaration Hashtable XMLDeclAttribs = new Hashtable(); XMLDeclAttribs.put("standalone", new String("no")); XMLDeclAttribs.put("version", (String) sXMLSpecVersion); toXDFOutputStream(outputstream, XMLDeclAttribs, indent); }
public void toXDFOutputStream (OutputStream outputstream, String indent) { // prepare XMLDeclaration Hashtable XMLDeclAttribs = new Hashtable(); XMLDeclAttribs.put("standalone", new String("no")); XMLDeclAttribs.put("version", (String) sXMLSpecVersion); toXDFOutputStream(outputstream, XMLDeclAttribs, indent); }
1,192
public DSSPrivateKey(BigInteger p, BigInteger q, BigInteger g, BigInteger x) { super(p, q, g); this.x = x; }
public DSSPrivateKey(BigInteger p, BigInteger q, BigInteger g, BigInteger x) { super(p, q, g); this.x = x; }
1,193
public byte[] getEncoded(int format) { byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new DSSKeyPairRawCodec().encodePrivateKey(this); break; default: throw new IllegalArgumentException("format"); } return result; }
public byte[] getEncoded(int format) { byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new DSSKeyPairRawCodec().encodePrivateKey(this); break; default: throw new IllegalArgumentException("Unsupported encoding format: " + format); } return result; }
1,194
public static DSSPrivateKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_DSS_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
public static DSSPrivateKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_DSS_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
1,195
public static DSSPrivateKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_DSS_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
public static DSSPrivateKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_DSS_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
1,196
public static DSSPrivateKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_DSS_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
public static DSSPrivateKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_DSS_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPrivateKey) codec.decodePrivateKey(k); } catch (IllegalArgumentException ignored) { throw new IllegalArgumentException("magic"); } }
1,197
public static DSSPrivateKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_DSS_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
public static DSSPrivateKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_DSS_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over IKeyPairCodec codec = new DSSKeyPairRawCodec(); return (DSSPrivateKey) codec.decodePrivateKey(k); } else { } }
1,198
public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); }
private static boolean equals(BigInteger x, BigInteger y) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); }
1,200
public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); }
public boolean equals(Object obj) { if (x.words == null && y.words == null) return x.ival == y.ival; if (x.words == null || y.words == null || x.ival != y.ival) return false; return equals(this, (BigInteger) obj); }
1,201
public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); }
public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; for (int i = x.ival; --i >= 0; ) { if (x.words[i] != y.words[i]) return false; } return true; }
1,202
public static void error(String msg, Throwable ex) { log(ERROR, System.err, msg, ex); /*try { Thread.sleep(2500); } catch (InterruptedException ex2) { // Ignore }*/ }
public static void error(String msg, Throwable ex) { log(ERROR, System.err, msg, ex); /*try { Thread.sleep(2500); } catch (InterruptedException ex2) { // Ignore }*/ }
1,203
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 += small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 += small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
1,204
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 += small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 += small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
1,205
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 += small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 -= small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
1,206
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 += small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 += small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
1,207
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 += small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
private int getAxisIntersections(double x, double y, boolean useYaxis, double distance) { int nCrossings = 0; double a0; double a1; double a2; double b0; double b1; double b2; double[] r = new double[3]; int nRoots; a0 = a2 = 0.0; if (useYaxis) { a0 = getY1() - y; a1 = getCtrlY() - y; a2 = getY2() - y; b0 = getX1() - x; b1 = getCtrlX() - x; b2 = getX2() - x; } else { a0 = getX1() - x; a1 = getCtrlX() - x; a2 = getX2() - x; b0 = getY1() - y; b1 = getCtrlY() - y; b2 = getY2() - y; } /* If the axis intersects a start/endpoint, shift it up by some small amount to guarantee the line is 'inside' If this is not done,bad behaviour may result for points on that axis. */ if (a0 == 0.0 || a2 == 0.0) { double small = getFlatness() * (1E-10); if (a0 == 0.0) a0 += small; if (a2 == 0.0) a2 += small; } r[0] = a0; r[1] = 2 * (a1 - a0); r[2] = (a2 - 2 * a1 + a0); nRoots = solveQuadratic(r); for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { double crossing = t * t * (b2 - 2 * b1 + b0) + 2 * t * (b1 - b0) + b0; /* single root is always doubly degenerate in quads */ if (crossing > 0 && crossing < distance) nCrossings += (nRoots == 1) ? 2 : 1; } } if (useYaxis) { if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0)) nCrossings++; } else { if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance)) nCrossings++; } return (nCrossings); }
1,208
public static boolean linesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) { double beta = (((y1 - y3) * (x4 - x3) + (x1 - x3) * (y4 - y3)) / ((y2 - y1) * (x4 - x3) + (x2 - x1) * (y4 - y3))); if (beta < 0.0 || beta > 1.0) return false; double alpha = (x1 + beta * (x2 - x1) - x3) / (x4 - x3); return alpha >= 0.0 && alpha <= 1.0; }
public static boolean linesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) { double beta = (((y1 - y3) * (x4 - x3) + (x1 - x3) * (y4 - y3)) / ((y2 - y1) * (x4 - x3) + (x2 - x1) * (y4 - y3))); if (beta < 0.0 || beta > 1.0) return false; double alpha = (x1 + beta * (x2 - x1) - x3) / (x4 - x3); return alpha >= 0.0 && alpha <= 1.0; }
1,209
public static boolean linesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) { double beta = (((y1 - y3) * (x4 - x3) + (x1 - x3) * (y4 - y3)) / ((y2 - y1) * (x4 - x3) + (x2 - x1) * (y4 - y3))); if (beta < 0.0 || beta > 1.0) return false; double alpha = (x1 + beta * (x2 - x1) - x3) / (x4 - x3); return alpha >= 0.0 && alpha <= 1.0; }
public static boolean linesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) { double beta = (((y1 - y3) * (x4 - x3) + (x1 - x3) * (y4 - y3)) / ((y2 - y1) * (x4 - x3) + (x2 - x1) * (y4 - y3))); if (beta < 0.0 || beta > 1.0) return false; double alpha = (x1 + beta * (x2 - x1) - x3) / (x4 - x3); return alpha >= 0.0 && alpha <= 1.0; }
1,210
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int num) { if (srcPts == dstPts && dstOff > srcOff && num > 1 && srcOff + 2 * num > dstOff) { float[] f = new float[2 * num]; System.arraycopy(srcPts, srcOff, f, 0, 2 * num); srcPts = f; } while (--num >= 0) { float x = srcPts[srcOff++]; float y = srcPts[srcOff++]; dstPts[dstOff++] = (float) (m00 * x + m01 * y + m02); dstPts[dstOff++] = (float) (m10 * x + m11 * y + m12); } }
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int num) { if (srcPts == dstPts && dstOff > srcOff && num > 1 && srcOff + 2 * num > dstOff) { float[] f = new float[2 * num]; System.arraycopy(srcPts, srcOff, f, 0, 2 * num); srcPts = f; } while (--num >= 0) { float x = srcPts[srcOff++]; float y = srcPts[srcOff++]; dstPts[dstOff++] = (float) (m00 * x + m01 * y + m02); dstPts[dstOff++] = (float) (m10 * x + m11 * y + m12); } }
1,211
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int num) { if (srcPts == dstPts && dstOff > srcOff && num > 1 && srcOff + 2 * num > dstOff) { float[] f = new float[2 * num]; System.arraycopy(srcPts, srcOff, f, 0, 2 * num); srcPts = f; } while (--num >= 0) { float x = srcPts[srcOff++]; float y = srcPts[srcOff++]; dstPts[dstOff++] = (float) (m00 * x + m01 * y + m02); dstPts[dstOff++] = (float) (m10 * x + m11 * y + m12); } }
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int num) { if (srcPts == dstPts && dstOff > srcOff && num > 1 && srcOff + 2 * num > dstOff) { float[] f = new float[2 * num]; System.arraycopy(srcPts, srcOff, f, 0, 2 * num); srcPts = f; } while (--num >= 0) { float x = srcPts[srcOff++]; float y = srcPts[srcOff++]; dstPts[dstOff++] = (float) (m00 * x + m01 * y + m02); dstPts[dstOff++] = (float) (m10 * x + m11 * y + m12); } }
1,212
public static double abs(double d) { return (d <= 0) ? 0 - d : d; }
public static double abs(double d) { return (d <= 0) ? 0 - d : d; }
1,213
public ProtectionDomain(CodeSource codesource, PermissionCollection permissions, ClassLoader classloader, Principal[] principals) { this(codesource, permissions, classloader, principals, false); }
public ProtectionDomain(CodeSource codesource, PermissionCollection permissions, ClassLoader classloader, Principal[] principals) { this(codesource, permissions, classloader, principals, false); }
1,214
public ProtectionDomain(CodeSource codesource, PermissionCollection permissions, ClassLoader classloader, Principal[] principals) { this(codesource, permissions, classloader, principals, false); }
public ProtectionDomain(CodeSource codesource, PermissionCollection permissions, ClassLoader classloader, Principal[] principals) { this(codesource, permissions, null, null, true); }
1,215
public String toString() { String linesep = System.getProperty("line.separator"); StringBuffer sb = new StringBuffer("ProtectionDomain (").append(linesep); if (code_source == null) sb.append("CodeSource:null"); else sb.append(code_source); sb.append(linesep); if (classloader == null) sb.append("ClassLoader:null"); else sb.append(classloader); sb.append(linesep); sb.append("Principals:"); if (principals != null && principals.length > 0) { sb.append("["); Principal pal; for (int i = 0; i < principals.length; i++) { pal = principals[i]; sb.append("'").append(pal.getName()) .append("' of type ").append(pal.getClass().getName()); if (i < principals.length-1) sb.append(", "); } sb.append("]"); } else sb.append("none"); sb.append(linesep); if (!staticBinding) // include all but dont force loading Policy.currentPolicy if (Policy.isLoaded()) sb.append(Policy.getCurrentPolicy().getPermissions(this)); else // fallback on this one's permissions sb.append(perms); else sb.append(perms); return sb.append(linesep).append(")").append(linesep).toString(); }
public String toString() { String linesep = SystemProperties.getProperty("line.separator"); StringBuffer sb = new StringBuffer("ProtectionDomain (").append(linesep); if (code_source == null) sb.append("CodeSource:null"); else sb.append(code_source); sb.append(linesep); if (classloader == null) sb.append("ClassLoader:null"); else sb.append(classloader); sb.append(linesep); sb.append("Principals:"); if (principals != null && principals.length > 0) { sb.append("["); Principal pal; for (int i = 0; i < principals.length; i++) { pal = principals[i]; sb.append("'").append(pal.getName()) .append("' of type ").append(pal.getClass().getName()); if (i < principals.length-1) sb.append(", "); } sb.append("]"); } else sb.append("none"); sb.append(linesep); if (!staticBinding) // include all but dont force loading Policy.currentPolicy if (Policy.isLoaded()) sb.append(Policy.getCurrentPolicy().getPermissions(this)); else // fallback on this one's permissions sb.append(perms); else sb.append(perms); return sb.append(linesep).append(")").append(linesep).toString(); }
1,216
public static IdAssignmentPolicyValue from_int(int code) { try { return enume [ code ]; } catch (ArrayIndexOutOfBoundsException ex) { throw new BAD_OPERATION("Invalid enumeration code " + code); } }
public static IdAssignmentPolicyValue from_int(int code) { try { return enume [ code ]; } catch (ArrayIndexOutOfBoundsException ex) { BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code); bad.minor = Minor.PolicyType; throw bad; } }
1,217
public void canceled(WizardEvent e) {// System.out.println("It is canceled!"); if (workingThread != null) workingThread.interrupt(); this.hide(); this.dispose(); }
public void canceled(WizardEvent e) {// System.out.println("It is canceled!"); if (workingThread != null) { workingThread.interrupt(); this.hide(); this.dispose(); }
1,218
public JFileChooser(String currentDirectoryPath) { setup(null); setCurrentDirectory(fsv.createFileObject(currentDirectoryPath)); }
public JFileChooser() { setup(null); setCurrentDirectory(fsv.createFileObject(currentDirectoryPath)); }
1,220
public JFileChooser(String currentDirectoryPath) { setup(null); setCurrentDirectory(fsv.createFileObject(currentDirectoryPath)); }
public JFileChooser(String currentDirectoryPath) { setup(null); setCurrentDirectory(null); }
1,221
public Process exec(String[] cmd) throws IOException { return exec(cmd, null, null); }
public Process exec(String cmdline) throws IOException { return exec(cmd, null, null); }
1,222
public Process exec(String[] cmd) throws IOException { return exec(cmd, null, null); }
public Process exec(String[] cmd) throws IOException { return exec(cmd, null, null); }
1,223
setIconImage(Image icon){ this.icon = icon; if (peer != null) ((FramePeer) peer).setIconImage(icon);}
setIconImage(Image icon){ this.icon = icon; if (peer != null) ((FramePeer) peer).setIconImage(icon);}
1,224
setIconImage(Image icon){ this.icon = icon; if (peer != null) ((FramePeer) peer).setIconImage(icon);}
setIconImage(Image icon){ this.icon = icon; if (peer != null) ((FramePeer) peer).setIconImage(icon);}
1,225
public WizardPage(int button_flags) { // set layout as a vertical column setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));// setLayout(new BorderLayout()); Box pageBox = Box.createVerticalBox(); contentPane = new JPanel(); // add the pages contentpane to our wizard page add(contentPane); // lets add some glue here but it still does not stop the separator from // moving up and down. add(Box.createGlue()); // create the separator between the panels JSeparator js = new JSeparator(); js.setAlignmentY(Component.BOTTOM_ALIGNMENT); add(js); add(Box.createRigidArea(new Dimension(10,10))); // create the box for the buttons with an x-axis buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.X_AXIS)); buttonPanel.setName("buttonPanel"); buttonPanel.add(Box.createHorizontalGlue()); add(buttonPanel); if (button_flags == 0) { // no buttons to add :-( return; } if ((button_flags & PREVIOUS) != 0) { previousAction = new AbstractAction(LangTool.getString("wiz.previous")) { public void actionPerformed(ActionEvent e) { } }; previousButton = new JButton(previousAction); buttonPanel.add(Box.createRigidArea(new Dimension(GROUP_SPACING,0))); buttonPanel.add(previousButton); } if ((button_flags & NEXT) != 0) { nextAction = new AbstractAction(LangTool.getString("wiz.next")) { public void actionPerformed(ActionEvent e) { } }; nextButton = new JButton(nextAction); buttonPanel.add(Box.createRigidArea(new Dimension(BUTTON_SPACING,0))); buttonPanel.add(nextButton); } if ((button_flags & FINISH) != 0) { finishAction = new AbstractAction(LangTool.getString("wiz.finish")) { public void actionPerformed(ActionEvent e) { } }; finishButton = new JButton(finishAction); buttonPanel.add(Box.createRigidArea(new Dimension(BUTTON_SPACING,0))); buttonPanel.add(finishButton); } if ((button_flags & CANCEL) != 0) { cancelAction = new AbstractAction(LangTool.getString("wiz.cancel")) { public void actionPerformed(ActionEvent e) { } }; cancelButton = new JButton(cancelAction); buttonPanel.add(Box.createRigidArea(new Dimension(GROUP_SPACING,0))); buttonPanel.add(cancelButton); buttonPanel.add(Box.createRigidArea(new Dimension(MARGIN,0))); } if ((button_flags & HELP) != 0) { helpAction = new AbstractAction(LangTool.getString("wiz.help")) { public void actionPerformed(ActionEvent e) { } }; helpButton = new JButton(helpAction); } }
public WizardPage(int button_flags) { // set layout as a vertical column setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));// setLayout(new BorderLayout()); Box pageBox = Box.createVerticalBox(); contentPane = new JPanel(); // add the pages contentpane to our wizard page add(contentPane); // lets add some glue here but it still does not stop the separator from // moving up and down. add(Box.createGlue()); // create the separator between the panels JSeparator js = new JSeparator(); js.setAlignmentY(Component.BOTTOM_ALIGNMENT); add(js); add(Box.createRigidArea(new Dimension(10,10))); // create the box for the buttons with an x-axis buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.X_AXIS)); buttonPanel.setName("buttonPanel"); buttonPanel.add(Box.createHorizontalGlue()); add(buttonPanel); if (button_flags == 0) { // no buttons to add :-( return; } if ((button_flags & PREVIOUS) != 0) { previousAction = new AbstractAction(LangTool.getString("wiz.previous")) { public void actionPerformed(ActionEvent e) { } }; previousButton = new JButton(previousAction); buttonPanel.add(Box.createRigidArea(new Dimension(GROUP_SPACING,0))); buttonPanel.add(previousButton); } if ((button_flags & NEXT) != 0) { nextAction = new AbstractAction(LangTool.getString("wiz.next")) { public void actionPerformed(ActionEvent e) { } }; nextButton = new JButton(nextAction); buttonPanel.add(Box.createRigidArea(new Dimension(BUTTON_SPACING,0))); buttonPanel.add(nextButton); } if ((button_flags & FINISH) != 0) { finishAction = new AbstractAction(LangTool.getString("wiz.finish")) { public void actionPerformed(ActionEvent e) { } }; finishButton = new JButton(finishAction); buttonPanel.add(Box.createRigidArea(new Dimension(BUTTON_SPACING,0))); buttonPanel.add(finishButton); } if ((button_flags & CANCEL) != 0) { cancelAction = new AbstractAction(LangTool.getString("wiz.cancel")) { public void actionPerformed(ActionEvent e) { } }; cancelButton = new JButton(cancelAction); buttonPanel.add(Box.createRigidArea(new Dimension(GROUP_SPACING,0))); buttonPanel.add(cancelButton); buttonPanel.add(Box.createRigidArea(new Dimension(MARGIN,0))); } if ((button_flags & HELP) != 0) { helpAction = new AbstractAction(LangTool.getString("wiz.help")) { public void actionPerformed(ActionEvent e) { } }; helpButton = new JButton(helpAction); } }
1,226
setTitle(String title){ this.title = title; if (peer != null) ((FramePeer) peer).setTitle(title);}
setTitle(String title){ this.title = title; if (peer != null) ((FramePeer) peer).setTitle(title);}
1,227
setTitle(String title){ this.title = title; if (peer != null) ((FramePeer) peer).setTitle(title);}
setTitle(String title){ this.title = title; if (peer != null) ((FramePeer) peer).setTitle(title);}
1,228
protected KeyPairGeneratorAdapter(String kpgName) { super(); this.adaptee = KeyPairGeneratorFactory.getInstance(kpgName); }
protected KeyPairGeneratorAdapter(String kpgName) { super(kpgName); this.adaptee = KeyPairGeneratorFactory.getInstance(kpgName); }
1,229
public ScrollPaneLayout() { }
public ScrollPaneLayout() { }
1,231
public void layoutContainer(Container parent) { if (parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Dimension viewSize = viewport.getViewSize(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; int y1 = 0, y2 = 0, y3 = 0, y4 = 0; Rectangle scrollPaneBounds = SwingUtilities.calculateInnerArea(sc, null); x1 = scrollPaneBounds.x; y1 = scrollPaneBounds.y; x4 = scrollPaneBounds.x + scrollPaneBounds.width; y4 = scrollPaneBounds.y + scrollPaneBounds.height; if (colHead != null) y2 = y1 + colHead.getPreferredSize().height; else y2 = y1; if (rowHead != null) x2 = x1 + rowHead.getPreferredSize().width; else x2 = x1; int vsbPolicy = sc.getVerticalScrollBarPolicy(); int hsbPolicy = sc.getHorizontalScrollBarPolicy(); boolean showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); boolean showHsb = (hsb != null) && ((hsbPolicy == HORIZONTAL_SCROLLBAR_ALWAYS) || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED && viewSize.width > (x4 - x2))); if (!showVsb) x3 = x4; else x3 = x4 - vsb.getPreferredSize().width; if (!showHsb) y3 = y4; else y3 = y4 - hsb.getPreferredSize().height; // now set the layout if (viewport != null) viewport.setBounds(new Rectangle(x2, y2, x3-x2, y3-y2)); if (colHead != null) colHead.setBounds(new Rectangle(x2, y1, x3-x2, y2-y1)); if (rowHead != null) rowHead.setBounds(new Rectangle(x1, y2, x2-x1, y3-y2)); if (showVsb) { vsb.setVisible(true); vsb.setBounds(new Rectangle(x3, y2, x4-x3, y3-y2)); } else if (vsb != null) vsb.setVisible(false); if (showHsb) { hsb.setVisible(true); hsb.setBounds(new Rectangle(x2, y3, x3-x2, y4-y3)); } else if (hsb != null) hsb.setVisible(false); if (upperLeft != null) upperLeft.setBounds(new Rectangle(x1, y1, x2-x1, y2-y1)); if (upperRight != null) upperRight.setBounds(new Rectangle(x3, y1, x4-x3, y2-y1)); if (lowerLeft != null) lowerLeft.setBounds(new Rectangle(x1, y3, x2-x1, y4-y3)); if (lowerRight != null) lowerRight.setBounds(new Rectangle(x3, y3, x4-x3, y4-y3)); } }
public void layoutContainer(Container parent) { if (parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Dimension viewSize = viewport.getViewSize(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; int y1 = 0, y2 = 0, y3 = 0, y4 = 0; Rectangle scrollPaneBounds = SwingUtilities.calculateInnerArea(sc, null); x1 = scrollPaneBounds.x; y1 = scrollPaneBounds.y; x4 = scrollPaneBounds.x + scrollPaneBounds.width; y4 = scrollPaneBounds.y + scrollPaneBounds.height; if (colHead != null) y2 = y1 + colHead.getPreferredSize().height; else y2 = y1; if (rowHead != null) x2 = x1 + rowHead.getPreferredSize().width; else x2 = x1; int vsbPolicy = sc.getVerticalScrollBarPolicy(); int hsbPolicy = sc.getHorizontalScrollBarPolicy(); boolean showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); boolean showHsb = (hsb != null) && ((hsbPolicy == HORIZONTAL_SCROLLBAR_ALWAYS) || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED && viewSize.width > (x4 - x2))); if (!showVsb) x3 = x4; else x3 = x4 - vsb.getPreferredSize().width; if (!showHsb) y3 = y4; else y3 = y4 - hsb.getPreferredSize().height; // now set the layout if (viewport != null) viewport.setBounds(new Rectangle(x2, y2, x3-x2, y3-y2)); if (colHead != null) colHead.setBounds(new Rectangle(x2, y1, x3-x2, y2-y1)); if (rowHead != null) rowHead.setBounds(new Rectangle(x1, y2, x2-x1, y3-y2)); if (showVsb) { vsb.setVisible(true); vsb.setBounds(new Rectangle(x3, y2, x4-x3, y3-y2)); } else if (vsb != null) vsb.setVisible(false); if (showHsb) { hsb.setVisible(true); hsb.setBounds(new Rectangle(x2, y3, x3-x2, y4-y3)); } else if (hsb != null) hsb.setVisible(false); if (upperLeft != null) upperLeft.setBounds(new Rectangle(x1, y1, x2-x1, y2-y1)); if (upperRight != null) upperRight.setBounds(new Rectangle(x3, y1, x4-x3, y2-y1)); if (lowerLeft != null) lowerLeft.setBounds(new Rectangle(x1, y3, x2-x1, y4-y3)); if (lowerRight != null) lowerRight.setBounds(new Rectangle(x3, y3, x4-x3, y4-y3)); } }
1,232
public void layoutContainer(Container parent) { if (parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Dimension viewSize = viewport.getViewSize(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; int y1 = 0, y2 = 0, y3 = 0, y4 = 0; Rectangle scrollPaneBounds = SwingUtilities.calculateInnerArea(sc, null); x1 = scrollPaneBounds.x; y1 = scrollPaneBounds.y; x4 = scrollPaneBounds.x + scrollPaneBounds.width; y4 = scrollPaneBounds.y + scrollPaneBounds.height; if (colHead != null) y2 = y1 + colHead.getPreferredSize().height; else y2 = y1; if (rowHead != null) x2 = x1 + rowHead.getPreferredSize().width; else x2 = x1; int vsbPolicy = sc.getVerticalScrollBarPolicy(); int hsbPolicy = sc.getHorizontalScrollBarPolicy(); boolean showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); boolean showHsb = (hsb != null) && ((hsbPolicy == HORIZONTAL_SCROLLBAR_ALWAYS) || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED && viewSize.width > (x4 - x2))); if (!showVsb) x3 = x4; else x3 = x4 - vsb.getPreferredSize().width; if (!showHsb) y3 = y4; else y3 = y4 - hsb.getPreferredSize().height; // now set the layout if (viewport != null) viewport.setBounds(new Rectangle(x2, y2, x3-x2, y3-y2)); if (colHead != null) colHead.setBounds(new Rectangle(x2, y1, x3-x2, y2-y1)); if (rowHead != null) rowHead.setBounds(new Rectangle(x1, y2, x2-x1, y3-y2)); if (showVsb) { vsb.setVisible(true); vsb.setBounds(new Rectangle(x3, y2, x4-x3, y3-y2)); } else if (vsb != null) vsb.setVisible(false); if (showHsb) { hsb.setVisible(true); hsb.setBounds(new Rectangle(x2, y3, x3-x2, y4-y3)); } else if (hsb != null) hsb.setVisible(false); if (upperLeft != null) upperLeft.setBounds(new Rectangle(x1, y1, x2-x1, y2-y1)); if (upperRight != null) upperRight.setBounds(new Rectangle(x3, y1, x4-x3, y2-y1)); if (lowerLeft != null) lowerLeft.setBounds(new Rectangle(x1, y3, x2-x1, y4-y3)); if (lowerRight != null) lowerRight.setBounds(new Rectangle(x3, y3, x4-x3, y4-y3)); } }
public void layoutContainer(Container parent) { if (parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Dimension viewSize = viewport.getViewSize(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; int y1 = 0, y2 = 0, y3 = 0, y4 = 0; Rectangle scrollPaneBounds = SwingUtilities.calculateInnerArea(sc, null); x1 = scrollPaneBounds.x; y1 = scrollPaneBounds.y; x4 = scrollPaneBounds.x + scrollPaneBounds.width; y4 = scrollPaneBounds.y + scrollPaneBounds.height; if (colHead != null) y2 = y1 + colHead.getPreferredSize().height; else y2 = y1; if (rowHead != null) x2 = x1 + rowHead.getPreferredSize().width; else x2 = x1; int vsbPolicy = sc.getVerticalScrollBarPolicy(); int hsbPolicy = sc.getHorizontalScrollBarPolicy(); boolean showVsb = (vsb != null) && ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED && viewSize.height > (y4 - y2))); boolean showHsb = (hsb != null) && ((hsbPolicy == HORIZONTAL_SCROLLBAR_ALWAYS) || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED && viewSize.width > (x4 - x2))); if (!showVsb) x3 = x4; else x3 = x4 - vsb.getPreferredSize().width; if (!showHsb) y3 = y4; else y3 = y4 - hsb.getPreferredSize().height; // now set the layout if (viewport != null) viewport.setBounds(new Rectangle(x2, y2, x3-x2, y3-y2)); if (colHead != null) colHead.setBounds(new Rectangle(x2, y1, x3-x2, y2-y1)); if (rowHead != null) rowHead.setBounds(new Rectangle(x1, y2, x2-x1, y3-y2)); if (showVsb) { vsb.setVisible(true); vsb.setBounds(new Rectangle(x3, y2, x4-x3, y3-y2)); else if (vsb != null) vsb.setVisible(false); if (showHsb) { hsb.setVisible(true); hsb.setBounds(new Rectangle(x2, y3, x3-x2, y4-y3)); else if (hsb != null) hsb.setVisible(false); if (upperLeft != null) upperLeft.setBounds(new Rectangle(x1, y1, x2-x1, y2-y1)); if (upperRight != null) upperRight.setBounds(new Rectangle(x3, y1, x4-x3, y2-y1)); if (lowerLeft != null) lowerLeft.setBounds(new Rectangle(x1, y3, x2-x1, y4-y3)); if (lowerRight != null) lowerRight.setBounds(new Rectangle(x3, y3, x4-x3, y4-y3)); }
1,233
public Dimension minimumLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getMinimumSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getMinimumSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getMinimumSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getMinimumSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getMinimumSize().height; return new Dimension(width, height); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
public Dimension minimumLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getMinimumSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getMinimumSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getMinimumSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getMinimumSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getMinimumSize().height; return new Dimension(width, height); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
1,234
public Dimension minimumLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getMinimumSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getMinimumSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getMinimumSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getMinimumSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getMinimumSize().height; return new Dimension(width, height); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
public Dimension minimumLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getMinimumSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getMinimumSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getMinimumSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getMinimumSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getMinimumSize().height; return new Dimension(width, height); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
1,235
public Dimension preferredLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getPreferredSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getPreferredSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getPreferredSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getPreferredSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getPreferredSize().height; return new Dimension(width, height); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
public Dimension preferredLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getPreferredSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getPreferredSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getPreferredSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getPreferredSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getPreferredSize().height; return new Dimension(width, height); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
1,236
public Dimension preferredLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getPreferredSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getPreferredSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getPreferredSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getPreferredSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getPreferredSize().height; return new Dimension(width, height); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
public Dimension preferredLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getPreferredSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getPreferredSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getPreferredSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getPreferredSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getPreferredSize().height; Insets i = sc.getInsets(); return new Dimension(width + i.left + i.right, height + i.left + i.right); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
1,237
public Dimension preferredLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getPreferredSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getPreferredSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getPreferredSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getPreferredSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getPreferredSize().height; return new Dimension(width, height); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
public Dimension preferredLayoutSize(Container parent) { if (parent != null && parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; Dimension viewportSize = viewport.getPreferredSize(); int width = viewportSize.width; int height = viewportSize.height; if (hsb != null && hsb.isVisible()) height += hsb.getPreferredSize().height; if (vsb != null && vsb.isVisible()) width += vsb.getPreferredSize().width; if (rowHead != null && rowHead.isVisible()) width += rowHead.getPreferredSize().width; if (colHead != null && colHead.isVisible()) height += colHead.getPreferredSize().height; return new Dimension(width, height); } // TODO: Probably throw an exception here. Check this. return new Dimension(0,0); }
1,238
public DataCube(Array parentArray) { this.parentArray = parentArray; init(); }
public DataCube(ArrayInterface parentArray) { this.parentArray = parentArray; init(); }
1,239
public Array getParentArray() { return parentArray; }
public ArrayInterface getParentArray() { return parentArray; }
1,240
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean writeHrefAttribute = false; boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; String nodeName = getClassXDFNodeName(); if (newNodeNameString != null) nodeName = newNodeNameString; // indent up one indent = indent + strIndent; //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); Href hrefObj = getHref(); //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream = outputstream; if (hrefObj !=null) { //write out to another file, String fileName = hrefObj.getSysId(); String hrefName = hrefObj.getName(); if(hrefName == null) { Log.errorln("Error: href object in dataCube lacks name. Data being written into metadata instead.\n"); } else if (fileName != null) { writeHrefAttribute = true; try { dataOutputStream = new FileOutputStream(hrefObj.getSysId()); } catch (IOException e) { //oops, something. is wrong, writ out to the passed in OutputStream Log.warnln("Error: cannot open file:"+fileName+" for writing. Data being written into metadata.\n"); writeHrefAttribute = false; } } else { Log.warnln("Error: href:"+hrefName+" lacks systemId, cannot write data to a separate file."); Log.warnln("Data are being written into metadata instead.\n"); writeHrefAttribute = false; } } else { // no *href* attribute specified, write out to the passed in OutputStream // dataOutputStream = outputstream; // not needed now } // write data node attributes if (writeHrefAttribute) { writeOut(outputstream, " "+HREF_XML_ATTRIBUTE_NAME+"=\""); writeOutAttribute(outputstream, hrefObj.getName()); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " "+CHECKSUM_XML_ATTRIBUTE_NAME+"=\""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } String encoding = getEncoding(); if (encoding!= null) { writeOut(outputstream, " "+ENCODING_XML_ATTRIBUTE_NAME+"=\""); writeOutAttribute(outputstream, encoding.toString()); writeOut(outputstream, "\""); } String compress = getCompression(); if (compress != null) { writeOut(outputstream, " "+COMPRESSION_TYPE_XML_ATTRIBUTE_NAME+"=\""); writeOutAttribute(outputstream, compress.toString()); writeOut(outputstream, "\""); } if (writeHrefAttribute) writeOut(outputstream, "/>"); //we just close the data node now else writeOut(outputstream, ">"); //end of opening code Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxes().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String[] NoDataValues; if (parentArray.hasFieldAxis()) { NoDataValues = new String[parentArray.getFieldAxis().getLength()]; List fields = parentArray.getFieldAxis().getFields(); Iterator iter = fields.iterator(); int i = 0; while (iter.hasNext()) { Field field = (Field) iter.next(); if (field != null && field.getNoDataValue() != null) NoDataValues[i]=field.getNoDataValue().toString(); i++; } /* 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 { NoDataValues = new String[1]; NoDataValues[0] = parentArray.getNoDataValue();/* // what tis this?? If there is no fieldAxis, then no fields, // and hence, only ONE noDataValue. 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]; } 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, writeHrefAttribute ? false : true ); } } //close the data section appropriately if (!writeHrefAttribute && niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } // If we didnt write Href attribute, then means that data // were put into document. We need to close the open data // node appropriately. if (!writeHrefAttribute) 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 writeHrefAttribute = false; boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; String nodeName = getClassXDFNodeName(); if (newNodeNameString != null) nodeName = newNodeNameString; // indent up one indent = indent + strIndent; //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); Href hrefObj = getHref(); //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream = outputstream; if (hrefObj !=null) { //write out to another file, String fileName = hrefObj.getSysId(); String hrefName = hrefObj.getName(); if(hrefName == null) { Log.errorln("Error: href object in dataCube lacks name. Data being written into metadata instead.\n"); } else if (fileName != null) { writeHrefAttribute = true; try { dataOutputStream = new FileOutputStream(hrefObj.getSysId()); } catch (IOException e) { //oops, something. is wrong, writ out to the passed in OutputStream Log.warnln("Error: cannot open file:"+fileName+" for writing. Data being written into metadata.\n"); writeHrefAttribute = false; } } else { Log.warnln("Error: href:"+hrefName+" lacks systemId, cannot write data to a separate file."); Log.warnln("Data are being written into metadata instead.\n"); writeHrefAttribute = false; } } else { // no *href* attribute specified, write out to the passed in OutputStream // dataOutputStream = outputstream; // not needed now } // write data node attributes if (writeHrefAttribute) { writeOut(outputstream, " "+HREF_XML_ATTRIBUTE_NAME+"=\""); writeOutAttribute(outputstream, hrefObj.getName()); writeOut(outputstream, "\""); } String checksum = getChecksum(); if (checksum != null) { writeOut(outputstream, " "+CHECKSUM_XML_ATTRIBUTE_NAME+"=\""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); } String encoding = getEncoding(); if (encoding!= null) { writeOut(outputstream, " "+ENCODING_XML_ATTRIBUTE_NAME+"=\""); writeOutAttribute(outputstream, encoding.toString()); writeOut(outputstream, "\""); } String compress = getCompression(); if (compress != null) { writeOut(outputstream, " "+COMPRESSION_TYPE_XML_ATTRIBUTE_NAME+"=\""); writeOutAttribute(outputstream, compress.toString()); writeOut(outputstream, "\""); } if (writeHrefAttribute) writeOut(outputstream, "/>"); //we just close the data node now else writeOut(outputstream, ">"); //end of opening code Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxes().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String[] NoDataValues; if (parentArray.hasFieldAxis()) { NoDataValues = new String[parentArray.getFieldAxis().getLength()]; List fields = parentArray.getFieldAxis().getFields(); Iterator iter = fields.iterator(); int i = 0; while (iter.hasNext()) { Field field = (Field) iter.next(); if (field != null && field.getNoDataValue() != null) NoDataValues[i]=field.getNoDataValue().toString(); i++; } /* 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 { NoDataValues = new String[1]; NoDataValues[0] = parentArray.getNoDataValue();/* // what tis this?? If there is no fieldAxis, then no fields, // and hence, only ONE noDataValue. 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]; } 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, writeHrefAttribute ? false : true ); } } //close the data section appropriately if (!writeHrefAttribute && niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } // If we didnt write Href attribute, then means that data // were put into document. We need to close the open data // node appropriately. if (!writeHrefAttribute) writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
1,241
public FieldAxis getFieldAxis() { List axisList = getAxes(); if (axisList.size() == 0){ //empty axisList return null; } Object axisObj = axisList.get(0); if (axisObj instanceof FieldAxis) return (FieldAxis) axisObj; else return null; }
public FieldAxis getFieldAxis() { List axisList = getAxes(); if (axisList.size() == 0 || !this.hasFieldAxis() ){ //empty axisList return null; } Object axisObj = axisList.get(0); if (axisObj instanceof FieldAxis) return (FieldAxis) axisObj; else return null; }
1,242
public String getEndian() { String endian = (String) ((Attribute) attribHash.get(ENDIAN_XML_ATTRIBUTE_NAME)).getAttribValue(); // a safety just in case someone asks a stupid question // if (endian == null) endian = DEFAULT_ENDIAN; return endian; }
if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; publicif (endian == null) endian = DEFAULT_ENDIAN; Stringif (endian == null) endian = DEFAULT_ENDIAN; getEndian()if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; {if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; Stringif (endian == null) endian = DEFAULT_ENDIAN; endianif (endian == null) endian = DEFAULT_ENDIAN; =if (endian == null) endian = DEFAULT_ENDIAN; (String)if (endian == null) endian = DEFAULT_ENDIAN; ((Attribute)if (endian == null) endian = DEFAULT_ENDIAN; attribHash.get(ENDIAN_XML_ATTRIBUTE_NAME)).getAttribValue();if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; //if (endian == null) endian = DEFAULT_ENDIAN; aif (endian == null) endian = DEFAULT_ENDIAN; safetyif (endian == null) endian = DEFAULT_ENDIAN; justif (endian == null) endian = DEFAULT_ENDIAN; inif (endian == null) endian = DEFAULT_ENDIAN; caseif (endian == null) endian = DEFAULT_ENDIAN; someoneif (endian == null) endian = DEFAULT_ENDIAN; asksif (endian == null) endian = DEFAULT_ENDIAN; aif (endian == null) endian = DEFAULT_ENDIAN; stupidif (endian == null) endian = DEFAULT_ENDIAN; questionif (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; //if (endian == null) endian = DEFAULT_ENDIAN; ifif (endian == null) endian = DEFAULT_ENDIAN; (endianif (endian == null) endian = DEFAULT_ENDIAN; ==if (endian == null) endian = DEFAULT_ENDIAN; null)if (endian == null) endian = DEFAULT_ENDIAN; endianif (endian == null) endian = DEFAULT_ENDIAN; =if (endian == null) endian = DEFAULT_ENDIAN; DEFAULT_ENDIAN;if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; returnif (endian == null) endian = DEFAULT_ENDIAN; endian;if (endian == null) endian = DEFAULT_ENDIAN; if (endian == null) endian = DEFAULT_ENDIAN; }
1,243
void distributeExtraSpace() { int availSize = getAvailableSize(splitPane.getSize(), splitPane.getInsets()); int[] newSizes = new int[3]; double weight = splitPane.getResizeWeight(); int oldLen = sizes[0] + sizes[1]; // dividers don't change size. availSize -= sizes[2] + oldLen; int rightAlloc = (int) (availSize * (1 - weight)); int leftAlloc = availSize - rightAlloc; sizes[0] += leftAlloc; sizes[1] += rightAlloc; }
void distributeExtraSpace() { int availSize = getAvailableSize(splitPane.getSize(), splitPane.getInsets()); int[] newSizes = new int[3]; double weight = splitPane.getResizeWeight(); int oldLen = sizes[0] + sizes[1]; // dividers don't change size. availSize -= sizes[2] + oldLen; int rightAlloc = (int) (availSize * (1 - weight)); int leftAlloc = availSize - rightAlloc; sizes[0] += leftAlloc; sizes[1] += rightAlloc; }
1,244
public void layoutContainer(Container container) { if (container instanceof JSplitPane) { JSplitPane split = (JSplitPane) container; distributeExtraSpace(); Insets insets = split.getInsets(); int width = getInitialLocation(insets); Dimension dims = split.getSize(); for (int i = 0; i < components.length; i += 2) { if (components[i] == null) continue; setComponentToSize(components[i], sizes[i], width, insets, dims); width += sizes[i]; } if (components[1] != null) { setComponentToSize(components[1], sizes[1], width, insets, dims); width += sizes[1]; } } }
public void layoutContainer(Container container) { if (container instanceof JSplitPane) { JSplitPane split = (JSplitPane) container; distributeExtraSpace(); Insets insets = split.getInsets(); int width = getInitialLocation(insets); Dimension dims = split.getSize(); for (int i = 0; i < components.length; i += 2) { if (components[i] == null) continue; setComponentToSize(components[i], sizes[i], width, insets, dims); width += sizes[i]; } if (components[1] != null) { setComponentToSize(components[1], sizes[1], width, insets, dims); width += sizes[1]; } } }
1,245
public void layoutContainer(Container container) { if (container instanceof JSplitPane) { JSplitPane split = (JSplitPane) container; distributeExtraSpace(); Insets insets = split.getInsets(); int width = getInitialLocation(insets); Dimension dims = split.getSize(); for (int i = 0; i < components.length; i += 2) { if (components[i] == null) continue; setComponentToSize(components[i], sizes[i], width, insets, dims); width += sizes[i]; } if (components[1] != null) { setComponentToSize(components[1], sizes[1], width, insets, dims); width += sizes[1]; } } }
public void layoutContainer(Container container) { if (container instanceof JSplitPane) { JSplitPane split = (JSplitPane) container; distributeExtraSpace(); Insets insets = split.getInsets(); int width = getInitialLocation(insets); Dimension dims = split.getSize(); for (int i = 0; i < components.length; i += 2) { if (components[i] == null) continue; setComponentToSize(components[i], sizes[i], width, insets, dims); width += sizes[i]; } if (components[1] != null) { setComponentToSize(components[1], sizes[1], width, insets, dims); width += sizes[1]; } } }
1,246
public int getDividerLocation(JSplitPane jc) { return layoutManager.sizes[0] + layoutManager.getInitialLocation(splitPane.getInsets()); }
public int getDividerLocation(JSplitPane jc) { return layoutManager.sizes[0] + layoutManager.getInitialLocation(splitPane.getInsets()); }
1,247
public int getMinimumDividerLocation(JSplitPane jc) { int value = layoutManager.getInitialLocation(jc.getInsets()); if (layoutManager.components[0] != null) value -= layoutManager.minimumSizeOfComponent(0); return value; }
public int getMinimumDividerLocation(JSplitPane jc) { int value = layoutManager.getInitialLocation(jc.getInsets()); if (layoutManager.components[0] != null) value += layoutManager.minimumSizeOfComponent(0); return value; }
1,248
public void setDividerLocation(JSplitPane jc, int location) { location = validLocation(location); Container p = jc.getParent(); Component right = jc.getRightComponent(); Dimension rightPrefSize = right == null ? new Dimension(0, 0) : right.getPreferredSize(); Dimension size = jc.getSize(); // check if the size has been set for the splitpane if (size.width == 0 && size.height == 0) size = jc.getPreferredSize(); if (getOrientation() == 0 && location > size.height) { location = size.height; while (p != null) { p.setSize(p.getWidth(), p.getHeight() + rightPrefSize.height); p = p.getParent(); } } else if (location > size.width) { location = size.width; while (p != null) { p.setSize(p.getWidth() + rightPrefSize.width, p.getHeight()); p = p.getParent(); } } setLastDragLocation(getDividerLocation(splitPane)); splitPane.setLastDividerLocation(getDividerLocation(splitPane)); int[] tmpSizes = layoutManager.getSizes(); tmpSizes[0] = location - layoutManager.getInitialLocation(splitPane.getInsets()); tmpSizes[1] = layoutManager.getAvailableSize(splitPane.getSize(), splitPane.getInsets()) - tmpSizes[0]; layoutManager.setSizes(tmpSizes); splitPane.revalidate(); splitPane.repaint(); }
public void setDividerLocation(JSplitPane jc, int location) { location = validLocation(location); Container p = jc.getParent(); Component right = jc.getRightComponent(); Dimension rightPrefSize = right == null ? new Dimension(0, 0) : right.getPreferredSize(); Dimension size = jc.getSize(); // check if the size has been set for the splitpane if (size.width == 0 && size.height == 0) size = jc.getPreferredSize(); if (getOrientation() == 0 && location > size.height) { location = size.height; while (p != null) { p.setSize(p.getWidth(), p.getHeight() + rightPrefSize.height); p = p.getParent(); } } else if (location > size.width) { location = size.width; while (p != null) { p.setSize(p.getWidth() + rightPrefSize.width, p.getHeight()); p = p.getParent(); } } setLastDragLocation(getDividerLocation(splitPane)); splitPane.setLastDividerLocation(getDividerLocation(splitPane)); int[] tmpSizes = layoutManager.getSizes(); tmpSizes[0] = location - layoutManager.getInitialLocation(splitPane.getInsets()); tmpSizes[1] = layoutManager.getAvailableSize(splitPane.getSize(), splitPane.getInsets()) - tmpSizes[0]; layoutManager.setSizes(tmpSizes); splitPane.revalidate(); splitPane.repaint(); }
1,250
public Canvas() { }
public Canvas() { }
1,252
public static void paintComponent(Graphics g, Component c, Container p, Rectangle r) { paintComponent(g, c, p, r.x, r.y, r.width, r.height); }
public static void paintComponent(Graphics g, Component c, Container p, Rectangle r) { paintComponent(g, c, p, r.x, r.y, r.width, r.height); }
1,253
public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); else validate(); embedded = true; } else { if (hideTabBar && sessionPane.getTabCount() == 0 ) { Session ses = null; for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { ses = (Session)(this.getContentPane().getComponent(x)); this.getContentPane().remove(x); break; } } //ses = (Session)(this.getContentPane().getComponent(0)); sessionPane.addTab(tabText,focused,ses); ses.grabFocus(); ses.resizeMe(); repaint(); if (ses.getAllocDeviceName() != null) sessionPane.setTitleAt(0,ses.getAllocDeviceName()); else sessionPane.setTitleAt(0,ses.getSessionName()); ses.addSessionListener(this); ses.addSessionJumpListener(this); this.getContentPane().add(sessionPane, BorderLayout.CENTER); } sessionPane.addTab(tabText,focused,session); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.black); sessionPane.setIconAt(sessionPane.getSelectedIndex(),unfocused); sessionPane.setSelectedIndex(sessionPane.getTabCount()-1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused); session.addSessionListener(this); session.addSessionJumpListener(this); session.grabFocus(); session.resizeMe(); session.repaint(); } }
public void addSessionView(String tabText,Session sessionView) { final Session session = sessionView; if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); else validate(); embedded = true; } else { if (hideTabBar && sessionPane.getTabCount() == 0 ) { Session ses = null; for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { ses = (Session)(this.getContentPane().getComponent(x)); this.getContentPane().remove(x); break; } } //ses = (Session)(this.getContentPane().getComponent(0)); sessionPane.addTab(tabText,focused,ses); ses.grabFocus(); ses.resizeMe(); repaint(); if (ses.getAllocDeviceName() != null) sessionPane.setTitleAt(0,ses.getAllocDeviceName()); else sessionPane.setTitleAt(0,ses.getSessionName()); ses.addSessionListener(this); ses.addSessionJumpListener(this); this.getContentPane().add(sessionPane, BorderLayout.CENTER); } sessionPane.addTab(tabText,focused,session); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.black); sessionPane.setIconAt(sessionPane.getSelectedIndex(),unfocused); sessionPane.setSelectedIndex(sessionPane.getTabCount()-1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused); session.addSessionListener(this); session.addSessionJumpListener(this); session.grabFocus(); session.resizeMe(); session.repaint(); } }
1,254
public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); else validate(); embedded = true; } else { if (hideTabBar && sessionPane.getTabCount() == 0 ) { Session ses = null; for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { ses = (Session)(this.getContentPane().getComponent(x)); this.getContentPane().remove(x); break; } } //ses = (Session)(this.getContentPane().getComponent(0)); sessionPane.addTab(tabText,focused,ses); ses.grabFocus(); ses.resizeMe(); repaint(); if (ses.getAllocDeviceName() != null) sessionPane.setTitleAt(0,ses.getAllocDeviceName()); else sessionPane.setTitleAt(0,ses.getSessionName()); ses.addSessionListener(this); ses.addSessionJumpListener(this); this.getContentPane().add(sessionPane, BorderLayout.CENTER); } sessionPane.addTab(tabText,focused,session); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.black); sessionPane.setIconAt(sessionPane.getSelectedIndex(),unfocused); sessionPane.setSelectedIndex(sessionPane.getTabCount()-1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused); session.addSessionListener(this); session.addSessionJumpListener(this); session.grabFocus(); session.resizeMe(); session.repaint(); } }
public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.resizeMe(); repaint(); if (packFrame) pack(); else validate(); embedded = true; } else { if (hideTabBar && sessionPane.getTabCount() == 0 ) { Session ses = null; for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { ses = (Session)(this.getContentPane().getComponent(x)); this.getContentPane().remove(x); break; } } //ses = (Session)(this.getContentPane().getComponent(0)); sessionPane.addTab(tabText,focused,ses); ses.grabFocus(); ses.resizeMe(); repaint(); if (ses.getAllocDeviceName() != null) sessionPane.setTitleAt(0,ses.getAllocDeviceName()); else sessionPane.setTitleAt(0,ses.getSessionName()); ses.addSessionListener(this); ses.addSessionJumpListener(this); this.getContentPane().add(sessionPane, BorderLayout.CENTER); } sessionPane.addTab(tabText,focused,session); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.black); sessionPane.setIconAt(sessionPane.getSelectedIndex(),unfocused); sessionPane.setSelectedIndex(sessionPane.getTabCount()-1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused); session.addSessionListener(this); session.addSessionJumpListener(this); session.resizeMe(); session.repaint(); } }
1,255
public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); else validate(); embedded = true; } else { if (hideTabBar && sessionPane.getTabCount() == 0 ) { Session ses = null; for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { ses = (Session)(this.getContentPane().getComponent(x)); this.getContentPane().remove(x); break; } } //ses = (Session)(this.getContentPane().getComponent(0)); sessionPane.addTab(tabText,focused,ses); ses.grabFocus(); ses.resizeMe(); repaint(); if (ses.getAllocDeviceName() != null) sessionPane.setTitleAt(0,ses.getAllocDeviceName()); else sessionPane.setTitleAt(0,ses.getSessionName()); ses.addSessionListener(this); ses.addSessionJumpListener(this); this.getContentPane().add(sessionPane, BorderLayout.CENTER); } sessionPane.addTab(tabText,focused,session); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.black); sessionPane.setIconAt(sessionPane.getSelectedIndex(),unfocused); sessionPane.setSelectedIndex(sessionPane.getTabCount()-1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused); session.addSessionListener(this); session.addSessionJumpListener(this); session.grabFocus(); session.resizeMe(); session.repaint(); } }
public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); else validate(); embedded = true; } else { if (hideTabBar && sessionPane.getTabCount() == 0 ) { Session ses = null; for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { ses = (Session)(this.getContentPane().getComponent(x)); this.getContentPane().remove(x); break; } } //ses = (Session)(this.getContentPane().getComponent(0)); sessionPane.addTab(tabText,focused,ses); ses.grabFocus(); ses.resizeMe(); repaint(); if (ses.getAllocDeviceName() != null) sessionPane.setTitleAt(0,ses.getAllocDeviceName()); else sessionPane.setTitleAt(0,ses.getSessionName()); ses.addSessionListener(this); ses.addSessionJumpListener(this); this.getContentPane().add(sessionPane, BorderLayout.CENTER); } sessionPane.addTab(tabText,focused,session); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.black); sessionPane.setIconAt(sessionPane.getSelectedIndex(),unfocused); sessionPane.setSelectedIndex(sessionPane.getTabCount()-1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused); session.addSessionListener(this); session.addSessionJumpListener(this); session.grabFocus(); session.resizeMe(); session.repaint(); } }
1,256
public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); else validate(); embedded = true; } else { if (hideTabBar && sessionPane.getTabCount() == 0 ) { Session ses = null; for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { ses = (Session)(this.getContentPane().getComponent(x)); this.getContentPane().remove(x); break; } } //ses = (Session)(this.getContentPane().getComponent(0)); sessionPane.addTab(tabText,focused,ses); ses.grabFocus(); ses.resizeMe(); repaint(); if (ses.getAllocDeviceName() != null) sessionPane.setTitleAt(0,ses.getAllocDeviceName()); else sessionPane.setTitleAt(0,ses.getSessionName()); ses.addSessionListener(this); ses.addSessionJumpListener(this); this.getContentPane().add(sessionPane, BorderLayout.CENTER); } sessionPane.addTab(tabText,focused,session); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.black); sessionPane.setIconAt(sessionPane.getSelectedIndex(),unfocused); sessionPane.setSelectedIndex(sessionPane.getTabCount()-1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused); session.addSessionListener(this); session.addSessionJumpListener(this); session.grabFocus(); session.resizeMe(); session.repaint(); } }
public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); else validate(); embedded = true; } else { if (hideTabBar && sessionPane.getTabCount() == 0 ) { Session ses = null; for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { ses = (Session)(this.getContentPane().getComponent(x)); this.getContentPane().remove(x); break; } } //ses = (Session)(this.getContentPane().getComponent(0)); sessionPane.addTab(tabText,focused,ses); ses.grabFocus(); ses.resizeMe(); repaint(); if (ses.getAllocDeviceName() != null) sessionPane.setTitleAt(0,ses.getAllocDeviceName()); else sessionPane.setTitleAt(0,ses.getSessionName()); ses.addSessionListener(this); ses.addSessionJumpListener(this); this.getContentPane().add(sessionPane, BorderLayout.CENTER); } sessionPane.addTab(tabText,focused,session); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.black); sessionPane.setIconAt(sessionPane.getSelectedIndex(),unfocused); sessionPane.setSelectedIndex(sessionPane.getTabCount()-1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused); session.addSessionListener(this); session.addSessionJumpListener(this); session.grabFocus(); session.resizeMe(); session.repaint(); } }
1,257
public void run() { sessionPane.setTitleAt(index,d); }
public void run() { sessionPane.setTitleAt(index,d); }
1,258
public JTabbedPane() { this(SwingConstants.TOP, WRAP_TAB_LAYOUT); }
public JTabbedPane() { this(SwingConstants.TOP, WRAP_TAB_LAYOUT); }
1,259
public void addTab(String title, Icon icon, Component component) { insertTab(title, icon, component, null, tabs.size()); }
public void addTab(String title, Icon icon, Component component, String tip) { insertTab(title, icon, component, null, tabs.size()); }
1,260