gpt4 book ai didi

org.pentaho.ui.xul.XulComponent类的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 01:17:05 25 4
gpt4 key购买 nike

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

XulComponent介绍

暂无

代码示例

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

private void disableButtons() {
 document.getElementById( OPEN_REVISION_BUTTON ).setDisabled( true );
 document.getElementById( RESTORE_REVISION_BUTTON ).setDisabled( true );
}

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

private void traverseDomSetReadOnly( XulComponent component, boolean readonly ) {
 component.setDisabled( readonly );
 List<XulComponent> children = component.getChildNodes();
 if ( children != null && children.size() > 0 ) {
  for ( XulComponent child : children ) {
   child.setDisabled( readonly );
   traverseDomSetReadOnly( child, readonly );
  }
 }
}

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

public void removeMenuItem( String itemid, boolean removeTrailingSeparators ) {
 XulMenuitem item = (XulMenuitem) mainSpoonContainer.getDocumentRoot().getElementById( itemid );
 if ( item != null ) {
  XulComponent menu = item.getParent();
  item.getParent().removeChild( item );
  if ( removeTrailingSeparators ) {
   List<XulComponent> children = menu.getChildNodes();
   if ( children.size() > 0 ) {
    XulComponent lastMenuItem = children.get( children.size() - 1 );
    if ( lastMenuItem instanceof XulMenuseparator ) {
     menu.removeChild( lastMenuItem );
     // above call should work, but doesn't for some reason, removing separator by force
     // the menu separators seem to not be modeled as individual objects in XUL
     try {
      Menu swtm = (Menu) menu.getManagedObject();
      swtm.getItems()[swtm.getItemCount() - 1].dispose();
     } catch ( Throwable t ) {
      LogChannel.GENERAL.logError( "Error removing XUL menu item", t );
     }
    }
   }
  }
 } else {
  log.logError( "Could not find menu item with id " + itemid + " to remove from Spoon menu" );
 }
}

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

protected void loadDatabaseOptionsFragment( String fragmentUri ) throws XulException {
 XulComponent groupElement = document.getElementById( "database-options-box" );
 XulComponent parentElement = groupElement.getParent();
 XulDomContainer fragmentContainer;
 try {
  // Get new group box fragment ...
  // This will effectively set up the SWT parent child relationship...
  fragmentContainer = this.xulDomContainer.loadFragment( fragmentUri, Messages.getBundle() );
  XulComponent newGroup = fragmentContainer.getDocumentRoot().getFirstChild();
  parentElement.replaceChild( groupElement, newGroup );
 } catch ( XulException e ) {
  e.printStackTrace();
  throw e;
 }
}

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

if ( !listener.tableItemInserted( table.getItem( tRow.getParent().getParent().getChildNodes().indexOf(
 tRow.getParent() ) ), v ) ) {
 tRow.getParent().getParent().removeChild( tRow.getParent() );

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

if ( component.getId() == null ) {
  continue;
 if ( component.getId().startsWith( "import" ) || component.getId().startsWith( "plugin" ) ) {
for ( int i = 0; i < components.size(); i++ ) {
 XulComponent component = components.get( i );
 if ( "beforePlugins".equals( component.getId() ) ) {
  beforePlugins = i;
  beforePluginsMenuItem = component;
beforePluginsMenuItem.setVisible( hasPlugins );
datasourceAdminDialogModel.setDatasourceTypeList( datasourceTypes );

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

@Override
public void activating() {
 parentDatasource.setFinishable( false );
 // This step takes the place of the first. We'll grab references to it's elements added to the left
 stepRow = (XulRow) document.getElementById( STEP_ROWS_ID ).getFirstChild();
 stepImage = (XulImage) stepRow.getFirstChild();
 stepLabel = (XulLabel) stepRow.getChildNodes().get( 1 );
}

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

XulComponent parentElement = boxElement.getParent();
parentElement.replaceChild( boxElement, newBox );

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

public void dispose() {
  super.dispose();
  List<XulComponent> pops = xulDomContainer.getDocumentRoot().getElementsByTagName( "menupopup" );
  for ( XulComponent pop : pops ) {
   ( (MenuManager) pop.getManagedObject() ).dispose();
  }
 }
}

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

if ( doc != null ) {
 if ( etlPerspective ) {
  doc.getElementById( "file" ).setVisible( etlPerspective );
  doc.getElementById( "edit" ).setVisible( etlPerspective );
  doc.getElementById( "view" ).setVisible( etlPerspective );
  doc.getElementById( "action" ).setVisible( etlPerspective );
  doc.getElementById( "tools" ).setVisible( etlPerspective );
  doc.getElementById( "help" ).setVisible( etlPerspective );
  doc.getElementById( "help-welcome" ).setVisible( etlPerspective );
  doc.getElementById( "help-plugins" ).setVisible( true );

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

private void createNewExtMenuList( XulComponent parent ) {
 xulParent = parent;
 if ( ( xulParent != null ) && ( xulParent instanceof XulTree ) ) {
  variableSpace = (DatabaseMeta) ( (XulTree) xulParent ).getData();
 } else {
  variableSpace = new DatabaseMeta();
  style = SWT.BORDER;
 }
 extCombo = new ComboVar( variableSpace, (Composite) parent.getManagedObject(), style );
 combobox = extCombo.getCComboWidget();
 setManagedObject( extCombo );
 combobox.addSelectionListener( new SelectionAdapter() {
  public void widgetSelected( SelectionEvent e ) {
   fireSelectedEvents();
  }
 } );
 combobox.addModifyListener( new ModifyListener() {
  public void modifyText( ModifyEvent modifyEvent ) {
   fireModifiedEvents();
  }
 } );
}

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

boolean executePermitted = securityProvider.isAllowed( IAbsSecurityProvider.EXECUTE_CONTENT_ACTION );
container.getDocumentRoot().getElementById( "folder-context-export" ).setDisabled( !createPermitted || !executePermitted );

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

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

/**
 * Set the enabled state for all buttons that require a valid database to be selected.
 *
 * @param b
 *          {@code true} if the buttons should be disabled
 */
protected void setDatabaseInteractionButtonsDisabled( boolean b ) {
 document.getElementById( getEditConnectionButtonId() ).setDisabled( b );
 document.getElementById( getBrowseTableButtonId() ).setDisabled( b );
 // document.getElementById(getBrowseSchemaButtonId()).setDisabled(b);
}

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

private void updateDeleteButton() {
 boolean disabled = config.getCustomArguments().size() == 0;
 XulComponent delete = getXulDomContainer().getDocumentRoot().getElementById( "delete-button" );
 delete.setDisabled( disabled );
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com