rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
|
---|---|---|
throw new MARSHAL(); | MARSHAL m = new MARSHAL("Inappropriate"); m.minor = Minor.Inappropriate; throw m; | public static Current read(InputStream input) { throw new MARSHAL(); } |
throw new MARSHAL(); | MARSHAL m = new MARSHAL("Inappropriate"); m.minor = Minor.Inappropriate; throw m; | public static void write(OutputStream output, Current value) { throw new MARSHAL(); } |
setCursorActive(true); | protected final void pasteMe(boolean special) { Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard(); Transferable content = cb.getContents(this); try { StringBuffer sb = new StringBuffer((String)content.getTransferData(DataFlavor.stringFlavor)); StringBuffer pd = new StringBuffer(); int r = getRow(lastPos); int nextChar = 0; int nChars = sb.length(); boolean omitLF = false; boolean done = false; screenFields.saveCurrentField(); int lr = getRow(lastPos); int lc = getCol(lastPos); resetDirty(lastPos); while (!done) { if (nextChar >= nChars) { /* EOF */ done = true; break; } pd.setLength(0); boolean eol = false; char c = 0; int i; /* Skip a leftover '\n', if necessary */ if (omitLF && (sb.charAt(nextChar) == '\n')) nextChar++; boolean skipLF = false; omitLF = false; charLoop: for (i = nextChar; i < nChars; i++) { c = sb.charAt(i); if ((c == '\n') || (c == '\r')) { eol = true; break charLoop; } } int startChar = nextChar; nextChar = i; pd.append(sb.substring(startChar, startChar + (i - startChar))); if (eol) { nextChar++; if (c == '\r') { skipLF = true; } } System.out.println("pasted >" + pd + "<"); int col = getCol(lastPos); int t = numCols - col; if (t > pd.length()) t = pd.length(); int p = 0; char pc; boolean setIt; while (t-- > 0) { pc = pd.charAt(p); setIt = true; if (special && (!Character.isLetter(pc) && !Character.isDigit(pc))) setIt = false; if (isInField(r,col) && setIt) { screen[getPos(r,col)].setChar(pc); setDirty(r,col); screenFields.setCurrentFieldMDT(); } p++; if (setIt) col++; } r++; } screenFields.restoreCurrentField(); updateDirty(); goto_XY(lr+1,lc+1); } catch (Throwable exc) { System.err.println(exc); } } |
|
public Collection<FileSystemType> fileSystemTypes() { return Collections.unmodifiableCollection(types.values()); | public synchronized Collection<FileSystemType> fileSystemTypes() { return new ArrayList<FileSystemType>(types.values()); | public Collection<FileSystemType> fileSystemTypes() { return Collections.unmodifiableCollection(types.values()); } |
public FileSystemType getSystemType(String name) { | public synchronized FileSystemType getSystemType(String name) { | public FileSystemType getSystemType(String name) { return types.get(name); } |
protected synchronized void refreshFileSystemTypes() { types.clear(); | protected final void refreshFileSystemTypes() { HashMap<String, FileSystemType> newTypes = new HashMap<String, FileSystemType>(); | protected synchronized void refreshFileSystemTypes() { types.clear(); final Extension[] extensions = typesEP.getExtensions(); for (int i = 0; i < extensions.length; i++) { final Extension ext = extensions[i]; final ConfigurationElement[] elements = ext.getConfigurationElements(); for (int j = 0; j < elements.length; j++) { createType(types, elements[j]); } } } |
createType(types, elements[j]); | createType(newTypes, elements[j]); | protected synchronized void refreshFileSystemTypes() { types.clear(); final Extension[] extensions = typesEP.getExtensions(); for (int i = 0; i < extensions.length; i++) { final Extension ext = extensions[i]; final ConfigurationElement[] elements = ext.getConfigurationElements(); for (int j = 0; j < elements.length; j++) { createType(types, elements[j]); } } } |
synchronized (this) { this.types.clear(); this.types.putAll(newTypes); } | protected synchronized void refreshFileSystemTypes() { types.clear(); final Extension[] extensions = typesEP.getExtensions(); for (int i = 0; i < extensions.length; i++) { final Extension ext = extensions[i]; final ConfigurationElement[] elements = ext.getConfigurationElements(); for (int j = 0; j < elements.length; j++) { createType(types, elements[j]); } } } |
|
sb.append((char)buf[x]); | sb.append(byte2char(buf[x], "cp850")); | private void cvtToPDF() { try { openOutputFile(); // Create the printparameters to be used in the transform of the // input stream PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splfile.getTransformedInputStream(printParms); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); updateStatus("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A:// writeChar(sb.toString()); sb.append((char)buf[x]);// System.out.print(sb);// sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C: writeBuffer(sb.toString()); document.newPage(); sb.setLength(0); break; default: sb.append((char)buf[x]); } } totBytes += read; updateStatus("Bytes read " + totBytes); // // process the data buffer // avail = inStream.available(); } closeOutputFile(); updateStatus("Total bytes converted " + totBytes); if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } } |
sb.append((char)buf[x]); | sb.append(byte2char(buf[x], "cp850")); | private void cvtToText() { java.io.PrintStream dw; try { openOutputFile(); if (ifs.isSelected()) dw = new java.io.PrintStream(ifsfw); else dw = new java.io.PrintStream(fw); // Create an AS400 object. The system name was passed // as the first command line argument. AS400 system = new AS400 (systemName.getText()); String splfName = spooledFile.getText(); int splfNumber = Integer.parseInt(spooledFileNumber.getText()); String _jobName = jobName.getText(); String _jobUser = user.getText(); String _jobNumber = number.getText(); SpooledFile splF = new SpooledFile(system, splfName, splfNumber, _jobName, _jobUser, _jobNumber); PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // get the text (via a transformed input stream) from the spooled file PrintObjectTransformedInputStream inStream = splF.getTransformedInputStream(printParms); // DataInputStream dis = new DataInputStream(inStream); // get the number of available bytes int avail = inStream.available(); byte[] buf = new byte[avail + 1]; int read = 0; int totBytes = 0; StringBuffer sb = new StringBuffer(); updateStatus("Starting Output"); // read the transformed spooled file, creating the jobLog String while (avail > 0) { if (avail > buf.length) { buf = new byte[avail + 1]; } read = inStream.read(buf, 0, avail); for (int x = 0; x < read; x++) { switch (buf[x]) { case 0x0: // 0x00 break; // write line feed to the stream case 0x0A: dw.println(sb.toString().toCharArray()); sb.setLength(0); break; // we will skip the carrage return case 0x0D:// sb.append('\n');// writeChar("\n");// System.out.println(); break; // new page case 0x0C:// writeChar(sb.toString());// dw.write(sb.toString().getBytes()); dw.println(sb.toString().toCharArray()); sb.setLength(0); break; default: sb.append((char)buf[x]); } } totBytes += read; updateStatus("Bytes read " + totBytes); // // process the data buffer // avail = inStream.available(); } if (sb.length() > 0) dw.println(sb.toString().toCharArray()); dw.flush(); dw.close(); updateStatus("Total bytes converted " + totBytes); // if we are to open it afterwards then execute the program with the // text file as a parameter if (openAfter.isSelected()) { // not sure if this works on linux yet but here we go. try { Runtime rt = Runtime.getRuntime(); String[] cmdArray = {editor.getText(),pcPathInfo.getText()}; // We need to probably do some checking here in the future // Process proc = rt.exec(cmdArray); rt.exec(cmdArray); // now we set the field to use external viewer or not if (openAfter.isSelected()) session.getConfiguration().setProperty("useExternal",""); else session.getConfiguration().removeProperty("useExternal"); // now we set the property for external viewer session.getConfiguration().setProperty("externalViewer", editor.getText()); // save it off session.getConfiguration().saveSessionProps(); } catch (Throwable t) { // print a stack trace t.printStackTrace(); // throw up the message error JOptionPane.showMessageDialog(this,t.getMessage(),"error", JOptionPane.ERROR_MESSAGE); } } if (email.isSelected()) emailMe(); } catch (Exception e) { updateStatus("Error: " + e.getMessage ()); System.out.println ("Error: " + e.getMessage ()); } } |
attribs = attribtable; isDelimitedCase = false; | Enumeration keys = attribtable.keys(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); Object value = attribtable.get(key); attribs.put(key,value); } this.isDelimitedCase = false; | public void init (Hashtable attribtable) { attribs = attribtable; isDelimitedCase = false; } |
public void setSize(String value) { attribs.put("size", value); } | public void setSize(int value) { attribs.put("size", Integer.toString(value)); } | public void setSize(String value) { attribs.put("size", value); } |
public void setStep (String value) { attribs.put("step", value); } | public void setStep (int value) { attribs.put("step", Integer.toString(value)); } | public void setStep (String value) { attribs.put("step", value); } |
getDataCube().incrementDimension(fieldAxis); | public boolean setFieldAxis (FieldAxis fieldAxis) { if (!canAddAxisObjToArray(fieldAxis)) return false; hasFieldAxis = false; if (getFieldAxis() != null) { // replace or removal List axisList = getAxes(); axisList.remove(0); if (fieldAxis != null) { axisList.add(0, fieldAxis); //replace the old fieldAxis with the new one hasFieldAxis = true; } } else { //add a fieldAxis where none prev existed. if (fieldAxis != null) { // only if we have something to add getAxes().add(0, fieldAxis); getDataCube().incrementDimension(fieldAxis); // increment dimension hasFieldAxis = true; } } // IF we had an object, update the locators if (fieldAxis != null) { updateChildLocators(fieldAxis, "add"); } updateNotesLocationOrder(); // reset to the current order of the axes // may not be needed, but we do for all cases anyways //array doenst hold a dataformat anymore //each field along the fieldAxis should have dataformat // IF fieldAxis exists if (hasFieldAxis) { setDataFormat(null); } return true; } |
|
getDataCube().reset(); | public boolean setFieldAxis (FieldAxis fieldAxis) { if (!canAddAxisObjToArray(fieldAxis)) return false; hasFieldAxis = false; if (getFieldAxis() != null) { // replace or removal List axisList = getAxes(); axisList.remove(0); if (fieldAxis != null) { axisList.add(0, fieldAxis); //replace the old fieldAxis with the new one hasFieldAxis = true; } } else { //add a fieldAxis where none prev existed. if (fieldAxis != null) { // only if we have something to add getAxes().add(0, fieldAxis); getDataCube().incrementDimension(fieldAxis); // increment dimension hasFieldAxis = true; } } // IF we had an object, update the locators if (fieldAxis != null) { updateChildLocators(fieldAxis, "add"); } updateNotesLocationOrder(); // reset to the current order of the axes // may not be needed, but we do for all cases anyways //array doenst hold a dataformat anymore //each field along the fieldAxis should have dataformat // IF fieldAxis exists if (hasFieldAxis) { setDataFormat(null); } return true; } |
|
public ValueListDelimitedList(List values, String delimiter, String noDataValue, String infiniteValue, String infiniteNegativeValue, String notANumberValue, String overflowValue, String underflowValue ) { if (delimiter == null) { Log.errorln("ERROR: in ValueListDelimitedList() delimiter string can't be null."); System.exit(-1); } setDelimiter(delimiter); setNoData(noDataValue); setNotANumber(notANumberValue); setInfinite(infiniteValue); setInfiniteNegative(infiniteNegativeValue); setUnderflow(underflowValue); setOverflow(overflowValue); | public ValueListDelimitedList (List values) { | public ValueListDelimitedList(List values, String delimiter, String noDataValue, String infiniteValue, String infiniteNegativeValue, String notANumberValue, String overflowValue, String underflowValue ) { if (delimiter == null) { Log.errorln("ERROR: in ValueListDelimitedList() delimiter string can't be null."); System.exit(-1); } setDelimiter(delimiter); setNoData(noDataValue); setNotANumber(notANumberValue); setInfinite(infiniteValue); setInfiniteNegative(infiniteNegativeValue); setUnderflow(underflowValue); setOverflow(overflowValue); setValues(values); } |
public String toString() | public static String toString(float f) | public String toString() { return toString(value); } |
return toString(value); | return VMDouble.toString(f, true); | public String toString() { return toString(value); } |
if (theme == null) | public MetalLookAndFeel() { createDefaultTheme(); } |
|
Thread currentThread = Thread.currentThread(); List heritage = (List) threadMap.get(currentThread); if (heritage == null) { heritage = new ArrayList(); threadMap.put(currentThread, heritage); } heritage.add(this); | public InheritableThreadLocal() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned heritage and threadMap is a synchronizedMap. List heritage = (List) threadMap.get(currentThread); if (heritage == null) { heritage = new ArrayList(); threadMap.put(currentThread, heritage); } heritage.add(this); } |
|
ArrayList heritage = (ArrayList) threadMap.get(parentThread); if (heritage != null) | if (parentThread.locals != null) | static void newChildThread(Thread childThread) { // The currentThread is the parent of the new thread. Thread parentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned heritage and threadMap is a synchronizedMap. ArrayList heritage = (ArrayList) threadMap.get(parentThread); if (heritage != null) { threadMap.put(childThread, heritage.clone()); // Perform the inheritance. Iterator it = heritage.iterator(); int i = heritage.size(); while (--i >= 0) { InheritableThreadLocal local = (InheritableThreadLocal) it.next(); Object parentValue = local.valueMap.get(parentThread); if (parentValue != null) { Object childValue = local.childValue(parentValue == NULL ? null : parentValue); local.valueMap.put(childThread, (childValue == null ? NULL : parentValue)); } } } } |
threadMap.put(childThread, heritage.clone()); Iterator it = heritage.iterator(); int i = heritage.size(); while (--i >= 0) | Iterator keys = parentThread.locals.keySet().iterator(); while (keys.hasNext()) | static void newChildThread(Thread childThread) { // The currentThread is the parent of the new thread. Thread parentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned heritage and threadMap is a synchronizedMap. ArrayList heritage = (ArrayList) threadMap.get(parentThread); if (heritage != null) { threadMap.put(childThread, heritage.clone()); // Perform the inheritance. Iterator it = heritage.iterator(); int i = heritage.size(); while (--i >= 0) { InheritableThreadLocal local = (InheritableThreadLocal) it.next(); Object parentValue = local.valueMap.get(parentThread); if (parentValue != null) { Object childValue = local.childValue(parentValue == NULL ? null : parentValue); local.valueMap.put(childThread, (childValue == null ? NULL : parentValue)); } } } } |
InheritableThreadLocal local = (InheritableThreadLocal) it.next(); Object parentValue = local.valueMap.get(parentThread); if (parentValue != null) | Key key = (Key)keys.next(); if (key.get() instanceof InheritableThreadLocal) | static void newChildThread(Thread childThread) { // The currentThread is the parent of the new thread. Thread parentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned heritage and threadMap is a synchronizedMap. ArrayList heritage = (ArrayList) threadMap.get(parentThread); if (heritage != null) { threadMap.put(childThread, heritage.clone()); // Perform the inheritance. Iterator it = heritage.iterator(); int i = heritage.size(); while (--i >= 0) { InheritableThreadLocal local = (InheritableThreadLocal) it.next(); Object parentValue = local.valueMap.get(parentThread); if (parentValue != null) { Object childValue = local.childValue(parentValue == NULL ? null : parentValue); local.valueMap.put(childThread, (childValue == null ? NULL : parentValue)); } } } } |
local.valueMap.put(childThread, (childValue == null ? NULL : parentValue)); | if (childThread.locals == null) childThread.locals = new WeakHashMap(); childThread.locals.put(key, (childValue == null ? NULL : childValue)); | static void newChildThread(Thread childThread) { // The currentThread is the parent of the new thread. Thread parentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned heritage and threadMap is a synchronizedMap. ArrayList heritage = (ArrayList) threadMap.get(parentThread); if (heritage != null) { threadMap.put(childThread, heritage.clone()); // Perform the inheritance. Iterator it = heritage.iterator(); int i = heritage.size(); while (--i >= 0) { InheritableThreadLocal local = (InheritableThreadLocal) it.next(); Object parentValue = local.valueMap.get(parentThread); if (parentValue != null) { Object childValue = local.childValue(parentValue == NULL ? null : parentValue); local.valueMap.put(childThread, (childValue == null ? NULL : parentValue)); } } } } |
frame.show(); | frame.setVisible(true); | public Screen5250 startSession(String name) { JFrame frame = new JFrame(); String args[] = new String[15]; parseArgs((String) sesprops.get(name), args); Properties fin = convertToProps(args); Session5250 newses = manager.openSession(fin, null, name); SessionGUI newGui = new SessionGUI(newses); frame.getContentPane().add(newGui); frame.setBounds(50, 50, 960, 700); frame.show(); newses.connect(); return newses.getScreen(); } |
if (sesProps.containsKey(org.tn5250j.framework.transport.SSLConstants.SSL_TYPE)) { sslType = (String)sesProps.getProperty(org.tn5250j.framework.transport.SSLConstants.SSL_TYPE); | String sslType = null; if (sesProps.containsKey(TN5250jConstants.SSL_TYPE)) { sslType = (String)sesProps.getProperty(TN5250jConstants.SSL_TYPE); | public void connect() { String proxyPort = "1080"; // default socks proxy port boolean enhanced = false; boolean support132 = false; int port = 23; // default telnet port enhanced = sesProps.containsKey(SESSION_TN_ENHANCED); if (sesProps.containsKey(SESSION_SCREEN_SIZE)) if (((String)sesProps.getProperty(SESSION_SCREEN_SIZE)).equals(SCREEN_SIZE_27X132_STR)) support132 = true; final tnvt vt = new tnvt(this,screen,enhanced,support132); setVT(vt);// vt.setController(this); if (sesProps.containsKey(SESSION_PROXY_PORT)) proxyPort = (String)sesProps.getProperty(SESSION_PROXY_PORT); if (sesProps.containsKey(SESSION_PROXY_HOST)) vt.setProxy((String)sesProps.getProperty(SESSION_PROXY_HOST), proxyPort); if (sesProps.containsKey(org.tn5250j.framework.transport.SSLConstants.SSL_TYPE)) { sslType = (String)sesProps.getProperty(org.tn5250j.framework.transport.SSLConstants.SSL_TYPE); } else { // set default to none sslType = org.tn5250j.framework.transport.SSLConstants.SSL_TYPE_NONE; } vt.setSSLType(sslType); if (sesProps.containsKey(SESSION_CODE_PAGE)) vt.setCodePage((String)sesProps.getProperty(SESSION_CODE_PAGE)); if (sesProps.containsKey(SESSION_DEVICE_NAME)) vt.setDeviceName((String)sesProps.getProperty(SESSION_DEVICE_NAME)); if (sesProps.containsKey(SESSION_HOST_PORT)) { port = Integer.parseInt((String)sesProps.getProperty(SESSION_HOST_PORT)); } else { // set to default 23 of telnet port = 23; } final String ses = (String)sesProps.getProperty(SESSION_HOST); final int portp = port; // lets set this puppy up to connect within its own thread Runnable connectIt = new Runnable() { public void run() { vt.connect(ses,portp); } }; // now lets set it to connect within its own daemon thread // this seems to work better and is more responsive than using // swingutilities's invokelater Thread ct = new Thread(connectIt); ct.setDaemon(true); ct.start(); } |
sslType = org.tn5250j.framework.transport.SSLConstants.SSL_TYPE_NONE; | sslType = TN5250jConstants.SSL_TYPE_NONE; | public void connect() { String proxyPort = "1080"; // default socks proxy port boolean enhanced = false; boolean support132 = false; int port = 23; // default telnet port enhanced = sesProps.containsKey(SESSION_TN_ENHANCED); if (sesProps.containsKey(SESSION_SCREEN_SIZE)) if (((String)sesProps.getProperty(SESSION_SCREEN_SIZE)).equals(SCREEN_SIZE_27X132_STR)) support132 = true; final tnvt vt = new tnvt(this,screen,enhanced,support132); setVT(vt);// vt.setController(this); if (sesProps.containsKey(SESSION_PROXY_PORT)) proxyPort = (String)sesProps.getProperty(SESSION_PROXY_PORT); if (sesProps.containsKey(SESSION_PROXY_HOST)) vt.setProxy((String)sesProps.getProperty(SESSION_PROXY_HOST), proxyPort); if (sesProps.containsKey(org.tn5250j.framework.transport.SSLConstants.SSL_TYPE)) { sslType = (String)sesProps.getProperty(org.tn5250j.framework.transport.SSLConstants.SSL_TYPE); } else { // set default to none sslType = org.tn5250j.framework.transport.SSLConstants.SSL_TYPE_NONE; } vt.setSSLType(sslType); if (sesProps.containsKey(SESSION_CODE_PAGE)) vt.setCodePage((String)sesProps.getProperty(SESSION_CODE_PAGE)); if (sesProps.containsKey(SESSION_DEVICE_NAME)) vt.setDeviceName((String)sesProps.getProperty(SESSION_DEVICE_NAME)); if (sesProps.containsKey(SESSION_HOST_PORT)) { port = Integer.parseInt((String)sesProps.getProperty(SESSION_HOST_PORT)); } else { // set to default 23 of telnet port = 23; } final String ses = (String)sesProps.getProperty(SESSION_HOST); final int portp = port; // lets set this puppy up to connect within its own thread Runnable connectIt = new Runnable() { public void run() { vt.connect(ses,portp); } }; // now lets set it to connect within its own daemon thread // this seems to work better and is more responsive than using // swingutilities's invokelater Thread ct = new Thread(connectIt); ct.setDaemon(true); ct.start(); } |
return null; | String[][] info = { {"host","text","Hostname or IP Address of Host"}, {"-p","int","IP Port to connect to"}, {"width","int","Width of Applet"}, {"height","int","Height of Applet"}, {"-dn","text","Screen Device Name"}, {"-sslType","text","Type of SSL connection (NONE | SSLv2 | TLS)"} }; return info; | public String[][] getParameterInfo() { return null; } |
Session s = manager.openSession(sesProps,"","Test Applet"); | Session s = manager.openSession(sesProps,"",sessionName); | private void jbInit() throws Exception { this.setSize(new Dimension(400,300)); Properties sesProps = new Properties(); // Start loading properties - Host must exist sesProps.put(SESSION_HOST,getParameter("host")); if (isSpecified("-e")) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p")) { sesProps.put(SESSION_HOST_PORT,getParameter("-p")); }// if (isSpecified("-f",args))// propFileName = getParm("-f",args); if (isSpecified("-cp")) sesProps.put(SESSION_CODE_PAGE ,getParameter("-cp")); if (isSpecified("-gui")) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132")) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // socks proxy host argument if (isSpecified("-sph")) { sesProps.put(SESSION_PROXY_HOST ,getParameter("-sph")); } // socks proxy port argument if (isSpecified("-spp")) sesProps.put(SESSION_PROXY_PORT ,getParameter("-spp")); // check if device name is specified if (isSpecified("-dn")) sesProps.put(SESSION_DEVICE_NAME ,getParameter("-dn")); if (isSpecified("-L")) LangTool.init(parseLocale(getParameter("-L"))); else LangTool.init(); if (isSpecified("-sslType")) { sesProps.put(SSL_TYPE,getParameter("-sslType")); } manager = new SessionManager(); Session s = manager.openSession(sesProps,"","Test Applet"); this.getContentPane().add(s); s.connect(); } |
public void getInts(int memPtr, char[] dst, int dstOfs, int length) { | public void getInts(int memPtr, int[] dst, int dstOfs, int length) { | public void getInts(int memPtr, char[] dst, int dstOfs, int length) { if (dstOfs < 0) { throw new IndexOutOfBoundsException("dstOfs < 0"); } if (length < 0) { throw new IndexOutOfBoundsException("length < 0"); } if (dstOfs + length > dst.length) { throw new IndexOutOfBoundsException("dstOfs + length > dst.length"); } testMemPtr(memPtr, length * 4); Address dstPtr = Unsafe.add(Unsafe.addressOf(dst), (VmArray.DATA_OFFSET * slotSize) + (dstOfs * 4)); Unsafe.copy(Unsafe.add(start, memPtr), dstPtr, length * 4); } |
screen52.setPrehelpState(true); | screen52.setPrehelpState(true,true,false); | public void sendNegResponse2(int ec) { screen52.setPrehelpState(true); baosp.write(0x00); baosp.write(ec); try { writeGDS(1, 0, baosp.toByteArray()); } catch (IOException ioe) { System.out.println(ioe.getMessage()); } baosp.reset(); } |
show(); | setVisible(true); | void jbInit() throws Exception { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); mapper = new KeyMapper(); KeyMapper.init(); keyPanel.setLayout(borderLayout); keyPanel.add(createFunctionsPanel(),BorderLayout.WEST); keyPanel.add(createMappingPanel(),BorderLayout.CENTER); // add the panels to our dialog getContentPane().add(keyPanel,BorderLayout.CENTER); getContentPane().add(options, BorderLayout.SOUTH); // add option buttons to options panel addOptButton(LangTool.getString("key.labelDone","Done"),"DONE",options,true); this.setModal(true); this.setTitle(LangTool.getString("key.title")); // pack it and center it on the screen pack(); 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); // now show the world what we can do show(); } |
workStroke = new KeyStroker(0, false, false, false,false); | workStroke = newKeyStroker(0, false, false, false,false,KeyStroker.KEY_LOCATION_STANDARD); | public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } } |
mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]"); | mappedKeys.put(newKeyStroker(10, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[fldext]"); mappedKeys.put(newKeyStroker(17, false, true, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[enter]"); | public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } } |
mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); | mappedKeys.put(newKeyStroker(8, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[backspace]"); mappedKeys.put(newKeyStroker(9, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[tab]"); mappedKeys.put(newKeyStroker(9, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[backtab]"); mappedKeys.put(newKeyStroker(127, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[delete]"); mappedKeys.put(newKeyStroker(155, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[insert]"); mappedKeys.put(newKeyStroker(19, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[clear]"); mappedKeys.put(newKeyStroker(27, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[reset]"); mappedKeys.put(newKeyStroker(27, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[sysreq]"); | public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } } |
mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); | mappedKeys.put(newKeyStroker(35, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[eof]"); mappedKeys.put(newKeyStroker(36, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[home]"); mappedKeys.put(newKeyStroker(39, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[right]"); mappedKeys.put(newKeyStroker(39, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[nextword]"); mappedKeys.put(newKeyStroker(37, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[left]"); mappedKeys.put(newKeyStroker(37, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[prevword]"); mappedKeys.put(newKeyStroker(38, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[up]"); mappedKeys.put(newKeyStroker(40, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[down]"); mappedKeys.put(newKeyStroker(34, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pgdown]"); mappedKeys.put(newKeyStroker(33, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pgup]"); | public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } } |
mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); | mappedKeys.put(newKeyStroker(96, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad0]"); mappedKeys.put(newKeyStroker(97, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad1]"); mappedKeys.put(newKeyStroker(98, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad2]"); mappedKeys.put(newKeyStroker(99, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad3]"); mappedKeys.put(newKeyStroker(100, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad4]"); mappedKeys.put(newKeyStroker(101, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad5]"); mappedKeys.put(newKeyStroker(102, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad6]"); mappedKeys.put(newKeyStroker(103, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad7]"); mappedKeys.put(newKeyStroker(104, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad8]"); mappedKeys.put(newKeyStroker(105, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[keypad9]"); | public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } } |
mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); | mappedKeys.put(newKeyStroker(109, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[field-]"); mappedKeys.put(newKeyStroker(107, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[field+]"); mappedKeys.put(newKeyStroker(112, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf1]"); mappedKeys.put(newKeyStroker(113, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf2]"); mappedKeys.put(newKeyStroker(114, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf3]"); mappedKeys.put(newKeyStroker(115, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf4]"); mappedKeys.put(newKeyStroker(116, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf5]"); mappedKeys.put(newKeyStroker(117, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf6]"); mappedKeys.put(newKeyStroker(118, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf7]"); mappedKeys.put(newKeyStroker(119, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf8]"); mappedKeys.put(newKeyStroker(120, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf9]"); mappedKeys.put(newKeyStroker(121, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf10]"); mappedKeys.put(newKeyStroker(122, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf11]"); mappedKeys.put(newKeyStroker(123, false, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf12]"); mappedKeys.put(newKeyStroker(112, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf13]"); mappedKeys.put(newKeyStroker(113, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf14]"); mappedKeys.put(newKeyStroker(114, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf15]"); mappedKeys.put(newKeyStroker(115, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf16]"); mappedKeys.put(newKeyStroker(116, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf17]"); mappedKeys.put(newKeyStroker(117, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf18]"); mappedKeys.put(newKeyStroker(118, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf19]"); mappedKeys.put(newKeyStroker(119, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf20]"); mappedKeys.put(newKeyStroker(120, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf21]"); mappedKeys.put(newKeyStroker(121, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf22]"); mappedKeys.put(newKeyStroker(122, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf23]"); mappedKeys.put(newKeyStroker(123, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[pf24]"); mappedKeys.put(newKeyStroker(112, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[help]"); | public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } } |
mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); | mappedKeys.put(newKeyStroker(72, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[hostprint]"); mappedKeys.put(newKeyStroker(67, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[copy]"); mappedKeys.put(newKeyStroker(86, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[paste]"); | public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } } |
mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); | mappedKeys.put(newKeyStroker(39, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[markright]"); mappedKeys.put(newKeyStroker(37, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[markleft]"); mappedKeys.put(newKeyStroker(38, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[markup]"); mappedKeys.put(newKeyStroker(40, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[markdown]"); | public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } } |
mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); | mappedKeys.put(newKeyStroker(155, true, false, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[dupfield]"); mappedKeys.put(newKeyStroker(17, true, true, false, false,KeyStroker.KEY_LOCATION_STANDARD),"[newline]"); mappedKeys.put(newKeyStroker(34, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[jumpnext]"); mappedKeys.put(newKeyStroker(33, false, false, true, false,KeyStroker.KEY_LOCATION_STANDARD),"[jumpprev]"); | public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } } |
mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),keyVal); | mappedKeys.put(newKeyStroker(ke),keyVal); | public final static void setKeyStroke(String which, KeyEvent ke, boolean isAltGr) { if (ke == null) return; Collection v = mappedKeys.values(); Set o = mappedKeys.keySet(); Iterator k = o.iterator(); Iterator i = v.iterator(); while (k.hasNext()) { KeyStroker ks = (KeyStroker)k.next(); String keyVal = (String)i.next(); if (keyVal.equals(which)) { mappedKeys.remove(ks); mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),keyVal); return; } } // if we got here it was a dead key and we need to add it. mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),which); } |
mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),which); | mappedKeys.put(newKeyStroker(ke),which); | public final static void setKeyStroke(String which, KeyEvent ke, boolean isAltGr) { if (ke == null) return; Collection v = mappedKeys.values(); Set o = mappedKeys.keySet(); Iterator k = o.iterator(); Iterator i = v.iterator(); while (k.hasNext()) { KeyStroker ks = (KeyStroker)k.next(); String keyVal = (String)i.next(); if (keyVal.equals(which)) { mappedKeys.remove(ks); mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),keyVal); return; } } // if we got here it was a dead key and we need to add it. mappedKeys.put(new KeyStroker(ke.getKeyCode(), ke.isShiftDown(), ke.isControlDown(), ke.isAltDown(), isAltGr),which); } |
static public double distance(double x1, double y1, double x2, double y2) | public static double distance(double x1, double y1, double x2, double y2) | static public double distance(double x1, double y1, double x2, double y2) { return Math.sqrt(distanceSq(x1, y1, x2, y2)); } |
public boolean equals(Object obj) | public final boolean equals(Object obj) | public boolean equals(Object obj) { if (obj instanceof QName) { QName qname = (QName) obj; return qname.getLocalPart().equals(localPart) && qname.getNamespaceURI().equals(namespaceURI); } return false; } |
{ StringBuffer buf = new StringBuffer(); buf.append('{'); buf.append(namespaceURI); buf.append('}'); buf.append(localPart); hashCode = buf.toString().hashCode(); } | hashCode = localPart.hashCode() ^ namespaceURI.hashCode(); | public final int hashCode() { if (hashCode == -1) { StringBuffer buf = new StringBuffer(); buf.append('{'); buf.append(namespaceURI); buf.append('}'); buf.append(localPart); hashCode = buf.toString().hashCode(); } return hashCode; } |
public String toString() | public synchronized String toString() | public String toString() { return qName; } |
if (qName == null) { StringBuffer buf = new StringBuffer(); if (namespaceURI.length() > 0) { buf.append('{'); buf.append(namespaceURI); buf.append('}'); } if (prefix.length() > 0) { buf.append(prefix); buf.append(':'); } buf.append(localPart); qName = buf.toString(); } | public String toString() { return qName; } |
|
session.doConnections(); | session.startNewSession(); | public void actionPerformed(ActionEvent e) { session.doConnections(); } |
keyPad.repaint(); | protected void paintComponent(Graphics g) { //log.info("paint from screen"); if (bi == null) { checkOffScreenImage(); }// screen.paintComponent3(g); Graphics2D g2 = (Graphics2D) g; // Rectangle r = g.getClipBounds(); g2.setColor(bi.colorBg); g2.fillRect(0, 0, getWidth(), getHeight()); bi.drawImageBuffer(g2); if (rubberband.isAreaSelected() && !rubberband.isDragging()) { rubberband.erase(); rubberband.draw(); } keyPad.repaint(); } |
|
throw new BAD_OPERATION("NameValuePair expected"); | BAD_OPERATION bad = new BAD_OPERATION("NameValuePair expected"); bad.minor = Minor.Any; throw bad; | public static NameValuePair extract(Any a) { try { return ((NameValuePairHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { throw new BAD_OPERATION("NameValuePair expected"); } } |
try { Thread.sleep(20000); } catch (InterruptedException ex1) { } | protected PointerInterpreter createInterpreter() { try { initPointer(); // bring mouse into stable state } catch (DeviceException ex) { log.error("Cannot initialize pointer", ex); return null; } PointerInterpreter i = new MouseInterpreter(); if (i.probe(this)) { log.info("Found " + i.getName()); return i; } else { // here goes the tablet stuff return null; } } |
|
log.info("Starting " + dev.getId()); | log.debug("Starting " + dev.getId()); | protected synchronized void startDevice() throws DriverException { final Device dev = getDevice(); log.info("Starting " + dev.getId()); this.channel = getChannel(); this.interpreter = createInterpreter(); try { setRate(80); } catch (DeviceException ex) { log.error("Cannot set default rate", ex); } // start the deamon anyway, so we can register a mouse later daemon = new PointerDaemon(dev.getId() + "-daemon"); daemon.start(); dev.registerAPI(PointerAPI.class, this); } |
public String[] parse(String[] inArgs) | public synchronized void parse(String[] inArgs, FileArgumentCallback files) | public String[] parse(String[] inArgs) { final ArrayList fileResult = new ArrayList(); parse(inArgs, new FileArgumentCallback() { public void notifyFile(String fileArgument) { fileResult.add(fileArgument); } }); return (String[]) fileResult.toArray(new String[0]); } |
final ArrayList fileResult = new ArrayList(); parse(inArgs, new FileArgumentCallback() { public void notifyFile(String fileArgument) | try | public String[] parse(String[] inArgs) { final ArrayList fileResult = new ArrayList(); parse(inArgs, new FileArgumentCallback() { public void notifyFile(String fileArgument) { fileResult.add(fileArgument); } }); return (String[]) fileResult.toArray(new String[0]); } |
fileResult.add(fileArgument); | args = inArgs; for (currentIndex = 0; currentIndex < args.length; ++currentIndex) { if (args[currentIndex].length() == 0 || args[currentIndex].charAt(0) != '-' || "-".equals(args[currentIndex])) { files.notifyFile(args[currentIndex]); continue; } if ("--".equals(args[currentIndex])) break; if (args[currentIndex].charAt(1) == '-') handleLongOption(args[currentIndex], 2); else if (longOnly) handleLongOption(args[currentIndex], 1); else handleShortOptions(args[currentIndex]); } for (++currentIndex; currentIndex < args.length; ++currentIndex) files.notifyFile(args[currentIndex]); validate(); | public String[] parse(String[] inArgs) { final ArrayList fileResult = new ArrayList(); parse(inArgs, new FileArgumentCallback() { public void notifyFile(String fileArgument) { fileResult.add(fileArgument); } }); return (String[]) fileResult.toArray(new String[0]); } |
}); return (String[]) fileResult.toArray(new String[0]); | catch (OptionException err) { System.err.println(programName + ": " + err.getMessage()); String fmt; if (longOnly) fmt = Messages.getString("Parser.TryHelpShort"); else fmt = Messages.getString("Parser.TryHelpLong"); String msg = MessageFormat.format(fmt, new Object[] { programName }); System.err.println(programName + ": " + msg); System.exit(1); } | public String[] parse(String[] inArgs) { final ArrayList fileResult = new ArrayList(); parse(inArgs, new FileArgumentCallback() { public void notifyFile(String fileArgument) { fileResult.add(fileArgument); } }); return (String[]) fileResult.toArray(new String[0]); } |
else { if (isRootPaneCheckingEnabled()) throw new Error("rootPaneChecking is enabled - adding components " + "disallowed."); getContentPane().add(comp,constraints,index); } | protected void addImpl(Component comp, Object constraints, int index) { super.addImpl(comp, constraints, index); } |
|
initStageDone = true; | protected void frameInit() { super.setLayout(new BorderLayout(1, 1)); enableEvents(AWTEvent.WINDOW_EVENT_MASK); getRootPane(); // will do set/create } |
|
if (comp==rootPane) super.remove(rootPane); else | public void remove(Component comp) { getContentPane().remove(comp); } |
|
throw new IllegalArgumentException("operation = " + operation); | throw new IllegalArgumentException("defaultCloseOperation must be EXIT_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or DO_NOTHING_ON_CLOSE"); | public void setDefaultCloseOperation(int operation) { SecurityManager sm = System.getSecurityManager(); if (sm != null && operation == EXIT_ON_CLOSE) sm.checkExit(0); if (operation != EXIT_ON_CLOSE && operation != DISPOSE_ON_CLOSE && operation != HIDE_ON_CLOSE && operation != DO_NOTHING_ON_CLOSE) throw new IllegalArgumentException("operation = " + operation); close_action = operation; } |
if (initStageDone) { if (isRootPaneCheckingEnabled()) throw new Error("Cannot set layout. Use getContentPane().setLayout()" + " instead."); getContentPane().setLayout(manager); } else | public void setLayout(LayoutManager manager) { super.setLayout(manager); } |
|
if (d < 0) throw new IllegalArgumentException("Invalid delay: " + d); | public void setDelay(int d) { delay = d; } |
|
if (i < 0) throw new IllegalArgumentException("Invalid initial delay: " + i); | public void setInitialDelay(int i) { initialDelay = i; } |
|
if (t != null) { try { int pos = t.getCaret().getDot(); if (pos < t.getDocument().getEndPosition().getOffset()) { t.getDocument().remove(t.getCaret().getDot(), 1); } } catch (BadLocationException e) { } } | try { Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPosition(); int y = p.y; while (y == p.y && cur > 0) y = t.modelToView(--cur).getLocation().y; if (cur != 0) cur++; t.setCaretPosition(cur); } catch (BadLocationException ble) { } | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getCaret().getDot(); if (pos < t.getDocument().getEndPosition().getOffset()) { t.getDocument().remove(t.getCaret().getDot(), 1); } } catch (BadLocationException e) { // FIXME: we're not authorized to throw this.. swallow it? } } } |
if (t != null) { try { int pos = t.getCaret().getDot(); if (pos > t.getDocument().getStartPosition().getOffset()) { t.getDocument().remove(pos - 1, 1); t.getCaret().setDot(pos - 1); } } catch (BadLocationException e) { } } | try { Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPosition(); int y = p.y; int length = t.getDocument().getLength(); while (y == p.y && cur < length) y = t.modelToView(++cur).getLocation().y; if (cur != length) cur--; t.setCaretPosition(cur); } catch (BadLocationException ble) { } | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getCaret().getDot(); if (pos > t.getDocument().getStartPosition().getOffset()) { t.getDocument().remove(pos - 1, 1); t.getCaret().setDot(pos - 1); } } catch (BadLocationException e) { // FIXME: we're not authorized to throw this.. swallow it? } } } |
t.getCaret().setDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset())); | try { int pos = t.getCaret().getDot(); if (pos < t.getDocument().getEndPosition().getOffset()) { t.getDocument().remove(t.getCaret().getDot(), 1); } } catch (BadLocationException e) { } | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().setDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset())); } } |
t.getCaret().setDot(Math.min(t.getCaret().getDot() + 1, t.getDocument().getEndPosition().getOffset())); | try { int pos = t.getCaret().getDot(); if (pos > t.getDocument().getStartPosition().getOffset()) { t.getDocument().remove(pos - 1, 1); t.getCaret().setDot(pos - 1); } } catch (BadLocationException e) { } | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().setDot(Math.min(t.getCaret().getDot() + 1, t.getDocument().getEndPosition().getOffset())); } } |
JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().moveDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset())); } | JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().setDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset())); } | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().moveDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset())); } } |
t.getCaret().moveDot(Math.min(t.getCaret().getDot() + 1, t.getDocument().getEndPosition().getOffset())); | t.getCaret().setDot(Math.min(t.getCaret().getDot() + 1, t.getDocument().getEndPosition().getOffset())); | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().moveDot(Math.min(t.getCaret().getDot() + 1, t.getDocument().getEndPosition().getOffset())); } } |
MyFileChooser pcFileChooser = new MyFileChooser(workingDir); | TN5250jFileChooser pcFileChooser = new TN5250jFileChooser(workingDir); | private void getPCFile() { String workingDir = System.getProperty("user.dir"); MyFileChooser pcFileChooser = new MyFileChooser(workingDir); XTFRFileFilter pngFilter = new XTFRFileFilter("png", "Portable Network Graphics"); pcFileChooser.setFileFilter(pngFilter); int ret = pcFileChooser.showSaveDialog(new JFrame()); // check to see if something was actually chosen if (ret == JFileChooser.APPROVE_OPTION) { File file; try { if (!pcFileChooser.getSelectedFile().getCanonicalPath().endsWith(".png")) file = new File(pcFileChooser.getSelectedFile().getCanonicalPath() + ".png"); else file = pcFileChooser.getSelectedFile(); EncodeComponent.encode(EncodeComponent.PNG,session, file); } catch (Exception e) { System.out.println("Error generating PNG exception caught: " + e); } } } |
view = new HTMLTableView(element); | view = new javax.swing.text.html.TableView(element); | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) || tag.equals(HTML.Tag.H1) || tag.equals(HTML.Tag.H2) || tag.equals(HTML.Tag.H3) || tag.equals(HTML.Tag.H4) || tag.equals(HTML.Tag.H5) || tag.equals(HTML.Tag.H6) || tag.equals(HTML.Tag.DT)) view = new ParagraphView(element); else if (tag.equals(HTML.Tag.LI) || tag.equals(HTML.Tag.DL) || tag.equals(HTML.Tag.DD) || tag.equals(HTML.Tag.BODY) || tag.equals(HTML.Tag.HTML) || tag.equals(HTML.Tag.CENTER) || tag.equals(HTML.Tag.DIV) || tag.equals(HTML.Tag.BLOCKQUOTE) || tag.equals(HTML.Tag.PRE)) view = new BlockView(element, View.Y_AXIS); else if (tag.equals(HTML.Tag.IMG)) view = new ImageView(element); // FIXME: Uncomment when the views have been implemented else if (tag.equals(HTML.Tag.CONTENT)) view = new InlineView(element); else if (tag == HTML.Tag.HEAD) view = new NullView(element); else if (tag.equals(HTML.Tag.TABLE)) view = new HTMLTableView(element); else if (tag.equals(HTML.Tag.TD)) view = new ParagraphView(element); /* else if (tag.equals(HTML.Tag.MENU) || tag.equals(HTML.Tag.DIR) || tag.equals(HTML.Tag.UL) || tag.equals(HTML.Tag.OL)) view = new ListView(element); else if (tag.equals(HTML.Tag.HR)) view = new HRuleView(element); else if (tag.equals(HTML.Tag.BR)) view = new BRView(element); else if (tag.equals(HTML.Tag.INPUT) || tag.equals(HTML.Tag.SELECT) || tag.equals(HTML.Tag.TEXTAREA)) view = new FormView(element); else if (tag.equals(HTML.Tag.OBJECT)) view = new ObjectView(element); else if (tag.equals(HTML.Tag.FRAMESET)) view = new FrameSetView(element); else if (tag.equals(HTML.Tag.FRAME)) view = new FrameView(element); */ } if (view == null) { System.err.println("missing tag->view mapping for: " + element); view = new NullView(element); } return view; } |
else if (tag.equals(HTML.Tag.HR)) view = new HRuleView(element); else if (tag.equals(HTML.Tag.BR)) view = new BRView(element); | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) || tag.equals(HTML.Tag.H1) || tag.equals(HTML.Tag.H2) || tag.equals(HTML.Tag.H3) || tag.equals(HTML.Tag.H4) || tag.equals(HTML.Tag.H5) || tag.equals(HTML.Tag.H6) || tag.equals(HTML.Tag.DT)) view = new ParagraphView(element); else if (tag.equals(HTML.Tag.LI) || tag.equals(HTML.Tag.DL) || tag.equals(HTML.Tag.DD) || tag.equals(HTML.Tag.BODY) || tag.equals(HTML.Tag.HTML) || tag.equals(HTML.Tag.CENTER) || tag.equals(HTML.Tag.DIV) || tag.equals(HTML.Tag.BLOCKQUOTE) || tag.equals(HTML.Tag.PRE)) view = new BlockView(element, View.Y_AXIS); else if (tag.equals(HTML.Tag.IMG)) view = new ImageView(element); // FIXME: Uncomment when the views have been implemented else if (tag.equals(HTML.Tag.CONTENT)) view = new InlineView(element); else if (tag == HTML.Tag.HEAD) view = new NullView(element); else if (tag.equals(HTML.Tag.TABLE)) view = new HTMLTableView(element); else if (tag.equals(HTML.Tag.TD)) view = new ParagraphView(element); /* else if (tag.equals(HTML.Tag.MENU) || tag.equals(HTML.Tag.DIR) || tag.equals(HTML.Tag.UL) || tag.equals(HTML.Tag.OL)) view = new ListView(element); else if (tag.equals(HTML.Tag.HR)) view = new HRuleView(element); else if (tag.equals(HTML.Tag.BR)) view = new BRView(element); else if (tag.equals(HTML.Tag.INPUT) || tag.equals(HTML.Tag.SELECT) || tag.equals(HTML.Tag.TEXTAREA)) view = new FormView(element); else if (tag.equals(HTML.Tag.OBJECT)) view = new ObjectView(element); else if (tag.equals(HTML.Tag.FRAMESET)) view = new FrameSetView(element); else if (tag.equals(HTML.Tag.FRAME)) view = new FrameView(element); */ } if (view == null) { System.err.println("missing tag->view mapping for: " + element); view = new NullView(element); } return view; } |
|
else if (tag.equals(HTML.Tag.HR)) view = new HRuleView(element); else if (tag.equals(HTML.Tag.BR)) view = new BRView(element); | public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) || tag.equals(HTML.Tag.H1) || tag.equals(HTML.Tag.H2) || tag.equals(HTML.Tag.H3) || tag.equals(HTML.Tag.H4) || tag.equals(HTML.Tag.H5) || tag.equals(HTML.Tag.H6) || tag.equals(HTML.Tag.DT)) view = new ParagraphView(element); else if (tag.equals(HTML.Tag.LI) || tag.equals(HTML.Tag.DL) || tag.equals(HTML.Tag.DD) || tag.equals(HTML.Tag.BODY) || tag.equals(HTML.Tag.HTML) || tag.equals(HTML.Tag.CENTER) || tag.equals(HTML.Tag.DIV) || tag.equals(HTML.Tag.BLOCKQUOTE) || tag.equals(HTML.Tag.PRE)) view = new BlockView(element, View.Y_AXIS); else if (tag.equals(HTML.Tag.IMG)) view = new ImageView(element); // FIXME: Uncomment when the views have been implemented else if (tag.equals(HTML.Tag.CONTENT)) view = new InlineView(element); else if (tag == HTML.Tag.HEAD) view = new NullView(element); else if (tag.equals(HTML.Tag.TABLE)) view = new HTMLTableView(element); else if (tag.equals(HTML.Tag.TD)) view = new ParagraphView(element); /* else if (tag.equals(HTML.Tag.MENU) || tag.equals(HTML.Tag.DIR) || tag.equals(HTML.Tag.UL) || tag.equals(HTML.Tag.OL)) view = new ListView(element); else if (tag.equals(HTML.Tag.HR)) view = new HRuleView(element); else if (tag.equals(HTML.Tag.BR)) view = new BRView(element); else if (tag.equals(HTML.Tag.INPUT) || tag.equals(HTML.Tag.SELECT) || tag.equals(HTML.Tag.TEXTAREA)) view = new FormView(element); else if (tag.equals(HTML.Tag.OBJECT)) view = new ObjectView(element); else if (tag.equals(HTML.Tag.FRAMESET)) view = new FrameSetView(element); else if (tag.equals(HTML.Tag.FRAME)) view = new FrameView(element); */ } if (view == null) { System.err.println("missing tag->view mapping for: " + element); view = new NullView(element); } return view; } |
|
super(); styleContext = new StyleContext(); styleSheet = new StyleSheet(); styleSheet.importStyleSheet(getClass().getResource(DEFAULT_CSS)); | public HTMLEditorKit() { super(); styleContext = new StyleContext(); styleSheet = new StyleSheet(); styleSheet.importStyleSheet(getClass().getResource(DEFAULT_CSS)); // FIXME: Set inputAttributes with default.css } |
|
parser = new ParserDelegator(); | { parser = new GnuParserDelegator(HTML_401Swing.getInstance()); } | protected Parser getParser() { if (parser == null) parser = new ParserDelegator(); return parser; } |
styleSheet.importStyleSheet(getClass().getResource(DEFAULT_CSS)); | InputStream in = getClass().getResourceAsStream(DEFAULT_CSS); InputStreamReader r = new InputStreamReader(in); styleSheet.loadRules(r, null); r.close(); } catch (IOException ex) { } | public StyleSheet getStyleSheet() { if (styleSheet == null) { styleSheet = new StyleSheet(); styleSheet.importStyleSheet(getClass().getResource(DEFAULT_CSS)); } return styleSheet; } |
ParserCallback pc = ((HTMLDocument) doc).getReader (offset, popDepth, pushDepth, insertTag); | ParserCallback pc = doc.getReader(offset, popDepth, pushDepth, insertTag); | public void insertHTML(HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag insertTag) throws BadLocationException, IOException { Parser parser = getParser(); if (offset < 0 || offset > doc.getLength()) throw new BadLocationException("Bad location", offset); if (parser == null) throw new IOException("Parser is null."); ParserCallback pc = ((HTMLDocument) doc).getReader (offset, popDepth, pushDepth, insertTag); // FIXME: What should ignoreCharSet be set to? // parser.parse inserts html into the buffer parser.parse(new StringReader(html), pc, false); pc.flush(); } |
CssParser cp = new CssParser(); cp.parse(ref, in, false, false); | public void loadRules(Reader in, URL ref) throws IOException { // FIXME: Not implemented. } |
|
public void read(Reader in, Document document, int offset) | public void read(InputStream in, Document document, int offset) | public void read(Reader in, Document document, int offset) throws BadLocationException, IOException { BufferedReader reader = new BufferedReader(in); String line; StringBuffer content = new StringBuffer(); while ((line = reader.readLine()) != null) { content.append(line); content.append("\n"); } document.insertString(offset, content.toString(), SimpleAttributeSet.EMPTY); } |
BufferedReader reader = new BufferedReader(in); String line; StringBuffer content = new StringBuffer(); while ((line = reader.readLine()) != null) { content.append(line); content.append("\n"); } document.insertString(offset, content.toString(), SimpleAttributeSet.EMPTY); | read(new InputStreamReader(in), document, offset); | public void read(Reader in, Document document, int offset) throws BadLocationException, IOException { BufferedReader reader = new BufferedReader(in); String line; StringBuffer content = new StringBuffer(); while ((line = reader.readLine()) != null) { content.append(line); content.append("\n"); } document.insertString(offset, content.toString(), SimpleAttributeSet.EMPTY); } |
public void write(Writer out, Document document, int offset, int len) | public void write(OutputStream out, Document document, int offset, int len) | public void write(Writer out, Document document, int offset, int len) throws BadLocationException, IOException { } |
write(new OutputStreamWriter(out), document, offset, len); | public void write(Writer out, Document document, int offset, int len) throws BadLocationException, IOException { } |
|
File[] value = (File[]) trim.toArray(new File[0]); | File[] value = (File[]) trim.toArray(new File[trim.size()]); | public File[] getFiles(File dir, boolean useFileHiding) { if (dir == null || dir.listFiles() == null) return null; File[] files = dir.listFiles(); if (! useFileHiding) return files; ArrayList trim = new ArrayList(); for (int i = 0; i < files.length; i++) if (! files[i].isHidden()) trim.add(files[i]); File[] value = (File[]) trim.toArray(new File[0]); return value; } |
return new Boolean(f.isDirectory()); | return Boolean.valueOf(f.isDirectory()); | public Boolean isTraversable(File f) { // Tested. A directory where the user has no permission to rwx is still // traversable. (No files are listed when you traverse the directory) // My best guess is that as long as it's a directory, the file is // traversable. return new Boolean(f.isDirectory()); } |
AbstractButton.this.fireStateChanged(); repaint(); | getEventHandler().stateChanged(ev); | public void stateChanged(ChangeEvent ev) { AbstractButton.this.fireStateChanged(); repaint(); } |
actionListener = createActionListener(); changeListener = createChangeListener(); itemListener = createItemListener(); | public AbstractButton() { actionListener = createActionListener(); changeListener = createChangeListener(); itemListener = createItemListener(); horizontalAlignment = CENTER; horizontalTextPosition = TRAILING; verticalAlignment = CENTER; verticalTextPosition = CENTER; borderPainted = true; contentAreaFilled = true; focusPainted = true; setFocusable(true); setAlignmentX(CENTER_ALIGNMENT); setAlignmentY(CENTER_ALIGNMENT); setDisplayedMnemonicIndex(-1); setOpaque(true); text = ""; updateUI(); } |
|
return new ActionListener() { public void actionPerformed(ActionEvent e) { AbstractButton.this.fireActionPerformed(e); } }; | return getEventHandler(); | protected ActionListener createActionListener() { return new ActionListener() { public void actionPerformed(ActionEvent e) { AbstractButton.this.fireActionPerformed(e); } }; } |
return new ButtonChangeListener(); | return getEventHandler(); | protected ChangeListener createChangeListener() { return new ButtonChangeListener(); } |
return new ItemListener() { public void itemStateChanged(ItemEvent e) { AbstractButton.this.fireItemStateChanged(e); } }; | return getEventHandler(); | protected ItemListener createItemListener() { return new ItemListener() { public void itemStateChanged(ItemEvent e) { AbstractButton.this.fireItemStateChanged(e); } }; } |
if (disabeldIcon == null && default_icon instanceof ImageIcon) | if (disabledIcon == null && default_icon instanceof ImageIcon) | public Icon getDisabledIcon() { if (disabeldIcon == null && default_icon instanceof ImageIcon) { Image iconImage = ((ImageIcon) default_icon).getImage(); Image grayImage = GrayFilter.createDisabledImage(iconImage); disabeldIcon = new ImageIcon(grayImage); } return disabeldIcon; } |
disabeldIcon = new ImageIcon(grayImage); | disabledIcon = new ImageIcon(grayImage); | public Icon getDisabledIcon() { if (disabeldIcon == null && default_icon instanceof ImageIcon) { Image iconImage = ((ImageIcon) default_icon).getImage(); Image grayImage = GrayFilter.createDisabledImage(iconImage); disabeldIcon = new ImageIcon(grayImage); } return disabeldIcon; } |
return disabeldIcon; | return disabledIcon; | public Icon getDisabledIcon() { if (disabeldIcon == null && default_icon instanceof ImageIcon) { Image iconImage = ((ImageIcon) default_icon).getImage(); Image grayImage = GrayFilter.createDisabledImage(iconImage); disabeldIcon = new ImageIcon(grayImage); } return disabeldIcon; } |
this.text = text; | setText(text); | protected void init(String text, Icon icon) { // If text is null, we fall back to the empty // string (which is set using AbstractButton's // constructor). // This way the behavior of the JDK is matched. if(text != null) this.text = text; if (icon != null) default_icon = icon; } |
disabeldIcon = d; | if (disabledIcon == d) return; Icon old = disabledIcon; disabledIcon = d; firePropertyChange(DISABLED_ICON_CHANGED_PROPERTY, old, d); | public void setDisabledIcon(Icon d) { disabeldIcon = d; revalidate(); repaint(); } |
if (a != LEFT && a != CENTER && a != RIGHT && a != LEADING && a != TRAILING) throw new IllegalArgumentException("Invalid alignment."); | public void setHorizontalAlignment(int a) { if (horizontalAlignment == a) return; int old = horizontalAlignment; horizontalAlignment = a; firePropertyChange(HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, old, a); revalidate(); repaint(); } |
|
if (t != LEFT && t != CENTER && t != RIGHT && t != LEADING && t != TRAILING) throw new IllegalArgumentException("Invalid alignment."); | public void setHorizontalTextPosition(int t) { if (horizontalTextPosition == t) return; int old = horizontalTextPosition; horizontalTextPosition = t; firePropertyChange(HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, old, t); revalidate(); repaint(); } |
|
itemListener = createItemListener(); | public void setModel(ButtonModel newModel) { if (newModel == model) return; if (model != null) { model.removeActionListener(actionListener); model.removeChangeListener(changeListener); model.removeItemListener(itemListener); } ButtonModel old = model; model = newModel; if (model != null) { model.addActionListener(actionListener); model.addChangeListener(changeListener); model.addItemListener(itemListener); } firePropertyChange(MODEL_CHANGED_PROPERTY, old, model); revalidate(); repaint(); } |
|
setRolloverEnabled(true); | public void setRolloverIcon(Icon r) { if (rolloverIcon == r) return; Icon old = rolloverIcon; rolloverIcon = r; firePropertyChange(ROLLOVER_ICON_CHANGED_PROPERTY, old, rolloverIcon); revalidate(); repaint(); } |
|
setRolloverEnabled(true); | public void setRolloverSelectedIcon(Icon r) { if (rolloverSelectedIcon == r) return; Icon old = rolloverSelectedIcon; rolloverSelectedIcon = r; firePropertyChange(ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, old, r); revalidate(); repaint(); } |
Subsets and Splits