/*
* We add Vendor supplied tab to the dialog panel if selected print service has
* UIFactory and this factory has MAIN_UIROLE Panel or JComponent.
*/
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');
}