本文整理汇总了Java中javax.print.ServiceUIFactory类的典型用法代码示例。如果您正苦于以下问题:Java ServiceUIFactory类的具体用法?Java ServiceUIFactory怎么用?Java ServiceUIFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ServiceUIFactory类属于javax.print包,在下文中一共展示了ServiceUIFactory类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformed
import javax.print.ServiceUIFactory; //导入依赖的package包/类
final public void actionPerformed(ActionEvent objPactionEvent) {
final Object objLsourceObject = objPactionEvent.getSource();
if (objLsourceObject == this.objGpropertiesJButton) {
if (this.objGserviceUIFactory != null) {
final JDialog objLjDialog = (JDialog) this.objGserviceUIFactory.getUI(ServiceUIFactory.MAIN_UIROLE, ServiceUIFactory.JDIALOG_UI);
if (objLjDialog != null) {
objLjDialog.setVisible(true);
objLjDialog.dispose();
} else {
this.objGpropertiesJButton.setEnabled(false);
}
}
}
}
示例2: fillVendorSuppliedTab
import javax.print.ServiceUIFactory; //导入依赖的package包/类
void fillVendorSuppliedTab() {
ServiceUIFactory factory = myService.getServiceUIFactory();
if (tabbedPane.getTabCount() > 3) {
tabbedPane.remove(3);
}
if (factory != null) {
JComponent swingUI = (JComponent) factory.getUI(
ServiceUIFactory.MAIN_UIROLE, ServiceUIFactory.JCOMPONENT_UI);
if (swingUI != null) {
tabbedPane.addTab("Vendor Supplied", swingUI);
tabbedPane.setMnemonicAt(3, 'V');
} else {
Panel panelUI = (Panel) factory.getUI(ServiceUIFactory.MAIN_UIROLE,
ServiceUIFactory.PANEL_UI);
if (panelUI != null) {
tabbedPane.addTab("Vendor Supplied", panelUI);
tabbedPane.setMnemonicAt(3, 'V');
}
}
}
}
示例3: getUI
import javax.print.ServiceUIFactory; //导入依赖的package包/类
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");
}
示例4: getUIClassNamesForRole
import javax.print.ServiceUIFactory; //导入依赖的package包/类
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");
}
示例5: getServiceUIFactory
import javax.print.ServiceUIFactory; //导入依赖的package包/类
/**
* We currently provide no factories - just returns null.
* @see javax.print.PrintService#getServiceUIFactory()
*/
public ServiceUIFactory getServiceUIFactory()
{
// SUN does not provide any service factory for
// print services (tested on linux/windows)
// for the moment we do the same - just return null
// later on we could provide at least the about UI dialog
return null;
}
示例6: getServiceUIFactory
import javax.print.ServiceUIFactory; //导入依赖的package包/类
/**
* We currently provide no factories - just returns null.
* @see javax.print.PrintService#getServiceUIFactory()
*/
public ServiceUIFactory getServiceUIFactory()
{
// SUN does not provide any service factory for
// print services (tested on linux/windows)
// for the moment we do the same - just return null
// later on we could provide at least the about UI dialog
return null;
}
示例7: getServiceUIFactory
import javax.print.ServiceUIFactory; //导入依赖的package包/类
public ServiceUIFactory getServiceUIFactory() {
return null;
}
示例8: getServiceUIFactory
import javax.print.ServiceUIFactory; //导入依赖的package包/类
public synchronized ServiceUIFactory getServiceUIFactory() {
if (uiFactory == null) {
uiFactory = new Win32ServiceUIFactory(this);
}
return uiFactory;
}
示例9: getServiceUIFactory
import javax.print.ServiceUIFactory; //导入依赖的package包/类
@Override
public ServiceUIFactory getServiceUIFactory(){
return null;
}
示例10: getServiceUIFactory
import javax.print.ServiceUIFactory; //导入依赖的package包/类
@Override
public ServiceUIFactory getServiceUIFactory() {
return null;
}