rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
return null;
|
if (accessibleContext == null) accessibleContext = new AccessibleJApplet(); return accessibleContext;
|
public AccessibleContext getAccessibleContext() { return null; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/JApplet.java/buggy/core/src/classpath/javax/javax/swing/JApplet.java
|
public BufferedImage createCompatibleImage(int w, int h) { return createCompatibleImage(w, h, Transparency.OPAQUE);
|
public BufferedImage createCompatibleImage(int w, int h, int transparency) { return config.createCompatibleImage(w, h, transparency);
|
public BufferedImage createCompatibleImage(int w, int h) { return createCompatibleImage(w, h, Transparency.OPAQUE); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/JNodeGraphicsConfiguration.java/clean/gui/src/awt/org/jnode/awt/JNodeGraphicsConfiguration.java
|
/* If there is an outside border, add it to insets. */
|
public Insets getBorderInsets(Component c, Insets insets) { Insets borderInsets; if (insets == null) insets = new Insets (0,0,0,0); else insets.left = insets.right = insets.top = insets.bottom = 0; /* If there is an outside border, add it to insets. */ if (outsideBorder != null) { borderInsets = outsideBorder.getBorderInsets(c); insets.left += borderInsets.left; insets.right += borderInsets.right; insets.top += borderInsets.top; insets.bottom += borderInsets.bottom; } /* If there is an inside border, add it to insets. */ if (insideBorder != null) { borderInsets = insideBorder.getBorderInsets(c); insets.left += borderInsets.left; insets.right += borderInsets.right; insets.top += borderInsets.top; insets.bottom += borderInsets.bottom; } return insets; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/CompoundBorder.java/buggy/core/src/classpath/javax/javax/swing/border/CompoundBorder.java
|
|
/* If there is an inside border, add it to insets. */
|
public Insets getBorderInsets(Component c, Insets insets) { Insets borderInsets; if (insets == null) insets = new Insets (0,0,0,0); else insets.left = insets.right = insets.top = insets.bottom = 0; /* If there is an outside border, add it to insets. */ if (outsideBorder != null) { borderInsets = outsideBorder.getBorderInsets(c); insets.left += borderInsets.left; insets.right += borderInsets.right; insets.top += borderInsets.top; insets.bottom += borderInsets.bottom; } /* If there is an inside border, add it to insets. */ if (insideBorder != null) { borderInsets = insideBorder.getBorderInsets(c); insets.left += borderInsets.left; insets.right += borderInsets.right; insets.top += borderInsets.top; insets.bottom += borderInsets.bottom; } return insets; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/CompoundBorder.java/buggy/core/src/classpath/javax/javax/swing/border/CompoundBorder.java
|
|
/* While it would be safe to assume true for the opacity of * a null border, this behavior would not be according to * the API specification. Also, it is pathological to have * null borders anyway. */
|
public boolean isBorderOpaque () { /* While it would be safe to assume true for the opacity of * a null border, this behavior would not be according to * the API specification. Also, it is pathological to have * null borders anyway. */ if ((insideBorder == null) || (outsideBorder == null)) return false; return insideBorder.isBorderOpaque() && outsideBorder.isBorderOpaque(); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/CompoundBorder.java/buggy/core/src/classpath/javax/javax/swing/border/CompoundBorder.java
|
|
/* If there is an outside border, paint it and reduce the * bounding box by its insets. */
|
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { /* If there is an outside border, paint it and reduce the * bounding box by its insets. */ if (outsideBorder != null) { Insets outsideInsets; outsideBorder.paintBorder(c, g, x, y, width, height); outsideInsets = outsideBorder.getBorderInsets(c); x += outsideInsets.left; y += outsideInsets.top; /* Reduce width and height by the respective extent of the * outside border. */ width -= outsideInsets.left + outsideInsets.right; height -= outsideInsets.top + outsideInsets.bottom; } if (insideBorder != null) insideBorder.paintBorder(c, g, x, y, width, height); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/CompoundBorder.java/buggy/core/src/classpath/javax/javax/swing/border/CompoundBorder.java
|
|
/* Reduce width and height by the respective extent of the * outside border. */
|
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { /* If there is an outside border, paint it and reduce the * bounding box by its insets. */ if (outsideBorder != null) { Insets outsideInsets; outsideBorder.paintBorder(c, g, x, y, width, height); outsideInsets = outsideBorder.getBorderInsets(c); x += outsideInsets.left; y += outsideInsets.top; /* Reduce width and height by the respective extent of the * outside border. */ width -= outsideInsets.left + outsideInsets.right; height -= outsideInsets.top + outsideInsets.bottom; } if (insideBorder != null) insideBorder.paintBorder(c, g, x, y, width, height); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/CompoundBorder.java/buggy/core/src/classpath/javax/javax/swing/border/CompoundBorder.java
|
|
public Structure () { init(); }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/87ab545376893c7eb3050f92ce9fe83e257321fb/Structure.java/clean/src/gov/nasa/gsfc/adc/xdf/Structure.java
|
||
if (array == null) { Log.warn("in Structure.addArray(), Array passed in is null"); return null; }
|
public Array addArray(Array array) { getArrayList().add(array); return array; }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/87ab545376893c7eb3050f92ce9fe83e257321fb/Structure.java/clean/src/gov/nasa/gsfc/adc/xdf/Structure.java
|
|
if (n == null) { Log.warn("in Structure.addNote(), the Note passed in is null"); return null; }
|
public Note addNote(Note n) { getNoteList().add(n); return n; }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/87ab545376893c7eb3050f92ce9fe83e257321fb/Structure.java/clean/src/gov/nasa/gsfc/adc/xdf/Structure.java
|
|
else
|
else { Log.warn("in Structure.addParamGroup(). ParameterGroup passed in is null");
|
public ParameterGroup addParamGroup (ParameterGroup group) { if (group !=null) { //add the group to the groupOwnedHash paramGroupOwnedHash.add(group); return group; } else return null; }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/87ab545376893c7eb3050f92ce9fe83e257321fb/Structure.java/clean/src/gov/nasa/gsfc/adc/xdf/Structure.java
|
}
|
public ParameterGroup addParamGroup (ParameterGroup group) { if (group !=null) { //add the group to the groupOwnedHash paramGroupOwnedHash.add(group); return group; } else return null; }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/87ab545376893c7eb3050f92ce9fe83e257321fb/Structure.java/clean/src/gov/nasa/gsfc/adc/xdf/Structure.java
|
|
if (p == null) { Log.warn("in Structure.addParameter, Parameter passed in is null"); return null; }
|
public Parameter addParameter(Parameter p) { getParamList().add(p); return p; }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/87ab545376893c7eb3050f92ce9fe83e257321fb/Structure.java/clean/src/gov/nasa/gsfc/adc/xdf/Structure.java
|
|
classXMLName = "structure";
|
classXDFNodeName = "structure";
|
private void init() { classXMLName = "structure"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"noteList"); attribOrder.add(0,"arrayList"); attribOrder.add(0,"structList"); attribOrder.add(0,"paramList"); attribOrder.add(0,"description"); attribOrder.add(0,"name"); attribHash.put("noteList", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("arrayList", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("structList", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("paramList", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("description", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("name", new XMLAttribute(null, Constants.STRING_TYPE)); };
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/87ab545376893c7eb3050f92ce9fe83e257321fb/Structure.java/clean/src/gov/nasa/gsfc/adc/xdf/Structure.java
|
private void init() { classXMLName = "structure"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"noteList"); attribOrder.add(0,"arrayList"); attribOrder.add(0,"structList"); attribOrder.add(0,"paramList"); attribOrder.add(0,"description"); attribOrder.add(0,"name"); attribHash.put("noteList", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("arrayList", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("structList", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("paramList", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("description", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("name", new XMLAttribute(null, Constants.STRING_TYPE)); };
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/87ab545376893c7eb3050f92ce9fe83e257321fb/Structure.java/clean/src/gov/nasa/gsfc/adc/xdf/Structure.java
|
||
public Note removeNote (Note note, int i) { return note;
|
public boolean removeNote(Note what) { return removeFromList(what, getNoteList(), "noteList");
|
public Note removeNote (Note note, int i) { return note; }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/87ab545376893c7eb3050f92ce9fe83e257321fb/Structure.java/clean/src/gov/nasa/gsfc/adc/xdf/Structure.java
|
public boolean removeParamGroup(ParameterGroup group) { return paramGroupOwnedHash.remove(group); }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/87ab545376893c7eb3050f92ce9fe83e257321fb/Structure.java/clean/src/gov/nasa/gsfc/adc/xdf/Structure.java
|
||
public String setDescription (String strDesc) { return (String) ((XMLAttribute) attribHash.get("description")).setAttribValue(strDesc); }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/87ab545376893c7eb3050f92ce9fe83e257321fb/Structure.java/clean/src/gov/nasa/gsfc/adc/xdf/Structure.java
|
||
connection.setConnectTimeout( timeout );
|
public IppResponse send() throws IppException, IOException { if (alreadySent) throw new IllegalStateException("Request is already sent"); alreadySent = true; OutputStream stream = connection.getOutputStream(); DataOutputStream out = new DataOutputStream(stream); // the header 8 bytes long out.writeShort(VERSION); out.writeShort(operation_id); out.writeInt(request_id); logger.log(Component.IPP, "OperationID: " + Integer.toHexString(operation_id) + " RequestID: " + request_id); // Pass stuff the the attribute writer which knows how to // write the attributes in correct order logger.log(Component.IPP, "Operation Attributes"); RequestWriter writer = new RequestWriter(out); writer.writeOperationAttributes(operationAttributes); if (jobAttributes != null) { logger.log(Component.IPP, "Job Attributes"); out.write(IppDelimiterTag.JOB_ATTRIBUTES_TAG); writer.writeAttributes(jobAttributes); } if (printerAttributes != null) { logger.log(Component.IPP, "Printer Attributes"); out.write(IppDelimiterTag.PRINTER_ATTRIBUTES_TAG); writer.writeAttributes(printerAttributes); } // write the delimiter to the data out.write(IppDelimiterTag.END_OF_ATTRIBUTES_TAG); // check if data is byte[] or inputstream if (data instanceof InputStream) { byte[] readbuf = new byte[2048]; int len = 0; while( (len = ((InputStream) data).read(readbuf)) > 0) out.write(readbuf, 0, len); } else if (data != null) { out.write((byte[]) data); } out.flush(); stream.flush(); int responseCode = connection.getResponseCode(); if (responseCode == HttpURLConnection.HTTP_OK) { IppResponse response = new IppResponse(requestUri, operation_id); response.setResponseData(connection.getInputStream()); return response; } logger.log(Component.IPP, "HTTP-Statuscode: " + responseCode); throw new IppException("Request failed got HTTP status code " + responseCode); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7172738fba4eab23190cf62c40a31b7348ab1677/IppRequest.java/buggy/core/src/classpath/gnu/gnu/javax/print/ipp/IppRequest.java
|
|
public void log(Level level, String message)
|
public synchronized void log(LogRecord record)
|
public void log(Level level, String message) { log(level, message, (Object[]) null); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/Logger.java/buggy/core/src/classpath/java/java/util/logging/Logger.java
|
log(level, message, (Object[]) null);
|
if (!isLoggable(record.getLevel())) return; if ((filter != null) && !filter.isLoggable(record)) return; /* If no logger name has been set for the log record, * use the name of this logger. */ if (record.getLoggerName() == null) record.setLoggerName(name); /* Avoid that some other thread is changing the logger hierarchy * while we are traversing it. */ synchronized (LogManager.getLogManager()) { Logger curLogger = this; do { /* The Sun J2SE 1.4 reference implementation seems to call the * filter only for the logger whose log method is called, * never for any of its parents. Also, parent loggers publish * log record whatever their level might be. This is pretty * weird, but GNU Classpath tries to be as compatible as * possible to the reference implementation. */ for (int i = 0; i < curLogger.handlers.length; i++) curLogger.handlers[i].publish(record); if (curLogger.getUseParentHandlers() == false) break; curLogger = curLogger.getParent(); } while (parent != null); }
|
public void log(Level level, String message) { log(level, message, (Object[]) null); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/Logger.java/buggy/core/src/classpath/java/java/util/logging/Logger.java
|
}
|
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if (value != null) super.setText(value.toString()); setOpaque(true); if (table == null) return this; if (isSelected) { setBackground(table.getSelectionBackground()); setForeground(table.getSelectionForeground()); } else { setBackground(table.getBackground()); setForeground(table.getForeground()); } setEnabled(table.isEnabled()); setFont(table.getFont()); return this; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/DefaultTableCellRenderer.java/clean/core/src/classpath/javax/javax/swing/table/DefaultTableCellRenderer.java
|
|
case ALIGN_LEFT: prefix = "left "; break;
|
public String toString() { String prefix = ""; switch (align) { case ALIGN_LEFT: prefix = "left "; break; case ALIGN_RIGHT: prefix = "right "; break; case ALIGN_CENTER: prefix = "center "; break; case ALIGN_DECIMAL: prefix = "decimal "; break; case ALIGN_BAR: prefix = "bar "; break; default: break; } return (prefix + "tab @" + pos + ((leader == LEAD_NONE) ? "" : "(w/leaders)")); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/TabStop.java/clean/core/src/classpath/javax/javax/swing/text/TabStop.java
|
|
return (prefix + "tab @" + pos + ((leader == LEAD_NONE) ? "" : "(w/leaders)"));
|
return prefix + "tab @" + pos + ((leader == LEAD_NONE) ? "" : " (w/leaders)");
|
public String toString() { String prefix = ""; switch (align) { case ALIGN_LEFT: prefix = "left "; break; case ALIGN_RIGHT: prefix = "right "; break; case ALIGN_CENTER: prefix = "center "; break; case ALIGN_DECIMAL: prefix = "decimal "; break; case ALIGN_BAR: prefix = "bar "; break; default: break; } return (prefix + "tab @" + pos + ((leader == LEAD_NONE) ? "" : "(w/leaders)")); }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/TabStop.java/clean/core/src/classpath/javax/javax/swing/text/TabStop.java
|
throw new BAD_OPERATION("Invalid enumeration code " + code);
|
BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code); bad.minor = Minor.PolicyType; throw bad;
|
public static IdUniquenessPolicyValue from_int(int code) { try { return enume [ code ]; } catch (ArrayIndexOutOfBoundsException ex) { throw new BAD_OPERATION("Invalid enumeration code " + code); } }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/IdUniquenessPolicyValue.java/clean/core/src/classpath/org/org/omg/PortableServer/IdUniquenessPolicyValue.java
|
public Screen5250(Gui5250 gui, SessionConfig config) { this.gui = gui; this.config = config; // load the session properties from it's profile. loadProps(); try { jbInit(); } catch(Exception ex) { ex.printStackTrace(); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
||
protected final void copyMe() {
|
public final void copyMe() {
|
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 already // allocated gui.rubberband.getBoundingArea(workR); // get starting row and column int sPos = getRowColFromPoint(workR.x , workR.y ); // get the width and height int ePos = getRowColFromPoint(workR.width , workR.height ); int r = getRow(sPos); int c = getCol(sPos); int r2 = getRow(ePos) + 1; int c2 = getCol(ePos) + 1;// if (c2 == 0)// c2 = getCols();// if (r2 == 0)// r2 = 1; workR.setBounds(r,c,c2,r2); gui.rubberband.reset(); gui.repaint(); } System.out.println("Copying"); System.out.println(workR); // loop through all the screen characters to send them to the clip board int m = workR.x; int i = 0; int t = 0; while (workR.height-- > 0) { t = workR.width; i = workR.y; while (t-- > 0) { // only copy printable characters (in this case >= ' ') char c = screen[getPos(m,i)].getChar(); if (c >= ' ' && !screen[getPos(m,i)].nonDisplay) s.append(c); else s.append(' '); i++; } s.append('\n'); m++; } StringSelection contents = new StringSelection(s.toString()); cb.setContents(contents, null); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
if (!gui.rubberband.isAreaSelected()) workR.setBounds(0,0,numCols,numRows); else { gui.rubberband.getBoundingArea(workR);
|
getBoundingArea(workR);
|
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 already // allocated gui.rubberband.getBoundingArea(workR); // get starting row and column int sPos = getRowColFromPoint(workR.x , workR.y ); // get the width and height int ePos = getRowColFromPoint(workR.width , workR.height ); int r = getRow(sPos); int c = getCol(sPos); int r2 = getRow(ePos) + 1; int c2 = getCol(ePos) + 1;// if (c2 == 0)// c2 = getCols();// if (r2 == 0)// r2 = 1; workR.setBounds(r,c,c2,r2); gui.rubberband.reset(); gui.repaint(); } System.out.println("Copying"); System.out.println(workR); // loop through all the screen characters to send them to the clip board int m = workR.x; int i = 0; int t = 0; while (workR.height-- > 0) { t = workR.width; i = workR.y; while (t-- > 0) { // only copy printable characters (in this case >= ' ') char c = screen[getPos(m,i)].getChar(); if (c >= ' ' && !screen[getPos(m,i)].nonDisplay) s.append(c); else s.append(' '); i++; } s.append('\n'); m++; } StringSelection contents = new StringSelection(s.toString()); cb.setContents(contents, null); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
int sPos = getRowColFromPoint(workR.x , workR.y ); int ePos = getRowColFromPoint(workR.width , workR.height ); int r = getRow(sPos); int c = getCol(sPos); int r2 = getRow(ePos) + 1; int c2 = getCol(ePos) + 1;
|
gui.rubberband.reset(); gui.repaint();
|
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 already // allocated gui.rubberband.getBoundingArea(workR); // get starting row and column int sPos = getRowColFromPoint(workR.x , workR.y ); // get the width and height int ePos = getRowColFromPoint(workR.width , workR.height ); int r = getRow(sPos); int c = getCol(sPos); int r2 = getRow(ePos) + 1; int c2 = getCol(ePos) + 1;// if (c2 == 0)// c2 = getCols();// if (r2 == 0)// r2 = 1; workR.setBounds(r,c,c2,r2); gui.rubberband.reset(); gui.repaint(); } System.out.println("Copying"); System.out.println(workR); // loop through all the screen characters to send them to the clip board int m = workR.x; int i = 0; int t = 0; while (workR.height-- > 0) { t = workR.width; i = workR.y; while (t-- > 0) { // only copy printable characters (in this case >= ' ') char c = screen[getPos(m,i)].getChar(); if (c >= ' ' && !screen[getPos(m,i)].nonDisplay) s.append(c); else s.append(' '); i++; } s.append('\n'); m++; } StringSelection contents = new StringSelection(s.toString()); cb.setContents(contents, null); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
workR.setBounds(r,c,c2,r2); gui.rubberband.reset(); gui.repaint(); } System.out.println("Copying"); System.out.println(workR);
|
System.out.println("Copying" + workR);
|
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 already // allocated gui.rubberband.getBoundingArea(workR); // get starting row and column int sPos = getRowColFromPoint(workR.x , workR.y ); // get the width and height int ePos = getRowColFromPoint(workR.width , workR.height ); int r = getRow(sPos); int c = getCol(sPos); int r2 = getRow(ePos) + 1; int c2 = getCol(ePos) + 1;// if (c2 == 0)// c2 = getCols();// if (r2 == 0)// r2 = 1; workR.setBounds(r,c,c2,r2); gui.rubberband.reset(); gui.repaint(); } System.out.println("Copying"); System.out.println(workR); // loop through all the screen characters to send them to the clip board int m = workR.x; int i = 0; int t = 0; while (workR.height-- > 0) { t = workR.width; i = workR.y; while (t-- > 0) { // only copy printable characters (in this case >= ' ') char c = screen[getPos(m,i)].getChar(); if (c >= ' ' && !screen[getPos(m,i)].nonDisplay) s.append(c); else s.append(' '); i++; } s.append('\n'); m++; } StringSelection contents = new StringSelection(s.toString()); cb.setContents(contents, null); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
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 already // allocated gui.rubberband.getBoundingArea(workR); // get starting row and column int sPos = getRowColFromPoint(workR.x , workR.y ); // get the width and height int ePos = getRowColFromPoint(workR.width , workR.height ); int r = getRow(sPos); int c = getCol(sPos); int r2 = getRow(ePos) + 1; int c2 = getCol(ePos) + 1;// if (c2 == 0)// c2 = getCols();// if (r2 == 0)// r2 = 1; workR.setBounds(r,c,c2,r2); gui.rubberband.reset(); gui.repaint(); } System.out.println("Copying"); System.out.println(workR); // loop through all the screen characters to send them to the clip board int m = workR.x; int i = 0; int t = 0; while (workR.height-- > 0) { t = workR.width; i = workR.y; while (t-- > 0) { // only copy printable characters (in this case >= ' ') char c = screen[getPos(m,i)].getChar(); if (c >= ' ' && !screen[getPos(m,i)].nonDisplay) s.append(c); else s.append(' '); i++; } s.append('\n'); m++; } StringSelection contents = new StringSelection(s.toString()); cb.setContents(contents, null); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
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 that we have already // allocated gui.rubberband.getBoundingArea(bounds); // get starting row and column int sPos = getRowColFromPoint(bounds.x , bounds.y ); // get the width and height int ePos = getRowColFromPoint(bounds.width , bounds.height ); int row = getRow(sPos) + 1; int col = getCol(sPos) + 1; bounds.setBounds(row,col,getCol(ePos),getRow(ePos)); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
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 that we have already // allocated gui.rubberband.getBoundingArea(bounds); // get starting row and column int sPos = getRowColFromPoint(bounds.x , bounds.y ); // get the width and height int ePos = getRowColFromPoint(bounds.width , bounds.height ); int row = getRow(sPos) + 1; int col = getCol(sPos) + 1; bounds.setBounds(row,col,getCol(ePos),getRow(ePos)); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
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 that we have already // allocated gui.rubberband.getBoundingArea(bounds); // get starting row and column int sPos = getRowColFromPoint(bounds.x , bounds.y ); // get the width and height int ePos = getRowColFromPoint(bounds.width , bounds.height ); int row = getRow(sPos) + 1; int col = getCol(sPos) + 1; bounds.setBounds(row,col,getCol(ePos),getRow(ePos)); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
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 that we have already // allocated gui.rubberband.getBoundingArea(bounds); // get starting row and column int sPos = getRowColFromPoint(bounds.x , bounds.y ); // get the width and height int ePos = getRowColFromPoint(bounds.width , bounds.height ); int row = getRow(sPos) + 1; int col = getCol(sPos) + 1; bounds.setBounds(row,col,getCol(ePos),getRow(ePos)); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
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 that we have already // allocated gui.rubberband.getBoundingArea(bounds); // get starting row and column int sPos = getRowColFromPoint(bounds.x , bounds.y ); // get the width and height int ePos = getRowColFromPoint(bounds.width , bounds.height ); int row = getRow(sPos) + 1; int col = getCol(sPos) + 1; bounds.setBounds(row,col,getCol(ePos),getRow(ePos)); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
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; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
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((numRows - ((((fmHeight * (numRows)) - y) / fmHeight))),// (numCols - ((((fmWidth * (numCols)) - x) / fmWidth)))// );//// }// else {// if (!tArea.contains(x,y)) {// System.out.println(" Not in area before " +// (int)tArea.getMinX() + " " +// (int)tArea.getMinY() + " " +// (int)tArea.getMaxX() + " " +// (int)tArea.getMaxY() + " " +// x + " " + 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;// System.out.println(" Not in area after " +// (int)tArea.getMinX() + " " +// (int)tArea.getMinY() + " " +// (int)tArea.getMaxX() + " " +// (int)tArea.getMaxY() + " " +// x + " " + y);// } int s = fmWidth * numCols; int t = s - x; int u = t / fmWidth; int v = numCols - u; int s0 = y / fmHeight; int s1 = x / fmWidth;// return getPos((numRows - ((((fmHeight * (numRows)) - y) / fmHeight))),// (numCols - ((((fmWidth * (numCols)) - x) / fmWidth)))// ); return getPos(s0,s1);// return 0; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
|
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((numRows - ((((fmHeight * (numRows)) - y) / fmHeight))),// (numCols - ((((fmWidth * (numCols)) - x) / fmWidth)))// );//// }// else {// if (!tArea.contains(x,y)) {// System.out.println(" Not in area before " +// (int)tArea.getMinX() + " " +// (int)tArea.getMinY() + " " +// (int)tArea.getMaxX() + " " +// (int)tArea.getMaxY() + " " +// x + " " + 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;// System.out.println(" Not in area after " +// (int)tArea.getMinX() + " " +// (int)tArea.getMinY() + " " +// (int)tArea.getMaxX() + " " +// (int)tArea.getMaxY() + " " +// x + " " + y);// } int s = fmWidth * numCols; int t = s - x; int u = t / fmWidth; int v = numCols - u; int s0 = y / fmHeight; int s1 = x / fmWidth;// return getPos((numRows - ((((fmHeight * (numRows)) - y) / fmHeight))),// (numCols - ((((fmWidth * (numCols)) - x) / fmWidth)))// ); return getPos(s0,s1);// return 0; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
|
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((numRows - ((((fmHeight * (numRows)) - y) / fmHeight))),// (numCols - ((((fmWidth * (numCols)) - x) / fmWidth)))// );//// }// else {// if (!tArea.contains(x,y)) {// System.out.println(" Not in area before " +// (int)tArea.getMinX() + " " +// (int)tArea.getMinY() + " " +// (int)tArea.getMaxX() + " " +// (int)tArea.getMaxY() + " " +// x + " " + 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;// System.out.println(" Not in area after " +// (int)tArea.getMinX() + " " +// (int)tArea.getMinY() + " " +// (int)tArea.getMaxX() + " " +// (int)tArea.getMaxY() + " " +// x + " " + y);// } int s = fmWidth * numCols; int t = s - x; int u = t / fmWidth; int v = numCols - u; int s0 = y / fmHeight; int s1 = x / fmWidth;// return getPos((numRows - ((((fmHeight * (numRows)) - y) / fmHeight))),// (numCols - ((((fmWidth * (numCols)) - x) / fmWidth)))// ); return getPos(s0,s1);// return 0; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
||
public boolean isWithinScreenArea(int x, int y){ return tArea.contains(x,y); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
||
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; // default number of rows and columns numRows = 24; numCols = 80; goto_XY(1,1); // set initial cursor position restriction = new Rectangle(0,0); errorLineNum = numRows; updateCursorLoc = false; FontRenderContext frc = new FontRenderContext(font.getTransform(),true,true); lm = font.getLineMetrics("Wy",frc); fmWidth = (int)font.getStringBounds("W",frc).getWidth() + 1; fmHeight = (int)(font.getStringBounds("g",frc).getHeight() + lm.getDescent() + lm.getLeading()); keyboardLocked = true; checkOffScreenImage(); lenScreen = numRows * numCols; screen = new ScreenChar[lenScreen]; for (int y = 0;y < lenScreen; y++) { screen[y] = new ScreenChar(this); screen[y].setCharAndAttr(' ',initAttr,false); screen[y].setRowCol(getRow(y),getCol(y)); } screenFields = new ScreenFields(this); strokenizer = new KeyStrokenizer(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
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) return ; // because getRowColFromPoint returns offset of 1,1 we need to // translate to offset 0,0// pos -= (numCols + 1); int g = screen[pos].getWhichGUI(); // lets check for hot spots if (g >= ScreenChar.BUTTON_LEFT && g <= ScreenChar.BUTTON_LAST) { StringBuffer aid = new StringBuffer(); boolean aidFlag = true; switch (g) { case ScreenChar.BUTTON_RIGHT: case ScreenChar.BUTTON_MIDDLE: while (screen[--pos].getWhichGUI() != ScreenChar.BUTTON_LEFT) { } case ScreenChar.BUTTON_LEFT: if (screen[pos].getChar() == 'F') { pos++; } else aidFlag=false; if (screen[pos+1].getChar() != '=' && screen[pos+1].getChar() != '.' && screen[pos+1].getChar() != '/' ) {// System.out.println(" Hotspot clicked!!! we will send characters " +// screen[pos].getChar() +// screen[pos+1].getChar()); aid.append(screen[pos].getChar()); aid.append(screen[pos + 1].getChar()); } else {// System.out.println(" Hotspot clicked!!! we will send character " +// screen[pos].getChar());// aid.append(screen[pos].getChar()); } break; } if (aidFlag) { switch (g) { case ScreenChar.BUTTON_LEFT_UP: case ScreenChar.BUTTON_MIDDLE_UP: case ScreenChar.BUTTON_RIGHT_UP: case ScreenChar.BUTTON_ONE_UP: case ScreenChar.BUTTON_SB_UP: case ScreenChar.BUTTON_SB_GUIDE: gui.sendAidKey(tnvt.AID_ROLL_UP); break; case ScreenChar.BUTTON_LEFT_DN: case ScreenChar.BUTTON_MIDDLE_DN: case ScreenChar.BUTTON_RIGHT_DN: case ScreenChar.BUTTON_ONE_DN: case ScreenChar.BUTTON_SB_DN: case ScreenChar.BUTTON_SB_THUMB: gui.sendAidKey(tnvt.AID_ROLL_DOWN); break; case ScreenChar.BUTTON_LEFT_EB: case ScreenChar.BUTTON_MIDDLE_EB: case ScreenChar.BUTTON_RIGHT_EB: System.out.println("Send to external Browser"); break; default: int aidKey = Integer.parseInt(aid.toString()); if (aidKey >= 1 && aidKey <= 12) gui.sendAidKey(0x30 + aidKey); if (aidKey >= 13 && aidKey <= 24) gui.sendAidKey(0xB0 + (aidKey - 12)); } } else { if (screenFields.getCurrentField() != null) { int xPos = screenFields.getCurrentField().startPos(); for (int x = 0; x < aid.length(); x++) {// System.out.println(sr + "," + (sc + x) + " " + aid.charAt(x)); screen[xPos + x].setChar(aid.charAt(x)); }// System.out.println(aid); screenFields.setCurrentFieldMDT(); gui.sendAidKey(tnvt.AID_ENTER); } } } else { if (gui.rubberband.isAreaSelected()) { gui.rubberband.reset(); gui.repaint(); } goto_XY(pos); isInField(lastPos); } } gui.requestFocus(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
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) return ; // because getRowColFromPoint returns offset of 1,1 we need to // translate to offset 0,0// pos -= (numCols + 1); int g = screen[pos].getWhichGUI(); // lets check for hot spots if (g >= ScreenChar.BUTTON_LEFT && g <= ScreenChar.BUTTON_LAST) { StringBuffer aid = new StringBuffer(); boolean aidFlag = true; switch (g) { case ScreenChar.BUTTON_RIGHT: case ScreenChar.BUTTON_MIDDLE: while (screen[--pos].getWhichGUI() != ScreenChar.BUTTON_LEFT) { } case ScreenChar.BUTTON_LEFT: if (screen[pos].getChar() == 'F') { pos++; } else aidFlag=false; if (screen[pos+1].getChar() != '=' && screen[pos+1].getChar() != '.' && screen[pos+1].getChar() != '/' ) {// System.out.println(" Hotspot clicked!!! we will send characters " +// screen[pos].getChar() +// screen[pos+1].getChar()); aid.append(screen[pos].getChar()); aid.append(screen[pos + 1].getChar()); } else {// System.out.println(" Hotspot clicked!!! we will send character " +// screen[pos].getChar());// aid.append(screen[pos].getChar()); } break; } if (aidFlag) { switch (g) { case ScreenChar.BUTTON_LEFT_UP: case ScreenChar.BUTTON_MIDDLE_UP: case ScreenChar.BUTTON_RIGHT_UP: case ScreenChar.BUTTON_ONE_UP: case ScreenChar.BUTTON_SB_UP: case ScreenChar.BUTTON_SB_GUIDE: gui.sendAidKey(tnvt.AID_ROLL_UP); break; case ScreenChar.BUTTON_LEFT_DN: case ScreenChar.BUTTON_MIDDLE_DN: case ScreenChar.BUTTON_RIGHT_DN: case ScreenChar.BUTTON_ONE_DN: case ScreenChar.BUTTON_SB_DN: case ScreenChar.BUTTON_SB_THUMB: gui.sendAidKey(tnvt.AID_ROLL_DOWN); break; case ScreenChar.BUTTON_LEFT_EB: case ScreenChar.BUTTON_MIDDLE_EB: case ScreenChar.BUTTON_RIGHT_EB: System.out.println("Send to external Browser"); break; default: int aidKey = Integer.parseInt(aid.toString()); if (aidKey >= 1 && aidKey <= 12) gui.sendAidKey(0x30 + aidKey); if (aidKey >= 13 && aidKey <= 24) gui.sendAidKey(0xB0 + (aidKey - 12)); } } else { if (screenFields.getCurrentField() != null) { int xPos = screenFields.getCurrentField().startPos(); for (int x = 0; x < aid.length(); x++) {// System.out.println(sr + "," + (sc + x) + " " + aid.charAt(x)); screen[xPos + x].setChar(aid.charAt(x)); }// System.out.println(aid); screenFields.setCurrentFieldMDT(); gui.sendAidKey(tnvt.AID_ENTER); } } } else { if (gui.rubberband.isAreaSelected()) { gui.rubberband.reset(); gui.repaint(); } goto_XY(pos); isInField(lastPos); } } gui.requestFocus(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
private final void resizeScreenArea(int width, int height) { Font k = null; LineMetrics l; FontRenderContext f = null; k = GUIGraphicsUtils.getDerivedFont(font,width,height,numRows,numCols,sfh,sfw,ps132); f = new FontRenderContext(k.getTransform(),true,true); l = k.getLineMetrics("Wy",f); if (font.getSize() != k.getSize() || updateFont) { // set up all the variables that are used in calculating the new // size font = k; FontRenderContext frc = new FontRenderContext(font.getTransform(),true,true); lm = font.getLineMetrics("Wy",frc); fmWidth = (int)font.getStringBounds("W",frc).getWidth() + 2; fmHeight = (int)(font.getStringBounds("g",frc).getHeight() + lm.getDescent() + lm.getLeading()); bi.resize(fmWidth * numCols,fmHeight * (numRows + 2)); drawOIA(); // and loop through the screen buffer to draw the new image with // the correct attributes for (int m = 0;m < lenScreen; m++) { screen[m].setRowCol(getRow(m),getCol(m)); } updateFont = false; } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
||
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 int m = workR.x; int i = 0; int t = 0; double sum = 0.0; // obtain the decimal format for parsing DecimalFormat df = (DecimalFormat)NumberFormat.getInstance() ; DecimalFormatSymbols dfs = df.getDecimalFormatSymbols(); if (which) { dfs.setDecimalSeparator('.'); dfs.setGroupingSeparator(','); } else { dfs.setDecimalSeparator(','); dfs.setGroupingSeparator('.'); } df.setDecimalFormatSymbols(dfs); Vector sumVector = new Vector(); while (workR.height-- >= 0) { t = workR.width; i = workR.y; while (t-- >= 0) { // only copy printable numeric characters (in this case >= ' ') char c = screen[getPos(m-1,i-1)].getChar(); if (((c >= '0' && c <= '9') || c== '.' || c == ',' || c == '-') && !screen[getPos(m-1,i-1)].nonDisplay) { s.append(c); } i++; } if (s.length() > 0) { if (s.charAt(s.length()-1) == '-') { s.insert(0,'-'); s.deleteCharAt(s.length()-1); } try { Number n = df.parse(s.toString()); System.out.println(s + " " + n.doubleValue()); sumVector.add(new Double(n.doubleValue())); sum += n.doubleValue(); } catch (ParseException pe) { System.out.println(pe.getMessage() + " at " + pe.getErrorOffset()); } } s.setLength(0); m++; }// System.out.println(sum); return sumVector; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
|
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 int m = workR.x; int i = 0; int t = 0; double sum = 0.0; // obtain the decimal format for parsing DecimalFormat df = (DecimalFormat)NumberFormat.getInstance() ; DecimalFormatSymbols dfs = df.getDecimalFormatSymbols(); if (which) { dfs.setDecimalSeparator('.'); dfs.setGroupingSeparator(','); } else { dfs.setDecimalSeparator(','); dfs.setGroupingSeparator('.'); } df.setDecimalFormatSymbols(dfs); Vector sumVector = new Vector(); while (workR.height-- >= 0) { t = workR.width; i = workR.y; while (t-- >= 0) { // only copy printable numeric characters (in this case >= ' ') char c = screen[getPos(m-1,i-1)].getChar(); if (((c >= '0' && c <= '9') || c== '.' || c == ',' || c == '-') && !screen[getPos(m-1,i-1)].nonDisplay) { s.append(c); } i++; } if (s.length() > 0) { if (s.charAt(s.length()-1) == '-') { s.insert(0,'-'); s.deleteCharAt(s.length()-1); } try { Number n = df.parse(s.toString()); System.out.println(s + " " + n.doubleValue()); sumVector.add(new Double(n.doubleValue())); sum += n.doubleValue(); } catch (ParseException pe) { System.out.println(pe.getMessage() + " at " + pe.getErrorOffset()); } } s.setLength(0); m++; }// System.out.println(sum); return sumVector; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
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 int m = workR.x; int i = 0; int t = 0; double sum = 0.0; // obtain the decimal format for parsing DecimalFormat df = (DecimalFormat)NumberFormat.getInstance() ; DecimalFormatSymbols dfs = df.getDecimalFormatSymbols(); if (which) { dfs.setDecimalSeparator('.'); dfs.setGroupingSeparator(','); } else { dfs.setDecimalSeparator(','); dfs.setGroupingSeparator('.'); } df.setDecimalFormatSymbols(dfs); Vector sumVector = new Vector(); while (workR.height-- >= 0) { t = workR.width; i = workR.y; while (t-- >= 0) { // only copy printable numeric characters (in this case >= ' ') char c = screen[getPos(m-1,i-1)].getChar(); if (((c >= '0' && c <= '9') || c== '.' || c == ',' || c == '-') && !screen[getPos(m-1,i-1)].nonDisplay) { s.append(c); } i++; } if (s.length() > 0) { if (s.charAt(s.length()-1) == '-') { s.insert(0,'-'); s.deleteCharAt(s.length()-1); } try { Number n = df.parse(s.toString()); System.out.println(s + " " + n.doubleValue()); sumVector.add(new Double(n.doubleValue())); sum += n.doubleValue(); } catch (ParseException pe) { System.out.println(pe.getMessage() + " at " + pe.getErrorOffset()); } } s.setLength(0); m++; }// System.out.println(sum); return sumVector; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
char c = screen[getPos(m-1,i-1)].getChar();
|
char c = screen[getPos(m - 1,i - 1)].getChar();
|
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 m = workR.x; int i = 0; int t = 0; double sum = 0.0; // obtain the decimal format for parsing DecimalFormat df = (DecimalFormat)NumberFormat.getInstance() ; DecimalFormatSymbols dfs = df.getDecimalFormatSymbols(); if (which) { dfs.setDecimalSeparator('.'); dfs.setGroupingSeparator(','); } else { dfs.setDecimalSeparator(','); dfs.setGroupingSeparator('.'); } df.setDecimalFormatSymbols(dfs); Vector sumVector = new Vector(); while (workR.height-- >= 0) { t = workR.width; i = workR.y; while (t-- >= 0) { // only copy printable numeric characters (in this case >= ' ') char c = screen[getPos(m-1,i-1)].getChar(); if (((c >= '0' && c <= '9') || c== '.' || c == ',' || c == '-') && !screen[getPos(m-1,i-1)].nonDisplay) { s.append(c); } i++; } if (s.length() > 0) { if (s.charAt(s.length()-1) == '-') { s.insert(0,'-'); s.deleteCharAt(s.length()-1); } try { Number n = df.parse(s.toString()); System.out.println(s + " " + n.doubleValue()); sumVector.add(new Double(n.doubleValue())); sum += n.doubleValue(); } catch (ParseException pe) { System.out.println(pe.getMessage() + " at " + pe.getErrorOffset()); } } s.setLength(0); m++; }// System.out.println(sum); return sumVector; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
&& !screen[getPos(m-1,i-1)].nonDisplay) {
|
&& !screen[getPos(m - 1,i - 1)].nonDisplay) {
|
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 m = workR.x; int i = 0; int t = 0; double sum = 0.0; // obtain the decimal format for parsing DecimalFormat df = (DecimalFormat)NumberFormat.getInstance() ; DecimalFormatSymbols dfs = df.getDecimalFormatSymbols(); if (which) { dfs.setDecimalSeparator('.'); dfs.setGroupingSeparator(','); } else { dfs.setDecimalSeparator(','); dfs.setGroupingSeparator('.'); } df.setDecimalFormatSymbols(dfs); Vector sumVector = new Vector(); while (workR.height-- >= 0) { t = workR.width; i = workR.y; while (t-- >= 0) { // only copy printable numeric characters (in this case >= ' ') char c = screen[getPos(m-1,i-1)].getChar(); if (((c >= '0' && c <= '9') || c== '.' || c == ',' || c == '-') && !screen[getPos(m-1,i-1)].nonDisplay) { s.append(c); } i++; } if (s.length() > 0) { if (s.charAt(s.length()-1) == '-') { s.insert(0,'-'); s.deleteCharAt(s.length()-1); } try { Number n = df.parse(s.toString()); System.out.println(s + " " + n.doubleValue()); sumVector.add(new Double(n.doubleValue())); sum += n.doubleValue(); } catch (ParseException pe) { System.out.println(pe.getMessage() + " at " + pe.getErrorOffset()); } } s.setLength(0); m++; }// System.out.println(sum); return sumVector; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
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 m = workR.x; int i = 0; int t = 0; double sum = 0.0; // obtain the decimal format for parsing DecimalFormat df = (DecimalFormat)NumberFormat.getInstance() ; DecimalFormatSymbols dfs = df.getDecimalFormatSymbols(); if (which) { dfs.setDecimalSeparator('.'); dfs.setGroupingSeparator(','); } else { dfs.setDecimalSeparator(','); dfs.setGroupingSeparator('.'); } df.setDecimalFormatSymbols(dfs); Vector sumVector = new Vector(); while (workR.height-- >= 0) { t = workR.width; i = workR.y; while (t-- >= 0) { // only copy printable numeric characters (in this case >= ' ') char c = screen[getPos(m-1,i-1)].getChar(); if (((c >= '0' && c <= '9') || c== '.' || c == ',' || c == '-') && !screen[getPos(m-1,i-1)].nonDisplay) { s.append(c); } i++; } if (s.length() > 0) { if (s.charAt(s.length()-1) == '-') { s.insert(0,'-'); s.deleteCharAt(s.length()-1); } try { Number n = df.parse(s.toString()); System.out.println(s + " " + n.doubleValue()); sumVector.add(new Double(n.doubleValue())); sum += n.doubleValue(); } catch (ParseException pe) { System.out.println(pe.getMessage() + " at " + pe.getErrorOffset()); } } s.setLength(0); m++; }// System.out.println(sum); return sumVector; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
|
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 + fmHeight - 1;// System.out.println(" ex = " + x + " sx = " + rubberband.getStartPoint().x); end.setLocation(x,y);// }// else {// System.out.println(" pos is not good " + pos);// } return end; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
int x = screen[pos].x + fmWidth - 1; int y = screen[pos].y + fmHeight - 1;
|
int x = screen[pos].x + fmWidth - 1; int y = screen[pos].y + fmHeight - 1;
|
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 + fmHeight - 1;// System.out.println(" ex = " + x + " sx = " + rubberband.getStartPoint().x); end.setLocation(x,y);// }// else {// System.out.println(" pos is not good " + pos);// } return end; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
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 + fmHeight - 1;// System.out.println(" ex = " + x + " sx = " + rubberband.getStartPoint().x); end.setLocation(x,y);// }// else {// System.out.println(" pos is not good " + pos);// } return end; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
||
end.setLocation(x,y);
|
end.setLocation(x,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 + fmHeight - 1;// System.out.println(" ex = " + x + " sx = " + rubberband.getStartPoint().x); end.setLocation(x,y);// }// else {// System.out.println(" pos is not good " + pos);// } return end; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
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; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
protected synchronized void updateImage(int x, int y , int width, int height) { if (gg2d == null) { //System.out.println("was null"); gg2d = (Graphics2D)gui.getGraphics(); } if (bi == null || gg2d == null) { if (bi == null) System.out.println("bi was null in update image"); if (gg2d == null) System.out.println("gg2d was null in update image"); return; } g2d.setClip(x,y,width,height); if (!cursorActive && x + width <= bi.getWidth(null) && y + height <= (bi.getHeight(null) - fmWidth)) {// if (!cursorActive) { paintComponent2(g2d); } // fix for jdk1.4 - found this while testing under jdk1.4 // if the height and or the width are equal to zero we skip the // the updating of the image.// if (gui.isVisible() && height > 0 && width > 0) {// bi.drawImageBuffer(gg2d,x,y,width,height);// } if (gui.isVisible()) { if (height > 0 && width > 0) { bi.drawImageBuffer(gg2d,x,y,width,height);// gui.repaint();// System.out.println(" something went right finally " + gui.isVisible() +// " height " + height + " width " + width); }// else { // bi.drawImageBuffer(gg2d);// System.out.println(" something is wrong here " + gui.isVisible() +// " height " + height + " width " + width);// } } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java
|
||
{ 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); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
|
}
|
{ 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); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
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, bufferLength, startPos, endPos, plane); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
|
}
|
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, bufferLength, startPos, endPos, plane); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
public Screen5250() { //Added by Barry this.keybuf = new StringBuffer(); try { jbInit(); } catch (Exception ex) { log.warn("In constructor: ", ex); } }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
||
protected void addChoiceField(String text) { if (choices == null) { choices = new Vector(3); } ChoiceField cf = new ChoiceField(); cf.fieldId = screenFields.getCurrentField().getFieldId(); choices.add(cf); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
||
int fcw2) {
|
int fcw2) {
|
protected void addField(int attr, int len, int ffw1, int ffw2, int fcw1, int fcw2) { lastAttr = attr; planes.setScreenCharAndAttr(lastPos, initChar, lastAttr, true); setDirty(lastPos); advancePos(); ScreenField sf = null; // from 14.6.12 for Start of Field Order 5940 function manual // examine the format table for an entry that begins at the current // starting address plus 1. if (screenFields.existsAtPos(lastPos)) { screenFields.setCurrentFieldFFWs(ffw1, ffw2); } else { sf = screenFields.setField(attr, getRow(lastPos), getCol(lastPos), len, ffw1, ffw2, fcw1, fcw2); lastPos = sf.startPos(); int x = len; boolean gui = guiInterface; if (sf.isBypassField()) gui = false; while (x-- > 0) { if (planes.getChar(lastPos) == 0) planes.setScreenCharAndAttr(lastPos, ' ', lastAttr, false); else planes.setScreenAttr(lastPos,lastAttr); if (gui) { planes.setUseGUI(lastPos,FIELD_MIDDLE); } // now we set the field plane attributes planes.setScreenFieldAttr(lastPos,ffw1); advancePos(); } if (gui) if (len > 1) { planes.setUseGUI(sf.startPos(), FIELD_LEFT); if (lastPos > 0) planes.setUseGUI(lastPos - 1, FIELD_RIGHT); else planes.setUseGUI(lastPos,FIELD_RIGHT); } else { planes.setUseGUI(lastPos - 1,FIELD_ONE); } // screen[lastPos].setCharAndAttr(initChar,initAttr,true); setEndingAttr(initAttr); lastPos = sf.startPos(); } // if (fcw1 != 0 || fcw2 != 0) { // System.out.println("lr = " + lastRow + " lc = " + lastCol + " " + // sf.toString()); // } sf = null; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
len, ffw1, ffw2, fcw1, fcw2);
|
len, ffw1, ffw2, fcw1, fcw2);
|
protected void addField(int attr, int len, int ffw1, int ffw2, int fcw1, int fcw2) { lastAttr = attr; planes.setScreenCharAndAttr(lastPos, initChar, lastAttr, true); setDirty(lastPos); advancePos(); ScreenField sf = null; // from 14.6.12 for Start of Field Order 5940 function manual // examine the format table for an entry that begins at the current // starting address plus 1. if (screenFields.existsAtPos(lastPos)) { screenFields.setCurrentFieldFFWs(ffw1, ffw2); } else { sf = screenFields.setField(attr, getRow(lastPos), getCol(lastPos), len, ffw1, ffw2, fcw1, fcw2); lastPos = sf.startPos(); int x = len; boolean gui = guiInterface; if (sf.isBypassField()) gui = false; while (x-- > 0) { if (planes.getChar(lastPos) == 0) planes.setScreenCharAndAttr(lastPos, ' ', lastAttr, false); else planes.setScreenAttr(lastPos,lastAttr); if (gui) { planes.setUseGUI(lastPos,FIELD_MIDDLE); } // now we set the field plane attributes planes.setScreenFieldAttr(lastPos,ffw1); advancePos(); } if (gui) if (len > 1) { planes.setUseGUI(sf.startPos(), FIELD_LEFT); if (lastPos > 0) planes.setUseGUI(lastPos - 1, FIELD_RIGHT); else planes.setUseGUI(lastPos,FIELD_RIGHT); } else { planes.setUseGUI(lastPos - 1,FIELD_ONE); } // screen[lastPos].setCharAndAttr(initChar,initAttr,true); setEndingAttr(initAttr); lastPos = sf.startPos(); } // if (fcw1 != 0 || fcw2 != 0) { // System.out.println("lr = " + lastRow + " lc = " + lastCol + " " + // sf.toString()); // } sf = null; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
planes.setScreenAttr(lastPos,lastAttr);
|
planes.setScreenAttr(lastPos, lastAttr);
|
protected void addField(int attr, int len, int ffw1, int ffw2, int fcw1, int fcw2) { lastAttr = attr; planes.setScreenCharAndAttr(lastPos, initChar, lastAttr, true); setDirty(lastPos); advancePos(); ScreenField sf = null; // from 14.6.12 for Start of Field Order 5940 function manual // examine the format table for an entry that begins at the current // starting address plus 1. if (screenFields.existsAtPos(lastPos)) { screenFields.setCurrentFieldFFWs(ffw1, ffw2); } else { sf = screenFields.setField(attr, getRow(lastPos), getCol(lastPos), len, ffw1, ffw2, fcw1, fcw2); lastPos = sf.startPos(); int x = len; boolean gui = guiInterface; if (sf.isBypassField()) gui = false; while (x-- > 0) { if (planes.getChar(lastPos) == 0) planes.setScreenCharAndAttr(lastPos, ' ', lastAttr, false); else planes.setScreenAttr(lastPos,lastAttr); if (gui) { planes.setUseGUI(lastPos,FIELD_MIDDLE); } // now we set the field plane attributes planes.setScreenFieldAttr(lastPos,ffw1); advancePos(); } if (gui) if (len > 1) { planes.setUseGUI(sf.startPos(), FIELD_LEFT); if (lastPos > 0) planes.setUseGUI(lastPos - 1, FIELD_RIGHT); else planes.setUseGUI(lastPos,FIELD_RIGHT); } else { planes.setUseGUI(lastPos - 1,FIELD_ONE); } // screen[lastPos].setCharAndAttr(initChar,initAttr,true); setEndingAttr(initAttr); lastPos = sf.startPos(); } // if (fcw1 != 0 || fcw2 != 0) { // System.out.println("lr = " + lastRow + " lc = " + lastCol + " " + // sf.toString()); // } sf = null; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
planes.setUseGUI(lastPos,FIELD_MIDDLE);
|
planes.setUseGUI(lastPos, FIELD_MIDDLE);
|
protected void addField(int attr, int len, int ffw1, int ffw2, int fcw1, int fcw2) { lastAttr = attr; planes.setScreenCharAndAttr(lastPos, initChar, lastAttr, true); setDirty(lastPos); advancePos(); ScreenField sf = null; // from 14.6.12 for Start of Field Order 5940 function manual // examine the format table for an entry that begins at the current // starting address plus 1. if (screenFields.existsAtPos(lastPos)) { screenFields.setCurrentFieldFFWs(ffw1, ffw2); } else { sf = screenFields.setField(attr, getRow(lastPos), getCol(lastPos), len, ffw1, ffw2, fcw1, fcw2); lastPos = sf.startPos(); int x = len; boolean gui = guiInterface; if (sf.isBypassField()) gui = false; while (x-- > 0) { if (planes.getChar(lastPos) == 0) planes.setScreenCharAndAttr(lastPos, ' ', lastAttr, false); else planes.setScreenAttr(lastPos,lastAttr); if (gui) { planes.setUseGUI(lastPos,FIELD_MIDDLE); } // now we set the field plane attributes planes.setScreenFieldAttr(lastPos,ffw1); advancePos(); } if (gui) if (len > 1) { planes.setUseGUI(sf.startPos(), FIELD_LEFT); if (lastPos > 0) planes.setUseGUI(lastPos - 1, FIELD_RIGHT); else planes.setUseGUI(lastPos,FIELD_RIGHT); } else { planes.setUseGUI(lastPos - 1,FIELD_ONE); } // screen[lastPos].setCharAndAttr(initChar,initAttr,true); setEndingAttr(initAttr); lastPos = sf.startPos(); } // if (fcw1 != 0 || fcw2 != 0) { // System.out.println("lr = " + lastRow + " lc = " + lastCol + " " + // sf.toString()); // } sf = null; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
planes.setScreenFieldAttr(lastPos,ffw1);
|
planes.setScreenFieldAttr(lastPos, ffw1);
|
protected void addField(int attr, int len, int ffw1, int ffw2, int fcw1, int fcw2) { lastAttr = attr; planes.setScreenCharAndAttr(lastPos, initChar, lastAttr, true); setDirty(lastPos); advancePos(); ScreenField sf = null; // from 14.6.12 for Start of Field Order 5940 function manual // examine the format table for an entry that begins at the current // starting address plus 1. if (screenFields.existsAtPos(lastPos)) { screenFields.setCurrentFieldFFWs(ffw1, ffw2); } else { sf = screenFields.setField(attr, getRow(lastPos), getCol(lastPos), len, ffw1, ffw2, fcw1, fcw2); lastPos = sf.startPos(); int x = len; boolean gui = guiInterface; if (sf.isBypassField()) gui = false; while (x-- > 0) { if (planes.getChar(lastPos) == 0) planes.setScreenCharAndAttr(lastPos, ' ', lastAttr, false); else planes.setScreenAttr(lastPos,lastAttr); if (gui) { planes.setUseGUI(lastPos,FIELD_MIDDLE); } // now we set the field plane attributes planes.setScreenFieldAttr(lastPos,ffw1); advancePos(); } if (gui) if (len > 1) { planes.setUseGUI(sf.startPos(), FIELD_LEFT); if (lastPos > 0) planes.setUseGUI(lastPos - 1, FIELD_RIGHT); else planes.setUseGUI(lastPos,FIELD_RIGHT); } else { planes.setUseGUI(lastPos - 1,FIELD_ONE); } // screen[lastPos].setCharAndAttr(initChar,initAttr,true); setEndingAttr(initAttr); lastPos = sf.startPos(); } // if (fcw1 != 0 || fcw2 != 0) { // System.out.println("lr = " + lastRow + " lc = " + lastCol + " " + // sf.toString()); // } sf = null; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
planes.setUseGUI(lastPos,FIELD_RIGHT);
|
planes.setUseGUI(lastPos, FIELD_RIGHT);
|
protected void addField(int attr, int len, int ffw1, int ffw2, int fcw1, int fcw2) { lastAttr = attr; planes.setScreenCharAndAttr(lastPos, initChar, lastAttr, true); setDirty(lastPos); advancePos(); ScreenField sf = null; // from 14.6.12 for Start of Field Order 5940 function manual // examine the format table for an entry that begins at the current // starting address plus 1. if (screenFields.existsAtPos(lastPos)) { screenFields.setCurrentFieldFFWs(ffw1, ffw2); } else { sf = screenFields.setField(attr, getRow(lastPos), getCol(lastPos), len, ffw1, ffw2, fcw1, fcw2); lastPos = sf.startPos(); int x = len; boolean gui = guiInterface; if (sf.isBypassField()) gui = false; while (x-- > 0) { if (planes.getChar(lastPos) == 0) planes.setScreenCharAndAttr(lastPos, ' ', lastAttr, false); else planes.setScreenAttr(lastPos,lastAttr); if (gui) { planes.setUseGUI(lastPos,FIELD_MIDDLE); } // now we set the field plane attributes planes.setScreenFieldAttr(lastPos,ffw1); advancePos(); } if (gui) if (len > 1) { planes.setUseGUI(sf.startPos(), FIELD_LEFT); if (lastPos > 0) planes.setUseGUI(lastPos - 1, FIELD_RIGHT); else planes.setUseGUI(lastPos,FIELD_RIGHT); } else { planes.setUseGUI(lastPos - 1,FIELD_ONE); } // screen[lastPos].setCharAndAttr(initChar,initAttr,true); setEndingAttr(initAttr); lastPos = sf.startPos(); } // if (fcw1 != 0 || fcw2 != 0) { // System.out.println("lr = " + lastRow + " lc = " + lastCol + " " + // sf.toString()); // } sf = null; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
else { planes.setUseGUI(lastPos - 1,FIELD_ONE); }
|
else { planes.setUseGUI(lastPos - 1, FIELD_ONE); }
|
protected void addField(int attr, int len, int ffw1, int ffw2, int fcw1, int fcw2) { lastAttr = attr; planes.setScreenCharAndAttr(lastPos, initChar, lastAttr, true); setDirty(lastPos); advancePos(); ScreenField sf = null; // from 14.6.12 for Start of Field Order 5940 function manual // examine the format table for an entry that begins at the current // starting address plus 1. if (screenFields.existsAtPos(lastPos)) { screenFields.setCurrentFieldFFWs(ffw1, ffw2); } else { sf = screenFields.setField(attr, getRow(lastPos), getCol(lastPos), len, ffw1, ffw2, fcw1, fcw2); lastPos = sf.startPos(); int x = len; boolean gui = guiInterface; if (sf.isBypassField()) gui = false; while (x-- > 0) { if (planes.getChar(lastPos) == 0) planes.setScreenCharAndAttr(lastPos, ' ', lastAttr, false); else planes.setScreenAttr(lastPos,lastAttr); if (gui) { planes.setUseGUI(lastPos,FIELD_MIDDLE); } // now we set the field plane attributes planes.setScreenFieldAttr(lastPos,ffw1); advancePos(); } if (gui) if (len > 1) { planes.setUseGUI(sf.startPos(), FIELD_LEFT); if (lastPos > 0) planes.setUseGUI(lastPos - 1, FIELD_RIGHT); else planes.setUseGUI(lastPos,FIELD_RIGHT); } else { planes.setUseGUI(lastPos - 1,FIELD_ONE); } // screen[lastPos].setCharAndAttr(initChar,initAttr,true); setEndingAttr(initAttr); lastPos = sf.startPos(); } // if (fcw1 != 0 || fcw2 != 0) { // System.out.println("lr = " + lastRow + " lc = " + lastCol + " " + // sf.toString()); // } sf = null; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
protected void addField(int attr, int len, int ffw1, int ffw2, int fcw1, int fcw2) { lastAttr = attr; planes.setScreenCharAndAttr(lastPos, initChar, lastAttr, true); setDirty(lastPos); advancePos(); ScreenField sf = null; // from 14.6.12 for Start of Field Order 5940 function manual // examine the format table for an entry that begins at the current // starting address plus 1. if (screenFields.existsAtPos(lastPos)) { screenFields.setCurrentFieldFFWs(ffw1, ffw2); } else { sf = screenFields.setField(attr, getRow(lastPos), getCol(lastPos), len, ffw1, ffw2, fcw1, fcw2); lastPos = sf.startPos(); int x = len; boolean gui = guiInterface; if (sf.isBypassField()) gui = false; while (x-- > 0) { if (planes.getChar(lastPos) == 0) planes.setScreenCharAndAttr(lastPos, ' ', lastAttr, false); else planes.setScreenAttr(lastPos,lastAttr); if (gui) { planes.setUseGUI(lastPos,FIELD_MIDDLE); } // now we set the field plane attributes planes.setScreenFieldAttr(lastPos,ffw1); advancePos(); } if (gui) if (len > 1) { planes.setUseGUI(sf.startPos(), FIELD_LEFT); if (lastPos > 0) planes.setUseGUI(lastPos - 1, FIELD_RIGHT); else planes.setUseGUI(lastPos,FIELD_RIGHT); } else { planes.setUseGUI(lastPos - 1,FIELD_ONE); } // screen[lastPos].setCharAndAttr(initChar,initAttr,true); setEndingAttr(initAttr); lastPos = sf.startPos(); } // if (fcw1 != 0 || fcw2 != 0) { // System.out.println("lr = " + lastRow + " lc = " + lastCol + " " + // sf.toString()); // } sf = null; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
||
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); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
}
|
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); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
protected void advancePos() { changePos(1); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
||
protected void changePos(int i) { lastPos += i; if (lastPos < 0) lastPos = lenScreen + lastPos; if (lastPos > lenScreen - 1) lastPos = lastPos - lenScreen; // System.out.println(lastRow + "," + ((lastPos) / numCols) + "," + // lastCol + "," + ((lastPos) % numCols) + "," + // ((lastRow * numCols) + lastCol) + "," + // (lastPos)); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
||
return planes.checkHotSpots();
|
return planes.checkHotSpots();
|
public boolean checkHotSpots() { return planes.checkHotSpots(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
planes.setScreenAttr(0,initAttr);
|
planes.setScreenAttr(0, initAttr);
|
protected void clearAll() { lastAttr = 32; lastPos = 0; clearTable(); clearScreen(); planes.setScreenAttr(0,initAttr); insertMode = false; oia.setInsertMode(insertMode); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
oia.setInsertMode(insertMode);
|
oia.setInsertMode(insertMode);
|
protected void clearAll() { lastAttr = 32; lastPos = 0; clearTable(); clearScreen(); planes.setScreenAttr(0,initAttr); insertMode = false; oia.setInsertMode(insertMode); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
planes.setUseGUI(x,NO_GUI);
|
planes.setUseGUI(x, NO_GUI);
|
protected void clearGuiStuff() { for (int x = 0; x < lenScreen; x++) { planes.setUseGUI(x,NO_GUI); } dirtyScreen.setBounds(0,lenScreen - 1,0,0); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
dirtyScreen.setBounds(0,lenScreen - 1,0,0);
|
dirtyScreen.setBounds(0, lenScreen - 1, 0, 0);
|
protected void clearGuiStuff() { for (int x = 0; x < lenScreen; x++) { planes.setUseGUI(x,NO_GUI); } dirtyScreen.setBounds(0,lenScreen - 1,0,0); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
planes.initalizePlanes();
|
planes.initalizePlanes();
|
protected void clearScreen() { planes.initalizePlanes(); dirtyScreen.setBounds(0,lenScreen - 1,0,0); oia.clearScreen(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
dirtyScreen.setBounds(0,lenScreen - 1,0,0);
|
dirtyScreen.setBounds(0, lenScreen - 1, 0, 0);
|
protected void clearScreen() { planes.initalizePlanes(); dirtyScreen.setBounds(0,lenScreen - 1,0,0); oia.clearScreen(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
oia.clearScreen();
|
oia.clearScreen();
|
protected void clearScreen() { planes.initalizePlanes(); dirtyScreen.setBounds(0,lenScreen - 1,0,0); oia.clearScreen(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
protected void clearTable() { oia.setKeyBoardLocked(true); screenFields.clearFFT(); planes.initalizeFieldPlanes(); pendingInsert = false; homePos = -1; }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
||
.getCurrentFieldText());
|
.getCurrentFieldText());
|
public final void copyField(int pos) { Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard(); StringBuffer s = new StringBuffer(); screenFields.saveCurrentField(); isInField(pos); log.debug("Copying"); StringSelection contents = new StringSelection(screenFields .getCurrentFieldText()); cb.setContents(contents, null); screenFields.restoreCurrentField(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
public final void copyField(int pos) { Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard(); StringBuffer s = new StringBuffer(); screenFields.saveCurrentField(); isInField(pos); log.debug("Copying"); StringSelection contents = new StringSelection(screenFields .getCurrentFieldText()); cb.setContents(contents, null); screenFields.restoreCurrentField(); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
||
workR.setBounds(area);
|
workR.setBounds(area);
|
public final void copyMe(Rectangle area) { Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard(); StringBuffer s = new StringBuffer(); workR.setBounds(area); log.debug("Copying" + workR); // loop through all the screen characters to send them to the clip board int m = workR.x; int i = 0; int t = 0; while (workR.height-- > 0) { t = workR.width; i = workR.y; while (t-- > 0) { // only copy printable characters (in this case >= ' ') char c = planes.getChar(getPos(m - 1, i - 1)); if (c >= ' ' && (planes.screenExtended[getPos(m - 1, i - 1)] & EXTENDED_5250_NON_DSP) == 0) s.append(c); else s.append(' '); i++; } s.append('\n'); m++; } // uncomment the next block of code when we implement the copy append // functionality. This was a test just to see if it was possible.// String trString = "";// try {// trString= (String)(cb.getContents(this).getTransferData(DataFlavor.stringFlavor));// }// catch (Exception e) {// System.out.println(e.getMessage());// }// StringSelection contents = new StringSelection(trString + s.toString()); StringSelection contents = new StringSelection(s.toString()); cb.setContents(contents, null); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
if (c >= ' ' && (planes.screenExtended[getPos(m - 1, i - 1)] & EXTENDED_5250_NON_DSP) == 0)
|
if (c >= ' ' && (planes.screenExtended[getPos(m - 1, i - 1)] & EXTENDED_5250_NON_DSP) == 0)
|
public final void copyMe(Rectangle area) { Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard(); StringBuffer s = new StringBuffer(); workR.setBounds(area); log.debug("Copying" + workR); // loop through all the screen characters to send them to the clip board int m = workR.x; int i = 0; int t = 0; while (workR.height-- > 0) { t = workR.width; i = workR.y; while (t-- > 0) { // only copy printable characters (in this case >= ' ') char c = planes.getChar(getPos(m - 1, i - 1)); if (c >= ' ' && (planes.screenExtended[getPos(m - 1, i - 1)] & EXTENDED_5250_NON_DSP) == 0) s.append(c); else s.append(' '); i++; } s.append('\n'); m++; } // uncomment the next block of code when we implement the copy append // functionality. This was a test just to see if it was possible.// String trString = "";// try {// trString= (String)(cb.getContents(this).getTransferData(DataFlavor.stringFlavor));// }// catch (Exception e) {// System.out.println(e.getMessage());// }// StringSelection contents = new StringSelection(trString + s.toString()); StringSelection contents = new StringSelection(s.toString()); cb.setContents(contents, null); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
public final void copyMe(Rectangle area) { Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard(); StringBuffer s = new StringBuffer(); workR.setBounds(area); log.debug("Copying" + workR); // loop through all the screen characters to send them to the clip board int m = workR.x; int i = 0; int t = 0; while (workR.height-- > 0) { t = workR.width; i = workR.y; while (t-- > 0) { // only copy printable characters (in this case >= ' ') char c = planes.getChar(getPos(m - 1, i - 1)); if (c >= ' ' && (planes.screenExtended[getPos(m - 1, i - 1)] & EXTENDED_5250_NON_DSP) == 0) s.append(c); else s.append(' '); i++; } s.append('\n'); m++; } // uncomment the next block of code when we implement the copy append // functionality. This was a test just to see if it was possible.// String trString = "";// try {// trString= (String)(cb.getContents(this).getTransferData(DataFlavor.stringFlavor));// }// catch (Exception e) {// System.out.println(e.getMessage());// }// StringSelection contents = new StringSelection(trString + s.toString()); StringSelection contents = new StringSelection(s.toString()); cb.setContents(contents, null); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
||
int totalColScrollable, int sliderRowPos, int sliderColPos, int sbSize) {
|
int totalColScrollable, int sliderRowPos, int sliderColPos, int sbSize) {
|
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 Cols: " + totalColScrollable + // " thumb Row: " + sliderRowPos + // " thumb Col: " + sliderColPos + // " size: " + sbSize + // " row: " + getRow(lastPos) + // " col: " + getCol(lastPos)); int sp = lastPos; int size = sbSize - 2; int thumbPos = (int) (size * (float) ((float) sliderColPos / (float) totalColScrollable)); // System.out.println(thumbPos); planes.setScreenCharAndAttr(sp,' ', 32, false); planes.setUseGUI(sp,BUTTON_SB_UP); int ctr = 0; while (ctr < size) { sp += numCols; planes.setScreenCharAndAttr(sp,' ', 32, false); if (ctr == thumbPos) planes.setUseGUI(sp,BUTTON_SB_THUMB); else planes.setUseGUI(sp, BUTTON_SB_GUIDE); ctr++; } sp += numCols; planes.setScreenCharAndAttr(sp, ' ', 32, false); planes.setUseGUI(sp, BUTTON_SB_DN); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
planes.setScreenCharAndAttr(sp,' ', 32, false); planes.setUseGUI(sp,BUTTON_SB_UP);
|
planes.setScreenCharAndAttr(sp, ' ', 32, false); planes.setUseGUI(sp, BUTTON_SB_UP);
|
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 Cols: " + totalColScrollable + // " thumb Row: " + sliderRowPos + // " thumb Col: " + sliderColPos + // " size: " + sbSize + // " row: " + getRow(lastPos) + // " col: " + getCol(lastPos)); int sp = lastPos; int size = sbSize - 2; int thumbPos = (int) (size * (float) ((float) sliderColPos / (float) totalColScrollable)); // System.out.println(thumbPos); planes.setScreenCharAndAttr(sp,' ', 32, false); planes.setUseGUI(sp,BUTTON_SB_UP); int ctr = 0; while (ctr < size) { sp += numCols; planes.setScreenCharAndAttr(sp,' ', 32, false); if (ctr == thumbPos) planes.setUseGUI(sp,BUTTON_SB_THUMB); else planes.setUseGUI(sp, BUTTON_SB_GUIDE); ctr++; } sp += numCols; planes.setScreenCharAndAttr(sp, ' ', 32, false); planes.setUseGUI(sp, BUTTON_SB_DN); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
planes.setScreenCharAndAttr(sp,' ', 32, false);
|
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 Cols: " + totalColScrollable + // " thumb Row: " + sliderRowPos + // " thumb Col: " + sliderColPos + // " size: " + sbSize + // " row: " + getRow(lastPos) + // " col: " + getCol(lastPos)); int sp = lastPos; int size = sbSize - 2; int thumbPos = (int) (size * (float) ((float) sliderColPos / (float) totalColScrollable)); // System.out.println(thumbPos); planes.setScreenCharAndAttr(sp,' ', 32, false); planes.setUseGUI(sp,BUTTON_SB_UP); int ctr = 0; while (ctr < size) { sp += numCols; planes.setScreenCharAndAttr(sp,' ', 32, false); if (ctr == thumbPos) planes.setUseGUI(sp,BUTTON_SB_THUMB); else planes.setUseGUI(sp, BUTTON_SB_GUIDE); ctr++; } sp += numCols; planes.setScreenCharAndAttr(sp, ' ', 32, false); planes.setUseGUI(sp, BUTTON_SB_DN); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
planes.setUseGUI(sp,BUTTON_SB_THUMB);
|
planes.setUseGUI(sp, BUTTON_SB_THUMB);
|
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 Cols: " + totalColScrollable + // " thumb Row: " + sliderRowPos + // " thumb Col: " + sliderColPos + // " size: " + sbSize + // " row: " + getRow(lastPos) + // " col: " + getCol(lastPos)); int sp = lastPos; int size = sbSize - 2; int thumbPos = (int) (size * (float) ((float) sliderColPos / (float) totalColScrollable)); // System.out.println(thumbPos); planes.setScreenCharAndAttr(sp,' ', 32, false); planes.setUseGUI(sp,BUTTON_SB_UP); int ctr = 0; while (ctr < size) { sp += numCols; planes.setScreenCharAndAttr(sp,' ', 32, false); if (ctr == thumbPos) planes.setUseGUI(sp,BUTTON_SB_THUMB); else planes.setUseGUI(sp, BUTTON_SB_GUIDE); ctr++; } sp += numCols; planes.setScreenCharAndAttr(sp, ' ', 32, false); planes.setUseGUI(sp, BUTTON_SB_DN); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
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 Cols: " + totalColScrollable + // " thumb Row: " + sliderRowPos + // " thumb Col: " + sliderColPos + // " size: " + sbSize + // " row: " + getRow(lastPos) + // " col: " + getCol(lastPos)); int sp = lastPos; int size = sbSize - 2; int thumbPos = (int) (size * (float) ((float) sliderColPos / (float) totalColScrollable)); // System.out.println(thumbPos); planes.setScreenCharAndAttr(sp,' ', 32, false); planes.setUseGUI(sp,BUTTON_SB_UP); int ctr = 0; while (ctr < size) { sp += numCols; planes.setScreenCharAndAttr(sp,' ', 32, false); if (ctr == thumbPos) planes.setUseGUI(sp,BUTTON_SB_THUMB); else planes.setUseGUI(sp, BUTTON_SB_GUIDE); ctr++; } sp += numCols; planes.setScreenCharAndAttr(sp, ' ', 32, false); planes.setUseGUI(sp, BUTTON_SB_DN); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
|
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 Cols: " + totalColScrollable + // " thumb Row: " + sliderRowPos + // " thumb Col: " + sliderColPos + // " size: " + sbSize + // " row: " + getRow(lastPos) + // " col: " + getCol(lastPos)); int sp = lastPos; int size = sbSize - 2; int thumbPos = (int) (size * (float) ((float) sliderColPos / (float) totalColScrollable)); // System.out.println(thumbPos); planes.setScreenCharAndAttr(sp,' ', 32, false); planes.setUseGUI(sp,BUTTON_SB_UP); int ctr = 0; while (ctr < size) { sp += numCols; planes.setScreenCharAndAttr(sp,' ', 32, false); if (ctr == thumbPos) planes.setUseGUI(sp,BUTTON_SB_THUMB); else planes.setUseGUI(sp, BUTTON_SB_GUIDE); ctr++; } sp += numCols; planes.setScreenCharAndAttr(sp, ' ', 32, false); planes.setUseGUI(sp, BUTTON_SB_DN); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
||
int monoAttr, int colorAttr, int ul, int upper, int ur, int left, int right, int ll, int bottom, int lr) {
|
int monoAttr, int colorAttr, int ul, int upper, int ur, int left, int right, int ll, int bottom, int lr) {
|
protected void createWindow(int depth, int width, int type, boolean gui, int monoAttr, int colorAttr, int ul, int upper, int ur, int left, int right, int ll, int bottom, int lr) { int c = getCol(lastPos); int w = 0; width++; w = width; // set leading attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos, initChar, initAttr, true); setDirty(lastPos); advancePos(); // set upper left// screen[lastPos].setCharAndAttr((char) ul, colorAttr, false); planes.setScreenCharAndAttr(lastPos, (char) ul, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER_LEFT); planes.setUseGUI(lastPos, UPPER_LEFT); } setDirty(lastPos); advancePos(); // draw top row while (w-- >= 0) {// screen[lastPos].setCharAndAttr((char) upper, colorAttr, false); planes.setScreenCharAndAttr(lastPos, (char) upper, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER); planes.setUseGUI(lastPos,UPPER); } setDirty(lastPos); advancePos(); } // set upper right// screen[lastPos].setCharAndAttr((char) ur, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) ur, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER_RIGHT); planes.setUseGUI(lastPos, UPPER_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); lastPos = ((getRow(lastPos) + 1) * numCols) + c; // now handle body of window while (depth-- > 0) { // set leading attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); advancePos(); // set left planes.setScreenCharAndAttr(lastPos, (char) left, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,GUI_LEFT); } setDirty(lastPos); advancePos(); w = width; // fill it in while (w-- >= 0) {// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true);// screen[lastPos].setUseGUI(NO_GUI); planes.setUseGUI(lastPos,NO_GUI); setDirty(lastPos); advancePos(); } // set right// screen[lastPos].setCharAndAttr((char) right, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) right, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(RIGHT); planes.setUseGUI(lastPos,GUI_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); lastPos = ((getRow(lastPos) + 1) * numCols) + c; } // set leading attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); advancePos(); // set lower left// screen[lastPos].setCharAndAttr((char) ll, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) ll, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(LOWER_LEFT); planes.setUseGUI(lastPos,LOWER_LEFT); } setDirty(lastPos); advancePos(); w = width; // draw bottom row while (w-- >= 0) { planes.setScreenCharAndAttr(lastPos,(char) bottom, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,BOTTOM); } setDirty(lastPos); advancePos(); } // set lower right planes.setScreenCharAndAttr(lastPos, (char) lr, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,LOWER_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
planes.setScreenCharAndAttr(lastPos, initChar, initAttr, true); setDirty(lastPos); advancePos();
|
planes.setScreenCharAndAttr(lastPos, initChar, initAttr, true); setDirty(lastPos); advancePos();
|
protected void createWindow(int depth, int width, int type, boolean gui, int monoAttr, int colorAttr, int ul, int upper, int ur, int left, int right, int ll, int bottom, int lr) { int c = getCol(lastPos); int w = 0; width++; w = width; // set leading attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos, initChar, initAttr, true); setDirty(lastPos); advancePos(); // set upper left// screen[lastPos].setCharAndAttr((char) ul, colorAttr, false); planes.setScreenCharAndAttr(lastPos, (char) ul, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER_LEFT); planes.setUseGUI(lastPos, UPPER_LEFT); } setDirty(lastPos); advancePos(); // draw top row while (w-- >= 0) {// screen[lastPos].setCharAndAttr((char) upper, colorAttr, false); planes.setScreenCharAndAttr(lastPos, (char) upper, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER); planes.setUseGUI(lastPos,UPPER); } setDirty(lastPos); advancePos(); } // set upper right// screen[lastPos].setCharAndAttr((char) ur, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) ur, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER_RIGHT); planes.setUseGUI(lastPos, UPPER_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); lastPos = ((getRow(lastPos) + 1) * numCols) + c; // now handle body of window while (depth-- > 0) { // set leading attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); advancePos(); // set left planes.setScreenCharAndAttr(lastPos, (char) left, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,GUI_LEFT); } setDirty(lastPos); advancePos(); w = width; // fill it in while (w-- >= 0) {// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true);// screen[lastPos].setUseGUI(NO_GUI); planes.setUseGUI(lastPos,NO_GUI); setDirty(lastPos); advancePos(); } // set right// screen[lastPos].setCharAndAttr((char) right, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) right, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(RIGHT); planes.setUseGUI(lastPos,GUI_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); lastPos = ((getRow(lastPos) + 1) * numCols) + c; } // set leading attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); advancePos(); // set lower left// screen[lastPos].setCharAndAttr((char) ll, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) ll, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(LOWER_LEFT); planes.setUseGUI(lastPos,LOWER_LEFT); } setDirty(lastPos); advancePos(); w = width; // draw bottom row while (w-- >= 0) { planes.setScreenCharAndAttr(lastPos,(char) bottom, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,BOTTOM); } setDirty(lastPos); advancePos(); } // set lower right planes.setScreenCharAndAttr(lastPos, (char) lr, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,LOWER_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
protected void createWindow(int depth, int width, int type, boolean gui, int monoAttr, int colorAttr, int ul, int upper, int ur, int left, int right, int ll, int bottom, int lr) { int c = getCol(lastPos); int w = 0; width++; w = width; // set leading attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos, initChar, initAttr, true); setDirty(lastPos); advancePos(); // set upper left// screen[lastPos].setCharAndAttr((char) ul, colorAttr, false); planes.setScreenCharAndAttr(lastPos, (char) ul, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER_LEFT); planes.setUseGUI(lastPos, UPPER_LEFT); } setDirty(lastPos); advancePos(); // draw top row while (w-- >= 0) {// screen[lastPos].setCharAndAttr((char) upper, colorAttr, false); planes.setScreenCharAndAttr(lastPos, (char) upper, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER); planes.setUseGUI(lastPos,UPPER); } setDirty(lastPos); advancePos(); } // set upper right// screen[lastPos].setCharAndAttr((char) ur, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) ur, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER_RIGHT); planes.setUseGUI(lastPos, UPPER_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); lastPos = ((getRow(lastPos) + 1) * numCols) + c; // now handle body of window while (depth-- > 0) { // set leading attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); advancePos(); // set left planes.setScreenCharAndAttr(lastPos, (char) left, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,GUI_LEFT); } setDirty(lastPos); advancePos(); w = width; // fill it in while (w-- >= 0) {// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true);// screen[lastPos].setUseGUI(NO_GUI); planes.setUseGUI(lastPos,NO_GUI); setDirty(lastPos); advancePos(); } // set right// screen[lastPos].setCharAndAttr((char) right, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) right, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(RIGHT); planes.setUseGUI(lastPos,GUI_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); lastPos = ((getRow(lastPos) + 1) * numCols) + c; } // set leading attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); advancePos(); // set lower left// screen[lastPos].setCharAndAttr((char) ll, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) ll, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(LOWER_LEFT); planes.setUseGUI(lastPos,LOWER_LEFT); } setDirty(lastPos); advancePos(); w = width; // draw bottom row while (w-- >= 0) { planes.setScreenCharAndAttr(lastPos,(char) bottom, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,BOTTOM); } setDirty(lastPos); advancePos(); } // set lower right planes.setScreenCharAndAttr(lastPos, (char) lr, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,LOWER_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
||
if (gui) {
|
if (gui) {
|
protected void createWindow(int depth, int width, int type, boolean gui, int monoAttr, int colorAttr, int ul, int upper, int ur, int left, int right, int ll, int bottom, int lr) { int c = getCol(lastPos); int w = 0; width++; w = width; // set leading attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos, initChar, initAttr, true); setDirty(lastPos); advancePos(); // set upper left// screen[lastPos].setCharAndAttr((char) ul, colorAttr, false); planes.setScreenCharAndAttr(lastPos, (char) ul, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER_LEFT); planes.setUseGUI(lastPos, UPPER_LEFT); } setDirty(lastPos); advancePos(); // draw top row while (w-- >= 0) {// screen[lastPos].setCharAndAttr((char) upper, colorAttr, false); planes.setScreenCharAndAttr(lastPos, (char) upper, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER); planes.setUseGUI(lastPos,UPPER); } setDirty(lastPos); advancePos(); } // set upper right// screen[lastPos].setCharAndAttr((char) ur, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) ur, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER_RIGHT); planes.setUseGUI(lastPos, UPPER_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); lastPos = ((getRow(lastPos) + 1) * numCols) + c; // now handle body of window while (depth-- > 0) { // set leading attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); advancePos(); // set left planes.setScreenCharAndAttr(lastPos, (char) left, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,GUI_LEFT); } setDirty(lastPos); advancePos(); w = width; // fill it in while (w-- >= 0) {// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true);// screen[lastPos].setUseGUI(NO_GUI); planes.setUseGUI(lastPos,NO_GUI); setDirty(lastPos); advancePos(); } // set right// screen[lastPos].setCharAndAttr((char) right, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) right, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(RIGHT); planes.setUseGUI(lastPos,GUI_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); lastPos = ((getRow(lastPos) + 1) * numCols) + c; } // set leading attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); advancePos(); // set lower left// screen[lastPos].setCharAndAttr((char) ll, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) ll, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(LOWER_LEFT); planes.setUseGUI(lastPos,LOWER_LEFT); } setDirty(lastPos); advancePos(); w = width; // draw bottom row while (w-- >= 0) { planes.setScreenCharAndAttr(lastPos,(char) bottom, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,BOTTOM); } setDirty(lastPos); advancePos(); } // set lower right planes.setScreenCharAndAttr(lastPos, (char) lr, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,LOWER_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
}
|
}
|
protected void createWindow(int depth, int width, int type, boolean gui, int monoAttr, int colorAttr, int ul, int upper, int ur, int left, int right, int ll, int bottom, int lr) { int c = getCol(lastPos); int w = 0; width++; w = width; // set leading attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos, initChar, initAttr, true); setDirty(lastPos); advancePos(); // set upper left// screen[lastPos].setCharAndAttr((char) ul, colorAttr, false); planes.setScreenCharAndAttr(lastPos, (char) ul, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER_LEFT); planes.setUseGUI(lastPos, UPPER_LEFT); } setDirty(lastPos); advancePos(); // draw top row while (w-- >= 0) {// screen[lastPos].setCharAndAttr((char) upper, colorAttr, false); planes.setScreenCharAndAttr(lastPos, (char) upper, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER); planes.setUseGUI(lastPos,UPPER); } setDirty(lastPos); advancePos(); } // set upper right// screen[lastPos].setCharAndAttr((char) ur, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) ur, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(UPPER_RIGHT); planes.setUseGUI(lastPos, UPPER_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); lastPos = ((getRow(lastPos) + 1) * numCols) + c; // now handle body of window while (depth-- > 0) { // set leading attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); advancePos(); // set left planes.setScreenCharAndAttr(lastPos, (char) left, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,GUI_LEFT); } setDirty(lastPos); advancePos(); w = width; // fill it in while (w-- >= 0) {// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true);// screen[lastPos].setUseGUI(NO_GUI); planes.setUseGUI(lastPos,NO_GUI); setDirty(lastPos); advancePos(); } // set right// screen[lastPos].setCharAndAttr((char) right, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) right, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(RIGHT); planes.setUseGUI(lastPos,GUI_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); lastPos = ((getRow(lastPos) + 1) * numCols) + c; } // set leading attribute byte// screen[lastPos].setCharAndAttr(initChar, initAttr, true); planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); advancePos(); // set lower left// screen[lastPos].setCharAndAttr((char) ll, colorAttr, false); planes.setScreenCharAndAttr(lastPos,(char) ll, colorAttr, false); if (gui) {// screen[lastPos].setUseGUI(LOWER_LEFT); planes.setUseGUI(lastPos,LOWER_LEFT); } setDirty(lastPos); advancePos(); w = width; // draw bottom row while (w-- >= 0) { planes.setScreenCharAndAttr(lastPos,(char) bottom, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,BOTTOM); } setDirty(lastPos); advancePos(); } // set lower right planes.setScreenCharAndAttr(lastPos, (char) lr, colorAttr, false); if (gui) { planes.setUseGUI(lastPos,LOWER_RIGHT); } setDirty(lastPos); advancePos(); // set ending attribute byte planes.setScreenCharAndAttr(lastPos,initChar, initAttr, true); setDirty(lastPos); }
|
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Screen5250.java/clean/tn5250j/src/org/tn5250j/framework/tn5250/Screen5250.java
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.