下面列出了怎么用javax.print.ServiceUIFactory的API类实例代码及写法,或者点击链接到github查看源代码。
public Object getUI(int role, String ui) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE &&
DocumentPropertiesUI.DOCPROPERTIESCLASSNAME.equals(ui))
{
return service.getDocumentPropertiesUI();
}
throw new IllegalArgumentException("Unsupported role");
}
public String[] getUIClassNamesForRole(int role) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE) {
String[] names = new String[0];
names[0] = DocumentPropertiesUI.DOCPROPERTIESCLASSNAME;
return names;
}
throw new IllegalArgumentException("Unsupported role");
}
public Object getUI(int role, String ui) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE &&
DocumentPropertiesUI.DOCPROPERTIESCLASSNAME.equals(ui))
{
return service.getDocumentPropertiesUI();
}
throw new IllegalArgumentException("Unsupported role");
}
public String[] getUIClassNamesForRole(int role) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE) {
String[] names = new String[0];
names[0] = DocumentPropertiesUI.DOCPROPERTIESCLASSNAME;
return names;
}
throw new IllegalArgumentException("Unsupported role");
}
public Object getUI(int role, String ui) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE &&
DocumentPropertiesUI.DOCPROPERTIESCLASSNAME.equals(ui))
{
return service.getDocumentPropertiesUI();
}
throw new IllegalArgumentException("Unsupported role");
}
public String[] getUIClassNamesForRole(int role) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE) {
String[] names = new String[0];
names[0] = DocumentPropertiesUI.DOCPROPERTIESCLASSNAME;
return names;
}
throw new IllegalArgumentException("Unsupported role");
}
public Object getUI(int role, String ui) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE &&
DocumentPropertiesUI.DOCPROPERTIESCLASSNAME.equals(ui))
{
return service.getDocumentPropertiesUI();
}
throw new IllegalArgumentException("Unsupported role");
}
public String[] getUIClassNamesForRole(int role) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE) {
String[] names = new String[0];
names[0] = DocumentPropertiesUI.DOCPROPERTIESCLASSNAME;
return names;
}
throw new IllegalArgumentException("Unsupported role");
}
public Object getUI(int role, String ui) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE &&
DocumentPropertiesUI.DOCPROPERTIESCLASSNAME.equals(ui))
{
return service.getDocumentPropertiesUI();
}
throw new IllegalArgumentException("Unsupported role");
}
public String[] getUIClassNamesForRole(int role) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE) {
String[] names = new String[0];
names[0] = DocumentPropertiesUI.DOCPROPERTIESCLASSNAME;
return names;
}
throw new IllegalArgumentException("Unsupported role");
}
public Object getUI(int role, String ui) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE &&
DocumentPropertiesUI.DOCPROPERTIESCLASSNAME.equals(ui))
{
return service.getDocumentPropertiesUI();
}
throw new IllegalArgumentException("Unsupported role");
}
public String[] getUIClassNamesForRole(int role) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE) {
String[] names = new String[0];
names[0] = DocumentPropertiesUI.DOCPROPERTIESCLASSNAME;
return names;
}
throw new IllegalArgumentException("Unsupported role");
}
public Object getUI(int role, String ui) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE &&
DocumentPropertiesUI.DOCPROPERTIESCLASSNAME.equals(ui))
{
return service.getDocumentPropertiesUI();
}
throw new IllegalArgumentException("Unsupported role");
}
public String[] getUIClassNamesForRole(int role) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE) {
String[] names = new String[0];
names[0] = DocumentPropertiesUI.DOCPROPERTIESCLASSNAME;
return names;
}
throw new IllegalArgumentException("Unsupported role");
}
public Object getUI(int role, String ui) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE &&
DocumentPropertiesUI.DOCPROPERTIESCLASSNAME.equals(ui))
{
return service.getDocumentPropertiesUI();
}
throw new IllegalArgumentException("Unsupported role");
}
public String[] getUIClassNamesForRole(int role) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE) {
String[] names = new String[0];
names[0] = DocumentPropertiesUI.DOCPROPERTIESCLASSNAME;
return names;
}
throw new IllegalArgumentException("Unsupported role");
}
public Object getUI(int role, String ui) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE &&
DocumentPropertiesUI.DOCPROPERTIESCLASSNAME.equals(ui))
{
return service.getDocumentPropertiesUI();
}
throw new IllegalArgumentException("Unsupported role");
}
public String[] getUIClassNamesForRole(int role) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE) {
String[] names = new String[0];
names[0] = DocumentPropertiesUI.DOCPROPERTIESCLASSNAME;
return names;
}
throw new IllegalArgumentException("Unsupported role");
}
public Object getUI(int role, String ui) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE &&
DocumentPropertiesUI.DOCPROPERTIESCLASSNAME.equals(ui))
{
return service.getDocumentPropertiesUI();
}
throw new IllegalArgumentException("Unsupported role");
}
public String[] getUIClassNamesForRole(int role) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE) {
String[] names = new String[0];
names[0] = DocumentPropertiesUI.DOCPROPERTIESCLASSNAME;
return names;
}
throw new IllegalArgumentException("Unsupported role");
}
public Object getUI(int role, String ui) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE &&
DocumentPropertiesUI.DOCPROPERTIESCLASSNAME.equals(ui))
{
return service.getDocumentPropertiesUI();
}
throw new IllegalArgumentException("Unsupported role");
}
public String[] getUIClassNamesForRole(int role) {
if (role <= ServiceUIFactory.MAIN_UIROLE) {
return null;
}
if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE) {
String[] names = new String[0];
names[0] = DocumentPropertiesUI.DOCPROPERTIESCLASSNAME;
return names;
}
throw new IllegalArgumentException("Unsupported role");
}
public ServiceUIFactory getServiceUIFactory() {
return null;
}
public synchronized ServiceUIFactory getServiceUIFactory() {
if (uiFactory == null) {
uiFactory = new Win32ServiceUIFactory(this);
}
return uiFactory;
}
public ServiceUIFactory getServiceUIFactory() {
return null;
}
public ServiceUIFactory getServiceUIFactory() {
return null;
}
@Override
public ServiceUIFactory getServiceUIFactory() {
return null;
}
public ServiceUIFactory getServiceUIFactory() {
return null;
}
public synchronized ServiceUIFactory getServiceUIFactory() {
if (uiFactory == null) {
uiFactory = new Win32ServiceUIFactory(this);
}
return uiFactory;
}
public ServiceUIFactory getServiceUIFactory() {
return null;
}