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

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

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

Document.getElementById介绍

暂无

代码示例

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

private XulTree selectDeletedFileTable( boolean isAdmin ) {
 XulDeck treeDeck = (XulDeck) document.getElementById( "tree-deck" );
 treeDeck.setSelectedIndex( isAdmin ? 1 : 0 );
 return (XulTree) document.getElementById( isAdmin ? "deleted-file-table-admin" : "deleted-file-table" );
}

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

private void createBindings() {
 dialog = (XulDialog) document.getElementById( "repository-explorer-dialog" );
 shell = ( (SwtDialog) document.getElementById( "repository-explorer-dialog" ) ).getShell();
 // acceptButton = (XulButton) document.getElementById("repository-explorer-dialog_accept");
}

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

public void enableButtons( boolean enableNew, boolean enableEdit, boolean enableRemove ) {
 XulButton bNew = (XulButton) document.getElementById( "slaves-new" );
 XulButton bEdit = (XulButton) document.getElementById( "slaves-edit" );
 XulButton bRemove = (XulButton) document.getElementById( "slaves-remove" );
 bNew.setDisabled( !enableNew );
 bEdit.setDisabled( !enableEdit );
 bRemove.setDisabled( !enableRemove );
}

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

public void enableButtons( boolean enableNew, boolean enableEdit, boolean enableRemove ) {
 XulButton bNew = (XulButton) document.getElementById( "clusters-new" );
 XulButton bEdit = (XulButton) document.getElementById( "clusters-edit" );
 XulButton bRemove = (XulButton) document.getElementById( "clusters-remove" );
 bNew.setDisabled( !enableNew );
 bEdit.setDisabled( !enableEdit );
 bRemove.setDisabled( !enableRemove );
}

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

public void enableButtons( boolean enableNew, boolean enableEdit, boolean enableRemove ) {
 XulButton bNew = (XulButton) document.getElementById( "connections-new" );
 XulButton bEdit = (XulButton) document.getElementById( "connections-edit" );
 XulButton bRemove = (XulButton) document.getElementById( "connections-remove" );
 bNew.setDisabled( !enableNew );
 bEdit.setDisabled( !enableEdit );
 bRemove.setDisabled( !enableRemove );
}

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

public void enableButtons( boolean enableNew, boolean enableEdit, boolean enableRemove ) {
 XulButton bNew = (XulButton) document.getElementById( "partitions-new" );
 XulButton bEdit = (XulButton) document.getElementById( "partitions-edit" );
 XulButton bRemove = (XulButton) document.getElementById( "partitions-remove" );
 bNew.setDisabled( !enableNew );
 bEdit.setDisabled( !enableEdit );
 bRemove.setDisabled( !enableRemove );
}

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

private void disableMenuItem( org.pentaho.ui.xul.dom.Document doc, String itemId, boolean disable ) {
 XulComponent menuItem = doc.getElementById( itemId );
 if ( menuItem != null ) {
  menuItem.setDisabled( disable );
 } else {
  log.logError( "Non-Fatal error : Menu Item with id = " + itemId + " does not exist! Check 'menubar.xul'" );
 }
}

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

public Shell getShell() {
  XulDialog dialog = (XulDialog) container.getDocumentRoot().getElementById( "repository-login-dialog" );
  return (Shell) dialog.getRootObject();
 }
}

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

public void editOriginStep() {
 StepFieldNode theSelectedStep = (StepFieldNode) this.stepFieldsTree.getSelectedItem();
 if ( theSelectedStep != null ) {
  XulDialog theStepsDialog = (XulDialog) document.getElementById( "stepFieldsDialog" );
  theStepsDialog.hide();
 }
}

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

public void dispose() {
 SwtDialog dialog = (SwtDialog) container.getDocumentRoot().getElementById( "repository-explorer-dialog" );
 dialog.dispose();
 initialized = false;
}

代码示例来源: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

public void enableMenuItem( String itemId ) {
 XulMenuitem item = (XulMenuitem) mainSpoonContainer.getDocumentRoot().getElementById( itemId );
 item.setDisabled( false );
}

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

public Shell getShell() {
 XulDialog dialog = (XulDialog) container.getDocumentRoot().getElementById( "repository-config-dialog" ); //$NON-NLS-1$
 return (Shell) dialog.getRootObject();
}

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

public void setMenuBarVisible( boolean visible ) {
 mainSpoonContainer.getDocumentRoot().getElementById( "edit" ).setVisible( visible );
 mainSpoonContainer.getDocumentRoot().getElementById( "file" ).setVisible( visible );
 mainSpoonContainer.getDocumentRoot().getElementById( "view" ).setVisible( visible );
 mainSpoonContainer.getDocumentRoot().getElementById( "action" ).setVisible( visible );
 mainSpoonContainer.getDocumentRoot().getElementById( "tools" ).setVisible( visible );
 mainSpoonContainer.getDocumentRoot().getElementById( "help" ).setVisible( visible );
 MenuManager menuManager = getMenuBarManager();
 menuManager.getMenu().setVisible( visible );
 menuManager.updateAll( true );
}

代码示例来源: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

protected FileOverwriteDialogController( XulDomContainer container, List<UIRepositoryObject> objects ) {
 this.container = container;
 this.objects = new UIRepositoryObjectsList( objects );
 this.dialog = (XulDialog) this.container.getDocumentRoot().getElementById( "file-overwrite-dialog" );
 this.bf = new DefaultBindingFactory();
}

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

public void removePerspective( SpoonPerspective per ) {
 perspectives.remove( per );
 orderedPerspectives.remove( per );
 Document document = domContainer.getDocumentRoot();
 XulComponent comp = document.getElementById( "perspective-" + per.getId() );
 comp.getParent().removeChild( comp );
 comp = document.getElementById( "perspective-btn-" + per.getId() );
 comp.getParent().removeChild( comp );
 XulToolbar mainToolbar = (XulToolbar) domContainer.getDocumentRoot().getElementById( "main-toolbar" );
 ( (Composite) mainToolbar.getManagedObject() ).layout( true, true );
 deck.setSelectedIndex( 0 );
}

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

public void browse() {
 try {
  XulTextbox filename = (XulTextbox) document.getElementById( "keytab" );
  XulFileDialog dialog = (XulFileDialog) document.createElement( "filedialog" );
  XulFileDialog.RETURN_CODE retval = dialog.showOpenDialog();
  if ( retval == XulFileDialog.RETURN_CODE.OK ) {
   File file = (File) dialog.getFile();
   filename.setValue( file.getAbsolutePath() );
  }
 } catch ( XulException e ) {
  log.logError( resourceBundle.getString( "error.file_browse" ), e );
 }
}

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

@Override
public void applyToContainer( String category, XulDomContainer container ) throws XulException {
 if ( category.equals( SPOON_CATEGORY ) ) {
  XulToolbar toolbar = (XulToolbar) container.getDocumentRoot().getElementById( "main-toolbar" );
  RepositoryConnectMenu repoConnectMenu =
   new RepositoryConnectMenu( Spoon.getInstance(), (ToolBar) toolbar.getManagedObject(),
    repositoryConnectController );
  repoConnectMenu.render();
 }
}

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

public void createBindings() {
 refreshClusters();
 try {
  clustersTable = (XulTree) document.getElementById( "clusters-table" );
  bf.setBindingType( Binding.Type.ONE_WAY );
  bf.createBinding( clusterList, "children", clustersTable, "elements" ).fireSourceChanged();
  bf.createBinding( clustersTable, "selectedItems", this, "enableButtons" );
 } catch ( Exception e ) {
  if ( mainController == null || !mainController.handleLostRepository( e ) ) {
   throw new RuntimeException( e );
  }
 }
}

相关文章