本文整理汇总了Java中javax.print.attribute.EnumSyntax类的典型用法代码示例。如果您正苦于以下问题:Java EnumSyntax类的具体用法?Java EnumSyntax怎么用?Java EnumSyntax使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EnumSyntax类属于javax.print.attribute包,在下文中一共展示了EnumSyntax类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEnumValueTable
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
protected EnumSyntax[] getEnumValueTable() {
ArrayList completeList = new ArrayList();
for (int i=0; i < myEnumValueTable.length; i++) {
completeList.add(myEnumValueTable[i]);
}
completeList.addAll(winEnumTable);
MediaTray[] enumTable = new MediaTray[completeList.size()];
return (MediaTray[])completeList.toArray(enumTable);
}
示例2: getEnumValueTable
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
protected EnumSyntax[] getEnumValueTable() {
ArrayList<MediaTray> completeList = new ArrayList<>();
for (int i=0; i < myEnumValueTable.length; i++) {
completeList.add(myEnumValueTable[i]);
}
completeList.addAll(winEnumTable);
MediaTray[] enumTable = new MediaTray[completeList.size()];
return completeList.toArray(enumTable);
}
示例3: write
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
/**
* Writes an attribute in EnumSyntax into the stream.
* @param attribute the attribute
* @throws IOException if thrown by the stream
*/
private void write(EnumSyntax attribute) throws IOException
{
// in JPS API enum syntax is used for enums, keyword and boolean types
String name = ((Attribute) attribute).getName();
// the enum value types
if (attribute instanceof Finishings
|| attribute instanceof OrientationRequested
|| attribute instanceof PrintQuality)
{
out.writeByte(IppValueTag.ENUM);
out.writeShort(name.length());
out.write(name.getBytes());
out.writeShort(4); // length, enum is 4 bytes
out.writeInt(attribute.getValue());
}
// the boolean value type
else if (attribute instanceof Fidelity)
{
out.writeByte(IppValueTag.BOOLEAN);
out.writeShort(name.length());
out.write(name.getBytes());
out.writeShort(1); // length, boolean is 1 bytes
out.writeByte(attribute.getValue() == 0 ? 0x00 : 0x01);
}
// the keyword value types
else
{
String keyword = attribute.toString();
out.writeByte(IppValueTag.KEYWORD);
out.writeShort(name.length());
out.write(name.getBytes());
out.writeShort(keyword.length());
out.write(keyword.getBytes());
}
}
示例4: getEnumValueTable
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
/**
* Returns the enumeration value table for class CustomMediaTray.
*/
protected EnumSyntax[] getEnumValueTable() {
MediaTray[] enumTable = new MediaTray[customEnumTable.size()];
return (MediaTray[])customEnumTable.toArray(enumTable);
}
示例5: getEnumValueTable
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
/**
* Returns the enumeration value table for class CustomMediaSizeName.
*/
protected EnumSyntax[] getEnumValueTable() {
MediaSizeName[] enumTable = new MediaSizeName[customEnumTable.size()];
return (MediaSizeName[])customEnumTable.toArray(enumTable);
}
示例6: getEnumValueTable
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
/**
* Returns the enumeration value table for class PresentationDirection.
*/
protected EnumSyntax[] getEnumValueTable() {
return myEnumValueTable;
}
示例7: getEnumValueTable
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
/**
* Returns the enumeration value table for class SheetCollate.
*/
protected EnumSyntax[] getEnumValueTable() {
return myEnumValueTable;
}
示例8: getEnumValueTable
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
/**
* Returns the enumeration value table for class MediaSizeName.
*/
protected EnumSyntax[] getEnumValueTable() {
return (EnumSyntax[])myEnumValueTable.clone();
}
示例9: getEnumValueTable
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
/**
* Returns the enumeration value table for class PDLOverrideSupported.
*/
protected EnumSyntax[] getEnumValueTable() {
return (EnumSyntax[])myEnumValueTable.clone();
}
示例10: getEnumValueTable
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
/**
* Returns the enumeration value table for class PrinterState.
*/
protected EnumSyntax[] getEnumValueTable() {
return myEnumValueTable;
}
示例11: getEnumValueTable
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
/**
* Returns the enumeration value table for class Fidelity.
*/
protected EnumSyntax[] getEnumValueTable() {
return myEnumValueTable;
}
示例12: getEnumValueTable
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
/**
* Returns the enumeration value table for class MultipleDocumentHandling.
*/
protected EnumSyntax[] getEnumValueTable() {
return (EnumSyntax[])myEnumValueTable.clone();
}
示例13: getEnumValueTable
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
/**
* Returns the enumeration value table for class DialogTypeSelection.
*/
protected EnumSyntax[] getEnumValueTable() {
return myEnumValueTable;
}
示例14: getEnumValueTable
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
/**
* Returns the enumeration value table for class Severity.
*/
protected EnumSyntax[] getEnumValueTable() {
return myEnumValueTable;
}
示例15: getEnumValueTable
import javax.print.attribute.EnumSyntax; //导入依赖的package包/类
/**
* Returns the enumeration value table for class Compression.
*/
protected EnumSyntax[] getEnumValueTable() {
return (EnumSyntax[])myEnumValueTable.clone();
}