bugged
stringlengths 6
599k
| fixed
stringlengths 10
599k
| __index_level_0__
int64 0
1.13M
|
|---|---|---|
public DatagramSocket(SocketAddress address) throws SocketException { // @classpath-bugfix Security String propVal = (String)AccessController.doPrivileged(new GetPropertyAction("impl.prefix")); if (factory != null) { // @classpath-bugfix Use factory impl = factory.createDatagramSocketImpl(); } else if (propVal == null || propVal.equals("")) impl = new PlainDatagramSocketImpl(); else try { impl = (DatagramSocketImpl) Class.forName("java.net." + propVal + "DatagramSocketImpl") .newInstance(); } catch (Exception e) { System.err.println("Could not instantiate class: java.net." + propVal + "DatagramSocketImpl"); impl = new PlainDatagramSocketImpl(); } if (address != null) bind(address); }
|
public DatagramSocket(SocketAddress address) throws SocketException { // @classpath-bugfix Security String propVal = (String)AccessController.doPrivileged(new GetPropertyAction("impl.prefix")); if (factory != null) { // @classpath-bugfix Use factory impl = factory.createDatagramSocketImpl(); } else if (propVal == null || propVal.equals("")) impl = new PlainDatagramSocketImpl(); else try { impl = (DatagramSocketImpl) Class.forName("java.net." + propVal + "DatagramSocketImpl") .newInstance(); } catch (Exception e) { System.err.println("Could not instantiate class: java.net." + propVal + "DatagramSocketImpl"); impl = new PlainDatagramSocketImpl(); } if (address != null) bind(address); }
| 1,563
|
public DatagramSocket(SocketAddress address) throws SocketException { // @classpath-bugfix Security String propVal = (String)AccessController.doPrivileged(new GetPropertyAction("impl.prefix")); if (factory != null) { // @classpath-bugfix Use factory impl = factory.createDatagramSocketImpl(); } else if (propVal == null || propVal.equals("")) impl = new PlainDatagramSocketImpl(); else try { impl = (DatagramSocketImpl) Class.forName("java.net." + propVal + "DatagramSocketImpl") .newInstance(); } catch (Exception e) { System.err.println("Could not instantiate class: java.net." + propVal + "DatagramSocketImpl"); impl = new PlainDatagramSocketImpl(); } if (address != null) bind(address); }
|
public DatagramSocket(SocketAddress address) throws SocketException { // @classpath-bugfix Security String propVal = (String)AccessController.doPrivileged(new GetPropertyAction("impl.prefix")); if (factory != null) { // @classpath-bugfix Use factory impl = factory.createDatagramSocketImpl(); } else if (propVal == null || propVal.equals("")) impl = new PlainDatagramSocketImpl(); else try { impl = (DatagramSocketImpl) Class.forName("java.net." + propVal + "DatagramSocketImpl") .newInstance(); } catch (Exception e) { System.err.println("Could not instantiate class: java.net." + propVal + "DatagramSocketImpl"); impl = new PlainDatagramSocketImpl(); } if (address != null) bind(address); }
| 1,564
|
public AccessibleJWindow() { super(); // Nothing to do here. }
|
protected AccessibleJWindow() { super(); // Nothing to do here. }
| 1,565
|
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // The root node is just a "structure" node, // but is always the first one. XDF.setXMLAttributes(attrs); // set XML attributes from passed list CurrentStructure = XDF; // current working structure is now the root // structure // if this global option is set in the reader, we use it if(Options.contains("DefaultDataDimensionSize")) { int value = ((Integer) Options.get("DefaultDataDimensionSize")).intValue(); XDF.setDefaultDataArraySize(value); } return CurrentStructure; }
|
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // The root node is just a "structure" node, // but is always the first one. XDF.setXMLAttributes(attrs); // set XML attributes from passed list CurrentStructure = XDF; // current working structure is now the root // structure // if this global option is set in the reader, we use it if(Options.contains("DefaultDataDimensionSize")) { int value = ((Integer) Options.get("DefaultDataDimensionSize")).intValue(); Specification.getInstance().setDefaultDataArraySize(value); } return CurrentStructure; }
| 1,567
|
protected synchronized void create(boolean stream) throws IOException { // @vm-specific no natives //TODO implement me throw new SocketException("Not implemented"); }
|
protected synchronized void create(boolean stream) throws IOException { // @vm-specific no natives //TODO implement me throw new SocketException("Not implemented"); }
| 1,568
|
protected FontMetrics createFontMetrics(Font font) throws IOException { final BDFFont bdfFont = (BDFFont) font; return bdfFont.getFontMetrics(); }
|
protected FontMetrics createFontMetrics(Font font) throws IOException { final BDFFont bdfFont = (BDFFont) font; return bdfFont.getFontMetrics(); }
| 1,570
|
protected TextRenderer createTextRenderer(RenderCache renderCache, Font font) { final BDFFont bdfFont = (BDFFont) font; final TextRenderer renderer = new BDFTextRenderer(bdfFont.getContainer()); log.debug("created TextRenderer for BDF"); return renderer; }
|
protected TextRenderer createTextRenderer(RenderCache renderCache, Font font) { final BDFFont bdfFont = getBDFFont(font); final TextRenderer renderer = new BDFTextRenderer(bdfFont.getContainer()); log.debug("created TextRenderer for BDF"); return renderer; }
| 1,571
|
protected GnuRSAKey(final BigInteger n, final BigInteger e) { super(); this.n = n; this.e = e; }
|
protected GnuRSAKey(int defaultFormat, BigInteger n, BigInteger e) { super(); this.n = n; this.e = e; }
| 1,572
|
public String getFormat() { return null; }
|
public String getFormat() { return KeyPairCodecFactory.getEncodingShortName(defaultFormat); }
| 1,574
|
private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean align = response.header.version.since_inclusive(1, 2); boolean moved_permanently = false; switch (rh.reply_status) { case ReplyHeader.NO_EXCEPTION : NamedValue arg; // Read return value, if set. if (m_result != null) { if (align) { input.align(8); align = false; } m_result.value().read_value(input, m_result.value().type()); } // Read returned parameters, if set. if (m_args != null) for (int i = 0; i < m_args.count(); i++) { try { arg = m_args.item(i); // Both ARG_INOUT and ARG_OUT have this binary flag set. if ((arg.flags() & ARG_OUT.value) != 0) { if (align) { input.align(8); align = false; } arg.value().read_value(input, arg.value().type()); } } catch (Bounds ex) { Unexpected.error(ex); } } break; case ReplyHeader.SYSTEM_EXCEPTION : if (align) { input.align(8); align = false; } SystemException exception = ObjectCreator.readSystemException(input); m_environment.exception(exception); throw exception; case ReplyHeader.USER_EXCEPTION : if (align) { input.align(8); align = false; } input.mark(2000); String uxId = input.read_string(); input.reset(); UserException uex = ObjectCreator.readUserException(uxId, input); if (uex == null) m_environment.exception(new UserException(uxId)); else m_environment.exception(uex); break; case ReplyHeader.LOCATION_FORWARD_PERM : case ReplyHeader.LOCATION_FORWARD : if (response.header.version.since_inclusive(1, 2)) input.align(8); IOR forwarded = new IOR(); try { forwarded._read_no_endian(input); } catch (IOException ex) { throw new MARSHAL(ex + " while reading the forwarding info"); } setIor(forwarded); // Repeat with the forwarded information. p_invoke(); return; default : throw new MARSHAL("Unknow reply status: " + rh.reply_status); } }
|
private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean align = response.header.version.since_inclusive(1, 2); boolean moved_permanently = false; switch (rh.reply_status) { case ReplyHeader.NO_EXCEPTION : NamedValue arg; // Read return value, if set. if (m_result != null) { if (align) { input.align(8); align = false; } m_result.value().read_value(input, m_result.value().type()); } // Read returned parameters, if set. if (m_args != null) for (int i = 0; i < m_args.count(); i++) { try { arg = m_args.item(i); // Both ARG_INOUT and ARG_OUT have this binary flag set. if ((arg.flags() & ARG_OUT.value) != 0) { if (align) { input.align(8); align = false; } arg.value().read_value(input, arg.value().type()); } } catch (Bounds ex) { Unexpected.error(ex); } } break; case ReplyHeader.SYSTEM_EXCEPTION : if (align) { input.align(8); align = false; } SystemException exception = ObjectCreator.readSystemException(input); m_environment.exception(exception); throw exception; case ReplyHeader.USER_EXCEPTION : if (align) { input.align(8); align = false; } String uxId = input.read_string(); input.reset(); UserException uex = ObjectCreator.readUserException(uxId, input); if (uex == null) m_environment.exception(new UserException(uxId)); else m_environment.exception(uex); break; case ReplyHeader.LOCATION_FORWARD_PERM : case ReplyHeader.LOCATION_FORWARD : if (response.header.version.since_inclusive(1, 2)) input.align(8); IOR forwarded = new IOR(); try { forwarded._read_no_endian(input); } catch (IOException ex) { throw new MARSHAL(ex + " while reading the forwarding info"); } setIor(forwarded); // Repeat with the forwarded information. p_invoke(); return; default : throw new MARSHAL("Unknow reply status: " + rh.reply_status); } }
| 1,575
|
private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean align = response.header.version.since_inclusive(1, 2); boolean moved_permanently = false; switch (rh.reply_status) { case ReplyHeader.NO_EXCEPTION : NamedValue arg; // Read return value, if set. if (m_result != null) { if (align) { input.align(8); align = false; } m_result.value().read_value(input, m_result.value().type()); } // Read returned parameters, if set. if (m_args != null) for (int i = 0; i < m_args.count(); i++) { try { arg = m_args.item(i); // Both ARG_INOUT and ARG_OUT have this binary flag set. if ((arg.flags() & ARG_OUT.value) != 0) { if (align) { input.align(8); align = false; } arg.value().read_value(input, arg.value().type()); } } catch (Bounds ex) { Unexpected.error(ex); } } break; case ReplyHeader.SYSTEM_EXCEPTION : if (align) { input.align(8); align = false; } SystemException exception = ObjectCreator.readSystemException(input); m_environment.exception(exception); throw exception; case ReplyHeader.USER_EXCEPTION : if (align) { input.align(8); align = false; } input.mark(2000); String uxId = input.read_string(); input.reset(); UserException uex = ObjectCreator.readUserException(uxId, input); if (uex == null) m_environment.exception(new UserException(uxId)); else m_environment.exception(uex); break; case ReplyHeader.LOCATION_FORWARD_PERM : case ReplyHeader.LOCATION_FORWARD : if (response.header.version.since_inclusive(1, 2)) input.align(8); IOR forwarded = new IOR(); try { forwarded._read_no_endian(input); } catch (IOException ex) { throw new MARSHAL(ex + " while reading the forwarding info"); } setIor(forwarded); // Repeat with the forwarded information. p_invoke(); return; default : throw new MARSHAL("Unknow reply status: " + rh.reply_status); } }
|
private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean align = response.header.version.since_inclusive(1, 2); boolean moved_permanently = false; switch (rh.reply_status) { case ReplyHeader.NO_EXCEPTION : NamedValue arg; // Read return value, if set. if (m_result != null) { if (align) { input.align(8); align = false; } m_result.value().read_value(input, m_result.value().type()); } // Read returned parameters, if set. if (m_args != null) for (int i = 0; i < m_args.count(); i++) { try { arg = m_args.item(i); // Both ARG_INOUT and ARG_OUT have this binary flag set. if ((arg.flags() & ARG_OUT.value) != 0) { if (align) { input.align(8); align = false; } arg.value().read_value(input, arg.value().type()); } } catch (Bounds ex) { Unexpected.error(ex); } } break; case ReplyHeader.SYSTEM_EXCEPTION : if (align) { input.align(8); align = false; } SystemException exception = ObjectCreator.readSystemException(input); m_environment.exception(exception); throw exception; case ReplyHeader.USER_EXCEPTION : if (align) { input.align(8); align = false; } input.mark(2000); String uxId = input.read_string(); input.reset(); UserException uex = ObjectCreator.readUserException(uxId, input); if (uex == null) m_environment.exception(new UserException(uxId)); else m_environment.exception(uex); break; case ReplyHeader.LOCATION_FORWARD_PERM : case ReplyHeader.LOCATION_FORWARD : if (response.header.version.since_inclusive(1, 2)) input.align(8); IOR forwarded = new IOR(); try { forwarded._read_no_endian(input); } catch (IOException ex) { throw new MARSHAL(ex + " while reading the forwarding info"); } setIor(forwarded); // Repeat with the forwarded information. p_invoke(); return; default : throw new MARSHAL("Unknow reply status: " + rh.reply_status); } }
| 1,576
|
private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean align = response.header.version.since_inclusive(1, 2); boolean moved_permanently = false; switch (rh.reply_status) { case ReplyHeader.NO_EXCEPTION : NamedValue arg; // Read return value, if set. if (m_result != null) { if (align) { input.align(8); align = false; } m_result.value().read_value(input, m_result.value().type()); } // Read returned parameters, if set. if (m_args != null) for (int i = 0; i < m_args.count(); i++) { try { arg = m_args.item(i); // Both ARG_INOUT and ARG_OUT have this binary flag set. if ((arg.flags() & ARG_OUT.value) != 0) { if (align) { input.align(8); align = false; } arg.value().read_value(input, arg.value().type()); } } catch (Bounds ex) { Unexpected.error(ex); } } break; case ReplyHeader.SYSTEM_EXCEPTION : if (align) { input.align(8); align = false; } SystemException exception = ObjectCreator.readSystemException(input); m_environment.exception(exception); throw exception; case ReplyHeader.USER_EXCEPTION : if (align) { input.align(8); align = false; } input.mark(2000); String uxId = input.read_string(); input.reset(); UserException uex = ObjectCreator.readUserException(uxId, input); if (uex == null) m_environment.exception(new UserException(uxId)); else m_environment.exception(uex); break; case ReplyHeader.LOCATION_FORWARD_PERM : case ReplyHeader.LOCATION_FORWARD : if (response.header.version.since_inclusive(1, 2)) input.align(8); IOR forwarded = new IOR(); try { forwarded._read_no_endian(input); } catch (IOException ex) { throw new MARSHAL(ex + " while reading the forwarding info"); } setIor(forwarded); // Repeat with the forwarded information. p_invoke(); return; default : throw new MARSHAL("Unknow reply status: " + rh.reply_status); } }
|
private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean align = response.header.version.since_inclusive(1, 2); boolean moved_permanently = false; switch (rh.reply_status) { case ReplyHeader.NO_EXCEPTION : NamedValue arg; // Read return value, if set. if (m_result != null) { if (align) { input.align(8); align = false; } m_result.value().read_value(input, m_result.value().type()); } // Read returned parameters, if set. if (m_args != null) for (int i = 0; i < m_args.count(); i++) { try { arg = m_args.item(i); // Both ARG_INOUT and ARG_OUT have this binary flag set. if ((arg.flags() & ARG_OUT.value) != 0) { if (align) { input.align(8); align = false; } arg.value().read_value(input, arg.value().type()); } } catch (Bounds ex) { Unexpected.error(ex); } } break; case ReplyHeader.SYSTEM_EXCEPTION : if (align) { input.align(8); align = false; } SystemException exception = ObjectCreator.readSystemException(input); m_environment.exception(exception); throw exception; case ReplyHeader.USER_EXCEPTION : if (align) { input.align(8); align = false; } input.mark(2000); String uxId = input.read_string(); input.reset(); exc.insert_Streamable(new streamReadyHolder(input)); if (uex == null) m_environment.exception(new UserException(uxId)); else m_environment.exception(uex); break; case ReplyHeader.LOCATION_FORWARD_PERM : case ReplyHeader.LOCATION_FORWARD : if (response.header.version.since_inclusive(1, 2)) input.align(8); IOR forwarded = new IOR(); try { forwarded._read_no_endian(input); } catch (IOException ex) { throw new MARSHAL(ex + " while reading the forwarding info"); } setIor(forwarded); // Repeat with the forwarded information. p_invoke(); return; default : throw new MARSHAL("Unknow reply status: " + rh.reply_status); } }
| 1,577
|
private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean align = response.header.version.since_inclusive(1, 2); boolean moved_permanently = false; switch (rh.reply_status) { case ReplyHeader.NO_EXCEPTION : NamedValue arg; // Read return value, if set. if (m_result != null) { if (align) { input.align(8); align = false; } m_result.value().read_value(input, m_result.value().type()); } // Read returned parameters, if set. if (m_args != null) for (int i = 0; i < m_args.count(); i++) { try { arg = m_args.item(i); // Both ARG_INOUT and ARG_OUT have this binary flag set. if ((arg.flags() & ARG_OUT.value) != 0) { if (align) { input.align(8); align = false; } arg.value().read_value(input, arg.value().type()); } } catch (Bounds ex) { Unexpected.error(ex); } } break; case ReplyHeader.SYSTEM_EXCEPTION : if (align) { input.align(8); align = false; } SystemException exception = ObjectCreator.readSystemException(input); m_environment.exception(exception); throw exception; case ReplyHeader.USER_EXCEPTION : if (align) { input.align(8); align = false; } input.mark(2000); String uxId = input.read_string(); input.reset(); UserException uex = ObjectCreator.readUserException(uxId, input); if (uex == null) m_environment.exception(new UserException(uxId)); else m_environment.exception(uex); break; case ReplyHeader.LOCATION_FORWARD_PERM : case ReplyHeader.LOCATION_FORWARD : if (response.header.version.since_inclusive(1, 2)) input.align(8); IOR forwarded = new IOR(); try { forwarded._read_no_endian(input); } catch (IOException ex) { throw new MARSHAL(ex + " while reading the forwarding info"); } setIor(forwarded); // Repeat with the forwarded information. p_invoke(); return; default : throw new MARSHAL("Unknow reply status: " + rh.reply_status); } }
|
private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean align = response.header.version.since_inclusive(1, 2); boolean moved_permanently = false; switch (rh.reply_status) { case ReplyHeader.NO_EXCEPTION : NamedValue arg; // Read return value, if set. if (m_result != null) { if (align) { input.align(8); align = false; } m_result.value().read_value(input, m_result.value().type()); } // Read returned parameters, if set. if (m_args != null) for (int i = 0; i < m_args.count(); i++) { try { arg = m_args.item(i); // Both ARG_INOUT and ARG_OUT have this binary flag set. if ((arg.flags() & ARG_OUT.value) != 0) { if (align) { input.align(8); align = false; } arg.value().read_value(input, arg.value().type()); } } catch (Bounds ex) { Unexpected.error(ex); } } break; case ReplyHeader.SYSTEM_EXCEPTION : if (align) { input.align(8); align = false; } SystemException exception = ObjectCreator.readSystemException(input); m_environment.exception(exception); throw exception; case ReplyHeader.USER_EXCEPTION : if (align) { input.align(8); align = false; } input.mark(2000); String uxId = input.read_string(); input.reset(); UserException uex = ObjectCreator.readUserException(uxId, input); if (uex == null) m_environment.exception(new UserException(uxId)); else m_environment.exception(uex); break; case ReplyHeader.LOCATION_FORWARD_PERM : case ReplyHeader.LOCATION_FORWARD : if (response.header.version.since_inclusive(1, 2)) input.align(8); IOR forwarded = new IOR(); try { forwarded._read_no_endian(input); } catch (IOException ex) { throw new MARSHAL(ex + " while reading the forwarding info"); } setIor(forwarded); // Repeat with the forwarded information. p_invoke(); return; default : throw new MARSHAL("Unknow reply status: " + rh.reply_status); } }
| 1,578
|
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { ex1.printStackTrace(); return null; } }
|
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { long pause = PAUSE_INITIAL; if (socket == null) { Open: for (int i = 0; i < PAUSE_STEPS; i++) { try { socket = new Socket(ior.Internet.host, ior.Internet.port); break Open; } catch (BindException ex) { try { System.gc(); Thread.sleep(pause); pause = pause * 2; if (pause > PAUSE_MAX) pause = PAUSE_MAX; } catch (InterruptedException iex) { } } } } if (socket == null) throw new NO_RESOURCES(ior.Internet.host + ":" + ior.Internet.port + " in use" ); socket.setKeepAlive(true); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { ex1.printStackTrace(); return null; } }
| 1,580
|
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { ex1.printStackTrace(); return null; } }
|
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n += socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { ex1.printStackTrace(); return null; } }
| 1,581
|
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { ex1.printStackTrace(); return null; } }
|
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { ex1.printStackTrace(); return null; } }
| 1,582
|
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { ex1.printStackTrace(); return null; } }
|
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException io_ex) { ex1.printStackTrace(); return null; } }
| 1,583
|
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { ex1.printStackTrace(); return null; } }
|
public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { return null; } }
| 1,584
|
public static SystemException readSystemException(InputStream input) { String idl = input.read_string(); int minor = input.read_ulong(); CompletionStatus status = CompletionStatusHelper.read(input); SystemException exception = ObjectCreator.createSystemException(idl, minor, status); return exception; }
|
public static SystemException readSystemException(InputStream input, ServiceContext[] contexts) { String idl = input.read_string(); int minor = input.read_ulong(); CompletionStatus status = CompletionStatusHelper.read(input); SystemException exception = ObjectCreator.createSystemException(idl, minor, status); return exception; }
| 1,586
|
public static SystemException readSystemException(InputStream input) { String idl = input.read_string(); int minor = input.read_ulong(); CompletionStatus status = CompletionStatusHelper.read(input); SystemException exception = ObjectCreator.createSystemException(idl, minor, status); return exception; }
|
public static SystemException readSystemException(InputStream input) { String idl = input.read_string(); int minor = input.read_ulong(); CompletionStatus completed = CompletionStatusHelper.read(input); SystemException exception = ObjectCreator.createSystemException(idl, minor, status); return exception; }
| 1,587
|
public static SystemException readSystemException(InputStream input) { String idl = input.read_string(); int minor = input.read_ulong(); CompletionStatus status = CompletionStatusHelper.read(input); SystemException exception = ObjectCreator.createSystemException(idl, minor, status); return exception; }
|
public static SystemException readSystemException(InputStream input) { String idl = input.read_string(); int minor = input.read_ulong(); CompletionStatus status = CompletionStatusHelper.read(input); SystemException exception = ObjectCreator.createSystemException(idl, minor, status); return exception; }
| 1,588
|
public static UserException readUserException(String idl, InputStream input) { try { String helper = toHelperName(idl); Class helperClass = Class.forName(helper); Method read = helperClass.getMethod("read", new Class[] { org.omg.CORBA.portable.InputStream.class } ); return (UserException) read.invoke(null, new Object[] { input }); } catch (MARSHAL mex) { // This one is ok to throw throw mex; } catch (Exception ex) { ex.printStackTrace(); return null; } }
|
public static UserException readUserException(String idl, InputStream input) { try { String helper = toHelperName(idl); Class helperClass = Class.forName(helper); Method read = helperClass.getMethod("read", new Class[] { org.omg.CORBA.portable.InputStream.class } ); return (UserException) read.invoke(null, new Object[] { input }); } catch (MARSHAL mex) { // This one is ok to throw throw mex; } catch (Exception ex) { ex.printStackTrace(); return null; } }
| 1,589
|
public void read(java.io.InputStream istream) throws MARSHAL { try { byte[] xMagic = new byte[ MAGIC.length ]; istream.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) throw new MARSHAL("Not a GIOP message"); version = Version.read_version(istream); abstractDataInputStream din; flags = (byte) istream.read(); // This checks the bit in the byte we have just received. if (isBigEndian()) din = new BigEndianInputStream(istream); else din = new LittleEndianInputStream(istream); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { MARSHAL t = new MARSHAL(); t.initCause(ex); throw t; } }
|
public void read(java.io.InputStream istream) throws MARSHAL { try { byte[] xMagic = new byte[ MAGIC.length ]; istream.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) { MARSHAL m = new MARSHAL("Not a GIOP message"); m.minor = Minor.Giop; throw m; } version = Version.read_version(istream); abstractDataInputStream din; flags = (byte) istream.read(); // This checks the bit in the byte we have just received. if (isBigEndian()) din = new BigEndianInputStream(istream); else din = new LittleEndianInputStream(istream); message_type = (byte) din.read(); message_size = din.readInt(); } catch (IOException ex) { MARSHAL t = new MARSHAL(); t.initCause(ex); throw t; } }
| 1,591
|
public UnsatisfiedLinkError(String s) { super(s); }
|
public UnsatisfiedLinkError(String s) { super(s); }
| 1,593
|
public void checkRead(String filename) { checkPermission(new FilePermission(filename, "read")); }
|
public void checkRead(FileDescriptor desc) { checkPermission(new FilePermission(filename, "read")); }
| 1,594
|
public void checkRead(String filename) { checkPermission(new FilePermission(filename, "read")); }
|
public void checkRead(String filename) { if (desc == null) throw new NullPointerException(); checkPermission(new RuntimePermission("readFileDescriptor")); }
| 1,595
|
public static SortedMap availableCharsets () { TreeMap charsets = new TreeMap (String.CASE_INSENSITIVE_ORDER); for (Iterator i = provider ().charsets (); i.hasNext (); ) { Charset cs = (Charset) i.next (); charsets.put (cs.name (), cs); } return Collections.unmodifiableSortedMap (charsets); }
|
public static SortedMap availableCharsets () { TreeMap charsets = new TreeMap (String.CASE_INSENSITIVE_ORDER); CharsetProvider[] providers = providers(); for (int j = 0; j < providers.length; j++) { Charset cs = (Charset) i.next (); charsets.put (cs.name (), cs); } return Collections.unmodifiableSortedMap (charsets); }
| 1,596
|
public static SortedMap availableCharsets () { TreeMap charsets = new TreeMap (String.CASE_INSENSITIVE_ORDER); for (Iterator i = provider ().charsets (); i.hasNext (); ) { Charset cs = (Charset) i.next (); charsets.put (cs.name (), cs); } return Collections.unmodifiableSortedMap (charsets); }
|
public static SortedMap availableCharsets () { TreeMap charsets = new TreeMap (String.CASE_INSENSITIVE_ORDER); for (Iterator i = provider ().charsets (); i.hasNext (); ) { Charset cs = (Charset) i.next (); charsets.put (cs.name (), cs); } return Collections.unmodifiableSortedMap (charsets); }
| 1,597
|
private static Charset charsetForName (String charsetName) { checkName (charsetName); return provider ().charsetForName (charsetName); }
|
private static Charset charsetForName (String charsetName) { checkName (charsetName); Charset cs = null; CharsetProvider[] providers = providers(); for (int i = 0; i < providers.length; i++) { cs = providers[i].charsetForName(charsetName); if (cs != null) break; }
| 1,598
|
public static Current read(InputStream input) { throw new MARSHAL(); }
|
public static Current read(InputStream input) { MARSHAL m = new MARSHAL("Inappropriate"); m.minor = Minor.Inappropriate; throw m; }
| 1,600
|
public static void write(OutputStream output, Current value) { throw new MARSHAL(); }
|
public static void write(OutputStream output, Current value) { MARSHAL m = new MARSHAL("Inappropriate"); m.minor = Minor.Inappropriate; throw m; }
| 1,601
|
public Collection<FileSystemType> fileSystemTypes() { return Collections.unmodifiableCollection(types.values()); }
|
public Collection<FileSystemType> fileSystemTypes() { return Collections.unmodifiableCollection(types.values()); }
| 1,603
|
public FileSystemType getSystemType(String name) { return types.get(name); }
|
public synchronized FileSystemType getSystemType(String name) { return types.get(name); }
| 1,604
|
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]); } } }
|
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]); } } }
| 1,605
|
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]); } } }
|
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(newTypes, elements[j]); } } }
| 1,606
|
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 ()); } }
|
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(byte2char(buf[x], "cp850"));// 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(byte2char(buf[x], "cp850")); } } 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 ()); } }
| 1,608
|
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 ()); } }
|
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(byte2char(buf[x], "cp850")); } } 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 ()); } }
| 1,609
|
public void init (Hashtable attribtable) { attribs = attribtable; isDelimitedCase = false; }
|
public void init (Hashtable attribtable) { attribs = attribtable; isDelimitedCase = false; }
| 1,610
|
public void setSize(String value) { attribs.put("size", value); }
|
public void setSize(int value) { attribs.put("size", Integer.toString(value)); }
| 1,611
|
public void setStep (String value) { attribs.put("step", value); }
|
public void setStep (int value) { attribs.put("step", Integer.toString(value)); }
| 1,612
|
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 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); // 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; }
| 1,613
|
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 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); }
| 1,615
|
public String toString() { return toString(value); }
|
public static String toString(float f) { return toString(value); }
| 1,616
|
public String toString() { return toString(value); }
|
public String toString() { return VMDouble.toString(f, true); }
| 1,617
|
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); }
|
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); }
| 1,619
|
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)); } } } }
|
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)); } } } }
| 1,620
|
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)); } } } }
|
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)); } } } }
| 1,621
|
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)); } } } }
|
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)); } } } }
| 1,622
|
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)); } } } }
|
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)); } } } }
| 1,623
|
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(); }
|
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.setVisible(true); newses.connect(); return newses.getScreen(); }
| 1,624
|
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(); }
|
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(); }
| 1,625
|
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(); }
|
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 = TN5250jConstants.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(); }
| 1,626
|
public String[][] getParameterInfo() { return null; }
|
public String[][] getParameterInfo() { 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; }
| 1,627
|
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(); }
|
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,"",sessionName); this.getContentPane().add(s); s.connect(); }
| 1,628
|
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); }
|
public void getInts(int memPtr, int[] 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); }
| 1,629
|
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(); }
|
public void sendNegResponse2(int ec) { screen52.setPrehelpState(true,true,false); baosp.write(0x00); baosp.write(ec); try { writeGDS(1, 0, baosp.toByteArray()); } catch (IOException ioe) { System.out.println(ioe.getMessage()); } baosp.reset(); }
| 1,630
|
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(); }
|
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 setVisible(true); }
| 1,631
|
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); } }
|
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 = newKeyStroker(0, false, false, false,false,KeyStroker.KEY_LOCATION_STANDARD);// 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); } }
| 1,632
|
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); } }
|
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); } }
| 1,633
|
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); } }
|
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); } }
| 1,634
|
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); } }
|
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); } }
| 1,635
|
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); } }
|
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); } }
| 1,636
|
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); } }
|
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); } }
| 1,637
|
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); } }
|
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); } }
| 1,638
|
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); } }
|
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); } }
| 1,639
|
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); } }
|
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); } }
| 1,640
|
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); }
|
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); }
| 1,641
|
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); }
|
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); }
| 1,642
|
static public double distance(double x1, double y1, double x2, double y2) { return Math.sqrt(distanceSq(x1, y1, x2, y2)); }
|
public static double distance(double x1, double y1, double x2, double y2) { return Math.sqrt(distanceSq(x1, y1, x2, y2)); }
| 1,643
|
public boolean equals(Object obj) { if (obj instanceof QName) { QName qname = (QName) obj; return qname.getLocalPart().equals(localPart) && qname.getNamespaceURI().equals(namespaceURI); } return false; }
|
public final boolean equals(Object obj) { if (obj instanceof QName) { QName qname = (QName) obj; return qname.getLocalPart().equals(localPart) && qname.getNamespaceURI().equals(namespaceURI); } return false; }
| 1,644
|
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 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; }
| 1,645
|
public String toString() { return qName; }
|
public synchronized String toString() { return qName; }
| 1,646
|
public void actionPerformed(ActionEvent e) { session.doConnections(); }
|
public void actionPerformed(ActionEvent e) { session.startNewSession(); }
| 1,648
|
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(); }
|
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(); } }
| 1,649
|
public static NameValuePair extract(Any a) { try { return ((NameValuePairHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { throw new BAD_OPERATION("NameValuePair expected"); } }
|
public static NameValuePair extract(Any a) { try { return ((NameValuePairHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { BAD_OPERATION bad = new BAD_OPERATION("NameValuePair expected"); bad.minor = Minor.Any; throw bad; } }
| 1,650
|
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); }
|
protected synchronized void startDevice() throws DriverException { final Device dev = getDevice(); log.debug("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); }
| 1,652
|
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]); }
|
public synchronized void parse(String[] inArgs, FileArgumentCallback files) { final ArrayList fileResult = new ArrayList(); parse(inArgs, new FileArgumentCallback() { public void notifyFile(String fileArgument) { fileResult.add(fileArgument); } }); return (String[]) fileResult.toArray(new String[0]); }
| 1,653
|
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]); }
|
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]); }
| 1,654
|
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]); }
|
public String[] parse(String[] inArgs) { final ArrayList fileResult = new ArrayList(); parse(inArgs, new FileArgumentCallback() { public void notifyFile(String 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(); } }); return (String[]) fileResult.toArray(new String[0]); }
| 1,655
|
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]); }
|
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]); }
| 1,656
|
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; }
|
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("defaultCloseOperation must be EXIT_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or DO_NOTHING_ON_CLOSE"); close_action = operation; }
| 1,660
|
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? } } }
|
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? } } }
| 1,664
|
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? } } }
|
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? } } }
| 1,665
|
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())); } }
|
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())); } }
| 1,666
|
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())); } }
|
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())); } }
| 1,667
|
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())); } }
|
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())); } }
| 1,668
|
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())); } }
|
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())); } }
| 1,669
|
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); } } }
|
private void getPCFile() { String workingDir = System.getProperty("user.dir"); TN5250jFileChooser pcFileChooser = new TN5250jFileChooser(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); } } }
| 1,670
|
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; }
|
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 javax.swing.text.html.TableView(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; }
| 1,671
|
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; }
|
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; }
| 1,673
|
public HTMLEditorKit() { super(); styleContext = new StyleContext(); styleSheet = new StyleSheet(); styleSheet.importStyleSheet(getClass().getResource(DEFAULT_CSS)); // FIXME: Set inputAttributes with default.css }
|
public HTMLEditorKit() { super(); styleContext = new StyleContext(); styleSheet = new StyleSheet(); styleSheet.importStyleSheet(getClass().getResource(DEFAULT_CSS)); // FIXME: Set inputAttributes with default.css }
| 1,674
|
protected Parser getParser() { if (parser == null) parser = new ParserDelegator(); return parser; }
|
protected Parser getParser() { if (parser == null) { parser = new GnuParserDelegator(HTML_401Swing.getInstance()); } return parser; }
| 1,675
|
public StyleSheet getStyleSheet() { if (styleSheet == null) { styleSheet = new StyleSheet(); styleSheet.importStyleSheet(getClass().getResource(DEFAULT_CSS)); } return styleSheet; }
|
public StyleSheet getStyleSheet() { if (styleSheet == null) { styleSheet = new StyleSheet(); InputStream in = getClass().getResourceAsStream(DEFAULT_CSS); InputStreamReader r = new InputStreamReader(in); styleSheet.loadRules(r, null); r.close(); } catch (IOException ex) { } } return styleSheet; }
| 1,676
|
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(); }
|
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(); }
| 1,677
|
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 read(InputStream 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); }
| 1,679
|
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 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); }
| 1,680
|
public void write(Writer out, Document document, int offset, int len) throws BadLocationException, IOException { }
|
public void write(OutputStream out, Document document, int offset, int len) throws BadLocationException, IOException { }
| 1,681
|
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; }
|
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[trim.size()]); return value; }
| 1,683
|
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()); }
|
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 Boolean.valueOf(f.isDirectory()); }
| 1,684
|
public void stateChanged(ChangeEvent ev) { AbstractButton.this.fireStateChanged(); repaint(); }
|
public void stateChanged(ChangeEvent ev) { AbstractButton.this.fireStateChanged(); repaint(); }
| 1,685
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.