bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
|---|---|---|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent ) { boolean niceOutput = sPrettyXDFOutput; String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum().toString(); if (checksum !=null) writeOut(outputstream, " checksum = \"" + checksum + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); if (href !=null) { //write out to another file, double check } currentLocator = parentArray.createLocator(); if (readObj.getClass().getName().endsWith("TaggedXMLDataIOStyle")) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } if (!parentArray.hasFieldAxis()) { //even with FieldAxis, it is ok, double check int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(outputstream, currentLocator, indent, axisLength, tags, 0); } } //done dealwith with TaggedXMLDataIOSytle //close the tagged data section if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent ) { boolean niceOutput = sPrettyXDFOutput; String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); Number checksum = getChecksum(); if (checksum !=null) writeOut(outputstream, " checksum = \"" + checksum + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); if (href !=null) { //write out to another file, double check } currentLocator = parentArray.createLocator(); if (readObj.getClass().getName().endsWith("TaggedXMLDataIOStyle")) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } if (!parentArray.hasFieldAxis()) { //even with FieldAxis, it is ok, double check int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(outputstream, currentLocator, indent, axisLength, tags, 0); } } //done dealwith with TaggedXMLDataIOSytle //close the tagged data section if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 4,621
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent ) { boolean niceOutput = sPrettyXDFOutput; String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum().toString(); if (checksum !=null) writeOut(outputstream, " checksum = \"" + checksum + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); if (href !=null) { //write out to another file, double check } currentLocator = parentArray.createLocator(); if (readObj.getClass().getName().endsWith("TaggedXMLDataIOStyle")) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } if (!parentArray.hasFieldAxis()) { //even with FieldAxis, it is ok, double check int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(outputstream, currentLocator, indent, axisLength, tags, 0); } } //done dealwith with TaggedXMLDataIOSytle //close the tagged data section if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent ) { boolean niceOutput = sPrettyXDFOutput; String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum().toString(); if (checksum !=null) writeOut(outputstream, " checksum = \"" + checksum.toString() + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); if (href !=null) { //write out to another file, double check } currentLocator = parentArray.createLocator(); if (readObj.getClass().getName().endsWith("TaggedXMLDataIOStyle")) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } if (!parentArray.hasFieldAxis()) { //even with FieldAxis, it is ok, double check int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(outputstream, currentLocator, indent, axisLength, tags, 0); } } //done dealwith with TaggedXMLDataIOSytle //close the tagged data section if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 4,622
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent ) { boolean niceOutput = sPrettyXDFOutput; String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum().toString(); if (checksum !=null) writeOut(outputstream, " checksum = \"" + checksum + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); if (href !=null) { //write out to another file, double check } currentLocator = parentArray.createLocator(); if (readObj.getClass().getName().endsWith("TaggedXMLDataIOStyle")) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } if (!parentArray.hasFieldAxis()) { //even with FieldAxis, it is ok, double check int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(outputstream, currentLocator, indent, axisLength, tags, 0); } } //done dealwith with TaggedXMLDataIOSytle //close the tagged data section if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent ) { boolean niceOutput = sPrettyXDFOutput; String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum().toString(); if (checksum !=null) writeOut(outputstream, " checksum = \"" + checksum + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); if (href !=null) { //write out to another file, double check } currentLocator = parentArray.createLocator(); if (readObj.getClass().getName().endsWith("TaggedXMLDataIOStyle")) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } if (!parentArray.hasFieldAxis()) { //even with FieldAxis, it is ok, double check int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(outputstream, currentLocator, indent, axisLength, tags, 0); } } //done dealwith with TaggedXMLDataIOSytle //close the tagged data section if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 4,623
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent ) { boolean niceOutput = sPrettyXDFOutput; String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum().toString(); if (checksum !=null) writeOut(outputstream, " checksum = \"" + checksum + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); if (href !=null) { //write out to another file, double check } currentLocator = parentArray.createLocator(); if (readObj.getClass().getName().endsWith("TaggedXMLDataIOStyle")) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } if (!parentArray.hasFieldAxis()) { //even with FieldAxis, it is ok, double check int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(outputstream, currentLocator, indent, axisLength, tags, 0); } } //done dealwith with TaggedXMLDataIOSytle //close the tagged data section if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent ) { boolean niceOutput = sPrettyXDFOutput; String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum().toString(); if (checksum !=null) writeOut(outputstream, " checksum = \"" + checksum + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); if (href !=null) { //write out to another file, double check } currentLocator = parentArray.createLocator(); if (readObj.getClass().getName().endsWith("TaggedXMLDataIOStyle")) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } if (!parentArray.hasFieldAxis()) { //even with FieldAxis, it is ok, double check int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(outputstream, currentLocator, indent, axisLength, tags, 0); } } //done dealwith with TaggedXMLDataIOSytle //close the tagged data section if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 4,624
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent ) { boolean niceOutput = sPrettyXDFOutput; String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum().toString(); if (checksum !=null) writeOut(outputstream, " checksum = \"" + checksum + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); if (href !=null) { //write out to another file, double check } currentLocator = parentArray.createLocator(); if (readObj.getClass().getName().endsWith("TaggedXMLDataIOStyle")) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } if (!parentArray.hasFieldAxis()) { //even with FieldAxis, it is ok, double check int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(outputstream, currentLocator, indent, axisLength, tags, 0); } } //done dealwith with TaggedXMLDataIOSytle //close the tagged data section if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent ) { boolean niceOutput = sPrettyXDFOutput; String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum().toString(); if (checksum !=null) writeOut(outputstream, " checksum = \"" + checksum + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); if (href !=null) { //write out to another file, double check } currentLocator = parentArray.createLocator(); if (readObj.getClass().getName().endsWith("TaggedXMLDataIOStyle")) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } if (!parentArray.hasFieldAxis()) { //even with FieldAxis, it is ok, double check int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(outputstream, currentLocator, indent, axisLength, tags, 0); } } //done dealwith with TaggedXMLDataIOSytle //close the tagged data section if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 4,625
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent ) { boolean niceOutput = sPrettyXDFOutput; String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum().toString(); if (checksum !=null) writeOut(outputstream, " checksum = \"" + checksum + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); if (href !=null) { //write out to another file, double check } currentLocator = parentArray.createLocator(); if (readObj.getClass().getName().endsWith("TaggedXMLDataIOStyle")) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } if (!parentArray.hasFieldAxis()) { //even with FieldAxis, it is ok, double check int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(outputstream, currentLocator, indent, axisLength, tags, 0); } } //done dealwith with TaggedXMLDataIOSytle //close the tagged data section if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent ) { boolean niceOutput = sPrettyXDFOutput; String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum().toString(); if (checksum !=null) writeOut(outputstream, " checksum = \"" + checksum + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); if (href !=null) { //write out to another file, double check } currentLocator = parentArray.createLocator(); if (readObj.getClass().getName().endsWith("TaggedXMLDataIOStyle")) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } if (!parentArray.hasFieldAxis()) { //even with FieldAxis, it is ok, double check int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(outputstream, currentLocator, indent, axisLength, tags, 0); } } //done dealwith with TaggedXMLDataIOSytle //close the tagged data section if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 4,626
|
protected void writeTaggedData(OutputStream outputstream, Locator locator, String indent, int[] axisLength, String[] tags, int which) { String tag = (String) tags[which]; if (sPrettyXDFOutput) { indent += sPrettyXDFOutputIndentation; } //base case if (which == tags.length-2) { int stop = axisLength[which]; String tag1 = (String) tags[which+1]; for (int count = 0; count < stop; count++) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + tag + ">"); if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent + sPrettyXDFOutputIndentation); } int fastestAxisLength = axisLength[axisLength.length-1]; int dataNum = 0; while (dataNum < fastestAxisLength) { try { writeOut( outputstream, "<" + tag1 + ">"); writeOut(outputstream, getStringData(locator)); writeOut( outputstream, "</" + tag1 + ">"); } catch (NoDataException e) { writeOut(outputstream, e.toString()); } dataNum ++; locator.next(); } if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + tag+ ">"); } } else { int stop = axisLength[which]; which++; for (int i = 0; i < stop; i++) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + tag + ">"); writeTaggedData(outputstream, locator, indent, axisLength, tags, which); if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + tag + ">"); } } }
|
protected void writeTaggedData(OutputStream outputstream, Locator locator, String indent, int[] axisLength, String[] tags, int which) { String tag = (String) tags[which]; if (sPrettyXDFOutput) { indent += sPrettyXDFOutputIndentation; } //base case if (which == tags.length-2) { int stop = axisLength[which]; String tag1 = (String) tags[which+1]; for (int count = 0; count < stop; count++) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + tag + ">"); if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent + sPrettyXDFOutputIndentation); } int fastestAxisLength = axisLength[axisLength.length-1]; int dataNum = 0; while (dataNum < fastestAxisLength) { try { writeOut( outputstream, "<" + tag1 + ">"); writeOut(outputstream, getStringData(locator)); writeOut( outputstream, "</" + tag1 + ">"); } catch (NoDataException e) { writeOut(outputstream, e.toString()); } dataNum ++; locator.next(); } if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + tag+ ">"); } } else { int stop = axisLength[which]; which++; for (int i = 0; i < stop; i++) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + tag + ">"); writeTaggedData(outputstream, locator, indent, axisLength, tags, which); if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + tag + ">"); } } }
| 4,627
|
protected void writeTaggedData(OutputStream outputstream, Locator locator, String indent, int[] axisLength, String[] tags, int which) { String tag = (String) tags[which]; if (sPrettyXDFOutput) { indent += sPrettyXDFOutputIndentation; } //base case if (which == tags.length-2) { int stop = axisLength[which]; String tag1 = (String) tags[which+1]; for (int count = 0; count < stop; count++) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + tag + ">"); if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent + sPrettyXDFOutputIndentation); } int fastestAxisLength = axisLength[axisLength.length-1]; int dataNum = 0; while (dataNum < fastestAxisLength) { try { writeOut( outputstream, "<" + tag1 + ">"); writeOut(outputstream, getStringData(locator)); writeOut( outputstream, "</" + tag1 + ">"); } catch (NoDataException e) { writeOut(outputstream, e.toString()); } dataNum ++; locator.next(); } if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + tag+ ">"); } } else { int stop = axisLength[which]; which++; for (int i = 0; i < stop; i++) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + tag + ">"); writeTaggedData(outputstream, locator, indent, axisLength, tags, which); if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + tag + ">"); } } }
|
protected void writeTaggedData(OutputStream outputstream, Locator locator, String indent, int[] axisLength, String[] tags, int which) { String tag = (String) tags[which]; if (sPrettyXDFOutput) { indent += sPrettyXDFOutputIndentation; } //base case if (which == tags.length-2) { int stop = axisLength[which]; String tag1 = (String) tags[which+1]; for (int count = 0; count < stop; count++) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + tag + ">"); if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent + sPrettyXDFOutputIndentation); } int fastestAxisLength = axisLength[axisLength.length-1]; int dataNum = 0; while (dataNum < fastestAxisLength) { try { writeOut( outputstream, "<" + tag1 + ">"); writeOut(outputstream, getStringData(locator)); writeOut( outputstream, "</" + tag1 + ">"); } catch (NoDataException e) { writeOut(outputstream, e.toString()); } dataNum ++; locator.next(); } if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + tag+ ">"); } } else { int stop = axisLength[which]; which++; for (int i = 0; i < stop; i++) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + tag + ">"); writeTaggedData(outputstream, locator, indent, axisLength, tags, which); if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + tag + ">"); } } }
| 4,628
|
public BasicStroke() { this(1, CAP_SQUARE, JOIN_MITER, 10, null, 0); }
|
public BasicStroke(float width, int cap, int join, float miterlimit, float[] dash, float dashPhase) { this(1, CAP_SQUARE, JOIN_MITER, 10, null, 0); }
| 4,629
|
public BasicStroke() { this(1, CAP_SQUARE, JOIN_MITER, 10, null, 0); }
|
public BasicStroke() { if (width < 0.0f ) throw new IllegalArgumentException("width " + width + " < 0"); else if (cap < CAP_BUTT || cap > CAP_SQUARE) throw new IllegalArgumentException("cap " + cap + " out of range [" + CAP_BUTT + ".." + CAP_SQUARE + "]"); else if (miterlimit < 1.0f && join == JOIN_MITER) throw new IllegalArgumentException("miterlimit " + miterlimit + " < 1.0f while join == JOIN_MITER"); else if (join < JOIN_MITER || join > JOIN_BEVEL) throw new IllegalArgumentException("join " + join + " out of range [" + JOIN_MITER + ".." + JOIN_BEVEL + "]"); else if (dashPhase < 0.0f && dash != null) throw new IllegalArgumentException("dashPhase " + dashPhase + " < 0.0f while dash != null"); else if (dash != null) if (dash.length == 0) throw new IllegalArgumentException("dash.length is 0"); else { boolean allZero = true; for ( int i = 0; i < dash.length; ++i) { if (dash[i] != 0.0f) { allZero = false; break; } } if (allZero) throw new IllegalArgumentException("all dashes are 0.0f"); } this.width = width; this.cap = cap; this.join = join; limit = miterlimit; this.dash = dash == null ? null : (float[]) dash.clone(); phase = dashPhase; }
| 4,630
|
private void addSegments(Segment[] segments) { double[] p0 = start.last.last(); double[] p1 = new double[]{start.last.P2.getX(), start.last.P2.getY()}; double[] p2 = new double[]{segments[0].P1.getX(), segments[0].P1.getY()}; double[] p3 = segments[0].first(); Point2D p; double det = (p1[0] - p0[0])*(p3[1] - p2[1]) - (p3[0] - p2[0])*(p1[1] - p0[1]); if( det > 0 ) { // start and segment[0] form the 'inner' part of a join, // connect the overlapping segments p = lineIntersection(p0[0],p0[1],p1[0],p1[1],p2[0],p2[1],p3[0],p3[1], false); if( p == null ) { // Dodgy. start.add(new LineSegment(start.last.P2, segments[0].P1)); p = new Point2D.Double((segments[0].P1.getX()+ start.last.P2.getX())/2.0, (segments[0].P1.getY()+ start.last.P2.getY())/2.0); } else segments[0].P1 = start.last.P2 = p; start.add( segments[0] ); joinSegments(end, segments[1], p); } else { // end and segment[1] form the 'inner' part p0 = end.last.last(); p1 = new double[]{end.last.P2.getX(), end.last.P2.getY()}; p2 = new double[]{segments[1].P1.getX(), segments[1].P1.getY()}; p3 = segments[1].first(); p = lineIntersection(p0[0],p0[1],p1[0],p1[1], p2[0],p2[1],p3[0],p3[1], false); if( p == null ) { // Dodgy. end.add(new LineSegment(end.last.P2, segments[1].P1)); p = new Point2D.Double((segments[1].P1.getX()+ end.last.P2.getX())/2.0, (segments[1].P1.getY()+ end.last.P2.getY())/2.0); } else segments[1].P1 = end.last.P2 = p; end.add( segments[1] ); joinSegments(start, segments[0], p); } }
|
private void addSegments(Segment[] segments) { double[] p0 = start.last.last(); double[] p1 = new double[]{start.last.P2.getX(), start.last.P2.getY()}; double[] p2 = new double[]{segments[0].P1.getX(), segments[0].P1.getY()}; double[] p3 = segments[0].first(); Point2D p; double det = (p1[0] - p0[0])*(p3[1] - p2[1]) - (p3[0] - p2[0])*(p1[1] - p0[1]); if( det > 0 ) { // start and segment[0] form the 'inner' part of a join, // connect the overlapping segments p = lineIntersection(p0[0],p0[1],p1[0],p1[1],p2[0],p2[1],p3[0],p3[1], false); if( p == null ) { // Dodgy. start.add(new LineSegment(start.last.P2, segments[0].P1)); p = new Point2D.Double((segments[0].P1.getX()+ start.last.P2.getX())/2.0, (segments[0].P1.getY()+ start.last.P2.getY())/2.0); } else segments[0].P1 = start.last.P2 = p; start.add( segments[0] ); joinSegments(end, segments[1], p); } else { // end and segment[1] form the 'inner' part p0 = end.last.last(); p1 = new double[]{end.last.P2.getX(), end.last.P2.getY()}; p2 = new double[]{segments[1].P1.getX(), segments[1].P1.getY()}; p3 = segments[1].first(); p = lineIntersection(p0[0],p0[1],p1[0],p1[1], p2[0],p2[1],p3[0],p3[1], false); if( p == null ) { // Dodgy. end.add(new LineSegment(end.last.P2, segments[1].P1)); p = new Point2D.Double((segments[1].P1.getX()+ end.last.P2.getX())/2.0, (segments[1].P1.getY()+ end.last.P2.getY())/2.0); } else segments[1].P1 = end.last.P2 = p; end.add( segments[1] ); joinSegments(start, segments[0], p); } }
| 4,631
|
private void capEnd(Segment a, Segment b) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( cap ) { case CAP_BUTT: a.add(new LineSegment(a.last.P2, b.P1)); break; case CAP_SQUARE: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); c2 = new Point2D.Double(b.P1.getX() + dx, b.P1.getY() + dy); a.add(new LineSegment(a.last.P2, c1)); a.add(new LineSegment(c1, c2)); a.add(new LineSegment(c2, b.P1)); break; case CAP_ROUND: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = (2.0/3.0)*width*dx/l; dy = (2.0/3.0)*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); c2 = new Point2D.Double(b.P1.getX() + dx, b.P1.getY() + dy); a.add(new CubicSegment(a.last.P2, c1, c2, b.P1)); break; } a.add(b); }
|
private void capEnd(Segment a, Segment b) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( cap ) { case CAP_BUTT: a.add(new LineSegment(a.last.P2, b.P1)); break; case CAP_SQUARE: p0 = a.last.cp2(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); c2 = new Point2D.Double(b.P1.getX() + dx, b.P1.getY() + dy); a.add(new LineSegment(a.last.P2, c1)); a.add(new LineSegment(c1, c2)); a.add(new LineSegment(c2, b.P1)); break; case CAP_ROUND: p0 = a.last.cp2(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = (2.0/3.0)*width*dx/l; dy = (2.0/3.0)*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); c2 = new Point2D.Double(b.P1.getX() + dx, b.P1.getY() + dy); a.add(new CubicSegment(a.last.P2, c1, c2, b.P1)); break; } a.add(b); }
| 4,632
|
private void capEnd(Segment a, Segment b) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( cap ) { case CAP_BUTT: a.add(new LineSegment(a.last.P2, b.P1)); break; case CAP_SQUARE: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); c2 = new Point2D.Double(b.P1.getX() + dx, b.P1.getY() + dy); a.add(new LineSegment(a.last.P2, c1)); a.add(new LineSegment(c1, c2)); a.add(new LineSegment(c2, b.P1)); break; case CAP_ROUND: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = (2.0/3.0)*width*dx/l; dy = (2.0/3.0)*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); c2 = new Point2D.Double(b.P1.getX() + dx, b.P1.getY() + dy); a.add(new CubicSegment(a.last.P2, c1, c2, b.P1)); break; } a.add(b); }
|
private void capEnd(Segment a, Segment b) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( cap ) { case CAP_BUTT: a.add(new LineSegment(a.last.P2, b.P1)); break; case CAP_SQUARE: p0 = a.last.cp2(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); c2 = new Point2D.Double(b.P1.getX() + dx, b.P1.getY() + dy); a.add(new LineSegment(a.last.P2, c1)); a.add(new LineSegment(c1, c2)); a.add(new LineSegment(c2, b.P1)); break; case CAP_ROUND: p0 = a.last.cp2(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = (2.0/3.0)*width*dx/l; dy = (2.0/3.0)*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); c2 = new Point2D.Double(b.P1.getX() + dx, b.P1.getY() + dy); a.add(new CubicSegment(a.last.P2, c1, c2, b.P1)); break; } a.add(b); }
| 4,633
|
public Shape createStrokedShape(Shape s) { PathIterator pi = s.getPathIterator( new AffineTransform() ); if( dash == null ) return solidStroke( pi ); return dashedStroke( pi ); }
|
public Shape createStrokedShape(Shape s) { PathIterator pi = s.getPathIterator(null); if( dash == null ) return solidStroke( pi ); return dashedStroke( pi ); }
| 4,634
|
private Shape dashedStroke(PathIterator pi) { GeneralPath out = new GeneralPath(); return out; }
|
private Shape dashedStroke(PathIterator pi) { GeneralPath out = new GeneralPath(); return out; }
| 4,635
|
private void joinSegments(Segment a, Segment b, Point2D insideP) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( join ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.getY()}; double[] p3 = b.first(); Point2D p = lineIntersection(p0[0],p0[1],p1[0],p1[1],p2[0],p2[1],p3[0],p3[1], true); if( p == null || insideP == null ) a.add(new LineSegment(a.last.P2, b.P1)); else if((p.distance(insideP)/width) < limit) { a.add(new LineSegment(a.last.P2, p)); a.add(new LineSegment(p, b.P1)); } else { // outside miter limit, do a bevel join. a.add(new LineSegment(a.last.P2, b.P1)); } break; case JOIN_ROUND: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); p0 = new double[]{b.P1.getX(), b.P1.getY()}; p1 = b.first(); dx = p0[0] - p1[0]; // backwards direction. dy = p0[1] - p1[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c2 = new Point2D.Double(p0[0] + dx, p0[1] + dy); a.add(new CubicSegment(a.last.P2, c1, c2, b.P1)); break; case JOIN_BEVEL: a.add(new LineSegment(a.last.P2, b.P1)); break; } a.add(b); }
|
private void joinSegments(Segment[] segments) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( join ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.getY()}; double[] p3 = b.first(); Point2D p = lineIntersection(p0[0],p0[1],p1[0],p1[1],p2[0],p2[1],p3[0],p3[1], true); if( p == null || insideP == null ) a.add(new LineSegment(a.last.P2, b.P1)); else if((p.distance(insideP)/width) < limit) { a.add(new LineSegment(a.last.P2, p)); a.add(new LineSegment(p, b.P1)); } else { // outside miter limit, do a bevel join. a.add(new LineSegment(a.last.P2, b.P1)); } break; case JOIN_ROUND: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); p0 = new double[]{b.P1.getX(), b.P1.getY()}; p1 = b.first(); dx = p0[0] - p1[0]; // backwards direction. dy = p0[1] - p1[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c2 = new Point2D.Double(p0[0] + dx, p0[1] + dy); a.add(new CubicSegment(a.last.P2, c1, c2, b.P1)); break; case JOIN_BEVEL: a.add(new LineSegment(a.last.P2, b.P1)); break; } a.add(b); }
| 4,636
|
private void joinSegments(Segment a, Segment b, Point2D insideP) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( join ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.getY()}; double[] p3 = b.first(); Point2D p = lineIntersection(p0[0],p0[1],p1[0],p1[1],p2[0],p2[1],p3[0],p3[1], true); if( p == null || insideP == null ) a.add(new LineSegment(a.last.P2, b.P1)); else if((p.distance(insideP)/width) < limit) { a.add(new LineSegment(a.last.P2, p)); a.add(new LineSegment(p, b.P1)); } else { // outside miter limit, do a bevel join. a.add(new LineSegment(a.last.P2, b.P1)); } break; case JOIN_ROUND: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); p0 = new double[]{b.P1.getX(), b.P1.getY()}; p1 = b.first(); dx = p0[0] - p1[0]; // backwards direction. dy = p0[1] - p1[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c2 = new Point2D.Double(p0[0] + dx, p0[1] + dy); a.add(new CubicSegment(a.last.P2, c1, c2, b.P1)); break; case JOIN_BEVEL: a.add(new LineSegment(a.last.P2, b.P1)); break; } a.add(b); }
|
private void joinSegments(Segment a, Segment b, Point2D insideP) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( join ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.getY()}; double[] p3 = b.first(); Point2D p = lineIntersection(p0[0],p0[1],p1[0],p1[1],p2[0],p2[1],p3[0],p3[1], true); if( p == null || insideP == null ) a.add(new LineSegment(a.last.P2, b.P1)); else if((p.distance(insideP)/width) < limit) { a.add(new LineSegment(a.last.P2, p)); a.add(new LineSegment(p, b.P1)); } else { // outside miter limit, do a bevel join. a.add(new LineSegment(a.last.P2, b.P1)); } break; case JOIN_ROUND: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); p0 = new double[]{b.P1.getX(), b.P1.getY()}; p1 = b.first(); dx = p0[0] - p1[0]; // backwards direction. dy = p0[1] - p1[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c2 = new Point2D.Double(p0[0] + dx, p0[1] + dy); a.add(new CubicSegment(a.last.P2, c1, c2, b.P1)); break; case JOIN_BEVEL: a.add(new LineSegment(a.last.P2, b.P1)); break; } a.add(b); }
| 4,637
|
private void joinSegments(Segment a, Segment b, Point2D insideP) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( join ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.getY()}; double[] p3 = b.first(); Point2D p = lineIntersection(p0[0],p0[1],p1[0],p1[1],p2[0],p2[1],p3[0],p3[1], true); if( p == null || insideP == null ) a.add(new LineSegment(a.last.P2, b.P1)); else if((p.distance(insideP)/width) < limit) { a.add(new LineSegment(a.last.P2, p)); a.add(new LineSegment(p, b.P1)); } else { // outside miter limit, do a bevel join. a.add(new LineSegment(a.last.P2, b.P1)); } break; case JOIN_ROUND: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); p0 = new double[]{b.P1.getX(), b.P1.getY()}; p1 = b.first(); dx = p0[0] - p1[0]; // backwards direction. dy = p0[1] - p1[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c2 = new Point2D.Double(p0[0] + dx, p0[1] + dy); a.add(new CubicSegment(a.last.P2, c1, c2, b.P1)); break; case JOIN_BEVEL: a.add(new LineSegment(a.last.P2, b.P1)); break; } a.add(b); }
|
private void joinSegments(Segment a, Segment b, Point2D insideP) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; p = lineIntersection(p0[0],p0[1],p1[0],p1[1], p2[0],p2[1],p3[0],p3[1], false); double det = (p1[0] - p0[0])*(p3[1] - p2[1]) - (p3[0] - p2[0])*(p1[1] - p0[1]); if( det > 0 ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.getY()}; double[] p3 = b.first(); Point2D p = lineIntersection(p0[0],p0[1],p1[0],p1[1],p2[0],p2[1],p3[0],p3[1], true); if( p == null || insideP == null ) a.add(new LineSegment(a.last.P2, b.P1)); else if((p.distance(insideP)/width) < limit) { a.add(new LineSegment(a.last.P2, p)); a.add(new LineSegment(p, b.P1)); } else { // outside miter limit, do a bevel join. a.add(new LineSegment(a.last.P2, b.P1)); } break; case JOIN_ROUND: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); p0 = new double[]{b.P1.getX(), b.P1.getY()}; p1 = b.first(); dx = p0[0] - p1[0]; // backwards direction. dy = p0[1] - p1[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c2 = new Point2D.Double(p0[0] + dx, p0[1] + dy); a.add(new CubicSegment(a.last.P2, c1, c2, b.P1)); break; case JOIN_BEVEL: a.add(new LineSegment(a.last.P2, b.P1)); break; } a.add(b); }
| 4,638
|
private void joinSegments(Segment a, Segment b, Point2D insideP) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( join ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.getY()}; double[] p3 = b.first(); Point2D p = lineIntersection(p0[0],p0[1],p1[0],p1[1],p2[0],p2[1],p3[0],p3[1], true); if( p == null || insideP == null ) a.add(new LineSegment(a.last.P2, b.P1)); else if((p.distance(insideP)/width) < limit) { a.add(new LineSegment(a.last.P2, p)); a.add(new LineSegment(p, b.P1)); } else { // outside miter limit, do a bevel join. a.add(new LineSegment(a.last.P2, b.P1)); } break; case JOIN_ROUND: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); p0 = new double[]{b.P1.getX(), b.P1.getY()}; p1 = b.first(); dx = p0[0] - p1[0]; // backwards direction. dy = p0[1] - p1[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c2 = new Point2D.Double(p0[0] + dx, p0[1] + dy); a.add(new CubicSegment(a.last.P2, c1, c2, b.P1)); break; case JOIN_BEVEL: a.add(new LineSegment(a.last.P2, b.P1)); break; } a.add(b); }
|
private void joinSegments(Segment a, Segment b, Point2D insideP) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( join ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.getY()}; double[] p3 = b.first(); Point2D p = lineIntersection(p0[0],p0[1],p1[0],p1[1],p2[0],p2[1],p3[0],p3[1], true); if( p == null || insideP == null ) a.add(new LineSegment(a.last.P2, b.P1)); else if((p.distance(insideP)/width) < limit) { a.add(new LineSegment(a.last.P2, p)); a.add(new LineSegment(p, b.P1)); } else { // outside miter limit, do a bevel join. a.add(new LineSegment(a.last.P2, b.P1)); } break; case JOIN_ROUND: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); p0 = new double[]{b.P1.getX(), b.P1.getY()}; p1 = b.first(); dx = p0[0] - p1[0]; // backwards direction. dy = p0[1] - p1[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c2 = new Point2D.Double(p0[0] + dx, p0[1] + dy); a.add(new CubicSegment(a.last.P2, c1, c2, b.P1)); break; case JOIN_BEVEL: a.add(new LineSegment(a.last.P2, b.P1)); break; } a.add(b); }
| 4,639
|
private void joinSegments(Segment a, Segment b, Point2D insideP) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( join ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.getY()}; double[] p3 = b.first(); Point2D p = lineIntersection(p0[0],p0[1],p1[0],p1[1],p2[0],p2[1],p3[0],p3[1], true); if( p == null || insideP == null ) a.add(new LineSegment(a.last.P2, b.P1)); else if((p.distance(insideP)/width) < limit) { a.add(new LineSegment(a.last.P2, p)); a.add(new LineSegment(p, b.P1)); } else { // outside miter limit, do a bevel join. a.add(new LineSegment(a.last.P2, b.P1)); } break; case JOIN_ROUND: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); p0 = new double[]{b.P1.getX(), b.P1.getY()}; p1 = b.first(); dx = p0[0] - p1[0]; // backwards direction. dy = p0[1] - p1[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c2 = new Point2D.Double(p0[0] + dx, p0[1] + dy); a.add(new CubicSegment(a.last.P2, c1, c2, b.P1)); break; case JOIN_BEVEL: a.add(new LineSegment(a.last.P2, b.P1)); break; } a.add(b); }
|
private void joinSegments(Segment a, Segment b, Point2D insideP) { double[] p0, p1; double dx, dy, l; Point2D c1,c2; switch( join ) { case JOIN_MITER: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; double[] p2 = new double[]{b.P1.getX(), b.P1.getY()}; double[] p3 = b.first(); Point2D p = lineIntersection(p0[0],p0[1],p1[0],p1[1],p2[0],p2[1],p3[0],p3[1], true); if( p == null || insideP == null ) a.add(new LineSegment(a.last.P2, b.P1)); else if((p.distance(insideP)/width) < limit) { a.add(new LineSegment(a.last.P2, p)); a.add(new LineSegment(p, b.P1)); } else { // outside miter limit, do a bevel join. a.add(new LineSegment(a.last.P2, b.P1)); } break; case JOIN_ROUND: p0 = a.last.last(); p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()}; dx = p1[0] - p0[0]; dy = p1[1] - p0[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy); p0 = new double[]{b.P1.getX(), b.P1.getY()}; p1 = b.first(); dx = p0[0] - p1[0]; // backwards direction. dy = p0[1] - p1[1]; l = Math.sqrt(dx * dx + dy * dy); dx = 0.5*width*dx/l; dy = 0.5*width*dy/l; c2 = new Point2D.Double(p0[0] + dx, p0[1] + dy); a.add(new CubicSegment(a.last.P2, c1, c2, b.P1)); break; case JOIN_BEVEL: a.add(new LineSegment(a.last.P2, b.P1)); break; } else { joinInnerSegments(end, segments[1], p); joinOuterSegments(start, segments[0], p); } }
| 4,640
|
private Shape solidStroke(PathIterator pi) { double[] coords = new double[6]; double x, y, x0, y0; boolean pathOpen = false; GeneralPath output = new GeneralPath( ); Segment[] p; x = x0 = y = y0 = 0; while( !pi.isDone() ) { switch( pi.currentSegment(coords) ) { case PathIterator.SEG_MOVETO: x0 = x = coords[0]; y0 = y = coords[1]; if( pathOpen ) { capEnds(); convertPath(output, start); start = end = null; pathOpen = false; } break; case PathIterator.SEG_LINETO: p = (new LineSegment(x, y, coords[0], coords[1])). getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_QUADTO: p = (new QuadSegment(x, y, coords[0], coords[1], coords[2], coords[3])).getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_CUBICTO: p = new CubicSegment(x, y, coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]).getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_CLOSE: p = (new LineSegment(x, y, x0, y0)).getDisplacedSegments(width/2.0); addSegments(p); convertPath(output, start); convertPath(output, end); start = end = null; pathOpen = false; break; } pi.next(); } if( pathOpen ) { capEnds(); convertPath(output, start); } return output; }
|
private Shape solidStroke(PathIterator pi) { double[] coords = new double[6]; double x, y, x0, y0; boolean pathOpen = false; GeneralPath output = new GeneralPath( ); Segment[] p; x = x0 = y = y0 = 0; while( !pi.isDone() ) { switch( pi.currentSegment(coords) ) { case PathIterator.SEG_MOVETO: x0 = x = coords[0]; y0 = y = coords[1]; if( pathOpen ) { capEnds(); convertPath(output, start); start = end = null; pathOpen = false; } break; case PathIterator.SEG_LINETO: p = (new LineSegment(x, y, coords[0], coords[1])). getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_QUADTO: p = (new QuadSegment(x, y, coords[0], coords[1], coords[2], coords[3])).getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_CUBICTO: p = new CubicSegment(x, y, coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]).getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_CLOSE: p = (new LineSegment(x, y, x0, y0)).getDisplacedSegments(width/2.0); addSegments(p); convertPath(output, start); convertPath(output, end); start = end = null; pathOpen = false; break; } pi.next(); } if( pathOpen ) { capEnds(); convertPath(output, start); } return output; }
| 4,641
|
private Shape solidStroke(PathIterator pi) { double[] coords = new double[6]; double x, y, x0, y0; boolean pathOpen = false; GeneralPath output = new GeneralPath( ); Segment[] p; x = x0 = y = y0 = 0; while( !pi.isDone() ) { switch( pi.currentSegment(coords) ) { case PathIterator.SEG_MOVETO: x0 = x = coords[0]; y0 = y = coords[1]; if( pathOpen ) { capEnds(); convertPath(output, start); start = end = null; pathOpen = false; } break; case PathIterator.SEG_LINETO: p = (new LineSegment(x, y, coords[0], coords[1])). getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_QUADTO: p = (new QuadSegment(x, y, coords[0], coords[1], coords[2], coords[3])).getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_CUBICTO: p = new CubicSegment(x, y, coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]).getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_CLOSE: p = (new LineSegment(x, y, x0, y0)).getDisplacedSegments(width/2.0); addSegments(p); convertPath(output, start); convertPath(output, end); start = end = null; pathOpen = false; break; } pi.next(); } if( pathOpen ) { capEnds(); convertPath(output, start); } return output; }
|
private Shape solidStroke(PathIterator pi) { double[] coords = new double[6]; double x, y, x0, y0; boolean pathOpen = false; GeneralPath output = new GeneralPath( ); Segment[] p; x = x0 = y = y0 = 0; while( !pi.isDone() ) { switch( pi.currentSegment(coords) ) { case PathIterator.SEG_MOVETO: x0 = x = coords[0]; y0 = y = coords[1]; if( pathOpen ) { capEnds(); convertPath(output, start); start = end = null; pathOpen = false; } break; case PathIterator.SEG_LINETO: p = (new LineSegment(x, y, coords[0], coords[1])). getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_QUADTO: p = (new QuadSegment(x, y, coords[0], coords[1], coords[2], coords[3])).getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_CUBICTO: p = new CubicSegment(x, y, coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]).getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_CLOSE: p = (new LineSegment(x, y, x0, y0)).getDisplacedSegments(width/2.0); addSegments(p); convertPath(output, start); convertPath(output, end); start = end = null; pathOpen = false; break; } pi.next(); } if( pathOpen ) { capEnds(); convertPath(output, start); } return output; }
| 4,642
|
private Shape solidStroke(PathIterator pi) { double[] coords = new double[6]; double x, y, x0, y0; boolean pathOpen = false; GeneralPath output = new GeneralPath( ); Segment[] p; x = x0 = y = y0 = 0; while( !pi.isDone() ) { switch( pi.currentSegment(coords) ) { case PathIterator.SEG_MOVETO: x0 = x = coords[0]; y0 = y = coords[1]; if( pathOpen ) { capEnds(); convertPath(output, start); start = end = null; pathOpen = false; } break; case PathIterator.SEG_LINETO: p = (new LineSegment(x, y, coords[0], coords[1])). getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_QUADTO: p = (new QuadSegment(x, y, coords[0], coords[1], coords[2], coords[3])).getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_CUBICTO: p = new CubicSegment(x, y, coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]).getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_CLOSE: p = (new LineSegment(x, y, x0, y0)).getDisplacedSegments(width/2.0); addSegments(p); convertPath(output, start); convertPath(output, end); start = end = null; pathOpen = false; break; } pi.next(); } if( pathOpen ) { capEnds(); convertPath(output, start); } return output; }
|
private Shape solidStroke(PathIterator pi) { double[] coords = new double[6]; double x, y, x0, y0; boolean pathOpen = false; GeneralPath output = new GeneralPath( ); Segment[] p; x = x0 = y = y0 = 0; while( !pi.isDone() ) { switch( pi.currentSegment(coords) ) { case PathIterator.SEG_MOVETO: x0 = x = coords[0]; y0 = y = coords[1]; if( pathOpen ) { capEnds(); convertPath(output, start); start = end = null; pathOpen = false; } break; case PathIterator.SEG_LINETO: p = (new LineSegment(x, y, coords[0], coords[1])). getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_QUADTO: p = (new QuadSegment(x, y, coords[0], coords[1], coords[2], coords[3])).getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_CUBICTO: p = new CubicSegment(x, y, coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]).getDisplacedSegments(width/2.0); if( !pathOpen ) { start = p[0]; end = p[1]; pathOpen = true; } else addSegments(p); x = coords[0]; y = coords[1]; break; case PathIterator.SEG_CLOSE: if (x == x0 && y == y0) { joinSegments(new Segment[] { start.first, end.first }); } else { p = (new LineSegment(x, y, x0, y0)).getDisplacedSegments(width / 2.0); addSegments(p); convertPath(output, start); convertPath(output, end); start = end = null; pathOpen = false; break; } pi.next(); } if( pathOpen ) { capEnds(); convertPath(output, start); } return output; }
| 4,643
|
public void add(Segment newsegment) { last.next = newsegment; last = last.next; }
|
public void add(Segment newsegment) { last.next = newsegment; last = last.next.last; }
| 4,645
|
public LineSegment(Point2D p1, Point2D p2) { super(); P1 = (Point2D) p1.clone(); P2 = (Point2D) p2.clone(); }
|
public LineSegment(double x1, double y1, double x2, double y2) { super(); P1 = (Point2D) p1.clone(); P2 = (Point2D) p2.clone(); }
| 4,646
|
public LineSegment(Point2D p1, Point2D p2) { super(); P1 = (Point2D) p1.clone(); P2 = (Point2D) p2.clone(); }
|
public LineSegment(Point2D p1, Point2D p2) { super(); P1 = (Point2D) p1.clone(); P2 = (Point2D) p2.clone(); }
| 4,647
|
public CubicSegment(Point2D p1, Point2D cp1, Point2D cp2, Point2D p2) { super(); P1 = p1; P2 = p2; this.cp1 = cp1; this.cp2 = cp2; }
|
public CubicSegment(double x1, double y1, double c1x, double c1y, double c2x, double c2y, double x2, double y2) { super(); P1 = p1; P2 = p2; this.cp1 = cp1; this.cp2 = cp2; }
| 4,648
|
public CubicSegment(Point2D p1, Point2D cp1, Point2D cp2, Point2D p2) { super(); P1 = p1; P2 = p2; this.cp1 = cp1; this.cp2 = cp2; }
|
public CubicSegment(Point2D p1, Point2D cp1, Point2D cp2, Point2D p2) { super(); P1 = p1; P2 = p2; this.cp1 = cp1; this.cp2 = cp2; }
| 4,649
|
public Segment[] getDisplacedSegments(double radius) { this.radius = radius; double x0 = P1.getX(); double y0 = P1.getY(); double x1 = cp1.getX(); double y1 = cp1.getY(); double x2 = cp2.getX(); double y2 = cp2.getY(); double x3 = P2.getX(); double y3 = P2.getY(); double[] p1 = normal(x0, y0, x1, y1); double[] p2 = normal(x2, y2, x3, y3); // FIXME: Doesn't compile. // return new Segment[]{s1, s2}; return new Segment[0]; }
|
public Segment[] getDisplacedSegments(double radius) { this.radius = radius; double x0 = P1.getX(); double y0 = P1.getY(); double x1 = cp1.getX(); double y1 = cp1.getY(); double x2 = cp2.getX(); double y2 = cp2.getY(); double x3 = P2.getX(); double y3 = P2.getY(); double[] p1 = normal(x0, y0, x1, y1); double[] p2 = normal(x2, y2, x3, y3); // FIXME: Doesn't compile. // return new Segment[]{s1, s2}; return new Segment[0]; }
| 4,651
|
public Segment[] getDisplacedSegments(double radius) { this.radius = radius; double x0 = P1.getX(); double y0 = P1.getY(); double x1 = cp1.getX(); double y1 = cp1.getY(); double x2 = cp2.getX(); double y2 = cp2.getY(); double x3 = P2.getX(); double y3 = P2.getY(); double[] p1 = normal(x0, y0, x1, y1); double[] p2 = normal(x2, y2, x3, y3); // FIXME: Doesn't compile. // return new Segment[]{s1, s2}; return new Segment[0]; }
|
public Segment[] getDisplacedSegments(double radius) { this.radius = radius; double x0 = P1.getX(); double y0 = P1.getY(); double x1 = cp1.getX(); double y1 = cp1.getY(); double x2 = cp2.getX(); double y2 = cp2.getY(); double x3 = P2.getX(); double y3 = P2.getY(); double[] p1 = normal(x0, y0, x1, y1); double[] p2 = normal(x2, y2, x3, y3); // FIXME: Doesn't compile. // return new Segment[]{s1, s2}; return new Segment[] { segmentTop, segmentBottom }; }
| 4,652
|
protected void resolve() throws PluginException { // Do nothing }
|
protected void resolve(PluginRegistryModel registry) throws PluginException { registry.registerExtensionPoint(this); // Do nothing }
| 4,653
|
protected void unresolve() throws PluginException { // Do nothing }
|
protected void unresolve() throws PluginException { // Do nothing }
| 4,654
|
public DoubleSeqHolder(double[] initial_value) { value = initial_value; typecode.setLength(value.length); }
|
public DoubleSeqHolder() { value = initial_value; typecode.setLength(value.length); }
| 4,655
|
public DoubleSeqHolder(double[] initial_value) { value = initial_value; typecode.setLength(value.length); }
|
public DoubleSeqHolder(double[] initial_value) { value = initial_value; typecode.setLength(value.length); }
| 4,656
|
public void append(PathIterator iter, boolean connect) { // A bad implementation of this method had caused Classpath bug #6076. float[] f = new float[6]; while (! iter.isDone()) { switch (iter.currentSegment(f)) { case PathIterator.SEG_MOVETO: if (! connect || (index == 0)) { moveTo(f[0], f[1]); break; } if ((index >= 1) && (types[index - 1] == PathIterator.SEG_CLOSE) && (f[0] == xpoints[index - 1]) && (f[1] == ypoints[index - 1])) break; // Fall through. case PathIterator.SEG_LINETO: lineTo(f[0], f[1]); break; case PathIterator.SEG_QUADTO: quadTo(f[0], f[1], f[2], f[3]); break; case PathIterator.SEG_CUBICTO: curveTo(f[0], f[1], f[2], f[3], f[4], f[5]); break; case PathIterator.SEG_CLOSE: closePath(); break; } connect = false; iter.next(); } }
|
public void append(Shape s, boolean connect) { // A bad implementation of this method had caused Classpath bug #6076. float[] f = new float[6]; while (! iter.isDone()) { switch (iter.currentSegment(f)) { case PathIterator.SEG_MOVETO: if (! connect || (index == 0)) { moveTo(f[0], f[1]); break; } if ((index >= 1) && (types[index - 1] == PathIterator.SEG_CLOSE) && (f[0] == xpoints[index - 1]) && (f[1] == ypoints[index - 1])) break; // Fall through. case PathIterator.SEG_LINETO: lineTo(f[0], f[1]); break; case PathIterator.SEG_QUADTO: quadTo(f[0], f[1], f[2], f[3]); break; case PathIterator.SEG_CUBICTO: curveTo(f[0], f[1], f[2], f[3], f[4], f[5]); break; case PathIterator.SEG_CLOSE: closePath(); break; } connect = false; iter.next(); } }
| 4,657
|
public void append(PathIterator iter, boolean connect) { // A bad implementation of this method had caused Classpath bug #6076. float[] f = new float[6]; while (! iter.isDone()) { switch (iter.currentSegment(f)) { case PathIterator.SEG_MOVETO: if (! connect || (index == 0)) { moveTo(f[0], f[1]); break; } if ((index >= 1) && (types[index - 1] == PathIterator.SEG_CLOSE) && (f[0] == xpoints[index - 1]) && (f[1] == ypoints[index - 1])) break; // Fall through. case PathIterator.SEG_LINETO: lineTo(f[0], f[1]); break; case PathIterator.SEG_QUADTO: quadTo(f[0], f[1], f[2], f[3]); break; case PathIterator.SEG_CUBICTO: curveTo(f[0], f[1], f[2], f[3], f[4], f[5]); break; case PathIterator.SEG_CLOSE: closePath(); break; } connect = false; iter.next(); } }
|
public void append(PathIterator iter, boolean connect) { // A bad implementation of this method had caused Classpath bug #6076. float[] f = new float[6]; while (! iter.isDone()) { switch (iter.currentSegment(f)) { case PathIterator.SEG_MOVETO: if (! connect || (index == 0)) { moveTo(f[0], f[1]); break; } if ((index >= 1) && (types[index - 1] == PathIterator.SEG_CLOSE) && (f[0] == xpoints[index - 1]) && (f[1] == ypoints[index - 1])) break; // Fall through. case PathIterator.SEG_LINETO: lineTo(f[0], f[1]); break; case PathIterator.SEG_QUADTO: quadTo(f[0], f[1], f[2], f[3]); break; case PathIterator.SEG_CUBICTO: curveTo(f[0], f[1], f[2], f[3], f[4], f[5]); break; case PathIterator.SEG_CLOSE: closePath(); break; } connect = false; iter.next(); } }
| 4,658
|
public void parseFields(byte[] cByte, ArrayList ffd, StringBuffer rb) { FileFieldDef f; // write out the html record information for each field that is selected for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { switch (f.getFieldType()) { case 'P': case 'S': rb.append(f.parseData(cByte).trim() + delimiter); break; default: rb.append(stringQualifier + f.parseData(cByte).trim() + stringQualifier + delimiter); break; } } } rb.append ('\n'); fout.println(rb); }
|
public void parseFields(byte[] cByte, ArrayList ffd, StringBuffer rb) { FileFieldDef f; // write out the html record information for each field that is selected for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { switch (f.getFieldType()) { case 'P': case 'S': rb.append(f.parseData(cByte).trim() + delimiter); break; default: rb.append(stringQualifier + f.parseData(cByte).trim() + stringQualifier + delimiter); break; } } } fout.println(rb); }
| 4,659
|
public void writeHeader(String fileName, String host, ArrayList ffd, char decChar) { try { FileFieldDef f; StringBuffer sb = new StringBuffer(); // loop through each of the fields and write out the field name for // each selected field for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { sb.append(f.getFieldName() + delimiter); } } fout.write (sb.toString().getBytes()); fout.write ('\n'); } catch (IOException ioe) {// printFTPInfo(" error writing header " + ioe.getMessage()); } }
|
public void writeHeader(String fileName, String host, ArrayList ffd, char decChar) { FileFieldDef f; StringBuffer sb = new StringBuffer(); for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { sb.append(f.getFieldName() + delimiter); } } FileFieldDef f; StringBuffer sb = new StringBuffer(); // loop through each of the fields and write out the field name for // each selected field for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { sb.append(f.getFieldName() + delimiter); } } fout.write (sb.toString().getBytes()); fout.write ('\n'); } catch (IOException ioe) {// printFTPInfo(" error writing header " + ioe.getMessage()); } }
| 4,660
|
public void writeHeader(String fileName, String host, ArrayList ffd, char decChar) { try { FileFieldDef f; StringBuffer sb = new StringBuffer(); // loop through each of the fields and write out the field name for // each selected field for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { sb.append(f.getFieldName() + delimiter); } } fout.write (sb.toString().getBytes()); fout.write ('\n'); } catch (IOException ioe) {// printFTPInfo(" error writing header " + ioe.getMessage()); } }
|
public void writeHeader(String fileName, String host, ArrayList ffd, char decChar) { try { FileFieldDef f; StringBuffer sb = new StringBuffer(); // loop through each of the fields and write out the field name for // each selected field for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { sb.append(f.getFieldName() + delimiter); } } fout.write (sb.toString().getBytes()); fout.write ('\n'); } catch (IOException ioe) {// printFTPInfo(" error writing header " + ioe.getMessage()); } }
| 4,661
|
protected Rectangle getBox(Rectangle r) { if (!progressBar.isIndeterminate()) return null; if (r == null) r = new Rectangle(); Rectangle vr = new Rectangle(); SwingUtilities.calculateInnerArea(progressBar, vr); // Recalculate the metrics only when size of the progressbar has changed. if (incr == -1 || boxDependent == -1 || boxIndependent == -1) { //numFrames has to be an even number as defined by spec. int iterations = numFrames / 2; if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) { boxDependent = vr.width / 6.; incr = ((double) (vr.width - boxDependent)) / (double) iterations; boxIndependent = vr.height; } else { boxDependent = vr.height / 6.; incr = ((double) (vr.height - boxDependent)) / (double) iterations; boxIndependent = vr.width; } } int index = getAnimationIndex(); if (animationIndex > (numFrames) / 2) index = numFrames - getAnimationIndex(); if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) { r.x = vr.x + (int) (incr * index); r.y = vr.y; r.width = (int) boxDependent; r.height = (int) boxIndependent; } else { r.x = vr.x; r.y = vr.height - (int) (incr * index) + vr.y - (int) boxDependent; r.width = (int) boxIndependent; r.height = (int) boxDependent; } return r; }
|
protected Rectangle getBox(Rectangle r) { if (!progressBar.isIndeterminate()) return null; if (r == null) r = new Rectangle(); Rectangle vr = new Rectangle(); SwingUtilities.calculateInnerArea(progressBar, vr); // Recalculate the metrics only when size of the progressbar has changed. if (incr == -1 || boxDependent == -1 || boxIndependent == -1) { //numFrames has to be an even number as defined by spec. int iterations = numFrames / 2; if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) { boxDependent = vr.width / 6.; incr = ((double) (vr.width - boxDependent)) / (double) iterations; boxIndependent = vr.height; } else { boxDependent = vr.height / 6.; incr = ((double) (vr.height - boxDependent)) / (double) iterations; boxIndependent = vr.width; } } int index = getAnimationIndex(); if (animationIndex > numFrames / 2) index = numFrames - getAnimationIndex(); if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) { r.x = vr.x + (int) (incr * index); r.y = vr.y; r.width = (int) boxDependent; r.height = (int) boxIndependent; } else { r.x = vr.x; r.y = vr.height - (int) (incr * index) + vr.y - (int) boxDependent; r.width = (int) boxIndependent; r.height = (int) boxDependent; } return r; }
| 4,662
|
protected void paintDeterminate(Graphics g, JComponent c) { Color saved = g.getColor(); int space = getCellSpacing(); int len = getCellLength(); int max = progressBar.getMaximum(); int min = progressBar.getMinimum(); int value = progressBar.getValue(); Rectangle vr = SwingUtilities.calculateInnerArea(c, new Rectangle()); Rectangle or = progressBar.getBounds(); Insets insets = c.getInsets(); int amountFull = getAmountFull(insets, or.width, or.height); if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) { g.setColor(c.getForeground()); g.fillRect(vr.x, vr.y, amountFull, vr.height); } else { g.setColor(c.getForeground()); g.fillRect(vr.x, vr.y + vr.height - amountFull, vr.width, amountFull); } if (progressBar.isStringPainted() && !progressBar.getString().equals("")) paintString(g, 0, 0, or.width, or.height, amountFull, insets); g.setColor(saved); }
|
protected void paintDeterminate(Graphics g, JComponent c) { Color saved = g.getColor(); int space = getCellSpacing(); int len = getCellLength(); int max = progressBar.getMaximum(); int min = progressBar.getMinimum(); int value = progressBar.getValue(); Rectangle vr = SwingUtilities.calculateInnerArea(c, new Rectangle()); Rectangle or = progressBar.getBounds(); Insets insets = c.getInsets(); int amountFull = getAmountFull(insets, or.width, or.height); if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) { g.setColor(c.getForeground()); g.fillRect(vr.x, vr.y, amountFull, vr.height); } else { g.setColor(c.getForeground()); g.fillRect(vr.x, vr.y + vr.height - amountFull, vr.width, amountFull); } if (progressBar.isStringPainted() && !progressBar.getString().equals("")) paintString(g, 0, 0, or.width, or.height, amountFull, insets); g.setColor(saved); }
| 4,663
|
public static void main(String[] args) { final int i1 = 0x00450078; final int i2 = 0x45007800; System.out.println("i1 % i2=" + NumberUtils.hex(i1 % i2)); System.out.println("i1 & i2=" + NumberUtils.hex(i1 & i2)); System.out.println("i1 | i2=" + NumberUtils.hex(i1 | i2)); System.out.println("i1 ^ i2=" + NumberUtils.hex(i1 ^ i2)); }
|
public static void main(String[] args) { final int i1 = 0x00450078; final int i2 = 0x45007800; System.out.println("i1 % i2=" + NumberUtils.hex(i1 % i2)); System.out.println("i1 & i2=" + NumberUtils.hex(i1 & i2)); System.out.println("i1 | i2=" + NumberUtils.hex(i1 | i2)); System.out.println("i1 ^ i2=" + NumberUtils.hex(i1 ^ i2)); }
| 4,665
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
| 4,667
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
| 4,668
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
| 4,669
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
| 4,670
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
| 4,671
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
| 4,672
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
| 4,673
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
| 4,674
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
|
public final static VmArrayClass getPrimitiveArrayClass(int type) { switch (type) { case 4: return BooleanArrayClass; case 8: return ByteArrayClass; case 5: return CharArrayClass; case 9: return ShortArrayClass; case 10: return IntArrayClass; case 6: return FloatArrayClass; case 11: return LongArrayClass; case 7: return DoubleArrayClass; default: throw new IllegalArgumentException("Unknown type " + type); } }
| 4,675
|
public NoSuchFieldError() { super(); }
|
public NoSuchFieldError() { super(); }
| 4,676
|
public StackOverflowError() { super(); }
|
public StackOverflowError() { super(); }
| 4,677
|
public UnknownError(String s) { super(s); }
|
public UnknownError(String s) { super(s); }
| 4,678
|
public AbstractColorChooserPanel() { } // AbstractColorChooserPanel()
|
public AbstractColorChooserPanel() { } // AbstractColorChooserPanel()
| 4,679
|
public AddressPcEntry(VmMethod method, int pc, int offset) { this.method = method; this.pc = (char)pc; this.offset = offset; }
|
public AddressPcEntry(VmMethod method, int pc, int offset, int inlineDepth) { this.method = method; this.pc = (char)pc; this.offset = offset; }
| 4,680
|
public AddressPcEntry(VmMethod method, int pc, int offset) { this.method = method; this.pc = (char)pc; this.offset = offset; }
|
public AddressPcEntry(VmMethod method, int pc, int offset) { this.method = method; this.pc = (char) pc; this.offset = offset; }
| 4,681
|
public void add(VmMethod method, int pc, int offset) { if (offsetTable != null) { throw new RuntimeException( "Address table is locked"); } final AddressPcEntry entry = new AddressPcEntry(method, pc, offset); if (list == null) { list = entry; } else { // Sort on offset (from low to high) if (offset < list.offset) { entry.next = list; list = entry; } else { AddressPcEntry p = list; while ((p.next != null) && (offset > p.next.offset)) { p = p.next; } entry.next = p.next; p.next = entry; } } }
|
public void add(VmMethod method, int pc, int offset) { if (offsetTable != null) { throw new RuntimeException( "Address table is locked"); } final AddressPcEntry entry = new AddressPcEntry(method, pc, offset); if (list == null) { list = entry; } else { // Sort on offset (from low to high) if (offset < list.offset) { entry.next = list; list = entry; } else { AddressPcEntry p = list; while ((p.next != null) && (offset > p.next.offset)) { p = p.next; } entry.next = p.next; p.next = entry; } } }
| 4,683
|
final void lock() { AddressPcEntry p = list; int count = 0; final ArrayList<VmMethod> methods = new ArrayList<VmMethod>(); while (p != null) { count++; final VmMethod m = p.method; if (!methods.contains(m)) { methods.add(m); } p = p.next; } final int[] offsetTable = new int[ count]; final char[] pcTable = new char[count]; final byte[] methodIndexTable = new byte[count]; this.methodTable = (VmMethod[]) methods.toArray(new VmMethod[ methods .size()]); p = list; int i = 0; int lastOffset = -1; while (p != null) { methodIndexTable[i] = (byte)methods.indexOf(p.method); pcTable[i] = p.pc; offsetTable[i] = p.offset; if (p.offset < lastOffset) { throw new InternalError( "unordered offset found"); } lastOffset = p.offset; i++; p = p.next; } this.offsetTable = offsetTable; this.pcTable = pcTable; this.methodIndexTable = methodIndexTable; this.list = null; }
|
final void lock() { AddressPcEntry p = list; int count = 0; final ArrayList<VmMethod> methods = new ArrayList<VmMethod>(); while (p != null) { count++; final VmMethod m = p.method; if (!methods.contains(m)) { methods.add(m); } p = p.next; } final int methodCount = methods.size(); final int[] offsetTable = new int[count]; final char[] pcTable = new char[count]; final byte[] methodIndexTable = new byte[count]; this.methodTable = (VmMethod[]) methods.toArray(new VmMethod[ methods .size()]); p = list; int i = 0; int lastOffset = -1; while (p != null) { methodIndexTable[i] = (byte)methods.indexOf(p.method); pcTable[i] = p.pc; offsetTable[i] = p.offset; if (p.offset < lastOffset) { throw new InternalError( "unordered offset found"); } lastOffset = p.offset; i++; p = p.next; } this.offsetTable = offsetTable; this.pcTable = pcTable; this.methodIndexTable = methodIndexTable; this.list = null; }
| 4,684
|
final void lock() { AddressPcEntry p = list; int count = 0; final ArrayList<VmMethod> methods = new ArrayList<VmMethod>(); while (p != null) { count++; final VmMethod m = p.method; if (!methods.contains(m)) { methods.add(m); } p = p.next; } final int[] offsetTable = new int[ count]; final char[] pcTable = new char[count]; final byte[] methodIndexTable = new byte[count]; this.methodTable = (VmMethod[]) methods.toArray(new VmMethod[ methods .size()]); p = list; int i = 0; int lastOffset = -1; while (p != null) { methodIndexTable[i] = (byte)methods.indexOf(p.method); pcTable[i] = p.pc; offsetTable[i] = p.offset; if (p.offset < lastOffset) { throw new InternalError( "unordered offset found"); } lastOffset = p.offset; i++; p = p.next; } this.offsetTable = offsetTable; this.pcTable = pcTable; this.methodIndexTable = methodIndexTable; this.list = null; }
|
final void lock() { AddressPcEntry p = list; int count = 0; final ArrayList<VmMethod> methods = new ArrayList<VmMethod>(); while (p != null) { count++; final VmMethod m = p.method; if (!methods.contains(m)) { methods.add(m); } p = p.next; } final int[] offsetTable = new int[ count]; final char[] pcTable = new char[count]; final byte[] methodIndexTable = new byte[count]; this.methodTable = (VmMethod[]) methods.toArray(new VmMethod[ methods .size()]); p = list; int i = 0; int lastOffset = -1; while (p != null) { methodIndexTable[i] = (byte)methods.indexOf(p.method); pcTable[i] = p.pc; offsetTable[i] = p.offset; if (p.offset < lastOffset) { throw new InternalError( "unordered offset found"); } lastOffset = p.offset; i++; p = p.next; } this.offsetTable = offsetTable; this.pcTable = pcTable; this.methodIndexTable = methodIndexTable; this.list = null; }
| 4,685
|
final void lock() { AddressPcEntry p = list; int count = 0; final ArrayList<VmMethod> methods = new ArrayList<VmMethod>(); while (p != null) { count++; final VmMethod m = p.method; if (!methods.contains(m)) { methods.add(m); } p = p.next; } final int[] offsetTable = new int[ count]; final char[] pcTable = new char[count]; final byte[] methodIndexTable = new byte[count]; this.methodTable = (VmMethod[]) methods.toArray(new VmMethod[ methods .size()]); p = list; int i = 0; int lastOffset = -1; while (p != null) { methodIndexTable[i] = (byte)methods.indexOf(p.method); pcTable[i] = p.pc; offsetTable[i] = p.offset; if (p.offset < lastOffset) { throw new InternalError( "unordered offset found"); } lastOffset = p.offset; i++; p = p.next; } this.offsetTable = offsetTable; this.pcTable = pcTable; this.methodIndexTable = methodIndexTable; this.list = null; }
|
final void lock() { AddressPcEntry p = list; int count = 0; final ArrayList<VmMethod> methods = new ArrayList<VmMethod>(); while (p != null) { count++; final VmMethod m = p.method; if (!methods.contains(m)) { methods.add(m); } p = p.next; } final int[] offsetTable = new int[ count]; final char[] pcTable = new char[count]; final byte[] methodIndexTable = new byte[count]; this.methodTable = (VmMethod[]) methods.toArray(new VmMethod[ methods .size()]); p = list; int i = 0; int lastOffset = -1; while (p != null) { if (methodIndexTable != null) { methodIndexTable[i] = (byte) methods.indexOf(p.method); } pcTable[i] = p.pc; offsetTable[i] = p.offset; if (p.offset < lastOffset) { throw new InternalError( "unordered offset found"); } lastOffset = p.offset; i++; p = p.next; } this.offsetTable = offsetTable; this.pcTable = pcTable; this.methodIndexTable = methodIndexTable; this.list = null; }
| 4,686
|
final void lock() { AddressPcEntry p = list; int count = 0; final ArrayList<VmMethod> methods = new ArrayList<VmMethod>(); while (p != null) { count++; final VmMethod m = p.method; if (!methods.contains(m)) { methods.add(m); } p = p.next; } final int[] offsetTable = new int[ count]; final char[] pcTable = new char[count]; final byte[] methodIndexTable = new byte[count]; this.methodTable = (VmMethod[]) methods.toArray(new VmMethod[ methods .size()]); p = list; int i = 0; int lastOffset = -1; while (p != null) { methodIndexTable[i] = (byte)methods.indexOf(p.method); pcTable[i] = p.pc; offsetTable[i] = p.offset; if (p.offset < lastOffset) { throw new InternalError( "unordered offset found"); } lastOffset = p.offset; i++; p = p.next; } this.offsetTable = offsetTable; this.pcTable = pcTable; this.methodIndexTable = methodIndexTable; this.list = null; }
|
final void lock() { AddressPcEntry p = list; int count = 0; final ArrayList<VmMethod> methods = new ArrayList<VmMethod>(); while (p != null) { count++; final VmMethod m = p.method; if (!methods.contains(m)) { methods.add(m); } p = p.next; } final int[] offsetTable = new int[ count]; final char[] pcTable = new char[count]; final byte[] methodIndexTable = new byte[count]; this.methodTable = (VmMethod[]) methods.toArray(new VmMethod[ methods .size()]); p = list; int i = 0; int lastOffset = -1; while (p != null) { methodIndexTable[i] = (byte)methods.indexOf(p.method); pcTable[i] = p.pc; offsetTable[i] = p.offset; if (p.offset < lastOffset) { throw new InternalError( "unordered offset found"); } lastOffset = p.offset; i++; p = p.next; } this.offsetTable = offsetTable; this.pcTable = pcTable; this.methodIndexTable = methodIndexTable; this.list = null; }
| 4,687
|
public void writeTo(PrintStream out) { for (int i = 0; i < offsetTable.length; i++) { final int methodIdx = methodIndexTable[i]; final int pc = pcTable[i]; final int offset = offsetTable[i]; out.println(methodTable[ methodIdx].getName() + ", pc[" + pc + "]\t0x" + NumberUtils.hex(offset)); } }
|
public void writeTo(PrintStream out) { for (int i = 0; i < offsetTable.length; i++) { final int methodIdx = (methodIndexTable != null) ? methodIndexTable[i] : 0; final int pc = pcTable[i]; final int offset = offsetTable[i]; out.println(methodTable[ methodIdx].getName() + ", pc[" + pc + "]\t0x" + NumberUtils.hex(offset)); } }
| 4,689
|
public void writeTo(PrintStream out) { for (int i = 0; i < offsetTable.length; i++) { final int methodIdx = methodIndexTable[i]; final int pc = pcTable[i]; final int offset = offsetTable[i]; out.println(methodTable[ methodIdx].getName() + ", pc[" + pc + "]\t0x" + NumberUtils.hex(offset)); } }
|
public void writeTo(PrintStream out) { for (int i = 0; i < offsetTable.length; i++) { final int methodIdx = methodIndexTable[i]; final int pc = pcTable[i]; final int offset = offsetTable[i]; out.println(methodTable[methodIdx].getName() + ", pc[" + pc + "]\t0x" + NumberUtils.hex(offset)); } }
| 4,690
|
public EthernetHeader(SocketBuffer skbuf) { this.destination = new EthernetAddress(skbuf, 0); this.source = new EthernetAddress(skbuf, 6); this.lengthType = skbuf.get16(12); }
|
public EthernetHeader(SocketBuffer skbuf) { this.destination = new EthernetAddress(skbuf, 0); this.source = new EthernetAddress(skbuf, 6); this.lengthType = skbuf.get16(12); }
| 4,691
|
protected void clearGuiStuff() { for (int x = 0; x < lenScreen; x++) {// screen[x].setCharAndAttr(' ',initAttr,false); screen[x].setUseGUI(ScreenChar.NO_GUI); }// dirty.setBounds(tArea.getBounds()); dirty.setBounds(fmWidth * numCols,fmHeight * numRows,0,0); }
|
protected void clearGuiStuff() { for (int x = 0; x < lenScreen; x++) {// screen[x].setCharAndAttr(' ',initAttr,false); screen[x].setUseGUI(ScreenChar.NO_GUI); }// dirty.setBounds(tArea.getBounds()); dirty.setBounds(tArea.getBounds()); }
| 4,694
|
public void clearScreen() { for (int x = 0; x < lenScreen; x++) { screen[x].setCharAndAttr(' ',initAttr,false); screen[x].setUseGUI(ScreenChar.NO_GUI); }// dirty.setBounds(tArea.getBounds()); dirty.setBounds(fmWidth * numCols,fmHeight * numRows,0,0); }
|
public void clearScreen() { for (int x = 0; x < lenScreen; x++) { screen[x].setCharAndAttr(' ',initAttr,false); screen[x].setUseGUI(ScreenChar.NO_GUI); }// dirty.setBounds(tArea.getBounds()); dirty.setBounds(tArea.getBounds()); }
| 4,695
|
public void keyPressed( KeyEvent evt ) { if (evt.getKeyCode() == KeyEvent.VK_DOWN) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; if (!evt.isShiftDown()) { BasicListUI.this.list.clearSelection(); BasicListUI.this.list.setSelectedIndex(Math.min(lead+1,max)); } else { BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.min(lead+1,max)); } } else if (evt.getKeyCode() == KeyEvent.VK_UP) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); if (!evt.isShiftDown()) { BasicListUI.this.list.clearSelection(); BasicListUI.this.list.setSelectedIndex(Math.max(lead-1,0)); } else { BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.max(lead-1,0)); } } }
|
public void keyPressed( KeyEvent evt ) { if (evt.getKeyCode() == KeyEvent.VK_DOWN) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; if (!evt.isShiftDown()) { BasicListUI.this.list.clearSelection(); BasicListUI.this.list.setSelectedIndex(Math.min(lead+1,max)); } else { BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.min(lead+1,max)); } } else if (evt.getKeyCode() == KeyEvent.VK_UP) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); if (!evt.isShiftDown()) { BasicListUI.this.list.clearSelection(); BasicListUI.this.list.setSelectedIndex(Math.max(lead-1,0)); } else { BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.max(lead-1,0)); } } }
| 4,696
|
public void keyPressed( KeyEvent evt ) { if (evt.getKeyCode() == KeyEvent.VK_DOWN) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; if (!evt.isShiftDown()) { BasicListUI.this.list.clearSelection(); BasicListUI.this.list.setSelectedIndex(Math.min(lead+1,max)); } else { BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.min(lead+1,max)); } } else if (evt.getKeyCode() == KeyEvent.VK_UP) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); if (!evt.isShiftDown()) { BasicListUI.this.list.clearSelection(); BasicListUI.this.list.setSelectedIndex(Math.max(lead-1,0)); } else { BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.max(lead-1,0)); } } }
|
public void keyPressed( KeyEvent evt ) { if (evt.getKeyCode() == KeyEvent.VK_DOWN) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; if (!evt.isShiftDown()) { BasicListUI.this.list.clearSelection(); BasicListUI.this.list.setSelectedIndex(Math.min(lead+1,max)); } else { BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.min(lead+1,max)); } } else if ((evt.getKeyCode() == KeyEvent.VK_UP) || (evt.getKeyCode() == KeyEvent.VK_KP_UP)) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); if (!evt.isShiftDown()) { BasicListUI.this.list.clearSelection(); BasicListUI.this.list.setSelectedIndex(Math.max(lead-1,0)); } else { BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.max(lead-1,0)); } } }
| 4,697
|
public void keyPressed( KeyEvent evt ) { if (evt.getKeyCode() == KeyEvent.VK_DOWN) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; if (!evt.isShiftDown()) { BasicListUI.this.list.clearSelection(); BasicListUI.this.list.setSelectedIndex(Math.min(lead+1,max)); } else { BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.min(lead+1,max)); } } else if (evt.getKeyCode() == KeyEvent.VK_UP) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); if (!evt.isShiftDown()) { BasicListUI.this.list.clearSelection(); BasicListUI.this.list.setSelectedIndex(Math.max(lead-1,0)); } else { BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.max(lead-1,0)); } } }
|
public void keyPressed( KeyEvent evt ) { if (evt.getKeyCode() == KeyEvent.VK_DOWN) { int max = BasicListUI.this.list.getModel().getSize() - 1; if (!evt.isShiftDown()) { BasicListUI.this.list.clearSelection(); BasicListUI.this.list.setSelectedIndex(Math.min(lead+1,max)); } else { BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.min(lead+1,max)); } } else if (evt.getKeyCode() == KeyEvent.VK_UP) { if (!evt.isShiftDown()) { BasicListUI.this.list.clearSelection(); BasicListUI.this.list.setSelectedIndex(Math.max(lead-1,0)); } else { BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.max(lead-1,0)); } } }
| 4,698
|
private void loadList(String which) { lm.clear(); lm.removeAllElements(); if (which.equals(LangTool.getString("key.labelKeys"))) { for (int x = 0; x < keyMnemonic.length; x++) { lm.addElement(LangTool.getString("key."+keyMnemonic[x])); } macros = false; special = false; } else { if (which.equals(LangTool.getString("key.labelMacros"))) { if (macrosList != null) for (int x = 0; x < macrosList.length; x++) { lm.addElement(macrosList[x]); } macros = true; special = false; } else { // we will use a collator here so that we can take advantage of the locales Collator collator = Collator.getInstance(); CollationKey key = null; StringBuffer sb = new StringBuffer(); Set set = new TreeSet(); for (int x =0;x < 256; x++) { char c = codePage.ebcdic2uni(x); char ac = codePage.getASCIIChar(x); if (!Character.isISOControl(c)) { sb.setLength(0); if (Integer.toHexString(ac).length() == 1){ sb.append("0x0" + Integer.toHexString(ac).toUpperCase()); } else { sb.append("0x" + Integer.toHexString(ac).toUpperCase()); } sb.append(" - " + c + " - " + getUnicodeString(c)); key = collator.getCollationKey(sb.toString()); set.add(key); } } Iterator iterator = set.iterator(); while (iterator.hasNext()) { CollationKey keyc = (CollationKey)iterator.next(); lm.addElement(keyc.getSourceString()); } macros = false; special = true; } } if (!lm.isEmpty()) functions.setSelectedIndex(0); }
|
private void loadList(String which) { lm.clear(); lm.removeAllElements(); if (which.equals(LangTool.getString("key.labelKeys"))) { for (int x = 0; x < keyMnemonic.length; x++) { lm.addElement(LangTool.getString("key."+keyMnemonic[x])); } macros = false; special = false; } else { if (which.equals(LangTool.getString("key.labelMacros"))) { if (macrosList != null) for (int x = 0; x < macrosList.length; x++) { lm.addElement(macrosList[x]); } macros = true; special = false; } else { // we will use a collator here so that we can take advantage of the locales Collator collator = Collator.getInstance(); CollationKey key = null; StringBuffer sb = new StringBuffer(); Set set = new TreeSet(); for (int x =0;x < 256; x++) { char c = codePage.ebcdic2uni(x); char ac = codePage.getASCIIChar(x); if (!Character.isISOControl(c)) { sb.setLength(0); if (Integer.toHexString(ac).length() == 1){ sb.append("0x0" + Integer.toHexString(ac).toUpperCase()); } else { sb.append("0x" + Integer.toHexString(ac).toUpperCase()); } sb.append(" - " + c + " - " + getUnicodeString(c)); key = collator.getCollationKey(sb.toString()); set.add(key); } } Iterator iterator = set.iterator(); while (iterator.hasNext()) { CollationKey keyc = (CollationKey)iterator.next(); lm.addElement(keyc.getSourceString()); } macros = false; special = true; } } if (!lm.isEmpty()) functions.setSelectedIndex(0); }
| 4,700
|
private void removeIt() { if (!macros && !special) { mapper.removeKeyStroke(keyMnemonic[functions.getSelectedIndex()]); strokeDesc.setText(mapper.getKeyStrokeDesc( keyMnemonic[functions.getSelectedIndex()])); } else { if (macros) { mapper.removeKeyStroke((String)functions.getSelectedValue()); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke((String)functions.getSelectedValue()); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } } }
|
private void removeIt() { if (!macros && !special) { mapper.removeKeyStroke(mnemonicData[functions.getSelectedIndex()]); strokeDesc.setText(mapper.getKeyStrokeDesc( keyMnemonic[functions.getSelectedIndex()])); } else { if (macros) { mapper.removeKeyStroke((String)functions.getSelectedValue()); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke((String)functions.getSelectedValue()); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } } }
| 4,701
|
private void removeIt() { if (!macros && !special) { mapper.removeKeyStroke(keyMnemonic[functions.getSelectedIndex()]); strokeDesc.setText(mapper.getKeyStrokeDesc( keyMnemonic[functions.getSelectedIndex()])); } else { if (macros) { mapper.removeKeyStroke((String)functions.getSelectedValue()); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke((String)functions.getSelectedValue()); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } } }
|
private void removeIt() { if (!macros && !special) { mapper.removeKeyStroke(keyMnemonic[functions.getSelectedIndex()]); strokeDesc.setText(mapper.getKeyStrokeDesc( mnemonicData[functions.getSelectedIndex()])); } else { if (macros) { mapper.removeKeyStroke((String)functions.getSelectedValue()); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); mapper.removeKeyStroke((String)functions.getSelectedValue()); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } } }
| 4,702
|
private void setKeyDescription(int index) { // This try and catch is to fix a problem in JDK1.4-betas try { if (!macros && !special) { strokeDesc.setText(mapper.getKeyStrokeDesc(keyMnemonic[index])); } else { if (macros) { System.out.println((String)lm.getElementAt(index)); strokeDesc.setText(mapper.getKeyStrokeDesc((String)lm.getElementAt(index))); } if (special) { System.out.println((String)lm.getElementAt(index)); String k = ""; k += ((String)lm.getElementAt(index)).charAt(7); strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } } catch (ArrayIndexOutOfBoundsException ar) { System.out.println("ar at index " + index + " - " + ar.getMessage()); } }
|
private void setKeyDescription(int index) { // This try and catch is to fix a problem in JDK1.4-betas try { if (!macros && !special) { strokeDesc.setText(mapper.getKeyStrokeDesc(mnemonicData[index])); } else { if (macros) { System.out.println((String)lm.getElementAt(index)); strokeDesc.setText(mapper.getKeyStrokeDesc((String)lm.getElementAt(index))); } if (special) { System.out.println((String)lm.getElementAt(index)); String k = ""; k += ((String)lm.getElementAt(index)).charAt(7); strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } } catch (ArrayIndexOutOfBoundsException ar) { System.out.println("ar at index " + index + " - " + ar.getMessage()); } }
| 4,703
|
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { if (isLinux) mapper.setKeyStroke(keyMnemonic[functions.getSelectedIndex()],ke,isAltGr); else mapper.setKeyStroke(keyMnemonic[functions.getSelectedIndex()],ke); strokeDesc.setText(mapper.getKeyStrokeDesc( keyMnemonic[functions.getSelectedIndex()])); } else { if (macros) { System.out.println((String)functions.getSelectedValue()); if (isLinux) mapper.setKeyStroke((String)functions.getSelectedValue(),ke,isAltGr); else mapper.setKeyStroke((String)functions.getSelectedValue(),ke); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); if (isLinux) mapper.setKeyStroke(k,ke,isAltGr); else mapper.setKeyStroke(k,ke); strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
|
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { if (isLinux) mapper.setKeyStroke(mnemonicData[functions.getSelectedIndex()],ke,isAltGr); else mapper.setKeyStroke(keyMnemonic[functions.getSelectedIndex()],ke); strokeDesc.setText(mapper.getKeyStrokeDesc( keyMnemonic[functions.getSelectedIndex()])); } else { if (macros) { System.out.println((String)functions.getSelectedValue()); if (isLinux) mapper.setKeyStroke((String)functions.getSelectedValue(),ke,isAltGr); else mapper.setKeyStroke((String)functions.getSelectedValue(),ke); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); if (isLinux) mapper.setKeyStroke(k,ke,isAltGr); else mapper.setKeyStroke(k,ke); strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
| 4,704
|
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { if (isLinux) mapper.setKeyStroke(keyMnemonic[functions.getSelectedIndex()],ke,isAltGr); else mapper.setKeyStroke(keyMnemonic[functions.getSelectedIndex()],ke); strokeDesc.setText(mapper.getKeyStrokeDesc( keyMnemonic[functions.getSelectedIndex()])); } else { if (macros) { System.out.println((String)functions.getSelectedValue()); if (isLinux) mapper.setKeyStroke((String)functions.getSelectedValue(),ke,isAltGr); else mapper.setKeyStroke((String)functions.getSelectedValue(),ke); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); if (isLinux) mapper.setKeyStroke(k,ke,isAltGr); else mapper.setKeyStroke(k,ke); strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
|
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { if (isLinux) mapper.setKeyStroke(keyMnemonic[functions.getSelectedIndex()],ke,isAltGr); else mapper.setKeyStroke(mnemonicData[functions.getSelectedIndex()],ke); strokeDesc.setText(mapper.getKeyStrokeDesc( keyMnemonic[functions.getSelectedIndex()])); } else { if (macros) { System.out.println((String)functions.getSelectedValue()); if (isLinux) mapper.setKeyStroke((String)functions.getSelectedValue(),ke,isAltGr); else mapper.setKeyStroke((String)functions.getSelectedValue(),ke); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); if (isLinux) mapper.setKeyStroke(k,ke,isAltGr); else mapper.setKeyStroke(k,ke); strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
| 4,705
|
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { if (isLinux) mapper.setKeyStroke(keyMnemonic[functions.getSelectedIndex()],ke,isAltGr); else mapper.setKeyStroke(keyMnemonic[functions.getSelectedIndex()],ke); strokeDesc.setText(mapper.getKeyStrokeDesc( keyMnemonic[functions.getSelectedIndex()])); } else { if (macros) { System.out.println((String)functions.getSelectedValue()); if (isLinux) mapper.setKeyStroke((String)functions.getSelectedValue(),ke,isAltGr); else mapper.setKeyStroke((String)functions.getSelectedValue(),ke); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); if (isLinux) mapper.setKeyStroke(k,ke,isAltGr); else mapper.setKeyStroke(k,ke); strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
|
private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { if (isLinux) mapper.setKeyStroke(keyMnemonic[functions.getSelectedIndex()],ke,isAltGr); else mapper.setKeyStroke(keyMnemonic[functions.getSelectedIndex()],ke); strokeDesc.setText(mapper.getKeyStrokeDesc( mnemonicData[functions.getSelectedIndex()])); } else { if (macros) { System.out.println((String)functions.getSelectedValue()); if (isLinux) mapper.setKeyStroke((String)functions.getSelectedValue(),ke,isAltGr); else mapper.setKeyStroke((String)functions.getSelectedValue(),ke); strokeDesc.setText(mapper.getKeyStrokeDesc( (String)functions.getSelectedValue())); } if (special) { System.out.println((String)functions.getSelectedValue()); String k = ""; k += ((String)functions.getSelectedValue()).charAt(7); if (isLinux) mapper.setKeyStroke(k,ke,isAltGr); else mapper.setKeyStroke(k,ke); strokeDesc.setText(mapper.getKeyStrokeDesc(k)); } } mods = true; }
| 4,706
|
public static void main(String[] args) throws NameNotFoundException, ShellException { final ConsoleManager conMgr = (ConsoleManager) InitialNaming .lookup(ConsoleManager.NAME); boolean listConsoles = false; boolean newConsole = false; boolean isolateNewConsole = false; System.out.print("args: "); for (String arg : args) { System.out.print(arg); if (arg.equals("-l")) { listConsoles = true; } else if (arg.equals("-n")) { newConsole = true; } else if (arg.equals("-i")) { isolateNewConsole = true; } } System.out.println(); if (listConsoles) { final Set<String> consoleNames = conMgr.getConsoleNames(); System.out.println("Nr. of registered consoles: " + consoleNames.size()); for (String name : consoleNames) { final Console console = conMgr.getConsole(name); System.out.println(" - " + name + " ACCEL:" + KeyEvent.getKeyText(console .getAcceleratorKeyCode())); } } else if (newConsole) { if (isolateNewConsole) { try { Isolate newIsolate = new Isolate(ConsoleCommand.class.getName(), new String[] { "-n" }); newIsolate.start(); } catch (IsolateStartupException ex) { System.out.println("Failed to start new isolated console"); ex.printStackTrace(System.err); } } else { final TextConsole console = (TextConsole) conMgr.createConsole( null, ConsoleManager.CreateOptions.TEXT | ConsoleManager.CreateOptions.SCROLLABLE); CommandShell commandShell = new CommandShell(console); new Thread(commandShell).start(); System.out.println("Console created with name:" + console.getConsoleName()); } } else { System.out.println("test RawTextConsole"); final TextConsole console = (TextConsole) conMgr.createConsole( null, ConsoleManager.CreateOptions.TEXT); conMgr.registerConsole(console); conMgr.focus(console); console.clear(); } }
|
public static void main(String[] args) throws NameNotFoundException, ShellException { final ConsoleManager conMgr = (ConsoleManager) InitialNaming .lookup(ConsoleManager.NAME); boolean listConsoles = false; boolean newConsole = false; boolean isolateNewConsole = false; System.out.print("args: "); for (String arg : args) { System.out.print(arg); if (arg.equals("-l")) { listConsoles = true; } else if (arg.equals("-n")) { newConsole = true; } else if (arg.equals("-i")) { isolateNewConsole = true; } } System.out.println(); if (listConsoles) { final Set<String> consoleNames = conMgr.getConsoleNames(); System.out.println("Nr. of registered consoles: " + consoleNames.size()); for (String name : consoleNames) { final Console console = conMgr.getConsole(name); System.out.println(" - " + name + " ACCEL:" + KeyEvent.getKeyText(console .getAcceleratorKeyCode())); } } else if (newConsole) { if (isolateNewConsole) { try { Isolate newIsolate = new Isolate(ConsoleCommand.class.getName(), new String[] { "-n" }); newIsolate.start(); } catch (IsolateStartupException ex) { System.out.println("Failed to start new isolated console"); ex.printStackTrace(System.err); } } else { final TextConsole console = (TextConsole) conMgr.createConsole( null, ConsoleManager.CreateOptions.TEXT | ConsoleManager.CreateOptions.SCROLLABLE); CommandShell commandShell = new CommandShell(console); new Thread(commandShell).start(); System.out.println("Console created with name:" + console.getConsoleName()); } } else { System.out.println("test RawTextConsole"); final TextConsole console = (TextConsole) conMgr.createConsole( null, ConsoleManager.CreateOptions.TEXT); conMgr.registerConsole(console); conMgr.focus(console); console.clear(); } }
| 4,707
|
public KeyStroke getKeyStroke(String accelKey) { return keyMap.getKeyStroke(accelKey); }
|
public KeyStroke getKeyStroke(String accelKey) { return KeyMapper.getKeyStroke(accelKey); }
| 4,708
|
public boolean isKeyStrokeDefined(String accelKey) { return keyMap.isKeyStrokeDefined(accelKey); }
|
public boolean isKeyStrokeDefined(String accelKey) { return KeyMapper.isKeyStrokeDefined(accelKey); }
| 4,709
|
private void processVTKeyPressed(KeyEvent e){ keyProcessed = true;// displayInfo(e,"Pressed " + keyProcessed); int keyCode = e.getKeyCode(); if (isLinux && keyCode == e.VK_ALT_GRAPH) { isAltGr = true; }// if (linux)// if (keyCode == e.VK_UNDEFINED ||// if (keyCode == e.VK_ALT) {// System.out.println(" cursor active " + screen.cursorActive);// e.consume();// return;// } if ( keyCode == e.VK_CAPS_LOCK || keyCode == e.VK_SHIFT || keyCode == e.VK_ALT || keyCode == e.VK_ALT_GRAPH ) {// displayInfo(e,"Pressed "); return; }// displayInfo(e,"Pressed " + keyProcessed); KeyStroke ks = KeyStroke.getKeyStroke(e.getKeyCode(),e.getModifiers(),false); if (emulatorAction(ks,e)) { return; } if (isLinux) lastKeyStroke = keyMap.getKeyStrokeText(e,isAltGr); else lastKeyStroke = keyMap.getKeyStrokeText(e); //System.out.println("lastKeyStroke " + lastKeyStroke); if (lastKeyStroke != null && !lastKeyStroke.equals("null")) { if (lastKeyStroke.startsWith("[") || lastKeyStroke.length() == 1) { screen.sendKeys(lastKeyStroke); if (recording) recordBuffer.append(lastKeyStroke); } else { session.executeMeMacro(lastKeyStroke); } if (lastKeyStroke.startsWith("[mark")) { if (lastKeyStroke.equals("[markleft]") || lastKeyStroke.equals("[markright]") || lastKeyStroke.equals("[markup]") || lastKeyStroke.equals("[markdown]")) { session.doKeyBoundArea(e,lastKeyStroke); } } } else keyProcessed = false; if (keyProcessed) e.consume(); }
|
private void processVTKeyPressed(KeyEvent e){ keyProcessed = true;// displayInfo(e,"Pressed " + keyProcessed); int keyCode = e.getKeyCode(); if (isLinux && keyCode == KeyEvent.VK_ALT_GRAPH) { isAltGr = true; }// if (linux)// if (keyCode == e.VK_UNDEFINED ||// if (keyCode == e.VK_ALT) {// System.out.println(" cursor active " + screen.cursorActive);// e.consume();// return;// } if ( keyCode == e.VK_CAPS_LOCK || keyCode == e.VK_SHIFT || keyCode == e.VK_ALT || keyCode == e.VK_ALT_GRAPH ) {// displayInfo(e,"Pressed "); return; }// displayInfo(e,"Pressed " + keyProcessed); KeyStroke ks = KeyStroke.getKeyStroke(e.getKeyCode(),e.getModifiers(),false); if (emulatorAction(ks,e)) { return; } if (isLinux) lastKeyStroke = keyMap.getKeyStrokeText(e,isAltGr); else lastKeyStroke = keyMap.getKeyStrokeText(e); //System.out.println("lastKeyStroke " + lastKeyStroke); if (lastKeyStroke != null && !lastKeyStroke.equals("null")) { if (lastKeyStroke.startsWith("[") || lastKeyStroke.length() == 1) { screen.sendKeys(lastKeyStroke); if (recording) recordBuffer.append(lastKeyStroke); } else { session.executeMeMacro(lastKeyStroke); } if (lastKeyStroke.startsWith("[mark")) { if (lastKeyStroke.equals("[markleft]") || lastKeyStroke.equals("[markright]") || lastKeyStroke.equals("[markup]") || lastKeyStroke.equals("[markdown]")) { session.doKeyBoundArea(e,lastKeyStroke); } } } else keyProcessed = false; if (keyProcessed) e.consume(); }
| 4,710
|
private void processVTKeyPressed(KeyEvent e){ keyProcessed = true;// displayInfo(e,"Pressed " + keyProcessed); int keyCode = e.getKeyCode(); if (isLinux && keyCode == e.VK_ALT_GRAPH) { isAltGr = true; }// if (linux)// if (keyCode == e.VK_UNDEFINED ||// if (keyCode == e.VK_ALT) {// System.out.println(" cursor active " + screen.cursorActive);// e.consume();// return;// } if ( keyCode == e.VK_CAPS_LOCK || keyCode == e.VK_SHIFT || keyCode == e.VK_ALT || keyCode == e.VK_ALT_GRAPH ) {// displayInfo(e,"Pressed "); return; }// displayInfo(e,"Pressed " + keyProcessed); KeyStroke ks = KeyStroke.getKeyStroke(e.getKeyCode(),e.getModifiers(),false); if (emulatorAction(ks,e)) { return; } if (isLinux) lastKeyStroke = keyMap.getKeyStrokeText(e,isAltGr); else lastKeyStroke = keyMap.getKeyStrokeText(e); //System.out.println("lastKeyStroke " + lastKeyStroke); if (lastKeyStroke != null && !lastKeyStroke.equals("null")) { if (lastKeyStroke.startsWith("[") || lastKeyStroke.length() == 1) { screen.sendKeys(lastKeyStroke); if (recording) recordBuffer.append(lastKeyStroke); } else { session.executeMeMacro(lastKeyStroke); } if (lastKeyStroke.startsWith("[mark")) { if (lastKeyStroke.equals("[markleft]") || lastKeyStroke.equals("[markright]") || lastKeyStroke.equals("[markup]") || lastKeyStroke.equals("[markdown]")) { session.doKeyBoundArea(e,lastKeyStroke); } } } else keyProcessed = false; if (keyProcessed) e.consume(); }
|
private void processVTKeyPressed(KeyEvent e){ keyProcessed = true;// displayInfo(e,"Pressed " + keyProcessed); int keyCode = e.getKeyCode(); if (isLinux && keyCode == e.VK_ALT_GRAPH) { isAltGr = true; }// if (linux)// if (keyCode == e.VK_UNDEFINED ||// if (keyCode == e.VK_ALT) {// System.out.println(" cursor active " + screen.cursorActive);// e.consume();// return;// } if ( keyCode == e.VK_CAPS_LOCK || keyCode == e.VK_SHIFT || keyCode == e.VK_ALT || keyCode == e.VK_ALT_GRAPH ) {// displayInfo(e,"Pressed "); return; }// displayInfo(e,"Pressed " + keyProcessed); KeyStroke ks = KeyStroke.getKeyStroke(e.getKeyCode(),e.getModifiers(),false); if (emulatorAction(ks,e)) { return; } if (isLinux) lastKeyStroke = keyMap.getKeyStrokeText(e,isAltGr); else lastKeyStroke = keyMap.getKeyStrokeText(e); //System.out.println("lastKeyStroke " + lastKeyStroke); if (lastKeyStroke != null && !lastKeyStroke.equals("null")) { if (lastKeyStroke.startsWith("[") || lastKeyStroke.length() == 1) { screen.sendKeys(lastKeyStroke); if (recording) recordBuffer.append(lastKeyStroke); } else { session.executeMeMacro(lastKeyStroke); } if (lastKeyStroke.startsWith("[mark")) { if (lastKeyStroke.equals("[markleft]") || lastKeyStroke.equals("[markright]") || lastKeyStroke.equals("[markup]") || lastKeyStroke.equals("[markdown]")) { session.doKeyBoundArea(e,lastKeyStroke); } } } else keyProcessed = false; if (keyProcessed) e.consume(); }
| 4,711
|
private void processVTKeyPressed(KeyEvent e){ keyProcessed = true;// displayInfo(e,"Pressed " + keyProcessed); int keyCode = e.getKeyCode(); if (isLinux && keyCode == e.VK_ALT_GRAPH) { isAltGr = true; }// if (linux)// if (keyCode == e.VK_UNDEFINED ||// if (keyCode == e.VK_ALT) {// System.out.println(" cursor active " + screen.cursorActive);// e.consume();// return;// } if ( keyCode == e.VK_CAPS_LOCK || keyCode == e.VK_SHIFT || keyCode == e.VK_ALT || keyCode == e.VK_ALT_GRAPH ) {// displayInfo(e,"Pressed "); return; }// displayInfo(e,"Pressed " + keyProcessed); KeyStroke ks = KeyStroke.getKeyStroke(e.getKeyCode(),e.getModifiers(),false); if (emulatorAction(ks,e)) { return; } if (isLinux) lastKeyStroke = keyMap.getKeyStrokeText(e,isAltGr); else lastKeyStroke = keyMap.getKeyStrokeText(e); //System.out.println("lastKeyStroke " + lastKeyStroke); if (lastKeyStroke != null && !lastKeyStroke.equals("null")) { if (lastKeyStroke.startsWith("[") || lastKeyStroke.length() == 1) { screen.sendKeys(lastKeyStroke); if (recording) recordBuffer.append(lastKeyStroke); } else { session.executeMeMacro(lastKeyStroke); } if (lastKeyStroke.startsWith("[mark")) { if (lastKeyStroke.equals("[markleft]") || lastKeyStroke.equals("[markright]") || lastKeyStroke.equals("[markup]") || lastKeyStroke.equals("[markdown]")) { session.doKeyBoundArea(e,lastKeyStroke); } } } else keyProcessed = false; if (keyProcessed) e.consume(); }
|
private void processVTKeyPressed(KeyEvent e){ keyProcessed = true;// displayInfo(e,"Pressed " + keyProcessed); int keyCode = e.getKeyCode(); if (isLinux && keyCode == e.VK_ALT_GRAPH) { isAltGr = true; }// if (linux)// if (keyCode == e.VK_UNDEFINED ||// if (keyCode == e.VK_ALT) {// System.out.println(" cursor active " + screen.cursorActive);// e.consume();// return;// } if ( keyCode == e.VK_CAPS_LOCK || keyCode == e.VK_SHIFT || keyCode == e.VK_ALT || keyCode == e.VK_ALT_GRAPH ) {// displayInfo(e,"Pressed "); return; }// displayInfo(e,"Pressed " + keyProcessed); KeyStroke ks = KeyStroke.getKeyStroke(e.getKeyCode(),e.getModifiers(),false); if (emulatorAction(ks,e)) { return; } if (isLinux) lastKeyStroke = KeyMapper.getKeyStrokeText(e,isAltGr); else lastKeyStroke = keyMap.getKeyStrokeText(e); //System.out.println("lastKeyStroke " + lastKeyStroke); if (lastKeyStroke != null && !lastKeyStroke.equals("null")) { if (lastKeyStroke.startsWith("[") || lastKeyStroke.length() == 1) { screen.sendKeys(lastKeyStroke); if (recording) recordBuffer.append(lastKeyStroke); } else { session.executeMeMacro(lastKeyStroke); } if (lastKeyStroke.startsWith("[mark")) { if (lastKeyStroke.equals("[markleft]") || lastKeyStroke.equals("[markright]") || lastKeyStroke.equals("[markup]") || lastKeyStroke.equals("[markdown]")) { session.doKeyBoundArea(e,lastKeyStroke); } } } else keyProcessed = false; if (keyProcessed) e.consume(); }
| 4,712
|
private void processVTKeyPressed(KeyEvent e){ keyProcessed = true;// displayInfo(e,"Pressed " + keyProcessed); int keyCode = e.getKeyCode(); if (isLinux && keyCode == e.VK_ALT_GRAPH) { isAltGr = true; }// if (linux)// if (keyCode == e.VK_UNDEFINED ||// if (keyCode == e.VK_ALT) {// System.out.println(" cursor active " + screen.cursorActive);// e.consume();// return;// } if ( keyCode == e.VK_CAPS_LOCK || keyCode == e.VK_SHIFT || keyCode == e.VK_ALT || keyCode == e.VK_ALT_GRAPH ) {// displayInfo(e,"Pressed "); return; }// displayInfo(e,"Pressed " + keyProcessed); KeyStroke ks = KeyStroke.getKeyStroke(e.getKeyCode(),e.getModifiers(),false); if (emulatorAction(ks,e)) { return; } if (isLinux) lastKeyStroke = keyMap.getKeyStrokeText(e,isAltGr); else lastKeyStroke = keyMap.getKeyStrokeText(e); //System.out.println("lastKeyStroke " + lastKeyStroke); if (lastKeyStroke != null && !lastKeyStroke.equals("null")) { if (lastKeyStroke.startsWith("[") || lastKeyStroke.length() == 1) { screen.sendKeys(lastKeyStroke); if (recording) recordBuffer.append(lastKeyStroke); } else { session.executeMeMacro(lastKeyStroke); } if (lastKeyStroke.startsWith("[mark")) { if (lastKeyStroke.equals("[markleft]") || lastKeyStroke.equals("[markright]") || lastKeyStroke.equals("[markup]") || lastKeyStroke.equals("[markdown]")) { session.doKeyBoundArea(e,lastKeyStroke); } } } else keyProcessed = false; if (keyProcessed) e.consume(); }
|
private void processVTKeyPressed(KeyEvent e){ keyProcessed = true;// displayInfo(e,"Pressed " + keyProcessed); int keyCode = e.getKeyCode(); if (isLinux && keyCode == e.VK_ALT_GRAPH) { isAltGr = true; }// if (linux)// if (keyCode == e.VK_UNDEFINED ||// if (keyCode == e.VK_ALT) {// System.out.println(" cursor active " + screen.cursorActive);// e.consume();// return;// } if ( keyCode == e.VK_CAPS_LOCK || keyCode == e.VK_SHIFT || keyCode == e.VK_ALT || keyCode == e.VK_ALT_GRAPH ) {// displayInfo(e,"Pressed "); return; }// displayInfo(e,"Pressed " + keyProcessed); KeyStroke ks = KeyStroke.getKeyStroke(e.getKeyCode(),e.getModifiers(),false); if (emulatorAction(ks,e)) { return; } if (isLinux) lastKeyStroke = keyMap.getKeyStrokeText(e,isAltGr); else lastKeyStroke = KeyMapper.getKeyStrokeText(e); //System.out.println("lastKeyStroke " + lastKeyStroke); if (lastKeyStroke != null && !lastKeyStroke.equals("null")) { if (lastKeyStroke.startsWith("[") || lastKeyStroke.length() == 1) { screen.sendKeys(lastKeyStroke); if (recording) recordBuffer.append(lastKeyStroke); } else { session.executeMeMacro(lastKeyStroke); } if (lastKeyStroke.startsWith("[mark")) { if (lastKeyStroke.equals("[markleft]") || lastKeyStroke.equals("[markright]") || lastKeyStroke.equals("[markup]") || lastKeyStroke.equals("[markdown]")) { session.doKeyBoundArea(e,lastKeyStroke); } } } else keyProcessed = false; if (keyProcessed) e.consume(); }
| 4,713
|
private void processVTKeyReleased(KeyEvent e){ if (isLinux && e.getKeyCode() == e.VK_ALT_GRAPH) { isAltGr = false; } if (Character.isISOControl(e.getKeyChar()) || keyProcessed || e.isConsumed() ) return;// displayInfo(e,"Released " + keyProcessed); String s = keyMap.getKeyStrokeText(e); if (s != null) { if (s.startsWith("[")) { screen.sendKeys(s); if (recording) recordBuffer.append(s); } else session.executeMeMacro(s); } else keyProcessed = false; if (keyProcessed) e.consume(); }
|
private void processVTKeyReleased(KeyEvent e){ if (isLinux && e.getKeyCode() == KeyEvent.VK_ALT_GRAPH) { isAltGr = false; } if (Character.isISOControl(e.getKeyChar()) || keyProcessed || e.isConsumed() ) return;// displayInfo(e,"Released " + keyProcessed); String s = keyMap.getKeyStrokeText(e); if (s != null) { if (s.startsWith("[")) { screen.sendKeys(s); if (recording) recordBuffer.append(s); } else session.executeMeMacro(s); } else keyProcessed = false; if (keyProcessed) e.consume(); }
| 4,714
|
private void processVTKeyReleased(KeyEvent e){ if (isLinux && e.getKeyCode() == e.VK_ALT_GRAPH) { isAltGr = false; } if (Character.isISOControl(e.getKeyChar()) || keyProcessed || e.isConsumed() ) return;// displayInfo(e,"Released " + keyProcessed); String s = keyMap.getKeyStrokeText(e); if (s != null) { if (s.startsWith("[")) { screen.sendKeys(s); if (recording) recordBuffer.append(s); } else session.executeMeMacro(s); } else keyProcessed = false; if (keyProcessed) e.consume(); }
|
private void processVTKeyReleased(KeyEvent e){ if (isLinux && e.getKeyCode() == e.VK_ALT_GRAPH) { isAltGr = false; } if (Character.isISOControl(e.getKeyChar()) || keyProcessed || e.isConsumed() ) return;// displayInfo(e,"Released " + keyProcessed); String s = KeyMapper.getKeyStrokeText(e); if (s != null) { if (s.startsWith("[")) { screen.sendKeys(s); if (recording) recordBuffer.append(s); } else session.executeMeMacro(s); } else keyProcessed = false; if (keyProcessed) e.consume(); }
| 4,715
|
protected void installDefaults(JComponent c) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); c.setBackground(defaults.getColor("ToolTip.background")); c.setForeground(defaults.getColor("ToolTip.foreground")); c.setFont(defaults.getFont("ToolTip.font")); c.setBorder(defaultBorder); }
|
protected void installDefaults(JComponent c) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); c.setBackground(defaults.getColor("ToolTip.background")); c.setForeground(defaults.getColor("ToolTip.foreground")); c.setFont(defaults.getFont("ToolTip.font")); c.setBorder(defaults.getBorder("ToolTip.border")); }
| 4,716
|
protected Attribute(String a_name) { name = a_name; }
|
private Attribute(String a_name) { name = a_name; }
| 4,717
|
public abstract void write_Context(Context context, ContextList contexts);
|
public abstract void write_Context(Context context, ContextList contexts);
| 4,718
|
public static Provider[] getProviders() { Provider array[] = new Provider[providers.size ()]; providers.copyInto (array); return array; }
|
public static Provider[] getProviders() { Provider[] array = new Provider[providers.size ()]; providers.copyInto (array); return array; }
| 4,719
|
public JViewport createViewport() { return new JViewport(); }
|
protected JViewport createViewport() { return new JViewport(); }
| 4,721
|
public void setColumnHeader(JViewport h) { JViewport old = columnHeader; removeNonNull(old); columnHeader = h; addNonNull(h); firePropertyChange(COLUMN_HEADER_CHANGED_PROPERTY, old, h); sync(); }
|
public void setColumnHeader(JViewport h) { JViewport old = columnHeader; removeNonNull(old); columnHeader = h; addNonNull(h); firePropertyChange("columnHeader", old, h); sync(); }
| 4,722
|
public void setComponentOrientation(ComponentOrientation co) { ComponentOrientation old = super.getComponentOrientation(); super.setComponentOrientation(co); firePropertyChange(COMPONENT_ORIENTATION_CHANGED_PROPERTY, old, co); sync(); }
|
public void setComponentOrientation(ComponentOrientation co) { ComponentOrientation old = super.getComponentOrientation(); super.setComponentOrientation(co); firePropertyChange("componentOrientation", old, co); sync(); }
| 4,723
|
public void setHorizontalScrollBar(JScrollBar h) { JScrollBar old = horizontalScrollBar; removeNonNull(old); horizontalScrollBar = h; addNonNull(h); firePropertyChange(HORIZONTAL_SCROLLBAR_CHANGED_PROPERTY, old, h); sync(); if (old != null) { BoundedRangeModel model = old.getModel(); if (model != null) model.removeChangeListener(scrollListener); } if (h != null) { BoundedRangeModel model = h.getModel(); if (model != null) model.addChangeListener(scrollListener); } }
|
public void setHorizontalScrollBar(JScrollBar h) { JScrollBar old = horizontalScrollBar; removeNonNull(old); horizontalScrollBar = h; addNonNull(h); firePropertyChange("horizontalScrollBar", old, h); sync(); if (old != null) { BoundedRangeModel model = old.getModel(); if (model != null) model.removeChangeListener(scrollListener); } if (h != null) { BoundedRangeModel model = h.getModel(); if (model != null) model.addChangeListener(scrollListener); } }
| 4,724
|
public void setHorizontalScrollBarPolicy(int h) { if (h != HORIZONTAL_SCROLLBAR_AS_NEEDED && h != HORIZONTAL_SCROLLBAR_NEVER && h != HORIZONTAL_SCROLLBAR_ALWAYS) throw new IllegalArgumentException("unknown horizontal scrollbar policy"); int old = horizontalScrollBarPolicy; horizontalScrollBarPolicy = h; firePropertyChange(HORIZONTAL_SCROLLBAR_POLICY_CHANGED_PROPERTY, old, h); sync(); }
|
public void setHorizontalScrollBarPolicy(int h) { if (h != HORIZONTAL_SCROLLBAR_AS_NEEDED && h != HORIZONTAL_SCROLLBAR_NEVER && h != HORIZONTAL_SCROLLBAR_ALWAYS) throw new IllegalArgumentException("unknown horizontal scrollbar policy"); int old = horizontalScrollBarPolicy; horizontalScrollBarPolicy = h; firePropertyChange("horizontalScrollBarPolicy", old, h); sync(); }
| 4,725
|
public void setLayout(LayoutManager l) { LayoutManager old = super.getLayout(); ScrollPaneLayout tmp = (ScrollPaneLayout) l; super.setLayout(l); tmp.syncWithScrollPane(this); firePropertyChange(LAYOUT_CHANGED_PROPERTY, old, l); sync(); }
|
public void setLayout(LayoutManager l) { LayoutManager old = super.getLayout(); ScrollPaneLayout tmp = (ScrollPaneLayout) l; super.setLayout(l); tmp.syncWithScrollPane(this); firePropertyChange("layout", old, l); sync(); }
| 4,726
|
public void setRowHeader(JViewport v) { JViewport old = rowHeader; removeNonNull(old); rowHeader = v; addNonNull(v); firePropertyChange(ROW_HEADER_CHANGED_PROPERTY, old, v); sync(); }
|
public void setRowHeader(JViewport v) { JViewport old = rowHeader; removeNonNull(old); rowHeader = v; addNonNull(v); firePropertyChange("rowHeader", old, v); sync(); }
| 4,727
|
public void setVerticalScrollBar(JScrollBar v) { JScrollBar old = verticalScrollBar; removeNonNull(old); verticalScrollBar = v; addNonNull(v); firePropertyChange(VERTICAL_SCROLLBAR_CHANGED_PROPERTY, old, v); sync(); if (old != null) { BoundedRangeModel model = old.getModel(); if (model != null) model.removeChangeListener(scrollListener); } if (v != null) { BoundedRangeModel model = v.getModel(); if (model != null) model.addChangeListener(scrollListener); } }
|
public void setVerticalScrollBar(JScrollBar v) { JScrollBar old = verticalScrollBar; removeNonNull(old); verticalScrollBar = v; addNonNull(v); firePropertyChange("verticalScrollBar", old, v); sync(); if (old != null) { BoundedRangeModel model = old.getModel(); if (model != null) model.removeChangeListener(scrollListener); } if (v != null) { BoundedRangeModel model = v.getModel(); if (model != null) model.addChangeListener(scrollListener); } }
| 4,728
|
public void setVerticalScrollBarPolicy(int v) { if (v != VERTICAL_SCROLLBAR_AS_NEEDED && v != VERTICAL_SCROLLBAR_NEVER && v != VERTICAL_SCROLLBAR_ALWAYS) throw new IllegalArgumentException("unknown vertical scrollbar policy"); int old = verticalScrollBarPolicy; verticalScrollBarPolicy = v; firePropertyChange(VERTICAL_SCROLLBAR_POLICY_CHANGED_PROPERTY, old, v); sync(); }
|
public void setVerticalScrollBarPolicy(int v) { if (v != VERTICAL_SCROLLBAR_AS_NEEDED && v != VERTICAL_SCROLLBAR_NEVER && v != VERTICAL_SCROLLBAR_ALWAYS) throw new IllegalArgumentException("unknown vertical scrollbar policy"); int old = verticalScrollBarPolicy; verticalScrollBarPolicy = v; firePropertyChange("verticalScrollBarPolicy", old, v); sync(); }
| 4,729
|
public void setViewport(JViewport v) { JViewport old = viewport; removeNonNull(old); if (old != null) old.removeChangeListener(scrollListener); viewport = v; if (v != null) v.addChangeListener(scrollListener); addNonNull(v); revalidate(); repaint(); firePropertyChange(VIEWPORT_CHANGED_PROPERTY, old, v); sync(); }
|
public void setViewport(JViewport v) { JViewport old = viewport; removeNonNull(old); if (old != null) old.removeChangeListener(scrollListener); viewport = v; if (v != null) v.addChangeListener(scrollListener); addNonNull(v); revalidate(); repaint(); firePropertyChange("viewport", old, v); sync(); }
| 4,730
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.