rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public abstract void setShort(int memPtr, short value, int count);
public abstract void setShort(int memPtr, short value);
public abstract void setShort(int memPtr, short value, int count);
public IllegalStateException(String s)
public IllegalStateException()
public IllegalStateException(String s) { super(s); }
super(s);
public IllegalStateException(String s) { super(s); }
public IncompatibleClassChangeError(String s) { super(s);
public IncompatibleClassChangeError() {
public IncompatibleClassChangeError(String s) { super(s); }
public final VmMethod getMethod(String name, String signature) { return getMethod(name, signature, false, true, VmMember.calcHashCode( name, signature));
final VmMethod getMethod(String name, String signature, boolean onlyThisClass, boolean searchInterfaces, int hashCode) { final VmMethod[] mt = this.methodTable; if (mt != null) { final int count = mt.length; for (int i = 0; i < count; i++) { final VmMethod mts = mt[i]; int mtsHashCode = mts.getMemberHashCode(); if (m...
public final VmMethod getMethod(String name, String signature) { return getMethod(name, signature, false, true, VmMember.calcHashCode( name, signature)); }
public NoSuchMethodError(String s) { super(s);
public NoSuchMethodError() {
public NoSuchMethodError(String s) { super(s); }
public AbstractMethodError(String s) { super(s);
public AbstractMethodError() {
public AbstractMethodError(String s) { super(s); }
public NotResolvedYetException(String s) { super(s);
public NotResolvedYetException() { super();
public NotResolvedYetException(String s) { super(s); }
Item pop(int type) {
Item pop() {
Item pop(int type) { // if (tos == 0) { // // the item requested in not on the virtual stack // // but already on the operand stack (it was pushed // // outside the current basic block) // // thus create a new stack item //...
if (i.getType() != type) throw new VerifyError("Expected:" + Integer.toString(type) + " Actual:" + Integer.toString(i.getType()));
Item pop(int type) { // if (tos == 0) { // // the item requested in not on the virtual stack // // but already on the operand stack (it was pushed // // outside the current basic block) // // thus create a new stack item //...
public boolean request(Register register) { return request(register, null);
public Register request(int type, Object owner) { return request(type, owner, false);
public boolean request(Register register) { return request(register, null); }
public StackException(String s) { super(s);
public StackException() { super();
public StackException(String s) { super(s); }
os86.setObjectRef(new Label("$$jmp-introCode"));
protected void initImageHeader(NativeStream os, Label clInitCaller, Vm vm, PluginRegistry pluginRegistry) throws BuildException { try { int startLength = os.getLength(); VmType vmCodeClass = loadClass(VmMethodCode.class); final X86Stream.ObjectInfo initObject = os.startObject(vmCodeClass); final int offset = ...
VmType mainClass = loadClass(Main.class); VmStaticField registryField = (VmStaticField) mainClass.getField(Main.REGISTRY_FIELD_NAME);
final VmType mainClass = loadClass(Main.class); final VmStaticField registryField = (VmStaticField) mainClass.getField(Main.REGISTRY_FIELD_NAME);
protected void initMain(X86Stream os, PluginRegistry registry) throws BuildException, ClassNotFoundException { os.setObjectRef(new Label("$$Initialize Main")); VmType mainClass = loadClass(Main.class); VmStaticField registryField = (VmStaticField) mainClass.getField(Main.REGISTRY_FIELD_NAME); // Setup STATICS regi...
System.out.println("rfOffset " + NumberUtils.hex(rfOffset));
protected void initMain(X86Stream os, PluginRegistry registry) throws BuildException, ClassNotFoundException { os.setObjectRef(new Label("$$Initialize Main")); VmType mainClass = loadClass(Main.class); VmStaticField registryField = (VmStaticField) mainClass.getField(Main.REGISTRY_FIELD_NAME); // Setup STATICS regi...
System.out.println("vmOffset " + NumberUtils.hex(vmOffset));
protected void initVm(X86Stream os, Vm vm) throws BuildException, ClassNotFoundException { os.setObjectRef(new Label("$$Initialize Vm")); VmType vmClass = loadClass(Vm.class); VmStaticField vmField = (VmStaticField) vmClass.getField("instance"); // Setup STATICS register (EDI) os.writeMOV_Const(Register.EDI, st...
public final VmField getField(String name) { return getField(name, null);
public final VmField getField(String name, String signature) { VmField f = getDeclaredField(name, signature); if (f != null) { return f; } if (superClass != null) { f = superClass.getField(name, signature); if (f != null) { return f; } } final int cnt = getNoInterfaces(); for (int i = 0; i < cnt; i++) { f = allInterfac...
public final VmField getField(String name) { return getField(name, null); }
public ServerSocket() throws IOException
ServerSocket(SocketImpl impl) throws IOException
public ServerSocket() throws IOException { if (factory != null) impl = factory.createSocketImpl(); else impl = new PlainSocketImpl(); impl.create(true); }
if (factory != null) impl = factory.createSocketImpl(); else impl = new PlainSocketImpl();
if (impl == null) throw new NullPointerException("impl may not be null");
public ServerSocket() throws IOException { if (factory != null) impl = factory.createSocketImpl(); else impl = new PlainSocketImpl(); impl.create(true); }
impl.create(true);
this.impl = impl; this.impl.create(true);
public ServerSocket() throws IOException { if (factory != null) impl = factory.createSocketImpl(); else impl = new PlainSocketImpl(); impl.create(true); }
n = quads.size(); for (int i=0; i<n; i+=1) { Quad quad = (Quad) quads.get(i); if (!quad.isDeadCode()) { quad.generateCode(x86cg); } } os.flush();
public static void main(String args[]) throws SecurityException, IOException, ClassNotFoundException { X86CpuID cpuId = X86CpuID.createID("p5"); TextX86Stream os = new TextX86Stream(new OutputStreamWriter(System.out), cpuId); X86CodeGenerator x86cg = new X86CodeGenerator(os); VmByteCode code = loadByteCode(args); ...
n = quads.size(); for (int i=0; i<n; i+=1) { Quad quad = (Quad) quads.get(i); if (!quad.isDeadCode()) { quad.generateCode(x86cg); } } os.flush();
public static void main(String args[]) throws SecurityException, IOException, ClassNotFoundException { X86CpuID cpuId = X86CpuID.createID("p5"); TextX86Stream os = new TextX86Stream(new OutputStreamWriter(System.out), cpuId); X86CodeGenerator x86cg = new X86CodeGenerator(os); VmByteCode code = loadByteCode(args); ...
return -10;
int l0 = a1; return -l0;
public static int simple(int a0, int a1) { return -10; }
session.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
public PrinterThread (ScreenChar[] sc, Font font, int cols, int rows, Color colorBg, boolean toDefaultPrinter, Session ses) { setPriority(1); session = ses; screen = new ScreenChar[sc.length]; toDefault = toDefaultPrinter; int len = sc.length; for (int x = 0; x...
session.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
public void run () {// Toolkit tk = Toolkit.getDefaultToolkit();//int [][] range = new int[][] {//new int[] { 1, 1 }//};// JobAttributes jobAttributes = new JobAttributes(1, JobAttributes.DefaultSelectionType.ALL, JobAttributes.DestinationType.PRINTER, JobAttributes.DialogType.NONE, "file", 1, 1, JobAttributes.Multi...
public Font deriveFont (float size) { return peer.deriveFont (this, size); }
public Font deriveFont(int style, float size) { return peer.deriveFont(this, style, size); }
public Font deriveFont (float size){ return peer.deriveFont (this, size);}
public LineMetrics getLineMetrics(String str, FontRenderContext frc)
public LineMetrics getLineMetrics(String text, int begin, int limit, FontRenderContext rc)
public LineMetrics getLineMetrics(String str, FontRenderContext frc) { return getLineMetrics (str, 0, str.length () - 1, frc); }
return getLineMetrics (str, 0, str.length () - 1, frc); }
return peer.getLineMetrics(this, new StringCharacterIterator(text), begin, limit, rc); }
public LineMetrics getLineMetrics(String str, FontRenderContext frc) { return getLineMetrics (str, 0, str.length () - 1, frc); }
throws NotImplementedException
public void stateChanged(ChangeEvent event) throws NotImplementedException { // TODO: What should be done here, if anything? }
firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, Boolean.FALSE, Boolean.TRUE); ButtonModel model = getModel(); if (model.isArmed()) { if (! armed) { armed = true; firePropertyChange(AccessibleContext.ACCESSIBLE_STATE_PROPERTY, AccessibleState.ARMED, null); } } else { if (armed) { armed = false;...
public void stateChanged(ChangeEvent event) throws NotImplementedException { // TODO: What should be done here, if anything? }
accessibleContext = new AccessibleJMenuItem();
{ AccessibleJMenuItem ctx = new AccessibleJMenuItem(); addChangeListener(ctx); accessibleContext = ctx; }
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJMenuItem(); return accessibleContext; }
public void setMnemonic(int mne)
public void setMnemonic(char mne)
public void setMnemonic(int mne) { int old = getModel().getMnemonic(); if (old != mne) { getModel().setMnemonic(mne); if (text != null && ! text.equals("")) { // Since lower case char = upper case char for // mnemonic, we will convert both text and mnemonic // to upper case before ch...
int old = getModel().getMnemonic(); if (old != mne) { getModel().setMnemonic(mne); if (text != null && ! text.equals("")) { int upperCaseMne = Character.toUpperCase((char) mne); String upperCaseText = text.toUpperCase(); setDisplayedMnemonicIndex(upperCaseText.indexOf(upperCaseMne)); } firePropertyChange(MNEMONI...
setMnemonic((int) mne);
public void setMnemonic(int mne) { int old = getModel().getMnemonic(); if (old != mne) { getModel().setMnemonic(mne); if (text != null && ! text.equals("")) { // Since lower case char = upper case char for // mnemonic, we will convert both text and mnemonic // to upper case before ch...
public String getHref()
public Href getHref()
public String getHref() { return (String) ((XMLAttribute) attribHash.get("href")).getAttribValue(); }
return (String) ((XMLAttribute) attribHash.get("href")).getAttribValue();
return (Href) ((XMLAttribute) attribHash.get("href")).getAttribValue();
public String getHref() { return (String) ((XMLAttribute) attribHash.get("href")).getAttribValue(); }
attribHash.put("href", new XMLAttribute(null, Constants.STRING_TYPE));
attribHash.put("href", new XMLAttribute(null, Constants.OBJECT_TYPE));
private void init() { classXDFNodeName = "data"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"compression"); attribOrder.add(0, "encoding"); attribOrder.add(0,"checksum"); attribOrder.add(0,"href"); //set up the attribute hashtable key w...
public void setHref (String strHref)
public void setHref (Href hrefObj)
public void setHref (String strHref) { ((XMLAttribute) attribHash.get("href")).setAttribValue(strHref); }
((XMLAttribute) attribHash.get("href")).setAttribValue(strHref);
((XMLAttribute) attribHash.get("href")).setAttribValue(hrefObj);
public void setHref (String strHref) { ((XMLAttribute) attribHash.get("href")).setAttribValue(strHref); }
String nodeName = getClassXDFNodeName();
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameStri...
String href = getHref(); if (href !=null) { writeOut(outputstream, " href = \""); writeOutAttribute(outputstream, href);
Href hrefObj = getHref(); XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream = outputstream; if (hrefObj !=null) { String fileName = hrefObj.getSysId(); String hrefName = hrefObj.getName(); if(hrefName == null) { Log.errorln("Error: href object in dataCube lacks name. Data bein...
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameStri...
writeOut(outputstream, ">"); XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { dataOutputStream = outputstream; } } else { dataOutputStream = outputstream; }
if (writeHrefAttribute) writeOut(outputstream, "/>"); else writeOut(outputstream, ">");
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameStri...
fastestAxis, NoDataValues );
fastestAxis, NoDataValues, writeHrefAttribute ? false : true );
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameStri...
writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues );
writeFormattedData( dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues, writeHrefAttribute ? false : true );
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameStri...
if (niceOutput) {
if (!writeHrefAttribute && niceOutput) {
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameStri...
writeOut(outputstream, "</" + nodeName + ">");
if (!writeHrefAttribute) writeOut(outputstream, "</" + nodeName + ">");
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameStri...
AxisInterface fastestAxis, String[] noDataValues) {
AxisInterface fastestAxis, String[] noDataValues, boolean writeCDATAStatement ) {
private void writeDelimitedData(OutputStream outputstream, Locator locator, DelimitedXMLDataIOStyle readObj, AxisInterface fastestAxis, String[] noDataValues) { String delimiter = readObj.getDelimiter(); Str...
writeOut(outputstream, "<![CDATA[");
if(writeCDATAStatement) writeOut(outputstream, "<![CDATA[");
private void writeDelimitedData(OutputStream outputstream, Locator locator, DelimitedXMLDataIOStyle readObj, AxisInterface fastestAxis, String[] noDataValues) { String delimiter = readObj.getDelimiter(); Str...
writeOut(outputstream, "]]>");
if (writeCDATAStatement) writeOut(outputstream, "]]>");
private void writeDelimitedData(OutputStream outputstream, Locator locator, DelimitedXMLDataIOStyle readObj, AxisInterface fastestAxis, String[] noDataValues) { String delimiter = readObj.getDelimiter(); Str...
String[] noDataValues )
String[] noDataValues, boolean writeCDATAStatement )
private void writeFormattedData(OutputStream outputstream , Locator locator, FormattedXMLDataIOStyle readObj, AxisInterface fastestAxis, String[] noDataValues ) { // print op...
writeOut(outputstream, "<![CDATA[");
if (writeCDATAStatement) writeOut(outputstream, "<![CDATA[");
private void writeFormattedData(OutputStream outputstream , Locator locator, FormattedXMLDataIOStyle readObj, AxisInterface fastestAxis, String[] noDataValues ) { // print op...
writeOut(outputstream, "]]>");
if (writeCDATAStatement) writeOut(outputstream, "]]>");
private void writeFormattedData(OutputStream outputstream , Locator locator, FormattedXMLDataIOStyle readObj, AxisInterface fastestAxis, String[] noDataValues ) { // print op...
public DecimalFormat (String pattern)
public DecimalFormat ()
public DecimalFormat (String pattern) { this (pattern, new DecimalFormatSymbols ()); }
this (pattern, new DecimalFormatSymbols ());
this ("#,##0.###");
public DecimalFormat (String pattern) { this (pattern, new DecimalFormatSymbols ()); }
if (msg == null) { return ; }
protected void writeOut ( OutputStream outputstream, String msg ) { if (msg == null) { return ; } try { outputstream.write(msg.getBytes()); } catch (IOException e) { Log.error("Error: couldnt open OutputStream for writing"); } }
public int getAxisLocation (Axis axisObj) {
public int getAxisLocation (AxisInterface axisObj) {
public int getAxisLocation (Axis axisObj) { if ((!parentArray.getAxisList().contains(axisObj)) ) { Log.error("axisObj is not an Axis ref contained in Locator's parentArray"); Log.error("regnore request"); return -1; } Integer loc = (Integer) locations.get(axisObj); if (loc !=null)...
public OptionArgument(String name, String description, Option o1) { this(name, description, new Option[] { o1}, SINGLE);
public OptionArgument(String name, String description, Option[] options, boolean multi) { super(name, description, multi); this.options = options;
public OptionArgument(String name, String description, Option o1) { this(name, description, new Option[] { o1}, SINGLE); }
public DeviceArgument(String name, String description) { super(name, description);
public DeviceArgument(String name, String description, boolean multi) { super(name, description, multi);
public DeviceArgument(String name, String description) { super(name, description); }
public IntegerArgument(String name, String description) { super(name, description);
public IntegerArgument(String name, String description, boolean multi) { super(name, description, multi);
public IntegerArgument(String name, String description) { super(name, description); }
public Parameter(Argument argument, boolean optional) { this(ANONYMOUS, NO_DESCRIPTION, argument, optional);
public Parameter(String name, String description, Argument argument, boolean optional) { super(name, description); this.argument = argument; this.optional = optional;
public Parameter(Argument argument, boolean optional) { this(ANONYMOUS, NO_DESCRIPTION, argument, optional); }
public Syntax(String description, Parameter p1) { this(description, new Parameter[] { p1});
public Syntax(String description, Parameter[] params) { this.description = description; this.params = params;
public Syntax(String description, Parameter p1) { this(description, new Parameter[] { p1}); }
setCursorOff();
setCursorActive(false);
protected void crossHair() { setCursorOff(); crossHair++; if (crossHair > 3) crossHair = 0; setCursorOn(); }
setCursorOn();
setCursorActive(true);
protected void crossHair() { setCursorOff(); crossHair++; if (crossHair > 3) crossHair = 0; setCursorOn(); }
return Integer.parseInt((String)appProps.get(prop));
if (appProps.containsKey(prop)) { try { int i = Integer.parseInt((String)appProps.get(prop)); return i; } catch (NumberFormatException ne) { return 0; } } else return 0;
protected final int getIntProperty(String prop) { return Integer.parseInt((String)appProps.get(prop)); }
setCursorOff();
private void gotoNextWord() { int pos = lastPos; setCursorOff(); if (screen[lastPos].getChar() > ' ') { advancePos(); // get the next space character while (screen[lastPos].getChar() > ' ' && pos != lastPos ) { advancePos(); } } els...
setCursorOn();
private void gotoNextWord() { int pos = lastPos; setCursorOff(); if (screen[lastPos].getChar() > ' ') { advancePos(); // get the next space character while (screen[lastPos].getChar() > ' ' && pos != lastPos ) { advancePos(); } } els...
setCursorOff();
private void gotoPrevWord() { int pos = lastPos; setCursorOff(); changePos(-1); // position previous white space character while (screen[lastPos].getChar() <= ' ') { changePos(-1); if (pos == lastPos) break; } changePos(-1); // get the previous space...
setCursorOn();
private void gotoPrevWord() { int pos = lastPos; setCursorOff(); changePos(-1); // position previous white space character while (screen[lastPos].getChar() <= ' ') { changePos(-1); if (pos == lastPos) break; } changePos(-1); // get the previous space...
if (appProps.containsKey("cursorBottOffset")) { cursorBottOffset = getIntProperty("cursorBottOffset"); }
public void loadProps(Properties props) { appProps = props; loadColors(); if (appProps.containsKey("colSeparator")) { if (getStringProperty("colSeparator").equals("Line")) colSepLine = 0; if (getStringProperty("colSeparator").equals("ShortLine")) colSepLine = 1; ...
setCursorOff();
protected final void pasteMe(boolean special) { Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard(); Transferable content = cb.getContents(this); setCursorOff(); try { StringBuffer sb = new StringBuffer((String)content.getTransferData(DataFlavor.stringFlavor)); String...
setCursorOn();
protected final void pasteMe(boolean special) { Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard(); Transferable content = cb.getContents(this); setCursorOff(); try { StringBuffer sb = new StringBuffer((String)content.getTransferData(DataFlavor.stringFlavor)); String...
gui.revalidate();
public void propertyChange(PropertyChangeEvent pce) { String pn = pce.getPropertyName(); boolean resetAttr = false; if (pn.equals("colorBg")) { colorBg = (Color)pce.getNewValue(); resetAttr = true; } if (pn.equals("colorBlue")) { colorBlue = (Color)pce.getNewValue(); ...
if (!cursorActive) setCursorOn();
public void sendKeys(String text) {// if (text == null) {// return;// } if (isStatusErrorCode() && !resetRequired) { resetError(); if (!cursorActive) setCursorOn(); } if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]"...
while (strokenizer.hasMoreKeyStrokes() && !keyboardLocked && !isStatusErrorCode() && !done) {
setCursorActive(false); while (!done) { if (strokenizer.hasMoreKeyStrokes()) {
public void sendKeys(String text) {// if (text == null) {// return;// } if (isStatusErrorCode() && !resetRequired) { resetError(); if (!cursorActive) setCursorOn(); } if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]"...
setCursorOn();
public void sendKeys(String text) {// if (text == null) {// return;// } if (isStatusErrorCode() && !resetRequired) { resetError(); if (!cursorActive) setCursorOn(); } if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]"...
else { done = true; } } setCursorActive(true);
public void sendKeys(String text) {// if (text == null) {// return;// } if (isStatusErrorCode() && !resetRequired) { resetError(); if (!cursorActive) setCursorOn(); } if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]"...
setCursorOn();
public final void setBounds(int width, int height) { resizeScreenArea(width,height); dirty.setBounds(tArea.getBounds()); if (gui.getGraphics() != null) { // do not forget to null out gg2d before update or else there will // be a very hard to trace screen resize problem gg2d ...
setCursorActive(true);
public final void setBounds(int width, int height) { resizeScreenArea(width,height); dirty.setBounds(tArea.getBounds()); if (gui.getGraphics() != null) { // do not forget to null out gg2d before update or else there will // be a very hard to trace screen resize problem gg2d ...
updateCursorLoc(); updateCursorLoc = false;
updateCursorLoc();
public void setCursorOff() { updateCursorLoc(); updateCursorLoc = false; }
updateCursorLoc = true; if (!keysBuffered) updateCursorLoc();
updateCursorLoc();
public void setCursorOn() { updateCursorLoc = true;// System.out.println("cursor on"); if (!keysBuffered) updateCursorLoc(); }
setCursorOff();
protected boolean simulateKeyStroke(char c){// if (isStatusErrorCode() && !Character.isISOControl(c) && !keyProcessed) {// if (resetRequired)// return false;// else// resetError();// } boolean updateField = false; boolean numericError = false; boolean up...
setCursorOn();
protected boolean simulateKeyStroke(char c){// if (isStatusErrorCode() && !Character.isISOControl(c) && !keyProcessed) {// if (resetRequired)// return false;// else// resetError();// } boolean updateField = false; boolean numericError = false; boolean up...
setCursorOff();
protected boolean simulateMnemonic(int mnem){ boolean simulated = false; switch (mnem) { case AID_CLEAR : case AID_ENTER : case AID_PF1 : case AID_PF2 : case AID_PF3 : case AID_PF4 : case AID_PF5 : case AID_PF6 : case AID_PF7 : ...
setCursorOn();
protected boolean simulateMnemonic(int mnem){ boolean simulated = false; switch (mnem) { case AID_CLEAR : case AID_ENTER : case AID_PF1 : case AID_PF2 : case AID_PF3 : case AID_PF4 : case AID_PF5 : case AID_PF6 : case AID_PF7 : ...
if (updateCursorLoc) { cursorActive = cursorActive ? false:true;
if (cursorActive) {
private void updateCursorLoc() { if (updateCursorLoc) { cursorActive = cursorActive ? false:true; int row = getRow(lastPos); int col = getCol(lastPos); bi.drawCursor(this,row,col, fmWidth,fmHeight, insertMode, crossHair, ...
font);
font,cursorBottOffset);
private void updateCursorLoc() { if (updateCursorLoc) { cursorActive = cursorActive ? false:true; int row = getRow(lastPos); int col = getCol(lastPos); bi.drawCursor(this,row,col, fmWidth,fmHeight, insertMode, crossHair, ...
cursorActive = false;
private void updateCursorLoc() { if (updateCursorLoc) { cursorActive = cursorActive ? false:true; int row = getRow(lastPos); int col = getCol(lastPos); bi.drawCursor(this,row,col, fmWidth,fmHeight, insertMode, crossHair, ...
resized = true;
public BufferedImage getImageBuffer(int width, int height) { synchronized (lock) { if (bi == null || bi.getWidth() != width || bi.getHeight() != height) { // allocate a buffer Image with appropriate size bi = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB); th...
protected void getBoundingArea(Rectangle r) {
protected Rectangle getBoundingArea() {
protected void getBoundingArea(Rectangle r) { if((getEndPoint().x > getStartPoint().x) && (getEndPoint().y > getStartPoint().y)) { r.setBounds(getStartPoint().x,getStartPoint().y,getEndPoint().x-getStartPoint().x,getEndPoint().y-getStartPoint().y); } else if((getEndPoint().x < g...
if((getEndPoint().x > getStartPoint().x) && (getEndPoint().y > getStartPoint().y)) { r.setBounds(getStartPoint().x,getStartPoint().y,getEndPoint().x-getStartPoint().x,getEndPoint().y-getStartPoint().y); } else if((getEndPoint().x < getStartPoint().x) && (getEndPoint().y < getStartPoint().y)) { r.setBounds(getEndPoint(...
Rectangle r = new Rectangle(); getBoundingArea(r); return r;
protected void getBoundingArea(Rectangle r) { if((getEndPoint().x > getStartPoint().x) && (getEndPoint().y > getStartPoint().y)) { r.setBounds(getStartPoint().x,getStartPoint().y,getEndPoint().x-getStartPoint().x,getEndPoint().y-getStartPoint().y); } else if((getEndPoint().x < g...
public int getKeyPos(int pos) {
public int getKeyPos(int row1, int col1) {
public int getKeyPos(int pos) { int y = pos - startPos(); cursorPos = pos; return y; }
int y = pos - startPos(); cursorPos = pos;
int x = ((row1 * s.getCols()) + col1); int y = x - startPos(); cursorPos = x;
public int getKeyPos(int pos) { int y = pos - startPos(); cursorPos = pos; return y; }
public boolean isInField(int pos, boolean chgToField) { ScreenField sf; for (int x = 0;x < sizeFields; x++) { sf = screenFields[x]; if (sf.withinField(pos)) { if (chgToField) { currentField = sf; } return true; } } return false;
public boolean isInField(int pos) { return isInField(pos,true);
public boolean isInField(int pos, boolean chgToField) { ScreenField sf; for (int x = 0;x < sizeFields; x++) { sf = screenFields[x]; if (sf.withinField(pos)) { if (chgToField) { currentField = sf; } return true; } } return fals...
public synchronized void drawImageBuffer(Graphics2D gg2d) {
public synchronized void drawImageBuffer(Graphics2D gg2d,int x, int y, int width, int height) {
public synchronized void drawImageBuffer(Graphics2D gg2d) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { System.out.println(" we got a null graphic object "); return; } synchronized (lock) { gg2d.drawImage(...
gg2d.drawImage(bi,null,0,0);
gg2d.drawImage(bi.getSubimage(x,y,width,height),null,x + offLeft,y+ offTop);
public synchronized void drawImageBuffer(Graphics2D gg2d) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { System.out.println(" we got a null graphic object "); return; } synchronized (lock) { gg2d.drawImage(...
resized = true;
public void resize(int width, int height) { if (bi.getWidth() != width || bi.getHeight() != height) { synchronized (lock) { bi = null; bi = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB); this.width = width; this.height = height; // tel...
log.debug("set "+ keyStrokes);
public void setKeyStrokes (String strokes) { if (strokes != null) { keyStrokes.setLength(0);// System.out.println("set "+ keyStrokes); length = strokes.length(); } else { keyStrokes = new StringBuffer(); length = 0; } keyStrokes.append(strokes); i...
System.out.println(" mnemonic key was incomplete :1 " +
log.warn(" mnemonic key was incomplete :1 " +
public String nextKeyStroke() { String s = ""; boolean gotOne = false; int start = index; if(length > index) { sb.setLength(0); char c = keyStrokes.charAt(index); switch(c) { case '[': sb.append(c); index++; // we need t...
System.out.println(
log.warn(
public String nextKeyStroke() { String s = ""; boolean gotOne = false; int start = index; if(length > index) { sb.setLength(0); char c = keyStrokes.charAt(index); switch(c) { case '[': sb.append(c); index++; // we need t...
log.debug("next "+ keyStrokes);
public String nextKeyStroke() { String s = ""; boolean gotOne = false; int start = index; if(length > index) { sb.setLength(0); char c = keyStrokes.charAt(index); switch(c) { case '[': sb.append(c); index++; // we need t...
public synchronized StringBuffer insert(int offset, char ch)
public synchronized StringBuffer insert(int offset, char[] str, int str_offset, int len)
public synchronized StringBuffer insert(int offset, char ch) { if (offset < 0 || offset > count) throw new StringIndexOutOfBoundsException(offset); ensureCapacity_unsynchronized(count + 1); VMSystem.arraycopy(value, offset, value, offset + 1, count - offset); value[offset] = ch; count++; retur...