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); } } } }
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'); } } } }
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"); }
/** * 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; }
public ServiceUIFactory getServiceUIFactory() { return null; }
public synchronized ServiceUIFactory getServiceUIFactory() { if (uiFactory == null) { uiFactory = new Win32ServiceUIFactory(this); } return uiFactory; }
@Override public ServiceUIFactory getServiceUIFactory(){ return null; }
@Override public ServiceUIFactory getServiceUIFactory() { return null; }