Search in sources :

Example 1 with SwtBindingFactory

use of org.pentaho.ui.xul.swt.SwtBindingFactory in project pentaho-kettle by pentaho.

the class BrowseController method init.

// end PDI-3326 hack
@SuppressWarnings("deprecation")
public void init(Repository repository) throws ControllerInitializationException {
    try {
        this.repository = repository;
        mainController = (MainController) this.getXulDomContainer().getEventHandler("mainController");
        RepositoryDirectoryInterface root;
        try {
            if (repository instanceof RepositoryExtended) {
                root = ((RepositoryExtended) repository).loadRepositoryDirectoryTree(false);
            } else {
                root = repository.loadRepositoryDirectoryTree();
            }
            this.repositoryDirectory = UIObjectRegistry.getInstance().constructUIRepositoryDirectory(root, null, repository);
        } catch (UIObjectCreationException uoe) {
            this.repositoryDirectory = new UIRepositoryDirectory(repository.loadRepositoryDirectoryTree(), null, repository);
        }
        this.repositoryDirectory.populateChildren();
        dirMap = new HashMap<ObjectId, UIRepositoryDirectory>();
        populateDirMap(repositoryDirectory);
        bf = new SwtBindingFactory();
        bf.setDocument(this.getXulDomContainer().getDocumentRoot());
        messageBox = (XulMessageBox) document.createElement("messagebox");
        createBindings();
    } catch (Exception e) {
        throw new ControllerInitializationException(e);
    }
}
Also used : UIRepositoryDirectory(org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryDirectory) RepositoryDirectoryInterface(org.pentaho.di.repository.RepositoryDirectoryInterface) SwtBindingFactory(org.pentaho.ui.xul.swt.SwtBindingFactory) ControllerInitializationException(org.pentaho.di.ui.repository.repositoryexplorer.ControllerInitializationException) ObjectId(org.pentaho.di.repository.ObjectId) RepositoryExtended(org.pentaho.di.repository.RepositoryExtended) XulException(org.pentaho.ui.xul.XulException) ControllerInitializationException(org.pentaho.di.ui.repository.repositoryexplorer.ControllerInitializationException) UIObjectCreationException(org.pentaho.di.ui.repository.repositoryexplorer.model.UIObjectCreationException) KettleException(org.pentaho.di.core.exception.KettleException) UIObjectCreationException(org.pentaho.di.ui.repository.repositoryexplorer.model.UIObjectCreationException)

Example 2 with SwtBindingFactory

use of org.pentaho.ui.xul.swt.SwtBindingFactory in project pentaho-kettle by pentaho.

the class MainController method init.

public void init() {
    bf = new SwtBindingFactory();
    bf.setDocument(this.getXulDomContainer().getDocumentRoot());
    createBindings();
    if (dialog != null && repository != null) {
        dialog.setTitle(BaseMessages.getString(PKG, "RepositoryExplorerDialog.DevTitle", repository.getName()));
    }
}
Also used : SwtBindingFactory(org.pentaho.ui.xul.swt.SwtBindingFactory)

Example 3 with SwtBindingFactory

use of org.pentaho.ui.xul.swt.SwtBindingFactory in project pentaho-kettle by pentaho.

the class BaseStepXulDialog method initializeXul.

protected void initializeXul() throws XulException {
    initializeXul(new KettleXulLoader(), new SwtBindingFactory(), new SwtXulRunner(), parent);
    dialogShell = (Shell) xulDialog.getRootObject();
}
Also used : SwtBindingFactory(org.pentaho.ui.xul.swt.SwtBindingFactory) KettleXulLoader(org.pentaho.di.ui.xul.KettleXulLoader) SwtXulRunner(org.pentaho.ui.xul.swt.SwtXulRunner)

Example 4 with SwtBindingFactory

use of org.pentaho.ui.xul.swt.SwtBindingFactory in project pentaho-kettle by pentaho.

the class AuthProviderControllerTest method setup.

@Before
public void setup() {
    BindingFactory bf = new SwtBindingFactory();
    controller = new AuthProviderController();
    controller.setResourceBundle(resourceBundle);
    providers = AuthHarness.getProviders(bf);
}
Also used : SwtBindingFactory(org.pentaho.ui.xul.swt.SwtBindingFactory) BindingFactory(org.pentaho.ui.xul.binding.BindingFactory) SwtBindingFactory(org.pentaho.ui.xul.swt.SwtBindingFactory) Before(org.junit.Before)

Example 5 with SwtBindingFactory

use of org.pentaho.ui.xul.swt.SwtBindingFactory in project pentaho-kettle by pentaho.

the class PartitionsController method doLazyInit.

protected boolean doLazyInit() {
    // Load the SWT Shell from the explorer dialog
    shell = ((SwtDialog) document.getElementById("repository-explorer-dialog")).getShell();
    try {
        mainController = (MainController) this.getXulDomContainer().getEventHandler("mainController");
    } catch (XulException e) {
        return false;
    }
    enableButtons(true, false, false);
    bf = new SwtBindingFactory();
    bf.setDocument(this.getXulDomContainer().getDocumentRoot());
    if (bf != null) {
        createBindings();
    }
    return true;
}
Also used : SwtBindingFactory(org.pentaho.ui.xul.swt.SwtBindingFactory) XulException(org.pentaho.ui.xul.XulException)

Aggregations

SwtBindingFactory (org.pentaho.ui.xul.swt.SwtBindingFactory)8 XulException (org.pentaho.ui.xul.XulException)4 KettleException (org.pentaho.di.core.exception.KettleException)2 ControllerInitializationException (org.pentaho.di.ui.repository.repositoryexplorer.ControllerInitializationException)2 Before (org.junit.Before)1 ObjectId (org.pentaho.di.repository.ObjectId)1 RepositoryDirectoryInterface (org.pentaho.di.repository.RepositoryDirectoryInterface)1 RepositoryExtended (org.pentaho.di.repository.RepositoryExtended)1 UIObjectCreationException (org.pentaho.di.ui.repository.repositoryexplorer.model.UIObjectCreationException)1 UIRepositoryDirectory (org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryDirectory)1 KettleXulLoader (org.pentaho.di.ui.xul.KettleXulLoader)1 BindingFactory (org.pentaho.ui.xul.binding.BindingFactory)1 SwtXulRunner (org.pentaho.ui.xul.swt.SwtXulRunner)1