if (index == 0) {
return "Start";
}
LinkedList<PictureCode> pictureCodes = picture.getPictureCodes();
PictureCode pictureCode = pictureCodes.get(index - 1);
PictureCode previousPictureCode = null;
String displayText = null;
if (pictureCode.isActionCode()) {
PictureCodeType actionCodeType = pictureCode.getType();
StringBuilder displayTextBuf = new StringBuilder(" ");
displayTextBuf.append(actionCodeType.getDisplayableText());
displayText = displayTextBuf.toString();
} else {
StringBuilder displayTextBuf = null;
int code = pictureCode.getCode();
switch (pictureCode.getType()) {
case FILL_POINT_DATA:
displayTextBuf = new StringBuilder(" Fill ");
displayTextBuf.append((code & 0xFF00) >> 8);
displayTextBuf.append(" ");
displayTextBuf.append(code & 0x00FF);
displayText = displayTextBuf.toString();
break;
case BRUSH_POINT_DATA:
displayTextBuf = new StringBuilder(" Plot ");
displayTextBuf.append((code & 0xFF00) >> 8);
displayTextBuf.append(" ");
displayTextBuf.append(code & 0x00FF);
displayText = displayTextBuf.toString();
break;
case ABSOLUTE_POINT_DATA:
previousPictureCode = pictureCodes.get(index - 2);
if (previousPictureCode.isActionCode()) {
displayTextBuf = new StringBuilder(" MoveTo ");
} else {
displayTextBuf = new StringBuilder(" LineTo ");
}
displayTextBuf.append((code & 0xFF00) >> 8);