755 if ((sidesArray != null) && (sidesArray.length > 0)) {
756 Sides[] sidesSup = new Sides[sidesArray.length];
757 for (int i=0; i<sidesArray.length; i++) {
758 if (sidesArray[i].endsWith("long-edge")) {
759 sidesSup[i] = Sides.TWO_SIDED_LONG_EDGE;
760 } else if (sidesArray[i].endsWith("short-edge")) {
761 sidesSup[i] = Sides.TWO_SIDED_SHORT_EDGE;
762 } else {
763 sidesSup[i] = Sides.ONE_SIDED;
764 }
765 }
766 return sidesSup;
767 }
768 }
769 }
770
771 return null;
772 }
773
774 //This class is for getting all pre-defined Finishings
775 private class ExtFinishing extends Finishings {
776 ExtFinishing(int value) {
777 super(100); // 100 to avoid any conflicts with predefined values.
778 }
779
780 EnumSyntax[] getAll() {
781 EnumSyntax[] es = super.getEnumValueTable();
782 return es;
783 }
784 }
785
786
787 public AttributeSet getUnsupportedAttributes(DocFlavor flavor,
788 AttributeSet attributes) {
789 if (flavor != null && !isDocFlavorSupported(flavor)) {
790 throw new IllegalArgumentException("flavor " + flavor +
791 "is not supported");
792 }
793
794 if (attributes == null) {
|
755 if ((sidesArray != null) && (sidesArray.length > 0)) {
756 Sides[] sidesSup = new Sides[sidesArray.length];
757 for (int i=0; i<sidesArray.length; i++) {
758 if (sidesArray[i].endsWith("long-edge")) {
759 sidesSup[i] = Sides.TWO_SIDED_LONG_EDGE;
760 } else if (sidesArray[i].endsWith("short-edge")) {
761 sidesSup[i] = Sides.TWO_SIDED_SHORT_EDGE;
762 } else {
763 sidesSup[i] = Sides.ONE_SIDED;
764 }
765 }
766 return sidesSup;
767 }
768 }
769 }
770
771 return null;
772 }
773
774 //This class is for getting all pre-defined Finishings
775 @SuppressWarnings("serial") // JDK implementation class
776 private class ExtFinishing extends Finishings {
777 ExtFinishing(int value) {
778 super(100); // 100 to avoid any conflicts with predefined values.
779 }
780
781 EnumSyntax[] getAll() {
782 EnumSyntax[] es = super.getEnumValueTable();
783 return es;
784 }
785 }
786
787
788 public AttributeSet getUnsupportedAttributes(DocFlavor flavor,
789 AttributeSet attributes) {
790 if (flavor != null && !isDocFlavorSupported(flavor)) {
791 throw new IllegalArgumentException("flavor " + flavor +
792 "is not supported");
793 }
794
795 if (attributes == null) {
|