bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
|---|---|---|
public void mouseDragged(MouseEvent e) {}
|
public void mouseDragged(MouseEvent e) {}
| 8,294
|
public void mouseEntered(MouseEvent e) {}
|
public void mouseEntered(MouseEvent e) {}
| 8,295
|
public void mouseExited(MouseEvent e) {}
|
public void mouseExited(MouseEvent e) {}
| 8,296
|
public void mouseMoved(MouseEvent e) {}
|
public void mouseMoved(MouseEvent e) {}
| 8,297
|
public void mousePressed(MouseEvent e) {}
|
public void mousePressed(MouseEvent e) {}
| 8,298
|
public void mouseReleased(MouseEvent e) {}
|
public void mouseReleased(MouseEvent e) {}
| 8,299
|
private void init() { classXDFNodeName = "fieldAxis"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"fieldList"); attribOrder.add(0,"axisIdRef"); attribOrder.add(0,"axisId"); attribOrder.add(0,"align"); //not sure what it is??? attribOrder.add(0,"description"); attribOrder.add(0,"name"); //set up the attribute hashtable key with the default initial value //set the minimum array size(essentially the size of the axis) attribHash.put("fieldList", new XMLAttribute(Collections.synchronizedList(new ArrayList(super.sDefaultDataArraySize)), Constants.LIST_TYPE)); attribHash.put("axisIdRef", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("axisId", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("align", new XMLAttribute(null, Constants.STRING_TYPE)); //double check?? attribHash.put("description", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("name", new XMLAttribute(null, Constants.STRING_TYPE)); length = 0; }
|
private void init() { classXDFNodeName = "fieldAxis"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"fieldList"); attribOrder.add(0,"axisIdRef"); attribOrder.add(0,"axisId"); attribOrder.add(0,"align"); //not sure what it is??? attribOrder.add(0,"description"); attribOrder.add(0,"name"); //set up the attribute hashtable key with the default initial value //set the minimum array size(essentially the size of the axis) attribHash.put("fieldList", new XMLAttribute(Collections.synchronizedList(new ArrayList(Specification.getInstance().getDefaultDataArraySize())), Constants.LIST_TYPE)); attribHash.put("axisIdRef", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("axisId", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("align", new XMLAttribute(null, Constants.STRING_TYPE)); //double check?? attribHash.put("description", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("name", new XMLAttribute(null, Constants.STRING_TYPE)); length = 0; }
| 8,302
|
public int read() throws IOException { int nread = read(onebytebuffer, 0, 1); //read one byte if (nread > 0) return onebytebuffer[0] & 0xff; return -1; }
|
public int read() throws IOException { int nread = read(onebytebuffer, 0, 1); //read one byte if (nread > 0) return onebytebuffer[0] & 0xff; return -1; }
| 8,303
|
public int read() throws IOException { int nread = read(onebytebuffer, 0, 1); //read one byte if (nread > 0) return onebytebuffer[0] & 0xff; return -1; }
|
publicintread()throwsIOException{intnread=read(onebytebuffer,0,1);//readonebyteif(nread>0)returnonebytebuffer[0]&0xff;return-1;}
| 8,304
|
public void checkAccess(ThreadGroup g) { if (g.getParent() != null) checkPermission(new RuntimePermission("modifyThreadGroup")); }
|
public void checkAccess(Thread thread) { if (g.getParent() != null) checkPermission(new RuntimePermission("modifyThreadGroup")); }
| 8,314
|
public void checkAccess(ThreadGroup g) { if (g.getParent() != null) checkPermission(new RuntimePermission("modifyThreadGroup")); }
|
public void checkAccess(ThreadGroup g) { if (g.getParent() != null) checkPermission(new RuntimePermission("modifyThreadGroup")); }
| 8,315
|
public Session5250 (Properties props, String configurationResource, String sessionName, SessionConfig config) { propFileName = config.getConfigurationResource(); sesConfig = config; this.configurationResource = configurationResource; this.sessionName = sessionName; sesProps = props; sce = new SessionChangeEvent(this); if (sesProps.containsKey(SESSION_HEART_BEAT)) heartBeat = true; screen = new Screen5250(); screen.setVT(vt); }
|
public Session5250 (Properties props, String configurationResource, String sessionName, SessionConfig config) { propFileName = config.getConfigurationResource(); sesConfig = config; this.configurationResource = configurationResource; this.sessionName = sessionName; sesProps = props; sce = new SessionChangeEvent(this); if (sesProps.containsKey(SESSION_HEART_BEAT)) heartBeat = true; screen = new Screen5250(); }
| 8,316
|
public boolean isConnected() { return vt.isConnected(); }
|
public boolean isConnected() { if (vt == null) return false; else return vt.isConnected(); }
| 8,317
|
public String getSystemDisplayName(File f) throws NotImplementedException { // FIXME: Implement; return null; }
|
public String getSystemDisplayName(File f) { // FIXME: Implement; return null; }
| 8,318
|
public String getSystemDisplayName(File f) throws NotImplementedException { // FIXME: Implement; return null; }
|
public String getSystemDisplayName(File f) throws NotImplementedException { // FIXME: Implement; String name = null; if (f != null) { if (isRoot(f)) name = f.getAbsolutePath(); else { try { String path = f.getCanonicalPath(); name = path.substring(path.lastIndexOf(File.separator) + 1); } catch (IOException e) { name = f.getName(); } } } return name; }
| 8,319
|
getSelectedCheckbox(){ return(selectedCheckbox);}
|
getSelectedCheckbox(){ return(selectedCheckbox);}
| 8,320
|
setCurrent(Checkbox selectedCheckbox){ setSelectedCheckbox(selectedCheckbox);}
|
setCurrent(Checkbox selectedCheckbox){ setSelectedCheckbox(selectedCheckbox);}
| 8,321
|
setSelectedCheckbox(Checkbox selectedCheckbox){ if (this.selectedCheckbox != null) { if (this.selectedCheckbox.getCheckboxGroup() != this) return; this.selectedCheckbox.setState(false); } this.selectedCheckbox = selectedCheckbox; if (selectedCheckbox != null) selectedCheckbox.setState(true);}
|
setSelectedCheckbox(Checkbox selectedCheckbox){ if (this.selectedCheckbox != null) { if (this.selectedCheckbox.getCheckboxGroup() != this) return; this.selectedCheckbox.setState(false); } this.selectedCheckbox = selectedCheckbox; if (selectedCheckbox != null) selectedCheckbox.setState(true);}
| 8,322
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); FontMetrics fm = getToolkit().getFontMetrics(list.getFont()); int strWidth = SwingUtilities.computeStringWidth(fm, s); int cbWidth = getSize().width; if (cbWidth != 0 && strWidth > cbWidth) { char[] str = s.toCharArray(); int currWidth = 0; int i = 0; String postStr = "... "; cbWidth -= SwingUtilities.computeStringWidth(fm, postStr); while (i < str.length && currWidth < cbWidth) { ++i; currWidth = SwingUtilities.computeStringWidth(fm, new String(str, 0, i)); } setText(new String(str, 0, i) + postStr); } else setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
| 8,323
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
| 8,324
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
| 8,325
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
| 8,326
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String s = value.toString(); setText(s); setOpaque(true); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setEnabled(list.isEnabled()); setFont(list.getFont()); // Use focusCellHighlightBorder when renderer has focus and // noFocusBorder otherwise if (cellHasFocus) setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); else setBorder(noFocusBorder); return this; }
| 8,327
|
public static final String toCanonicalForm(String path) { if(isRootDirectory(path)) return path; //FDy: ClassPath bug fix for root (from JNode team) /*?? if(path.indexOf('.') < 0 && path.indexOf("..") < 0) return path; */ String tmppath = path.replace('/', separatorChar); StringBuffer canonpath; // We found it'll be more efficient and easy to handle to // return a lowercased canonical path if(isWindows) tmppath = tmppath.toLowerCase(); int i; if ((i = beginWithRootPathPrefix(tmppath)) == 0 ) return path; /* The original "canonpath = new StringBuffer(tmppath.substring(0, i))" isn't very efficient because StringBuffer's ensureCapacity_unsynchronized will fail definitely each time and will enlarge buffer and copy contents. . */ canonpath = new StringBuffer(INITIAL_MAX_PATH); canonpath.append(tmppath.substring(0, i)); tmppath = tmppath.substring(i); // pathdepth==0 indicates there're only root path in the buffer int pathdepth = 0; StringTokenizer st = new StringTokenizer(tmppath, separator); // Traverse each element of the path, handling "." and ".." // Should handle "~" too? if (st.hasMoreTokens()) do { String s = st.nextToken(); // Handle "." or an empty element. if (s.equals(".") || s.equals("")) continue; // Handle ".." by deleting the last element from the path if (s.equals("..")) { if (pathdepth == 0) continue; // Strip of trailing separator canonpath.setLength(canonpath.length() - 1/*separator.length()*/); String tmpstr = canonpath.toString(); int idx = tmpstr.lastIndexOf(separator); if ((idx == -1) || ((idx + 1/*separator.length()*/) > tmpstr.length())) //throw new IOException("Can't happen error"); return path; // Shouldn't happen canonpath.setLength(idx + 1/*separator.length()*/); pathdepth--; continue; } canonpath.append(s); pathdepth++; //now it's more than root path if (st.hasMoreTokens()) canonpath.append(separator); } while (st.hasMoreTokens()); if (endWithSeparator(path)) canonpath.append(separator); String tmpstr = canonpath.toString(); //if (pathdepth > 0 && endWithSeparator(tmpstr) ) // tmpstr = tmpstr.substring(0, tmpstr.length() - 1/*separator.length()*/); return tmpstr; }
|
public static final String toCanonicalForm(String path) { if(isRootDirectory(path)) return path; //FDy: ClassPath bug fix for root (from JNode team) /*?? if(path.indexOf('.') < 0 && path.indexOf("..") < 0) return path; */ String tmppath = path.replace('/', separatorChar); StringBuffer canonpath; // We found it'll be more efficient and easy to handle to // return a lowercased canonical path if(isWindows) tmppath = tmppath.toLowerCase(); int i; if ((i = beginWithRootPathPrefix(tmppath)) == 0 ) return path; /* The original "canonpath = new StringBuffer(tmppath.substring(0, i))" isn't very efficient because StringBuffer's ensureCapacity_unsynchronized will fail definitely each time and will enlarge buffer and copy contents. . */ canonpath = new StringBuffer(INITIAL_MAX_PATH); canonpath.append(tmppath.substring(0, i)); tmppath = tmppath.substring(i); // pathdepth==0 indicates there're only root path in the buffer int pathdepth = 0; StringTokenizer st = new StringTokenizer(tmppath, separator); // Traverse each element of the path, handling "." and ".." // Should handle "~" too? if (st.hasMoreTokens()) do { String s = st.nextToken(); // Handle "." or an empty element. if (s.equals(".") || s.equals("")) continue; // Handle ".." by deleting the last element from the path if (s.equals("..")) { if (pathdepth == 0) continue; // Strip of trailing separator canonpath.setLength(canonpath.length() - 1/*separator.length()*/); String tmpstr = canonpath.toString(); int idx = tmpstr.lastIndexOf(separator); if ((idx == -1) || ((idx + 1/*separator.length()*/) > tmpstr.length())) //throw new IOException("Can't happen error"); return path; // Shouldn't happen canonpath.setLength(idx + 1/*separator.length()*/); pathdepth--; continue; } canonpath.append(s); pathdepth++; //now it's more than root path if (st.hasMoreTokens()) canonpath.append(separator); } while (st.hasMoreTokens()); if (endWithSeparator(path)) canonpath.append(separator); String tmpstr = canonpath.toString(); //if (pathdepth > 0 && endWithSeparator(tmpstr) ) // tmpstr = tmpstr.substring(0, tmpstr.length() - 1/*separator.length()*/); return tmpstr; }
| 8,328
|
private void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else { new SecureRandom ().nextBytes(buffer); } }
|
private void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else { new SecureRandom ().nextBytes(buffer); } }
| 8,329
|
private void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); } else { new SecureRandom ().nextBytes(buffer); } }
|
private void nextRandomBytes(byte[] buffer) { if (rnd != null) { rnd.nextBytes(buffer); else { new SecureRandom ().nextBytes(buffer); }
| 8,330
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
| 8,332
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
| 8,333
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
| 8,334
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
| 8,335
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
| 8,336
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
| 8,337
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
|
final VmStackFrame[] getVmStackTrace(Address argFrame, Address ip, int limit) { final Address frame = argFrame; Address f = frame; int count = 0; while (isValid(f) && (count < limit)) { count++; f = getPrevious(f); } if ((f != null) && !isStackBottom(f) && (count < limit)) { Unsafe.debug("Corrupted stack!, st.length="); Unsafe.debug(count); Unsafe.debug(" f.magic="); //Unsafe.die(); } final VmStackFrame[] stack = new VmStackFrame[count]; f = frame; for (int i = 0; i < count; i++) { stack[i] = new VmStackFrame(f, this, ip); // Subtract 1, because the return address is directly after // the location where the previous frame was executing. ip = stack[i].getReturnAddress().add(-1); f = getPrevious(f); } return stack; }
| 8,338
|
public ISO9660FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); //byte[] buff = new byte[ISO9660FileSystem.DefaultLBNSize]; try { volume = new ISO9660Volume(getApi()); } catch (IOException e) { throw new FileSystemException(e); } }
|
public ISO9660FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); //byte[] buff = new byte[ISO9660FileSystem.DefaultLBNSize]; try { volume = new ISO9660Volume(getApi()); } catch (IOException e) { throw new FileSystemException(e); } }
| 8,339
|
public void flush() throws IOException { //TODO: perhaps nothing todo (always readOnly ?) }
|
public void flush() throws IOException { //TODO: perhaps nothing todo (always readOnly ?) }
| 8,340
|
public FSEntry getRootEntry() throws IOException { return new ISO9660Entry(volume.getVolumeDescriptor().getRootDirectoryEntry()); }
|
public FSEntry getRootEntry() throws IOException { return new ISO9660Entry(volume.getVolumeDescriptor().getRootDirectoryEntry()); }
| 8,341
|
public ISO9660Volume getVolume() { return this.volume; }
|
public ISO9660Volume getVolume() { return this.volume; }
| 8,342
|
private Raster createCompatibleRaster(Raster raster) { //todo fix gif images (index color model?), optimize final ColorModel dst_model = surface.getColorModel(); final int[] samples = new int[4]; final int w = raster.getWidth(); final int h = raster.getHeight(); final WritableRaster dst_raster = dst_model.createCompatibleWritableRaster(w, h); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { raster.getPixel(x, y, samples); dst_raster.setPixel(x, y, samples); } } return dst_raster; }
|
private Raster createCompatibleRaster(Raster raster, ColorModel model) { //todo fix gif images (index color model?), optimize final ColorModel dst_model = surface.getColorModel(); final int[] samples = new int[4]; final int w = raster.getWidth(); final int h = raster.getHeight(); final WritableRaster dst_raster = dst_model.createCompatibleWritableRaster(w, h); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { raster.getPixel(x, y, samples); dst_raster.setPixel(x, y, samples); } } return dst_raster; }
| 8,343
|
private Raster createCompatibleRaster(Raster raster) { //todo fix gif images (index color model?), optimize final ColorModel dst_model = surface.getColorModel(); final int[] samples = new int[4]; final int w = raster.getWidth(); final int h = raster.getHeight(); final WritableRaster dst_raster = dst_model.createCompatibleWritableRaster(w, h); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { raster.getPixel(x, y, samples); dst_raster.setPixel(x, y, samples); } } return dst_raster; }
|
private Raster createCompatibleRaster(Raster raster) { //todo fix gif images (index color model?), optimize final ColorModel dst_model = surface.getColorModel(); final int[] samples = new int[4]; final int w = raster.getWidth(); final int h = raster.getHeight(); final WritableRaster dst_raster = dst_model.createCompatibleWritableRaster(w, h); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { raster.getPixel(x, y, samples); dst_raster.setPixel(x, y, samples); } } return dst_raster; }
| 8,344
|
private Raster createCompatibleRaster(Raster raster) { //todo fix gif images (index color model?), optimize final ColorModel dst_model = surface.getColorModel(); final int[] samples = new int[4]; final int w = raster.getWidth(); final int h = raster.getHeight(); final WritableRaster dst_raster = dst_model.createCompatibleWritableRaster(w, h); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { raster.getPixel(x, y, samples); dst_raster.setPixel(x, y, samples); } } return dst_raster; }
|
private Raster createCompatibleRaster(Raster raster) { //todo fix gif images (index color model?), optimize final ColorModel dst_model = surface.getColorModel(); final int[] samples = new int[4]; final int w = raster.getWidth(); final int h = raster.getHeight(); final WritableRaster dst_raster = dst_model.createCompatibleWritableRaster(w, h); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { raster.getPixel(x, y, samples); dst_raster.setPixel(x, y, samples); } } return dst_raster; }
| 8,345
|
private Raster createCompatibleRaster(Raster raster) { //todo fix gif images (index color model?), optimize final ColorModel dst_model = surface.getColorModel(); final int[] samples = new int[4]; final int w = raster.getWidth(); final int h = raster.getHeight(); final WritableRaster dst_raster = dst_model.createCompatibleWritableRaster(w, h); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { raster.getPixel(x, y, samples); dst_raster.setPixel(x, y, samples); } } return dst_raster; }
|
private Raster createCompatibleRaster(Raster raster) { //todo fix gif images (index color model?), optimize final ColorModel dst_model = surface.getColorModel(); final int[] samples = new int[4]; final int w = raster.getWidth(); final int h = raster.getHeight(); final WritableRaster dst_raster = dst_model.createCompatibleWritableRaster(w, h); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { raster.getPixel(x, y, samples); dst_raster.setPixel(x, y, samples); } } return dst_raster; }
| 8,346
|
private Raster getCompatibleRaster(Image image) throws InterruptedException { final ColorModel dstModel = surface.getColorModel(); if (image instanceof BufferedImage) { // We have a direct raster final Raster raster = ((BufferedImage) image).getRaster(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else if (image instanceof RenderedImage) { // We have a direct raster final Raster raster = ((RenderedImage) image).getData(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else { // Convert it to a raster final PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, true); if (grabber.grabPixels()) { final int w = grabber.getWidth(); final int h = grabber.getHeight(); final WritableRaster raster = dstModel.createCompatibleWritableRaster(w, h); final int[] pixels = (int[]) grabber.getPixels(); Object dataElems = null; for (int y = 0; y < h; y++) { final int ofsY = y * w; for (int x = 0; x < w; x++) { final int rgb = pixels[ofsY + x]; dataElems = dstModel.getDataElements(rgb, dataElems); raster.setDataElements(x, y, dataElems); } } return raster; } else { throw new IllegalArgumentException("Cannot grab pixels"); } } }
|
private Raster getCompatibleRaster(Image image) throws InterruptedException { final ColorModel dstModel = surface.getColorModel(); if (image instanceof BufferedImage) { // We have a direct raster final Raster raster = ((BufferedImage) image).getRaster(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else if (image instanceof RenderedImage) { // We have a direct raster final Raster raster = ((RenderedImage) image).getData(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else { // Convert it to a raster final PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, true); if (grabber.grabPixels()) { final int w = grabber.getWidth(); final int h = grabber.getHeight(); final WritableRaster raster = dstModel.createCompatibleWritableRaster(w, h); final int[] pixels = (int[]) grabber.getPixels(); Object dataElems = null; for (int y = 0; y < h; y++) { final int ofsY = y * w; for (int x = 0; x < w; x++) { final int rgb = pixels[ofsY + x]; dataElems = dstModel.getDataElements(rgb, dataElems); raster.setDataElements(x, y, dataElems); } } return raster; } else { throw new IllegalArgumentException("Cannot grab pixels"); } } }
| 8,347
|
private Raster getCompatibleRaster(Image image) throws InterruptedException { final ColorModel dstModel = surface.getColorModel(); if (image instanceof BufferedImage) { // We have a direct raster final Raster raster = ((BufferedImage) image).getRaster(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else if (image instanceof RenderedImage) { // We have a direct raster final Raster raster = ((RenderedImage) image).getData(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else { // Convert it to a raster final PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, true); if (grabber.grabPixels()) { final int w = grabber.getWidth(); final int h = grabber.getHeight(); final WritableRaster raster = dstModel.createCompatibleWritableRaster(w, h); final int[] pixels = (int[]) grabber.getPixels(); Object dataElems = null; for (int y = 0; y < h; y++) { final int ofsY = y * w; for (int x = 0; x < w; x++) { final int rgb = pixels[ofsY + x]; dataElems = dstModel.getDataElements(rgb, dataElems); raster.setDataElements(x, y, dataElems); } } return raster; } else { throw new IllegalArgumentException("Cannot grab pixels"); } } }
|
private Raster getCompatibleRaster(Image image) throws InterruptedException { final ColorModel dstModel = surface.getColorModel(); if (image instanceof BufferedImage) { // We have a direct raster final Raster raster = ((BufferedImage) image).getRaster(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else if (image instanceof RenderedImage) { // We have a direct raster final Raster raster = ((RenderedImage) image).getData(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else { // Convert it to a raster final PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, true); if (grabber.grabPixels()) { final int w = grabber.getWidth(); final int h = grabber.getHeight(); final WritableRaster raster = dstModel.createCompatibleWritableRaster(w, h); final int[] pixels = (int[]) grabber.getPixels(); Object dataElems = null; for (int y = 0; y < h; y++) { final int ofsY = y * w; for (int x = 0; x < w; x++) { final int rgb = pixels[ofsY + x]; dataElems = dstModel.getDataElements(rgb, dataElems); raster.setDataElements(x, y, dataElems); } } return raster; } else { throw new IllegalArgumentException("Cannot grab pixels"); } } }
| 8,348
|
private Raster getCompatibleRaster(Image image) throws InterruptedException { final ColorModel dstModel = surface.getColorModel(); if (image instanceof BufferedImage) { // We have a direct raster final Raster raster = ((BufferedImage) image).getRaster(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else if (image instanceof RenderedImage) { // We have a direct raster final Raster raster = ((RenderedImage) image).getData(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else { // Convert it to a raster final PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, true); if (grabber.grabPixels()) { final int w = grabber.getWidth(); final int h = grabber.getHeight(); final WritableRaster raster = dstModel.createCompatibleWritableRaster(w, h); final int[] pixels = (int[]) grabber.getPixels(); Object dataElems = null; for (int y = 0; y < h; y++) { final int ofsY = y * w; for (int x = 0; x < w; x++) { final int rgb = pixels[ofsY + x]; dataElems = dstModel.getDataElements(rgb, dataElems); raster.setDataElements(x, y, dataElems); } } return raster; } else { throw new IllegalArgumentException("Cannot grab pixels"); } } }
|
private Raster getCompatibleRaster(Image image) throws InterruptedException { final ColorModel dstModel = surface.getColorModel(); if (image instanceof BufferedImage) { // We have a direct raster final Raster raster = ((BufferedImage) image).getRaster(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else if (image instanceof RenderedImage) { // We have a direct raster final Raster raster = ((RenderedImage) image).getData(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else { // Convert it to a raster final PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, true); if (grabber.grabPixels()) { final int w = grabber.getWidth(); final int h = grabber.getHeight(); final WritableRaster raster = dstModel.createCompatibleWritableRaster(w, h); final int[] pixels = (int[]) grabber.getPixels(); Object dataElems = null; for (int y = 0; y < h; y++) { final int ofsY = y * w; for (int x = 0; x < w; x++) { final int rgb = pixels[ofsY + x]; dataElems = dstModel.getDataElements(rgb, dataElems); raster.setDataElements(x, y, dataElems); } } return raster; } else { throw new IllegalArgumentException("Cannot grab pixels"); } } }
| 8,349
|
private Raster getCompatibleRaster(Image image) throws InterruptedException { final ColorModel dstModel = surface.getColorModel(); if (image instanceof BufferedImage) { // We have a direct raster final Raster raster = ((BufferedImage) image).getRaster(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else if (image instanceof RenderedImage) { // We have a direct raster final Raster raster = ((RenderedImage) image).getData(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else { // Convert it to a raster final PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, true); if (grabber.grabPixels()) { final int w = grabber.getWidth(); final int h = grabber.getHeight(); final WritableRaster raster = dstModel.createCompatibleWritableRaster(w, h); final int[] pixels = (int[]) grabber.getPixels(); Object dataElems = null; for (int y = 0; y < h; y++) { final int ofsY = y * w; for (int x = 0; x < w; x++) { final int rgb = pixels[ofsY + x]; dataElems = dstModel.getDataElements(rgb, dataElems); raster.setDataElements(x, y, dataElems); } } return raster; } else { throw new IllegalArgumentException("Cannot grab pixels"); } } }
|
private Raster getCompatibleRaster(Image image) throws InterruptedException { final ColorModel dstModel = surface.getColorModel(); if (image instanceof BufferedImage) { // We have a direct raster final Raster raster = ((BufferedImage) image).getRaster(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else if (image instanceof RenderedImage) { // We have a direct raster final Raster raster = ((RenderedImage) image).getData(); if (dstModel.isCompatibleRaster(raster)) { // Raster is compatible, return without changes return raster; } else { // Convert it into a compatible raster return createCompatibleRaster(raster); } } else { // Convert it to a raster final PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, true); if (grabber.grabPixels()) { final int w = grabber.getWidth(); final int h = grabber.getHeight(); final WritableRaster raster = dstModel.createCompatibleWritableRaster(w, h); final int[] pixels = (int[]) grabber.getPixels(); Object dataElems = null; for (int y = 0; y < h; y++) { final int ofsY = y * w; for (int x = 0; x < w; x++) { final int rgb = pixels[ofsY + x]; dataElems = dstModel.getDataElements(rgb, dataElems); raster.setDataElements(x, y, dataElems); } } return raster; } else { throw new IllegalArgumentException("Cannot grab pixels"); } } }
| 8,350
|
final void lock() { AddressPcEntry p = list; int count = 0; final ArrayList methods = new ArrayList(); while (p != null) { count++; final VmMethod m = p.method; if (!methods.contains(m)) { methods.add(m); } p = p.next; } final int[] table = new int[ count * 3]; this.methodTable = (VmMethod[]) methods.toArray(new VmMethod[ methods .size()]); p = list; int i = 0; int lastOffset = -1; while (p != null) { table[ i + 0] = methods.indexOf(p.method); table[ i + 1] = p.pc; table[ i + 2] = p.offset; if (p.offset < lastOffset) { throw new VirtualMachineError( "unordered offset found"); } lastOffset = p.offset; i += 3; p = p.next; } this.table = table; this.list = null; }
|
final void lock() { AddressPcEntry p = list; int count = 0; final ArrayList methods = new ArrayList(); while (p != null) { count++; final VmMethod m = p.method; if (!methods.contains(m)) { methods.add(m); } p = p.next; } final int[] table = new int[ count * 3]; this.methodTable = (VmMethod[]) methods.toArray(new VmMethod[ methods .size()]); p = list; int i = 0; int lastOffset = -1; while (p != null) { table[ i + 0] = methods.indexOf(p.method); table[ i + 1] = p.pc; table[ i + 2] = p.offset; if (p.offset < lastOffset) { throw new InternalError( "unordered offset found"); } lastOffset = p.offset; i += 3; p = p.next; } this.table = table; this.list = null; }
| 8,351
|
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); workR.setBounds(r,c,getCol(ePos),getRow(ePos)); 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); }
|
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); 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); }
| 8,353
|
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))) ); } return 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))) ); } return 0; }
| 8,354
|
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))) ); } return 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))) ); } return 0; }
| 8,355
|
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))) ); } return 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))) ); 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; return 0; }
| 8,356
|
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))) ); } return 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))) ); } 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(s0, s1 ); }
| 8,357
|
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(); }
|
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 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(); }
| 8,358
|
protected synchronized void paintComponent2(Graphics2D g2) { Rectangle r = g2.getClipBounds(); g2.setColor(colorBg);// System.out.println("PaintComponent " + r); g2.fillRect(r.x,r.y,r.width,r.height); int sPos = getRowColFromPoint(r.x, r.y); // fix me here int er = (numRows - ((((fmHeight * (numRows + 1)) - ((r.y + r.height) + fmHeight)) / fmHeight))); int ec = (numCols - ((((fmWidth * (numCols + 1)) - ((r.x + r.width) + fmWidth)) / fmWidth))); int sr = getRow(sPos); int c = getCol(sPos); er--; ec--;// System.out.println(sr + "," + c + "," + er + "," + ec); workR.setBounds(sr,c,ec,er); int rows = er - sr; int cols = 0; int lr = workR.x; int lc = 0; lr = sPos; while (rows-- >= 0) { cols = ec - c; lc = lr; while (cols-- >= 0) { screen[lc++].drawChar(g2); } lr += numCols; } }
|
protected void paintComponent2(Graphics2D g2) { Rectangle r = g2.getClipBounds(); g2.setColor(colorBg);// System.out.println("PaintComponent " + r); g2.fillRect(r.x,r.y,r.width,r.height); int sPos = getRowColFromPoint(r.x, r.y); // fix me here int er = (numRows - ((((fmHeight * (numRows + 1)) - ((r.y + r.height) + fmHeight)) / fmHeight))); int ec = (numCols - ((((fmWidth * (numCols + 1)) - ((r.x + r.width) + fmWidth)) / fmWidth))); int sr = getRow(sPos); int c = getCol(sPos); er--; ec--;// System.out.println(sr + "," + c + "," + er + "," + ec); workR.setBounds(sr,c,ec,er); int rows = er - sr; int cols = 0; int lr = workR.x; int lc = 0; lr = sPos; while (rows-- >= 0) { cols = ec - c; lc = lr; while (cols-- >= 0) { screen[lc++].drawChar(g2); } lr += numCols; } }
| 8,359
|
protected synchronized void paintComponent2(Graphics2D g2) { Rectangle r = g2.getClipBounds(); g2.setColor(colorBg);// System.out.println("PaintComponent " + r); g2.fillRect(r.x,r.y,r.width,r.height); int sPos = getRowColFromPoint(r.x, r.y); // fix me here int er = (numRows - ((((fmHeight * (numRows + 1)) - ((r.y + r.height) + fmHeight)) / fmHeight))); int ec = (numCols - ((((fmWidth * (numCols + 1)) - ((r.x + r.width) + fmWidth)) / fmWidth))); int sr = getRow(sPos); int c = getCol(sPos); er--; ec--;// System.out.println(sr + "," + c + "," + er + "," + ec); workR.setBounds(sr,c,ec,er); int rows = er - sr; int cols = 0; int lr = workR.x; int lc = 0; lr = sPos; while (rows-- >= 0) { cols = ec - c; lc = lr; while (cols-- >= 0) { screen[lc++].drawChar(g2); } lr += numCols; } }
|
protected synchronized void paintComponent2(Graphics2D g2) { Rectangle r = g2.getClipBounds(); g2.setColor(colorBg);// System.out.println("PaintComponent " + r); g2.fillRect(r.x,r.y,r.width,r.height); int sPos = getRowColFromPoint(r.x, r.y); // fix me here int er = (numRows - ((((fmHeight * (numRows + 1)) - ((r.y + r.height) + fmHeight)) / fmHeight))); int ec = (numCols - ((((fmWidth * (numCols + 1)) - ((r.x + r.width) + fmWidth)) / fmWidth))); int sr = getRow(sPos); int c = getCol(sPos); er--; ec--;// System.out.println(sr + "," + c + "," + er + "," + ec); workR.setBounds(sr,c,ec,er); int rows = er - sr; int cols = 0; int lr = workR.x; int lc = 0; lr = sPos; while (rows-- >= 0) { cols = ec - c; lc = lr; while (cols-- >= 0) { if (lc >= 0 && lc < lenScreen) screen[lc++].drawChar(g2); } lr += numCols; } }
| 8,360
|
protected void paintComponent3(Graphics g) {// System.out.println("paint from screen"); Graphics2D g2 = (Graphics2D)g;// Rectangle r = g.getClipBounds(); g2.setColor(colorBg); g2.fillRect(0,0,gui.getWidth(),gui.getHeight()); bi.drawImageBuffer(g2);// g2.drawImage(bi.getImageBuffer(),null,0,0); }
|
protected void paintComponent3(Graphics g) {// System.out.println("paint from screen"); Graphics2D g2 = (Graphics2D)g;// Rectangle r = g.getClipBounds(); g2.setColor(colorBg); g2.fillRect(0,0,gui.getWidth(),gui.getHeight()); bi.drawImageBuffer(g2);// g2.drawImage(bi.getImageBuffer(),null,0,0); }
| 8,361
|
public void sendKeys(String text) {// if (text == null) {// return;// } if (isStatusErrorCode() && !resetRequired) { resetError();// if (!cursorActive)// setCursorOn(); } if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { simulateMnemonic(getMnemonicValue(text)); } else { if (isStatusErrorCode()) { Toolkit.getDefaultToolkit().beep(); return; } keysBuffered = true; setKBIndicatorOn(); if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { if (bufferedKeys != null) { text = bufferedKeys + text; }// if (text.length() == 0) { keysBuffered = false; setKBIndicatorOff();// } bufferedKeys = null; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) {// setCursorOff2(); setCursorActive(false); simulateKeyStroke(text.charAt(0)); setCursorActive(true);// setCursorOn2();// System.out.println(" text one"); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false;// setCursorOff2(); setCursorActive(false); while (!done) {// while (strokenizer.hasMoreKeyStrokes() && !keyboardLocked &&// !isStatusErrorCode() && !done) { if (strokenizer.hasMoreKeyStrokes()) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) {// setCursorOn();// if (!keysBuffered) {// System.out.println(" s two" + s);// setCursorOn();// }// try { new Thread().sleep(400);} catch (InterruptedException ie) {} simulateKeyStroke(s.charAt(0));// System.out.println(" s two " + s + " " + cursorActive);// if (cursorActive && !keysBuffered) {// System.out.println(" s two" + s);// setCursorOn();// } } else { if (s != null) { simulateMnemonic(getMnemonicValue(s));// if (!cursorActive && !keysBuffered) {// System.out.println(" m one");// setCursorOn();// } } else System.out.println(" send keys mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; setKBIndicatorOn(); } done = true; } } else {// setCursorActive(true);// setCursorOn(); done = true; } } setCursorActive(true); } } }
|
public void sendKeys(String text) {// if (text == null) {// return;// } if (isStatusErrorCode() && !resetRequired) { resetError();// if (!cursorActive)// setCursorOn(); } if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { simulateMnemonic(getMnemonicValue(text)); } else { if (isStatusErrorCode()) { Toolkit.getDefaultToolkit().beep(); return; } keysBuffered = true; setKBIndicatorOn(); if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { if (bufferedKeys != null) { text = bufferedKeys + text; }// if (text.length() == 0) { keysBuffered = false; setKBIndicatorOff();// } bufferedKeys = null; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) {// setCursorOff2(); setCursorActive(false); simulateKeyStroke(text.charAt(0)); setCursorActive(true);// setCursorOn2();// System.out.println(" text one"); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false;// setCursorOff2(); setCursorActive(false); while (!done) {// while (strokenizer.hasMoreKeyStrokes() && !keyboardLocked &&// !isStatusErrorCode() && !done) { if (strokenizer.hasMoreKeyStrokes()) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) {// setCursorOn();// if (!keysBuffered) {// System.out.println(" s two" + s);// setCursorOn();// }// try { new Thread().sleep(400);} catch (InterruptedException ie) {} simulateKeyStroke(s.charAt(0));// System.out.println(" s two " + s + " " + cursorActive);// if (cursorActive && !keysBuffered) {// System.out.println(" s two" + s);// setCursorOn();// } } else { if (s != null) { simulateMnemonic(getMnemonicValue(s));// if (!cursorActive && !keysBuffered) {// System.out.println(" m one");// setCursorOn();// } } else System.out.println(" send keys mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; setKBIndicatorOn(); } done = true; } } else {// setCursorActive(true);// setCursorOn(); done = true; } } setCursorActive(true); } } }
| 8,362
|
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) - (numCols + 1); 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); return end; }
|
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); 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); return end; }
| 8,364
|
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) - (numCols + 1); 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); return end; }
|
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) - (numCols + 1); 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); return end; }
| 8,365
|
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) - (numCols + 1); 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); return end; }
|
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) - (numCols + 1); 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); return end; }
| 8,366
|
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) - (numCols + 1); start.setLocation(screen[pos].x,screen[pos].y); return start; }
|
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; }
| 8,367
|
protected synchronized void updateImage(int x, int y , int width, int height) { if (gg2d == null) { gg2d = (Graphics2D)gui.getGraphics();// System.out.println("was null"); } if (bi == null || gg2d == null) return; g2d.setClip(x,y,width,height); if (!cursorActive && x + width <= bi.getWidth(null) && y + height <= (bi.getHeight(null) - fmWidth)) { 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); } }
|
protected synchronized void updateImage(int x, int y , int width, int height) { if (gg2d == null) { gg2d = (Graphics2D)gui.getGraphics();// System.out.println("was null"); } if (bi == null || gg2d == null) return; g2d.setClip(x,y,width,height); if (!cursorActive && x + width <= bi.getWidth(null) && y + height <= (bi.getHeight(null) - fmWidth)) { 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); } }
| 8,369
|
private void centerMe() { pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
|
private void centerMe() { pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
| 8,370
|
private void centerMe() { pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
|
private void centerMe() { pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
| 8,371
|
private void centerMe() { pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
|
private void centerMe() { pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
| 8,372
|
private void centerMe() { pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
|
private void centerMe() { pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); }
| 8,373
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
| 8,374
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
| 8,375
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
| 8,376
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
| 8,377
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); mainPanel.add(configPanel, BorderLayout.NORTH); optionsPanel.add(optDone); optionsPanel.add(optCancel); mainPanel.add(optionsPanel, BorderLayout.SOUTH); setProperties(); } centerMe(); }
| 8,378
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { getContentPane().add(mainPanel); } centerMe(); }
| 8,379
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); if (loadConfig(null)) { }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); if (loadConfig(null)) { }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); if (loadConfig(null)) { centerMe(); }
| 8,380
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } setProperties(); }
| 8,381
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); }
|
void jbInit() throws Exception { setTitle(LangTool.getString("em.configTitle")); mainPanel.setLayout(borderLayout1); labelHost.setText(LangTool.getString("em.labelHost")); fieldHost.setColumns(20); labelPort.setText(LangTool.getString("em.labelPort")); fieldPort.setColumns(5); labelFrom.setText(LangTool.getString("em.labelFrom")); fieldFrom.setColumns(20); optDone.setText(LangTool.getString("em.optDone")); optDone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); } centerMe(); } }); optCancel.setText(LangTool.getString("em.optCancelLabel")); optCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); } centerMe(); } }); labelFileName.setText(LangTool.getString("em.labelFileName")); fieldFileName.setText("tn5250j.txt"); fieldFileName.setColumns(20); optionsPanel.add(optDone, null); optionsPanel.add(optCancel, null); getContentPane().add(mainPanel); mainPanel.add(configPanel, BorderLayout.CENTER); configPanel.add(labelHost, null); mainPanel.add(optionsPanel, BorderLayout.SOUTH); configPanel.add(fieldHost, null); configPanel.add(labelPort, null); configPanel.add(fieldPort, null); configPanel.add(labelFrom, null); configPanel.add(fieldFrom, null); configPanel.add(labelFileName, null); configPanel.add(fieldFileName, null); configPanel.setLayout(alignLayout); if (loadConfig(null)) { setProperties(); } centerMe(); } centerMe(); }
| 8,382
|
public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); }
|
public void actionPerformed(ActionEvent e) { optDone_actionPerformed(e); }
| 8,383
|
public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); }
|
public void actionPerformed(ActionEvent e) { optCancel_actionPerformed(e); }
| 8,384
|
private boolean loadConfig(String name) throws Exception { SMTPProperties = ConfigureFactory.getInstance().getProperties("smtp", smtpFileName); if (SMTPProperties.size() > 0) return true; else return false; }
|
private boolean loadConfig(String name) throws Exception { SMTPProperties = ConfigureFactory.getInstance().getProperties("smtp", smtpFileName); if (SMTPProperties.size() > 0) return true; else return false; }
| 8,385
|
private boolean loadConfig(String name) throws Exception { SMTPProperties = ConfigureFactory.getInstance().getProperties("smtp", smtpFileName); if (SMTPProperties.size() > 0) return true; else return false; }
|
private boolean loadConfig(String name) throws Exception { SMTPProperties = ConfigureFactory.getInstance().getProperties("smtp", smtpFileName); if (SMTPProperties.size() > 0) return true; else return false; }
| 8,386
|
void optCancel_actionPerformed(ActionEvent e) { this.setVisible(false); }
|
void optCancel_actionPerformed(ActionEvent e) { this.setVisible(false); }
| 8,387
|
void optCancel_actionPerformed(ActionEvent e) { this.setVisible(false); }
|
void optCancel_actionPerformed(ActionEvent e) { this.setVisible(false); }
| 8,388
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName",fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName",fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
| 8,389
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName",fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName", fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
| 8,390
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName",fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName",fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
| 8,391
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName",fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName",fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
| 8,392
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName",fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
|
void optDone_actionPerformed(ActionEvent e) { SMTPProperties.setProperty("mail.smtp.host",fieldHost.getText()); SMTPProperties.setProperty("mail.smtp.port",fieldPort.getText()); SMTPProperties.setProperty("mail.smtp.from",fieldFrom.getText()); // file name SMTPProperties.setProperty("fileName",fieldFileName.getText()); for (Enumeration x = SMTPProperties.propertyNames();x.hasMoreElements();) System.out.println(SMTPProperties.get(x.nextElement())); ConfigureFactory.getInstance().saveSettings("smtp", smtpFileName, "------ SMTP Defaults --------"); this.setVisible(false); }
| 8,393
|
private void setProperties() { // mail.smtp.host= Fill in the host name or ip address of your SMTP // mail server. // // mail.smtp.port= Fill in the port to use to connect // // mail.smtp.from= This is the e-mail address from. For example I would // place kjpou@hotmail.com here as follows: // // mail.smtp.from=kjpou@hotmail.com fieldHost.setText(SMTPProperties.getProperty("mail.smtp.host")); fieldPort.setText(SMTPProperties.getProperty("mail.smtp.port")); fieldFrom.setText(SMTPProperties.getProperty("mail.smtp.from")); // file name fieldFileName.setText(SMTPProperties.getProperty("fileName")); }
|
private void setProperties() { // mail.smtp.host= Fill in the host name or ip address of your SMTP // mail server. // // mail.smtp.port= Fill in the port to use to connect // // mail.smtp.from= This is the e-mail address from. For example I would // place kjpou@hotmail.com here as follows: // // mail.smtp.from=kjpou@hotmail.com fieldHost.setText(SMTPProperties.getProperty("mail.smtp.host")); fieldPort.setText(SMTPProperties.getProperty("mail.smtp.port")); fieldFrom.setText(SMTPProperties.getProperty("mail.smtp.from")); // file name fieldFileName.setText(SMTPProperties.getProperty("fileName")); }
| 8,394
|
private void setProperties() { // mail.smtp.host= Fill in the host name or ip address of your SMTP // mail server. // // mail.smtp.port= Fill in the port to use to connect // // mail.smtp.from= This is the e-mail address from. For example I would // place kjpou@hotmail.com here as follows: // // mail.smtp.from=kjpou@hotmail.com fieldHost.setText(SMTPProperties.getProperty("mail.smtp.host")); fieldPort.setText(SMTPProperties.getProperty("mail.smtp.port")); fieldFrom.setText(SMTPProperties.getProperty("mail.smtp.from")); // file name fieldFileName.setText(SMTPProperties.getProperty("fileName")); }
|
private void setProperties() { // mail.smtp.host= Fill in the host name or ip address of your SMTP // mail server. // // mail.smtp.port= Fill in the port to use to connect // // mail.smtp.from= This is the e-mail address from. For example I would // place kjpou@hotmail.com here as follows: // // mail.smtp.from=kjpou@hotmail.com fieldHost.setText(SMTPProperties.getProperty("mail.smtp.host")); fieldPort.setText(SMTPProperties.getProperty("mail.smtp.port")); fieldFrom.setText(SMTPProperties.getProperty("mail.smtp.from")); // file name fieldFileName.setText(SMTPProperties.getProperty("fileName")); }
| 8,395
|
private void setProperties() { // mail.smtp.host= Fill in the host name or ip address of your SMTP // mail server. // // mail.smtp.port= Fill in the port to use to connect // // mail.smtp.from= This is the e-mail address from. For example I would // place kjpou@hotmail.com here as follows: // // mail.smtp.from=kjpou@hotmail.com fieldHost.setText(SMTPProperties.getProperty("mail.smtp.host")); fieldPort.setText(SMTPProperties.getProperty("mail.smtp.port")); fieldFrom.setText(SMTPProperties.getProperty("mail.smtp.from")); // file name fieldFileName.setText(SMTPProperties.getProperty("fileName")); }
|
private void setProperties() { // mail.smtp.host= Fill in the host name or ip address of your SMTP // mail server. // // mail.smtp.port= Fill in the port to use to connect // // mail.smtp.from= This is the e-mail address from. For example I would // place kjpou@hotmail.com here as follows: // // mail.smtp.from=kjpou@hotmail.com fieldHost.setText(SMTPProperties.getProperty("mail.smtp.host")); fieldPort.setText(SMTPProperties.getProperty("mail.smtp.port")); fieldFrom.setText(SMTPProperties.getProperty("mail.smtp.from")); // file name fieldFileName.setText(SMTPProperties.getProperty("fileName")); }
| 8,396
|
private void setProperties() { // mail.smtp.host= Fill in the host name or ip address of your SMTP // mail server. // // mail.smtp.port= Fill in the port to use to connect // // mail.smtp.from= This is the e-mail address from. For example I would // place kjpou@hotmail.com here as follows: // // mail.smtp.from=kjpou@hotmail.com fieldHost.setText(SMTPProperties.getProperty("mail.smtp.host")); fieldPort.setText(SMTPProperties.getProperty("mail.smtp.port")); fieldFrom.setText(SMTPProperties.getProperty("mail.smtp.from")); // file name fieldFileName.setText(SMTPProperties.getProperty("fileName")); }
|
private void setProperties() { // mail.smtp.host= Fill in the host name or ip address of your SMTP // mail server. // // mail.smtp.port= Fill in the port to use to connect // // mail.smtp.from= This is the e-mail address from. For example I would // place kjpou@hotmail.com here as follows: // // mail.smtp.from=kjpou@hotmail.com fieldHost.setText(SMTPProperties.getProperty("mail.smtp.host")); fieldPort.setText(SMTPProperties.getProperty("mail.smtp.port")); fieldFrom.setText(SMTPProperties.getProperty("mail.smtp.from")); // file name fieldFileName.setText(SMTPProperties.getProperty("fileName")); }
| 8,397
|
public ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption) { super(); setPrompt(prompt); setMessageType(messageType); setOptionType(optionType, defaultOption); this.defaultOption = defaultOption; }
|
public ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption) { super(); setPrompt(prompt); setMessageType(messageType); setOptionType(optionType, defaultOption); this.defaultOption = defaultOption; }
| 8,400
|
public ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption) { super(); setPrompt(prompt); setMessageType(messageType); setOptionType(optionType, defaultOption); this.defaultOption = defaultOption; }
|
public ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption) { super(); setMessageType(messageType); setOptionType(optionType, defaultOption); this.defaultOption = defaultOption; }
| 8,401
|
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value and valueMap is a synchronizedMap. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL : value); } return value == NULL ? null : value; }
|
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value and valueMap is a synchronizedMap. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL : value); } return value == NULL ? null : value; }
| 8,402
|
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value and valueMap is a synchronizedMap. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL : value); } return value == NULL ? null : value; }
|
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value and valueMap is a synchronizedMap. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL : value); } return value == NULL ? null : value; }
| 8,403
|
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value and valueMap is a synchronizedMap. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL : value); } return value == NULL ? null : value; }
|
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value and valueMap is a synchronizedMap. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL : value); } return value == NULL ? null : value; }
| 8,404
|
public void set(Object value) { // Note that we don't have to synchronize, as only this thread will // ever modify the returned value and valueMap is a synchronizedMap. valueMap.put(Thread.currentThread(), value == null ? NULL : value); }
|
public void set(Object value) { // Note that we don't have to synchronize, as only this thread will // ever modify the returned value and valueMap is a synchronizedMap. valueMap.put(Thread.currentThread(), value == null ? NULL : value); }
| 8,405
|
public Insets getBorderInsets(Component c) { return new Insets(2, 2, 2, 2); }
|
public Insets getBorderInsets(Component c) { return new Insets(2, 2, 2, 2); }
| 8,406
|
public Insets getBorderInsets(Component c) { return new Insets(2, 2, 2, 2); }
|
public Insets getBorderInsets(Component c) { return new Insets(2, 2, 2, 2); }
| 8,407
|
public boolean isBorderOpaque() { return true; }
|
public boolean isBorderOpaque() { return true; }
| 8,408
|
public boolean isBorderOpaque() { return true; }
|
public boolean isBorderOpaque() { return true; }
| 8,409
|
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); AbstractButton b = (AbstractButton) c; if (b.getModel().isPressed()) { g.setColor(darkShadow); g.drawRect(x, y, x + w - 1, y + h - 1); } else { g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 3, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 2); g.setColor(shadow); g.drawLine(x + 1, y + h - 2, x + w - 1, y + h - 2); g.drawLine(x + w - 2, y + 1, x + w - 2, y + h - 2); g.setColor(darkShadow); g.drawLine(x, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y, x + w - 1, y + h - 1); g.setColor(saved); } }
|
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color saved = g.getColor(); AbstractButton b = (AbstractButton) c; if (b.getModel().isPressed()) { g.setColor(darkShadow); g.drawRect(x, y, x + w - 1, y + h - 1); } else { g.setColor(highlight); g.drawLine(x + 1, y + 1, x + w - 3, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + h - 2); g.setColor(shadow); g.drawLine(x + 1, y + h - 2, x + w - 1, y + h - 2); g.drawLine(x + w - 2, y + 1, x + w - 2, y + h - 2); g.setColor(darkShadow); g.drawLine(x, y + h - 1, x + w - 1, y + h - 1); g.drawLine(x + w - 1, y, x + w - 1, y + h - 1); g.setColor(saved); } }
| 8,410
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.