当前位置: 首页>>代码示例>>Java>>正文


Java GUIResource类代码示例

本文整理汇总了Java中org.pentaho.di.ui.core.gui.GUIResource的典型用法代码示例。如果您正苦于以下问题:Java GUIResource类的具体用法?Java GUIResource怎么用?Java GUIResource使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GUIResource类属于org.pentaho.di.ui.core.gui包,在下文中一共展示了GUIResource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getRowForData

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
private Object[] getRowForData( TableItem item, int rowNr ) throws KettleException {
  try {
    Object[] row = RowDataUtil.allocateRowData( rowMeta.size() );
    for ( int i = 0; i < rowMeta.size(); i++ ) {
      ValueMetaInterface valueMeta = rowMeta.getValueMeta( i );
      ValueMetaInterface stringValueMeta = stringRowMeta.getValueMeta( i );

      int colnr = i + 1;
      if ( GUIResource.getInstance().getColorBlue().equals( item.getForeground( colnr ) ) ) {
        row[i] = null; // <null> value
      } else {
        String string = item.getText( colnr );
        row[i] = valueMeta.convertDataFromString( string, stringValueMeta,
          null, null, ValueMetaInterface.TRIM_TYPE_NONE );
      }
    }
    return row;
  } catch ( KettleException e ) {
    throw new KettleException( BaseMessages.getString( PKG, "EditRowsDialog.Error.ErrorGettingRowForData",
      Integer.toString( rowNr ) ), e );
  }
}
 
开发者ID:mattcasters,项目名称:pentaho-pdi-dataset,代码行数:23,代码来源:EditRowsDialog.java

示例2: checkWidgets

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
protected void checkWidgets() {
  wtvScriptLocation.setEnabled( wbLoadScriptFile.getSelection() );
  wstcScriptEditor.setEnabled( !wbLoadScriptFile.getSelection() );
  if ( wbLoadScriptFile.getSelection() ) {
    wtvScriptLocation.setEditable( true );
    wstcScriptEditor.getStyledText().setBackground( GUIResource.getInstance().getColorDemoGray() );
  } else {
    wtvScriptLocation.setEditable( false );
    wstcScriptEditor.getStyledText().setBackground( GUIResource.getInstance().getColorWhite() );
  }
  wbScriptBrowse.setEnabled( wbLoadScriptFile.getSelection() );

  String currVars = wtvPyVarsToGet.getText();
  if ( !Const.isEmpty( currVars ) ) {
    List<String> varList = stringToList( currVars );
    wbGetFields.setEnabled( varList.size() == 1 );
    wbIncludeRowIndex.setEnabled( varList.size() == 1 );
  }
}
 
开发者ID:pentaho-labs,项目名称:pentaho-cpython-plugin,代码行数:20,代码来源:CPythonScriptExecutorDialog.java

示例3: init

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
/**
 * Initialize the properties: load from disk.
 * @param display The Display
 * @param t The type of properties file.
 */
public static final void init(Display d, int t)
{
	if (props==null)
	{
       	display = d;
		props = new PropsUI(t);
           
           // Also init the colors and fonts to use...
           GUIResource.getInstance();
	}
	else
	{
		throw new RuntimeException("The Properties systems settings are already initialised!");
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:21,代码来源:PropsUI.java

示例4: refreshTree

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
private void refreshTree()
 {
     try
     {
         wTree.removeAll();
         
         TreeItem ti = new TreeItem(wTree, SWT.NONE);
         ti.setImage(GUIResource.getInstance().getImageFolderConnections());
         ti.setExpanded(true);
         
RepositoryDirectoryUI.getTreeWithNames(ti, rep, dircolor, sortColumn, ascending, showTrans, showJobs, rep.getDirectoryTree());
     }
     catch(KettleDatabaseException e)
     {
         new ErrorDialog(shell, Messages.getString("SelectObjectDialog.Dialog.UnexpectedError.Title"), Messages.getString("SelectObjectDialog.Dialog.UnexpectedError.Message"), e); //$NON-NLS-1$ //$NON-NLS-2$
     }
 }
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:18,代码来源:SelectObjectDialog.java

示例5: minMaxExtraView

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
private void minMaxExtraView() {
  // What is the state?
  //
  boolean maximized = sashForm.getMaximizedControl() != null;
  if (maximized) {
    // Minimize 
    //
    sashForm.setMaximizedControl(null);
    minMaxButton.setImage(GUIResource.getInstance().getImageMaximizePanel());
    minMaxButton.setToolTipText(BaseMessages.getString(PKG, "TransGraph.ExecutionResultsPanel.MaxButton.Tooltip")); //$NON-NLS-1$
  } else {
    // Maximize
    //
    sashForm.setMaximizedControl(extraViewComposite);
    minMaxButton.setImage(GUIResource.getInstance().getImageMinimizePanel());
    minMaxButton.setToolTipText(BaseMessages.getString(PKG, "TransGraph.ExecutionResultsPanel.MinButton.Tooltip")); //$NON-NLS-1$
  }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:19,代码来源:TransGraph.java

示例6: addAllTabs

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
public void addAllTabs() {

    CTabItem tabItemSelection = null;
    if (extraViewTabFolder!=null && !extraViewTabFolder.isDisposed()) {
      tabItemSelection = extraViewTabFolder.getSelection();
    }

    transHistoryDelegate.addTransHistory();
    transLogDelegate.addTransLog();
    transGridDelegate.addTransGrid();
    transPerfDelegate.addTransPerf();
    
    if (tabItemSelection!=null) {
      extraViewTabFolder.setSelection(tabItemSelection);
    } else {
      extraViewTabFolder.setSelection(transGridDelegate.getTransGridTab());
    }
    
    XulToolbarbutton button = (XulToolbarbutton) toolbar.getElementById("trans-show-results"); //$NON-NLS-1$
    button.setTooltiptext(BaseMessages.getString(PKG, "Spoon.Tooltip.HideExecutionResults")); //$NON-NLS-1$
    ToolItem toolItem = (ToolItem) button.getManagedObject();
    toolItem.setImage(GUIResource.getInstance().getImageHideResults());
  }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:TransGraph.java

示例7: editEntryParallel

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
/**
 * Go from serial to parallel to serial execution
 */
public void editEntryParallel() {
  getJobEntry().setLaunchingInParallel(!getJobEntry().isLaunchingInParallel());
  if (getJobEntry().isLaunchingInParallel()) {
    // Show a warning (optional)
    //
    if ("Y".equalsIgnoreCase(spoon.props.getCustomParameter(STRING_PARALLEL_WARNING_PARAMETER, "Y"))) //$NON-NLS-1$ //$NON-NLS-2$
    {
      MessageDialogWithToggle md = new MessageDialogWithToggle(shell, Messages
          .getString("JobGraph.ParallelJobEntriesWarning.DialogTitle"), //$NON-NLS-1$
          null, Messages.getString("JobGraph.ParallelJobEntriesWarning.DialogMessage", Const.CR) + Const.CR, //$NON-NLS-1$ //$NON-NLS-2$
          MessageDialog.WARNING, new String[] { Messages.getString("JobGraph.ParallelJobEntriesWarning.Option1") }, //$NON-NLS-1$
          0, Messages.getString("JobGraph.ParallelJobEntriesWarning.Option2"), //$NON-NLS-1$
          "N".equalsIgnoreCase(spoon.props.getCustomParameter(STRING_PARALLEL_WARNING_PARAMETER, "Y")) //$NON-NLS-1$ //$NON-NLS-2$
      );
      MessageDialogWithToggle.setDefaultImage(GUIResource.getInstance().getImageSpoon());
      md.open();
      spoon.props.setCustomParameter(STRING_PARALLEL_WARNING_PARAMETER, md.getToggleState() ? "N" : "Y"); //$NON-NLS-1$ //$NON-NLS-2$
      spoon.props.saveProps();
    }
  }
  redraw();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:26,代码来源:JobGraph.java

示例8: getIcon

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
public Image getIcon(JobEntryCopy je) {
  Image im = null;
  if (je == null)
    return null;

  switch (je.getJobEntryType()) {
    case SPECIAL:
      if (je.isStart())
        im = GUIResource.getInstance().getImageStart();
      if (je.isDummy())
        im = GUIResource.getInstance().getImageDummy();
      break;
    default:
      String configId = je.getEntry().getConfigId();
      if (configId != null) {
        im = (Image) GUIResource.getInstance().getImagesJobentries().get(configId);
      }
  }
  return im;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:21,代码来源:JobGraph.java

示例9: addAllTabs

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
public void addAllTabs() {
  
CTabItem tabItemSelection = null;
if (extraViewTabFolder!=null && !extraViewTabFolder.isDisposed()) {
	tabItemSelection = extraViewTabFolder.getSelection();
}

   jobHistoryDelegate.addJobHistory();
   jobLogDelegate.addJobLog();
   jobGridDelegate.addJobGrid();
   
   if (tabItemSelection!=null) {
   	extraViewTabFolder.setSelection(tabItemSelection);
   } else {
   	extraViewTabFolder.setSelection(jobGridDelegate.getJobGridTab());
   }
   
   XulToolbarButton button = toolbar.getButtonById("job-show-results");
   button.setImage(GUIResource.getInstance().getImageHideResults());
   button.setHint(Messages.getString("Spoon.Tooltip.HideExecutionResults"));

 }
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:23,代码来源:JobGraph.java

示例10: showArguments

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
public void showArguments() {

		RowMetaAndData allArgs = new RowMetaAndData();

		for (int ii = 0; ii < arguments.length; ++ii) {
			allArgs.addValue(new ValueMeta(Props.STRING_ARGUMENT_NAME_PREFIX + (1 + ii), ValueMetaInterface.TYPE_STRING), arguments[ii]);
		}

		// Now ask the use for more info on these!
		EnterStringsDialog esd = new EnterStringsDialog(shell, SWT.NONE, allArgs);
		esd.setTitle(Messages.getString("Spoon.Dialog.ShowArguments.Title"));
		esd.setMessage(Messages.getString("Spoon.Dialog.ShowArguments.Message"));
		esd.setReadOnly(true);
		esd.setShellImage(GUIResource.getInstance().getImageLogoSmall());
		esd.open();
	}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:17,代码来源:Spoon.java

示例11: layoutEditOptionButton

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
/**
 * Setting the layout of an <i>Edit</i> option button. Either a button
 * image is set - if existing - or a text.
 * 
 * @param button
 *            The button
 */
private FormData layoutEditOptionButton(Button button)
{
	FormData fd = new FormData();
	Image editButton = GUIResource.getInstance().getEditOptionButton();
	if (editButton != null)
	{
		button.setImage(editButton);
		button.setBackground(GUIResource.getInstance().getColorWhite());
		fd.width = editButton.getBounds().width + 4;
		fd.height = editButton.getBounds().height;
	} else
	{
		button.setText(BaseMessages.getString(PKG, "EnterOptionsDialog.Button.Edit"));
	}

	button.setToolTipText(BaseMessages.getString(PKG, "EnterOptionsDialog.Button.Edit.Tooltip"));
	return fd;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:26,代码来源:EnterOptionsDialog.java

示例12: minMaxExtraView

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
private void minMaxExtraView() {
  // What is the state?
  //
  boolean maximized = sashForm.getMaximizedControl() != null;
  if (maximized) {
    // Minimize 
    //
    sashForm.setMaximizedControl(null);
    minMaxButton.setImage(GUIResource.getInstance().getImageMaximizePanel());
    minMaxButton.setToolTipText(Messages.getString("TransGraph.ExecutionResultsPanel.MaxButton.Tooltip"));
  } else {
    // Maximize
    //
    sashForm.setMaximizedControl(extraViewComposite);
    minMaxButton.setImage(GUIResource.getInstance().getImageMinimizePanel());
    minMaxButton.setToolTipText(Messages.getString("TransGraph.ExecutionResultsPanel.MinButton.Tooltip"));
  }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:19,代码来源:TransGraph.java

示例13: addAllTabs

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
public void addAllTabs() {

	CTabItem tabItemSelection = null;
	if (extraViewTabFolder!=null && !extraViewTabFolder.isDisposed()) {
		tabItemSelection = extraViewTabFolder.getSelection();
	}

    transHistoryDelegate.addTransHistory();
    transLogDelegate.addTransLog();
    transGridDelegate.addTransGrid();
    transPerfDelegate.addTransPerf();
    
    if (tabItemSelection!=null) {
    	extraViewTabFolder.setSelection(tabItemSelection);
    } else {
    	extraViewTabFolder.setSelection(transGridDelegate.getTransGridTab());
    }
    
    XulToolbarButton button = toolbar.getButtonById("trans-show-results");
    button.setImage(GUIResource.getInstance().getImageHideResults());
    button.setHint(Messages.getString("Spoon.Tooltip.HideExecutionResults"));

  }
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:24,代码来源:TransGraph.java

示例14: drawJobEntryIcon

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
public void drawJobEntryIcon(int x, int y, JobEntryCopy jobEntryCopy) {
		    if (jobEntryCopy == null)
		      return; // Don't draw anything

		    Image image = null;

		    if (jobEntryCopy.isSpecial()) {
		        if (jobEntryCopy.isStart()) {
		          image = GUIResource.getInstance().getImageStart();
		        }
		        if (jobEntryCopy.isDummy()) {
		          image = GUIResource.getInstance().getImageDummy();
		        }
		    } else {
		        String configId = jobEntryCopy.getEntry().getPluginId();
		        if (configId != null) {
		          image = GUIResource.getInstance().getImagesJobentries().get(configId);
		        }
		    }
		    if (image==null) {
		    	return;
		    }
		    
            org.eclipse.swt.graphics.Rectangle bounds = image.getBounds();
            gc.drawImage(image, 0, 0, bounds.width, bounds.height, x, y, iconsize, iconsize);
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:27,代码来源:SWTGC.java

示例15: layoutResetOptionButton

import org.pentaho.di.ui.core.gui.GUIResource; //导入依赖的package包/类
/**
 * Setting the layout of a <i>Reset</i> option button. Either a button
 * image is set - if existing - or a text.
 * 
 * @param button
 *            The button
 */
private FormData layoutResetOptionButton(Button button)
{
	FormData fd = new FormData();
	Image editButton = GUIResource.getInstance().getResetOptionButton();
	if (editButton != null)
	{
		button.setImage(editButton);
		button.setBackground(GUIResource.getInstance().getColorWhite());
		fd.width = editButton.getBounds().width + 4;
		fd.height = editButton.getBounds().height;
	} else
	{
		button.setText(Messages.getString("EnterOptionsDialog.Button.Reset"));
	}

	button.setToolTipText(Messages.getString("EnterOptionsDialog.Button.Reset.Tooltip"));
	return fd;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:26,代码来源:EnterOptionsDialog.java


注:本文中的org.pentaho.di.ui.core.gui.GUIResource类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。