rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
char c = screen[getPos(m,i)].getChar(); if (c >= ' ' && !screen[getPos(m,i)].nonDisplay) | char c = screen[getPos(m - 1,i - 1)].getChar(); if (c >= ' ' && !screen[getPos(m - 1,i - 1)].nonDisplay) | protected final void copyMe() { Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard(); StringBuffer s = new StringBuffer(); if (!gui.rubberband.isAreaSelected()) workR.setBounds(0,0,numCols,numRows); else { // lets get the bounding area using a rectangle that we have alr... |
bounds.setBounds(1,1,getRows(),getCols()); | bounds.setBounds(1,1,getCols(),getRows()); | public void getBoundingArea(Rectangle bounds) { // check to see if there is an area selected. If not then return all // screen area. if (!gui.rubberband.isAreaSelected()) { bounds.setBounds(1,1,getRows(),getCols()); } else { // lets get the bounding area using a rectangle... |
gui.rubberband.getBoundingArea(bounds); | gui.rubberband.getBoundingArea(workR); | public void getBoundingArea(Rectangle bounds) { // check to see if there is an area selected. If not then return all // screen area. if (!gui.rubberband.isAreaSelected()) { bounds.setBounds(1,1,getRows(),getCols()); } else { // lets get the bounding area using a rectangle... |
int sPos = getRowColFromPoint(bounds.x , bounds.y ); | int sPos = getRowColFromPoint(workR.x, workR.y); | public void getBoundingArea(Rectangle bounds) { // check to see if there is an area selected. If not then return all // screen area. if (!gui.rubberband.isAreaSelected()) { bounds.setBounds(1,1,getRows(),getCols()); } else { // lets get the bounding area using a rectangle... |
int ePos = getRowColFromPoint(bounds.width , bounds.height ); | int ePos = getRowColFromPoint(workR.width, workR.height); | public void getBoundingArea(Rectangle bounds) { // check to see if there is an area selected. If not then return all // screen area. if (!gui.rubberband.isAreaSelected()) { bounds.setBounds(1,1,getRows(),getCols()); } else { // lets get the bounding area using a rectangle... |
bounds.setBounds(row,col,getCol(ePos),getRow(ePos)); | bounds.setBounds(row,col,getCol(ePos) + 1,getRow(ePos) + 1); | public void getBoundingArea(Rectangle bounds) { // check to see if there is an area selected. If not then return all // screen area. if (!gui.rubberband.isAreaSelected()) { bounds.setBounds(1,1,getRows(),getCols()); } else { // lets get the bounding area using a rectangle... |
point.x = screen[getPos(r,c)].x; point.y = screen[getPos(r,c)].y; | point.x = screen[getPos(r,c)].x + bi.offLeft; point.y = screen[getPos(r,c)].y + bi.offTop; | public void getPointFromRowCol (int r, int c, Point point) { point.x = screen[getPos(r,c)].x; point.y = screen[getPos(r,c)].y; } |
if (x > tArea.getMaxX()) x = (int)tArea.getMaxX() - 1; if (y > tArea.getMaxY()) y = (int)tArea.getMaxY() - 1; if (x < tArea.getMinX()) x = 0; if (y < tArea.getMinY()) y = 0; | public int getRowColFromPoint (int x, int y) { // is x,y in the drawing area // x is left to right and y is top to bottom// if (tArea.contains(x,y)) {//// // int cols = (numCols - ((((fmWidth * numCols) - x) / fmWidth)));// // System.out.println(cols);// return getPos... | |
if (x > tArea.getMaxX()) x = (int)tArea.getMaxX() - 1; if (y > tArea.getMaxY()) y = (int)tArea.getMaxY() - 1; if (x < tArea.getMinX()) x = 0; if (y < tArea.getMinY()) y = 0; int s = fmWidth * numCols; int t = s - x; int u = t / fmWidth; int v = numCols - u; | public int getRowColFromPoint (int x, int y) { // is x,y in the drawing area // x is left to right and y is top to bottom// if (tArea.contains(x,y)) {//// // int cols = (numCols - ((((fmWidth * numCols) - x) / fmWidth)));// // System.out.println(cols);// return getPos... | |
font = new Font("dialoginput",Font.PLAIN,14); config.setProperty("font","dialoginput"); | font = new Font("Courier New",Font.PLAIN,14); config.setProperty("font","Courier New"); | void jbInit() throws Exception { if (!config.isPropertyExists("font")) { font = new Font("dialoginput",Font.PLAIN,14); config.setProperty("font","dialoginput"); } else { font = new Font(getStringProperty("font"),Font.PLAIN,14); } gui.setFont(font); lastAttr = 32;... |
int pos = getRowColFromPoint(e.getX(),e.getY()); | int pos = getPosFromView(e.getX(),e.getY()); | public void moveCursor (MouseEvent e) { if(!keyboardLocked) { int pos = getRowColFromPoint(e.getX(),e.getY());// System.out.println((getRow(pos)) + "," + (getCol(pos)));// System.out.println(e.getX() + "," + e.getY()+ "," + fmWidth+ "," + fmHeight); if (pos == 0) retur... |
if (pos == 0) | if (pos < 0) | public void moveCursor (MouseEvent e) { if(!keyboardLocked) { int pos = getRowColFromPoint(e.getX(),e.getY());// System.out.println((getRow(pos)) + "," + (getCol(pos)));// System.out.println(e.getX() + "," + e.getY()+ "," + fmWidth+ "," + fmHeight); if (pos == 0) retur... |
System.out.println("Summing"); System.out.println(workR); int m = workR.x; int i = 0; int t = 0; double sum = 0.0; | protected final Vector sumThem(boolean which) { StringBuffer s = new StringBuffer(); getBoundingArea(workR); gui.rubberband.reset(); gui.repaint(); System.out.println("Summing"); System.out.println(workR); // loop through all the screen characters to send them to the clip board ... | |
while (workR.height-- >= 0) { | int m = workR.x; int i = 0; int t = 0; double sum = 0.0; while (workR.height-- > 0) { | protected final Vector sumThem(boolean which) { StringBuffer s = new StringBuffer(); getBoundingArea(workR); gui.rubberband.reset(); gui.repaint(); System.out.println("Summing"); System.out.println(workR); // loop through all the screen characters to send them to the clip board ... |
while (t-- >= 0) { | while (t-- > 0) { | protected final Vector sumThem(boolean which) { StringBuffer s = new StringBuffer(); getBoundingArea(workR); gui.rubberband.reset(); gui.repaint(); System.out.println("Summing"); System.out.println(workR); // loop through all the screen characters to send them to the clip board ... |
System.out.println(s + " " + n.doubleValue()); | protected final Vector sumThem(boolean which) { StringBuffer s = new StringBuffer(); getBoundingArea(workR); gui.rubberband.reset(); gui.repaint(); System.out.println("Summing"); System.out.println(workR); // loop through all the screen characters to send them to the clip board ... | |
int pos = getRowColFromPoint(end.x,end.y); | int pos = getPosFromView(end.x,end.y); | public Point translateEnd(Point end) { // because getRowColFromPoint returns position offset as 1,1 we need // to translate as offset 0,0 int pos = getRowColFromPoint(end.x,end.y);// if (pos >= 0 && pos <= lenScreen) { int x = screen[pos].x + fmWidth - 1; int y = screen[pos].y + f... |
int pos = getRowColFromPoint(start.x,start.y); | int pos = getPosFromView(start.x,start.y); | public Point translateStart(Point start) { // because getRowColFromPoint returns position offset as 1,1 we need // to translate as offset 0,0 int pos = getRowColFromPoint(start.x,start.y); start.setLocation(screen[pos].x,screen[pos].y); return start; } |
{ return GetScreen(buffer,bufferLength,0,lenScreen,plane); | public synchronized int GetScreen(char buffer[], int bufferLength, int plane)// throws OhioException { { return GetScreen(buffer,bufferLength,0,lenScreen,plane); } | |
} | { return GetScreen(buffer, bufferLength, 0, lenScreen, plane); } | public synchronized int GetScreen(char buffer[], int bufferLength, int plane)// throws OhioException { { return GetScreen(buffer,bufferLength,0,lenScreen,plane); } |
int startPos, int endPos, int plane) { return planes.GetScreenRect(buffer, bufferLength, startPos, endPos, plane); | public synchronized int GetScreenRect(char buffer[], int bufferLength, int startPos, int endPos, int plane)// throws OhioException { { return planes.GetScreenRect(buffer, bufferLen... | |
} | int startPos, int endPos, int plane) { return planes.GetScreenRect(buffer, bufferLength, startPos, endPos, plane); } | public synchronized int GetScreenRect(char buffer[], int bufferLength, int startPos, int endPos, int plane)// throws OhioException { { return planes.GetScreenRect(buffer, bufferLen... |
if (listeners == null) { listeners = new java.util.Vector(3); } listeners.addElement(listener); | if (listeners == null) { | public void addScreenListener(ScreenListener listener) { if (listeners == null) { listeners = new java.util.Vector(3); } listeners.addElement(listener); } |
} | listeners = new java.util.Vector(3); } listeners.addElement(listener); } | public void addScreenListener(ScreenListener listener) { if (listeners == null) { listeners = new java.util.Vector(3); } listeners.addElement(listener); } |
planes.setScreenCharAndAttr(sp, ' ', 32, false); | protected void createScrollBar(int flag, int totalRowScrollable, int totalColScrollable, int sliderRowPos, int sliderColPos, int sbSize) { // System.out.println("Scrollbar flag: " + flag + // " scrollable Rows: " + totalRowScrollable + // " scrollable Col... | |
sf.setRightAdjusted(); break; case 6: rightAdjustField(' '); | private boolean fieldExit() { int pos = lastPos; boolean mdt = false; int end = endOfField(false); // get the ending position of the first // non blank character in field ScreenField sf = screenFields.getCurrentField(); if (sf.isMandatoryEnter() && end == sf.startPos()) { displayError(ERR_MANDITORY_ENTER); r... | |
int startRow = getRow(lastPos); int startCol = getCol(lastPos); | private synchronized void fireCursorChanged(int update) { int startRow = getRow(lastPos); int startCol = getCol(lastPos); if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listene... | |
if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.elementAt(i); target.onScreenChanged(update,startRow,startCol,startRow,startCol); } } } | int startRow = getRow(lastPos); int startCol = getCol(lastPos); if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener) listeners.elementAt(i); target.onScreenChanged(update, startRow, startCol, startRow, startCol); } } } | private synchronized void fireCursorChanged(int update) { int startRow = getRow(lastPos); int startCol = getCol(lastPos); if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listene... |
int endRow, int endCol) { | private void fireScreenChanged(int which, int startRow, int startCol, int endRow, int endCol) { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.e... | |
if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.elementAt(i); target.onScreenChanged(1,startRow,startCol,endRow,endCol); } } dirtyScreen.setBounds(lenScreen,0,0,0); } | int endRow, int endCol) { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener) listeners.elementAt(i); target.onScreenChanged(1, startRow, startCol, endRow, endCol); } } dirtyScreen.setBounds(lenScreen, 0, 0, 0); } | private void fireScreenChanged(int which, int startRow, int startCol, int endRow, int endCol) { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.e... |
public char[] getData(int startRow, int startCol, int endRow, int endCol, int plane) { try { int from = getPos(startRow,startCol); int to = getPos(endRow,endCol); if (from > to) { | public char[] getData(int startRow, int startCol, int endRow, int endCol, int plane) { | public char[] getData(int startRow, int startCol, int endRow, int endCol, int plane) { try { int from = getPos(startRow,startCol); int to = getPos(endRow,endCol); if (from > to) { int f = from; to = f; from = f; } return planes.getPlaneDat... |
int f = from; to = f; from = f; } return planes.getPlaneData(from,to,plane); } catch (Exception oe) { return null; } | try { | public char[] getData(int startRow, int startCol, int endRow, int endCol, int plane) { try { int from = getPos(startRow,startCol); int to = getPos(endRow,endCol); if (from > to) { int f = from; to = f; from = f; } return planes.getPlaneDat... |
} | int from = getPos(startRow, startCol); int to = getPos(endRow, endCol); if (from > to) { int f = from; to = f; from = f; } return planes.getPlaneData(from, to, plane); } catch (Exception oe) { return null; } } | public char[] getData(int startRow, int startCol, int endRow, int endCol, int plane) { try { int from = getPos(startRow,startCol); int to = getPos(endRow,endCol); if (from > to) { int f = from; to = f; from = f; } return planes.getPlaneDat... |
return cursorActive; | public boolean isCursorActive() { return cursorActive; } | |
} | return cursorActive; } | public boolean isCursorActive() { return cursorActive; } |
int minr = Math.min(getRow(pos),getRow(dirtyScreen.x)); int minc = Math.min(getCol(pos),getCol(dirtyScreen.x)); | int minr = Math.min(getRow(pos), getRow(dirtyScreen.x)); | protected void setDirty(int pos) { int minr = Math.min(getRow(pos),getRow(dirtyScreen.x)); int minc = Math.min(getCol(pos),getCol(dirtyScreen.x)); int maxr = Math.max(getRow(pos),getRow(dirtyScreen.y)); int maxc = Math.max(getCol(pos),getCol(dirtyScreen.y)); int x1 = getPos(minr,minc); int x2 = get... |
int maxr = Math.max(getRow(pos),getRow(dirtyScreen.y)); int maxc = Math.max(getCol(pos),getCol(dirtyScreen.y)); | int minc = Math.min(getCol(pos), getCol(dirtyScreen.x)); | protected void setDirty(int pos) { int minr = Math.min(getRow(pos),getRow(dirtyScreen.x)); int minc = Math.min(getCol(pos),getCol(dirtyScreen.x)); int maxr = Math.max(getRow(pos),getRow(dirtyScreen.y)); int maxc = Math.max(getCol(pos),getCol(dirtyScreen.y)); int x1 = getPos(minr,minc); int x2 = get... |
int x1 = getPos(minr,minc); int x2 = getPos(maxr,maxc); | int maxr = Math.max(getRow(pos), getRow(dirtyScreen.y)); | protected void setDirty(int pos) { int minr = Math.min(getRow(pos),getRow(dirtyScreen.x)); int minc = Math.min(getCol(pos),getCol(dirtyScreen.x)); int maxr = Math.max(getRow(pos),getRow(dirtyScreen.y)); int maxc = Math.max(getCol(pos),getCol(dirtyScreen.y)); int x1 = getPos(minr,minc); int x2 = get... |
dirtyScreen.setBounds(x1,x2,0,0); | int maxc = Math.max(getCol(pos), getCol(dirtyScreen.y)); int x1 = getPos(minr, minc); int x2 = getPos(maxr, maxc); dirtyScreen.setBounds(x1, x2, 0, 0); | protected void setDirty(int pos) { int minr = Math.min(getRow(pos),getRow(dirtyScreen.x)); int minc = Math.min(getCol(pos),getCol(dirtyScreen.x)); int maxr = Math.max(getRow(pos),getRow(dirtyScreen.y)); int maxc = Math.max(getCol(pos),getCol(dirtyScreen.y)); int x1 = getPos(minr,minc); int x2 = get... |
oia.setKeysBuffered(false); | protected void setPrehelpState(boolean setErrorCode, boolean lockKeyboard, boolean unlockIfLocked) { statusErrorCode = setErrorCode; if (oia.isKeyBoardLocked() && unlockIfLocked) oia.setKeyBoardLocked(false); else oia.setKeyBoardLocked(lockKeyboard); bufferedKeys = null; oia.setKeysBuffered(false); } | |
oia.setKeysBuffered(false); | protected void setPrehelpState(boolean setErrorCode, boolean lockKeyboard, boolean unlockIfLocked) { statusErrorCode = setErrorCode; if (oia.isKeyBoardLocked() && unlockIfLocked) oia.setKeyBoardLocked(false); else oia.setKeyBoardLocked(lockKeyboard); bufferedKeys = null; oia.setKeysBuffered(false); } | |
if (location < 0 || location > lenScreen) { return; } | protected synchronized void setScreenData(String text, int location) {// throws OhioException { if (location < 0 || location > lenScreen) { return;// throw new OhioException(sessionVT.getSessionConfiguration(),// OhioScreen5250.class.getNam... | |
int pos = location; | if (location < 0 || location > lenScreen) { | protected synchronized void setScreenData(String text, int location) {// throws OhioException { if (location < 0 || location > lenScreen) { return;// throw new OhioException(sessionVT.getSessionConfiguration(),// OhioScreen5250.class.getNam... |
int l = text.length(); boolean updated = false; boolean flag = false; int x =0; for (; x < l; x++) { if (isInField(pos + x,true)) { if (!screenFields.getCurrentField().isBypassField()) { if (!flag) { screenFields.getCurrentField().setMDT(); updated = true; resetDirty(pos + x); screenFields.setMasterMDT(); flag = true; ... | return; | protected synchronized void setScreenData(String text, int location) {// throws OhioException { if (location < 0 || location > lenScreen) { return;// throw new OhioException(sessionVT.getSessionConfiguration(),// OhioScreen5250.class.getNam... |
planes.screen[pos + x] = text.charAt(x); setDirty(pos + x); } } | protected synchronized void setScreenData(String text, int location) {// throws OhioException { if (location < 0 || location > lenScreen) { return;// throw new OhioException(sessionVT.getSessionConfiguration(),// OhioScreen5250.class.getNam... | |
} lastPos = pos + x; if (updated) { fireScreenChanged(1); } | protected synchronized void setScreenData(String text, int location) {// throws OhioException { if (location < 0 || location > lenScreen) { return;// throw new OhioException(sessionVT.getSessionConfiguration(),// OhioScreen5250.class.getNam... | |
} | } int pos = location; int l = text.length(); boolean updated = false; boolean flag = false; int x = 0; for (; x < l; x++) { if (isInField(pos + x, true)) { if (!screenFields.getCurrentField().isBypassField()) { if (!flag) { screenFields.getCurrentField().setMDT(); updated = true; resetDirty(pos + x); scree... | protected synchronized void setScreenData(String text, int location) {// throws OhioException { if (location < 0 || location > lenScreen) { return;// throw new OhioException(sessionVT.getSessionConfiguration(),// OhioScreen5250.class.getNam... |
if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) | if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.getCurrentField().startPos() == lastPos) displayError(ERR_CURSOR_PROTECTED); else { screenFields.getCurrentField().getKeyPos(lastPos); screenFields.getCurrentFie... | protected boolean simulateMnemonic(int mnem) { boolean simulated = false; switch (mnem) { case AID_CLEAR: case AID_ENTER: case AID_PF1: case AID_PF2: case AID_PF3: case AID_PF4: case AID_PF5: case AID_PF6: case AID_PF7: case AID_PF8: case AID_PF9: case AID_PF10: case AID_PF11: case AID_PF12: case AID_... |
if (screenFields.getCurrentField().startPos() == lastPos) displayError(ERR_CURSOR_PROTECTED); else { screenFields.getCurrentField().getKeyPos(lastPos); screenFields.getCurrentField().changePos(-1); resetDirty(screenFields.getCurrentField().getCurrentPos()); shiftLeft(screenFields.getCurrentField().getCurrentPos()); up... | advancePos(); if (lastPos == startPos) { goto_XY(startPos); break; } | protected boolean simulateMnemonic(int mnem) { boolean simulated = false; switch (mnem) { case AID_CLEAR: case AID_ENTER: case AID_PF1: case AID_PF2: case AID_PF3: case AID_PF4: case AID_PF5: case AID_PF6: case AID_PF7: case AID_PF8: case AID_PF9: case AID_PF10: case AID_PF11: case AID_PF12: case AID_... |
} updateDirty(); goto_XY(where); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case ERASE_FIELD: if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = lastPos; lastPos = screenFields.getCurrentField... | } } simulated = true; break; | protected boolean simulateMnemonic(int mnem) { boolean simulated = false; switch (mnem) { case AID_CLEAR: case AID_ENTER: case AID_PF1: case AID_PF2: case AID_PF3: case AID_PF4: case AID_PF5: case AID_PF6: case AID_PF7: case AID_PF8: case AID_PF9: case AID_PF10: case AID_PF11: case AID_PF12: case AID_... |
public synchronized int GetScreen(char buffer[], int bufferLength, int from, int length, int plane) { if(buffer == null) return 0; | public synchronized int GetScreen(char buffer[], int bufferLength, int plane) { | public synchronized int GetScreen(char buffer[], int bufferLength, int from, int length, int plane) {// if(buffer == null)// throw new OhioException(sessionVT.getSessionConfiguration(),// OhioScreen.class.getName()... |
int min = Math.min(Math.min(buffer.length, bufferLength), screenSize); if ((from + min) > screenSize) { min = screenSize - from; } | return GetScreen(buffer,bufferLength,0,screenSize,plane); | public synchronized int GetScreen(char buffer[], int bufferLength, int from, int length, int plane) {// if(buffer == null)// throw new OhioException(sessionVT.getSessionConfiguration(),// OhioScreen.class.getName()... |
char[] pd = getPlaneData(from,from + min,plane); if(pd != null) { System.arraycopy(pd, 0, buffer, 0, min); return pd.length; } return 0; | public synchronized int GetScreen(char buffer[], int bufferLength, int from, int length, int plane) {// if(buffer == null)// throw new OhioException(sessionVT.getSessionConfiguration(),// OhioScreen.class.getName()... | |
protected void setScreenAttr(int pos, int attr) { | protected void setScreenAttr(int pos, int attr, boolean isAttr) { | protected void setScreenAttr(int pos, int attr) { screenAttr[pos] = (char)attr; screenGUI[pos] = initChar; disperseAttribute(pos,attr); } |
disperseAttribute(pos,attr); | protected void setScreenAttr(int pos, int attr) { screenAttr[pos] = (char)attr; screenGUI[pos] = initChar; disperseAttribute(pos,attr); } | |
System.arraycopy(screen,0,fieldExtended,0,screenSize); System.arraycopy(screen,0,screenField,0,screenSize); | if (initArray == null) { initArray = new char[screenSize]; System.arraycopy(screen,0,initArray,0,screenSize); } System.arraycopy(initArray,0,fieldExtended,0,screenSize); System.arraycopy(initArray,0,screenField,0,screenSize); | protected void initalizePlanes () { for (int y = 0;y < screenSize; y++) { setScreenCharAndAttr(y,initChar,initAttr,false); screenGUI[y] = NO_GUI; screenIsChanged[y] = false; } // here we will just copy a plane that has already been initialized // onto the other pla... |
protected boolean isInField(int pos, boolean chgToField) { ScreenField sf; for (int x = 0;x < sizeFields; x++) { sf = screenFields[x]; if (sf.withinField(pos)) { if (chgToField) { if (!currentField.equals(sf)) currentModified = false; currentField = sf; } return true; } } return false; | protected boolean isInField(int pos) { return isInField(pos,true); | protected boolean isInField(int pos, boolean chgToField) { ScreenField sf; for (int x = 0;x < sizeFields; x++) { sf = screenFields[x]; if (sf.withinField(pos)) { if (chgToField) { if (!currentField.equals(sf)) currentModified = false; ... |
initArray = null; | protected void setSize(int newSize) { int oldRows = numRows; screenSize = newSize; numCols = 80; switch (newSize) { case 24: numRows = 24; break; case 27: numRows = 27; numCols = 132; break; } // this is used here when ... | |
throw new BAD_OPERATION("Policy expected"); | BAD_OPERATION bad = new BAD_OPERATION("Policy expected"); bad.minor = Minor.Any; throw bad; | public static Policy extract(Any any) { try { PolicyHolder h = (PolicyHolder) any.extract_Streamable(); return h.value; } catch (ClassCastException ex) { throw new BAD_OPERATION("Policy expected"); } } |
switch (logLevel) { case TN5250jLogger.OFF: intOFF.setSelected(true); break; case TN5250jLogger.DEBUG: intDEBUG.setSelected(true); break; case TN5250jLogger.INFO: intINFO.setSelected(true); break; case TN5250jLogger.WARN: intWARN.setSelected(true); break; case TN5250jLogger.ERROR: intERROR.setSelected(true); break; cas... | private void createLoggingPanel(){ loggingPanel.setLayout(new GridBagLayout()); // levelPanel levelPanel = new JPanel(new GridBagLayout()); TitledBorder tb = BorderFactory.createTitledBorder( LangTool.getString("logscr.Level")); tb.setTitleJustification(TitledBorder.CENTER); levelPanel.setBorder(tb); // Crea... | |
intConsole_itemStateChanged(e); | intDEBUG_itemStateChanged(e); | public void itemStateChanged(ItemEvent e) { intConsole_itemStateChanged(e); } |
TN5250jLogFactory.setLogLevels(TN5250jLogger.OFF); | private void intOFF_itemStateChanged(ItemEvent e) { if (!intOFF.isSelected() && TN5250jLogFactory.isLog4j()) { intConsole.setEnabled(true); intFile.setEnabled(true); intBoth.setEnabled(true); } else { intConsole.setEnabled(false); intConsole.setSelected(true); intFile.setEnabled(false); intBoth.setEna... | |
setLogLevel(); | private void saveProps() { setOptionAccess(); setExternalPrograms(); ConfigureFactory.getInstance().saveSettings( ConfigureFactory.SESSIONS, "------ Session Information --------"); OptionAccessFactory.getInstance().reload(); } | |
listener = new DefaultExceptionListener(); | listener = DefaultExceptionListener.INSTANCE; | public void setExceptionListener(ExceptionListener listener) { // uses a default implementation when null if (listener == null) { listener = new DefaultExceptionListener(); } exceptionListener = listener; } |
ClassLoader cl = security.getCallingClassLoader(); | ClassLoader cl = VMStackWalker.getCallingClassLoader(); | public static ResourceBundle getBundle(String baseName) { ClassLoader cl = security.getCallingClassLoader(); if (cl == null) cl = ClassLoader.getSystemClassLoader(); return getBundle(baseName, Locale.getDefault(), cl); } |
static ClassLoader currentClassLoader (SecurityManager sm) { | static ClassLoader currentClassLoader() { | static ClassLoader currentClassLoader (SecurityManager sm) { // TODO implement me return null; } |
protected void installDefaults(JTree tree) | protected void installDefaults() | protected void installDefaults(JTree tree) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); rightChildIndent = defaults... |
protected void uninstallDefaults(JTree tree) | protected void uninstallDefaults() | protected void uninstallDefaults(JTree tree) { tree.setFont(null); tree.setForeground(null); tree.setBackground(null); } |
setPropertiesFromAttributes(); | StyleSheet ss = getStyleSheet(); attributes = ss.getViewAttributes(this); preferenceChanged(null, true, true); | public void changedUpdate(DocumentEvent e, Shape a, ViewFactory f) { super.changedUpdate(e, a, f); setPropertiesFromAttributes(); } |
return super.getAttributes(); | if (attributes == null) { StyleSheet ss = getStyleSheet(); attributes = ss.getViewAttributes(this); } return attributes; | public AttributeSet getAttributes() { // FIXME: Implement this. return super.getAttributes(); } |
AttributeSet atts = getAttributes(); Object o = atts.getAttribute(CSS.Attribute.TEXT_DECORATION); boolean b = false; if (o != null && o.toString().contains("underline")) b = true; setUnderline(b); b = false; if (o != null && o.toString().contains("line-through")) b = true; setStrikeThrough(b); o = atts.getAttribu... | protected void setPropertiesFromAttributes() { // FIXME: Implement this. super.setPropertiesFromAttributes(); } | |
final String diffFileName = pkg + ".diff"; | final String diffFileName = pkg + ".pkgdiff"; | public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map vmFiles = scanJavaFiles(vmDirs); final Map classpathFiles = scanJavaFiles(classpathDirs); final TreeSet allFiles = new TreeSet(); final Map p... |
g.drawLine(x + 1, y + 1, x + w - 1, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 1); | g.drawLine(x + 1, y + 1, x + w - 3, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 2); | public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 1, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 1); g.setColor(shadow); g.drawLine(x + 1, y + h - 1, ... |
g.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1); | g.drawLine(x + 1, y + h - 2, x + w - 1, y + h - 2); g.drawLine(x + w - 2, y + 1, x + w - 2, y + h - 2); | public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 1, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 1); g.setColor(shadow); g.drawLine(x + 1, y + h - 1, ... |
g.drawLine(x, y + h, x + w, y + h); g.drawLine(x + w, y, x + w, y + h); | g.drawLine(x, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y, x + w - 1, y + h - 1); | public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 1, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 1); g.setColor(shadow); g.drawLine(x + 1, y + h - 1, ... |
} | public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 1, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 1); g.setColor(shadow); g.drawLine(x + 1, y + h - 1, ... | |
int len = p1 - p0; char[] buffer = new char[len]; for (int index = 0; index < len; ++index) buffer[index] = ch; g.drawChars(buffer, 0, len, x, y); return x + len * metrics.charWidth(ch); | for (int index = p0; index < p1; ++index) x = drawEchoCharacter(g, x, y, ch); return x; | protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException { // FIXME: Throw BadLocationException somehow. // Update font metrics. updateMetrics(); // Get echo character. char ch = getEchoChar(); // Set color for selected text. g.setColor(sele... |
Segment segment = new Segment(); | protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException { // FIXME: Throw BadLocationException somehow. // Update font metrics. updateMetrics(); // Get echo character. char ch = getEchoChar(); Segment segment = new Segment(); // Set color... | |
p1--; getDocument().getText(p0, p1 - p0, segment); int len = segment.toString().length(); char[] buffer = new char[len]; for (int index = 0; index < len; ++index) buffer[index] = ch; y += getPreferredSpan(Y_AXIS)/2; g.drawChars(buffer, 0, len, x, y); return x + (len * metrics.charWidth(ch)); | for (int index = p0; index < p1; ++index) x = drawEchoCharacter(g, x, y, ch); return x; | protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException { // FIXME: Throw BadLocationException somehow. // Update font metrics. updateMetrics(); // Get echo character. char ch = getEchoChar(); Segment segment = new Segment(); // Set color... |
int size = listeners.size(); | Vector lc = new Vector(listeners); int size = lc.size(); | private synchronized void fireCursorChanged(int update) { int startRow = getRow(lastPos); int startCol = getCol(lastPos); if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listene... |
(ScreenListener)listeners.elementAt(i); | (ScreenListener)lc.elementAt(i); | private synchronized void fireCursorChanged(int update) { int startRow = getRow(lastPos); int startCol = getCol(lastPos); if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listene... |
int size = listeners.size(); | Vector lc = new Vector(listeners); int size = lc.size(); | private void fireScreenChanged(int which, int startRow, int startCol, int endRow, int endCol) { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.e... |
ScreenListener target = (ScreenListener)listeners.elementAt(i); | ScreenListener target = (ScreenListener)lc.elementAt(i); | private void fireScreenChanged(int which, int startRow, int startCol, int endRow, int endCol) { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.e... |
int size = listeners.size(); | Vector lc = new Vector(listeners); int size = lc.size(); | private void fireScreenSizeChanged() { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.elementAt(i); target.onScreenSizeChanged(numRows,numCols); } } } |
(ScreenListener)listeners.elementAt(i); | (ScreenListener)lc.elementAt(i); | private void fireScreenSizeChanged() { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { ScreenListener target = (ScreenListener)listeners.elementAt(i); target.onScreenSizeChanged(numRows,numCols); } } } |
indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); | public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,... | |
"MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), | protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDark... | |
private static final void checkTag(int value_tag) { if ((value_tag < 0x7fffff00 || value_tag > 0x7fffffff) && value_tag != vt_NULL && value_tag != vt_INDIRECTION ) throw new MARSHAL("Invalid value record, unsupported header tag: " + value_tag ); } | static void checkTag(int value_tag) { if ((value_tag < 0x7fffff00 || value_tag > 0x7fffffff) && value_tag != vt_NULL && value_tag != vt_INDIRECTION) { MARSHAL m = new MARSHAL("Invalid value record, unsupported header tag: " + value_tag + " (0x" + Integer.toHexString(value_tag) + ")"); m.minor = Minor.ValueHeaderTag; th... | private static final void checkTag(int value_tag) { if ((value_tag < 0x7fffff00 || value_tag > 0x7fffffff) && value_tag != vt_NULL && value_tag != vt_INDIRECTION ) throw new MARSHAL("Invalid value record, unsupported header tag: " + value_tag ); } |
private static Object read_instance(InputStream input, Object value, int value_tag, Object helper ) | static Object read_instance(InputStream input, final int position, Object value, int value_tag, BoxedValueHelper helper, String id, String[] ids, String codebase) | private static Object read_instance(InputStream input, Object value, int value_tag, Object helper ) { try { if ((value_tag & vf_CHUNKING) != 0) { ByteArrayOutputStream bout = null; int n = -1; ... |
ByteArrayOutputStream bout = null; int n = -1; | cdrBufOutput output = createBuffer(input, 1024); readNestedValue(value_tag, input, output, -1); cdrBufInput ci = new cdrBufInput(output.buffer.getBuffer()); ci.setRunTime(output.getRunTime()); | private static Object read_instance(InputStream input, Object value, int value_tag, Object helper ) { try { if ((value_tag & vf_CHUNKING) != 0) { ByteArrayOutputStream bout = null; int n = -1; ... |
int chunk_size = input.read_long(); if (chunk_size < 0) throw new MARSHAL("Invalid first chunk size " + chunk_size); byte[] r = new byte[ chunk_size ]; while (chunk_size > 0) { if (r.length < chunk_size) r = new byte[ chunk_size + 256 ]; n = 0; reading: while (n < chunk_size) n += input.read(r, n, r.length - n); c... | input = new noHeaderInput(ci, input); | private static Object read_instance(InputStream input, Object value, int value_tag, Object helper ) { try { if ((value_tag & vf_CHUNKING) != 0) { ByteArrayOutputStream bout = null; int n = -1; ... |
input = new noHeaderInput(((cdrBufInput) input).buffer.getBuffer()); | input = new noHeaderInput((cdrBufInput) input, null); } else if (input instanceof noHeaderInput) { ((noHeaderInput) input).subsequentCalls = false; | private static Object read_instance(InputStream input, Object value, int value_tag, Object helper ) { try { if ((value_tag & vf_CHUNKING) != 0) { ByteArrayOutputStream bout = null; int n = -1; ... |
input = new noHeaderInput(bout.buffer.toByteArray()); | input = new noHeaderInput( (cdrBufInput) bout.create_input_stream(), input); | private static Object read_instance(InputStream input, Object value, int value_tag, Object helper ) { try { if ((value_tag & vf_CHUNKING) != 0) { ByteArrayOutputStream bout = null; int n = -1; ... |
if (value instanceof CustomMarshal) { CustomMarshal marsh = (CustomMarshal) value; try { marsh.unmarshal((DataInputStream) input); } catch (ClassCastException ex) { incorrect_plug_in(ex); } } else if (value instanceof Streamable) { ((Streamable) value)._read(input); } else if (helper instanceof BoxedValueHelper) value... | return readValue(input, position, value, helper, id, ids, codebase); | private static Object read_instance(InputStream input, Object value, int value_tag, Object helper ) { try { if ((value_tag & vf_CHUNKING) != 0) { ByteArrayOutputStream bout = null; int n = -1; ... |
write(output, value, ObjectCreator.toIDL(value.getClass().getName())); | write(output, value, value.getClass()); | public static void write(OutputStream output, Serializable value) { // Write null if this is a null value. if (value == null) output.write_long(vt_NULL); else write(output, value, ObjectCreator.toIDL(value.getClass().getName())); } |
private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) | static void write_instance(OutputStream output, Serializable value, Object ids, BoxedValueHelper helper) | private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use /... |
int value_tag = vt_VALUE_TAG | vf_ID; | gnuValueStream rout = null; gnuRuntime runtime = null; try { if (output instanceof gnuValueStream) { int position; rout = (gnuValueStream) output; runtime = rout.getRunTime(); if (runtime == null) { runtime = new gnuRuntime(null, value); rout.setRunTime(runtime); rout.getRunTime().objectWritten(value, position = rout... | private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use /... |
cdrBufOutput out = null; | private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use /... | |
out = new cdrBufOutput(); out.setOrb(output.orb()); outObj = out; | outObj = output; | private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use /... |
output.write_string(id); | private static void write_instance(OutputStream output, Serializable value, String id, Object helper ) { // This implementation always writes a single repository id. // It never writes multiple repository ids and currently does not use /... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.