org.pentaho.ui.xul.dom.Document.getRootElement()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中org.pentaho.ui.xul.dom.Document.getRootElement()方法的一些代码示例,展示了Document.getRootElement()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Document.getRootElement()方法的具体详情如下:
包路径:org.pentaho.ui.xul.dom.Document
类名称:Document
方法名:getRootElement

Document.getRootElement介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

private Shell getShell() {
 Object obj = document.getRootElement().getManagedObject();
 Shell parent;
 if ( obj instanceof Shell ) {
  parent = (Shell) obj;
 } else {
  parent = ( (Composite) obj ).getShell();
 }
 if ( parent == null ) {
  throw new IllegalStateException( "Could not get Shell reference from Xul Dialog Tree." );
 }
 return parent;
}

代码示例来源:origin: pentaho/pentaho-kettle

private boolean windowClosed() {
 boolean closedWindow = true;
 XulComponent window = document.getElementById( "general-datasource-window" );
 if ( window == null ) { // window must be root
  window = document.getRootElement();
 }
 if ( window instanceof XulWindow ) {
  closedWindow = ( (XulWindow) window ).isClosed();
 }
 return closedWindow;
}

代码示例来源:origin: pentaho/pentaho-kettle

private void close() {
 XulComponent window = document.getElementById( "general-datasource-window" );
 if ( window == null ) { // window must be root
  window = document.getRootElement();
 }
 if ( window instanceof XulDialog ) {
  ( (XulDialog) window ).hide();
 } else if ( window instanceof XulWindow ) {
  ( (XulWindow) window ).close();
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void init() {
 xulDialog = ( (XulDialog) getXulDomContainer().getDocumentRoot().getRootElement() );
 if ( bf != null ) {
  bind();
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

private void setReadOnly( boolean readonly ) {
 // set the readonly status of EVERYTHING!
 traverseDomSetReadOnly( document.getRootElement(), readonly );
 if ( noticeLabel != null ) {
  noticeLabel.setVisible( readonly );
 }
 if ( readonly ) {
  // now turn back on the cancel and test buttons
  if ( cancelButton != null ) {
   cancelButton.setDisabled( false );
  }
  if ( testButton != null ) {
   testButton.setDisabled( false );
  }
  noticeLabel.setValue( Messages.getString( "DatabaseDialog.label.ConnectionIsReadOnly" ) );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

protected void initializeXul( XulLoader loader, BindingFactory bindingFactory, XulRunner runner, Object parent ) throws XulException {
 bf = bindingFactory;
 this.runner = runner;
 loader.registerClassLoader( getClass().getClassLoader() );
 loader.setSettingsManager( getSettingsManager() );
 loader.setOuterContext( parent );
 container = loader.loadXul( xulFile, getResourceBundle() );
 bf.setDocument( container.getDocumentRoot() );
 for ( XulEventHandler h : getEventHandlers() ) {
  container.addEventHandler( h );
 }
 this.runner.addContainer( container );
 // try and get the dialog
 xulDialog = (XulDialog) container.getDocumentRoot().getRootElement();
 runner.initialize();
}

代码示例来源:origin: pentaho/pentaho-kettle

protected void initializeXul( XulLoader loader, BindingFactory bindingFactory, XulRunner runner, Object parent ) throws XulException {
 bf = bindingFactory;
 this.runner = runner;
 loader.registerClassLoader( getClass().getClassLoader() );
 loader.setSettingsManager( getSettingsManager() );
 loader.setOuterContext( parent );
 container = loader.loadXul( xulFile, getResourceBundle() );
 bf.setDocument( container.getDocumentRoot() );
 for ( XulEventHandler h : getEventHandlers() ) {
  container.addEventHandler( h );
 }
 this.runner.addContainer( container );
 // try and get the dialog
 xulDialog = (XulDialog) container.getDocumentRoot().getRootElement();
 runner.initialize();
}

代码示例来源:origin: pentaho/pentaho-kettle

xulDialogComponent = (XulDialog) container.getDocumentRoot().getRootElement();

代码示例来源:origin: pentaho/pentaho-kettle

(XulTree) xulDialogComponent.getDocument().getRootElement().getElementById( "options-parameter-tree" );
tree.getRootChildren().removeAll();

代码示例来源:origin: pentaho/mondrian

private void connectionButtonActionPerformed(ActionEvent evt) {
  if (connectionDialog == null) {
    dbMeta = getDbMeta(null);
    connectionDialogController = new DataHandler();
    connectionDialogController.setName("dataHandler");
    XulDomContainer container = null;
    try {
      XulLoader loader = new SwingXulLoader();
      container = loader.loadXul(
        DatabaseConnectionDialog.DIALOG_DEFINITION_FILE,
        Messages.getBundle());
    } catch (XulException e) {
      throw new RuntimeException("Xul failed to initialize", e);
    }
    container.addEventHandler(connectionDialogController);
    connectionDialogController.loadConnectionData();
    connectionDialogController.setData(dbMeta);
    connectionDialog = (XulDialog) container.getDocumentRoot()
        .getRootElement();
  }
  connectionDialog.show();
  dbMeta = (DatabaseMeta) connectionDialogController.getData();
  if (dbMeta.hasChanged()) {
    dbMeta.clearChanged();
    syncToWorkspace(dbMeta);
    // Enforces the JDBC preferences entered throughout all schemas
    // currently opened in the workbench.
    resetWorkbench();
  }
}

代码示例来源:origin: pentaho/big-data-plugin

public void help() {
 XulDialog xulDialog = (XulDialog) getXulDomContainer().getDocumentRoot().getRootElement().getFirstChild();
 Shell shell = (Shell) xulDialog.getRootObject();
 PluginInterface plugin =
  PluginRegistry.getInstance().findPluginWithId( JobEntryPluginType.class, jobEntry.getPluginId() );
 HelpUtils.openHelpDialog( shell, plugin );
}

代码示例来源:origin: pentaho/big-data-plugin

XulRoot xulDialog = (XulRoot) getXulDomContainer().getDocumentRoot().getRootElement();
Shell shell = (Shell) xulDialog.getRootObject();
new ErrorDialog( shell, "Error", "Unable to populate Driver Class list", e );

代码示例来源:origin: pentaho/modeler

public void xulLoaded( GwtXulRunner gwtXulRunner ) {
 IModelerMessages messages =
   new GwtModelerMessages( (ResourceBundle) gwtXulRunner.getXulDomContainers().get( 0 ).getResourceBundles().get(
     0 ) );
 BogoPojo bogo = new BogoPojo();
 XulDomContainer container = gwtXulRunner.getXulDomContainers().get( 0 );
 GwtModelerWorkspaceHelper helper = new GwtModelerWorkspaceHelper();
 ModelerWorkspace model = new ModelerWorkspace( helper );
 model.setDomain( this.domain );
 ModelerController controller = new ModelerController( model );
 controller.setWorkspaceHelper( helper );
 try {
  ModelerMessagesHolder.setMessages( messages );
 } catch ( IllegalStateException e ) {
  // ignore, it was already set by someone else
  boolean ignore = true;
 }
 BindingFactory bf = new GwtBindingFactory( container.getDocumentRoot() );
 controller.setBindingFactory( bf );
 container.addEventHandler( controller );
 ModelerUiHelper.configureControllers( container, model, bf, controller, new ColResolverController() );
 RootPanel.get().add( (Widget) container.getDocumentRoot().getRootElement().getManagedObject() );
 try {
  gwtXulRunner.initialize();
 } catch ( XulException e ) {
  e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates.
 }
}

相关文章