• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ConstUI类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: editNote

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
protected void editNote(NotePadMeta ni) {
  NotePadMeta before = (NotePadMeta) ni.clone();
  String title = Messages.getString("JobGraph.Dialog.EditNote.Title");
  String message = Messages.getString("JobGraph.Dialog.EditNote.Message");
  EnterTextDialog dd = new EnterTextDialog(shell, title, message, ni.getNote());
  String n = dd.open();
  if (n != null) {
    spoon.addUndoChange(jobMeta, new NotePadMeta[] { before }, new NotePadMeta[] { ni }, new int[] { jobMeta
        .indexOfNote(ni) });
    ni.setChanged();
    ni.setNote(n);
    ni.width = ConstUI.NOTE_MIN_SIZE;
    ni.height = ConstUI.NOTE_MIN_SIZE;
    spoon.refreshGraph();
  }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:17,代码来源:JobGraph.java


示例2: editNote

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
private void editNote(NotePadMeta ni) {
  NotePadMeta before = (NotePadMeta) ni.clone();

  String title = Messages.getString("TransGraph.Dialog.EditNote.Title"); //$NON-NLS-1$
  String message = Messages.getString("TransGraph.Dialog.EditNote.Message"); //$NON-NLS-1$
  EnterTextDialog dd = new EnterTextDialog(shell, title, message, ni.getNote());
  String n = dd.open();
  if (n != null) {
    ni.setChanged();
    ni.setNote(n);
    ni.width = ConstUI.NOTE_MIN_SIZE;
    ni.height = ConstUI.NOTE_MIN_SIZE;

    NotePadMeta after = (NotePadMeta) ni.clone();
    spoon.addUndoChange(transMeta, new NotePadMeta[] { before }, new NotePadMeta[] { after }, new int[] { transMeta
        .indexOfNote(ni) });
    spoon.refreshGraph();
  }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:20,代码来源:TransGraph.java


示例3: refreshViewAndLog

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
protected void refreshViewAndLog()
{
    String[] selectionPath = null;
    if (wTree.getSelectionCount()==1)
    {
        selectionPath = ConstUI.getTreeStrings( wTree.getSelection()[0] );
    }

    refreshView(); 

    if (selectionPath!=null) // Select the same one again
    {
        TreeItem treeItem = TreeUtil.findTreeItem(wTree, selectionPath);
        if (treeItem!=null) wTree.setSelection(treeItem);
    }
    
    showLog();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:19,代码来源:SpoonSlave.java


示例4: restoreSelectedObjects

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
public boolean restoreSelectedObjects()
{
	TreeItem items[] = wTree.getSelection();
	boolean error = false;

	for (int i=0;i<items.length;i++)
	{
		final RepositoryElementMetaInterface repositoryObject = objectMap.get(ConstUI.getTreePath(items[i], 0));
		if (repositoryObject!=null) {
			try {
				rep.undeleteObject(repositoryObject);
			} catch(Exception e) {
				new ErrorDialog(shell, BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.ErrorRestoring.Title"), BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.ErrorRestoring.Message"), e); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
				error=true;
			}
		}
	}
	refreshTree();
	
	return !error;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:RepositoryExplorerDialog.java


示例5: newNote

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
public void newNote() {
  selectionRegion = null;
  String title = BaseMessages.getString(PKG, "TransGraph.Dialog.NoteEditor.Title"); //$NON-NLS-1$
  NotePadDialog dd = new NotePadDialog(transMeta, shell, title); //$NON-NLS-1$
  NotePadMeta n = dd.open();
  if (n != null)
  {
      NotePadMeta npi = new NotePadMeta(n.getNote(), lastclick.x, lastclick.y, ConstUI.NOTE_MIN_SIZE, 
      		ConstUI.NOTE_MIN_SIZE,n.getFontName(),n.getFontSize(), n.isFontBold(), n.isFontItalic(),
      		n.getFontColorRed(),n.getFontColorGreen(),n.getFontColorBlue(),
      		n.getBackGroundColorRed(), n.getBackGroundColorGreen(),n.getBackGroundColorBlue(), 
      		n.getBorderColorRed(), n.getBorderColorGreen(),n.getBorderColorBlue(), 
      		n.isDrawShadow());
      transMeta.addNote(npi);
      spoon.addUndoNew(transMeta, new NotePadMeta[] { npi }, new int[] { transMeta.indexOfNote(npi) });
      redraw();
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:19,代码来源:TransGraph.java


示例6: startRedrawTimer

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
private void startRedrawTimer() {
  
  

redrawTimer = new Timer("TransGraph: redraw timer");
   TimerTask timtask = new TimerTask(){
     public void run(){
       if (!spoon.getDisplay().isDisposed()){
         spoon.getDisplay().asyncExec(new Runnable(){
           public void run(){
             if (!TransGraph.this.canvas.isDisposed()) {
               TransGraph.this.canvas.redraw();
             }
           }});
       }
     }
   };

   redrawTimer.schedule(timtask, 0L, ConstUI.INTERVAL_MS_TRANS_CANVAS_REFRESH);

 }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:TransGraph.java


示例7: refreshViewAndLog

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
protected void refreshViewAndLog() {
  String[] selectionPath = null;
  if (wTree.getSelectionCount() == 1) {
    selectionPath = ConstUI.getTreeStrings(wTree.getSelection()[0]);
  }

  refreshView();

  if (selectionPath != null) // Select the same one again
  {
    TreeItem treeItem = TreeUtil.findTreeItem(wTree, selectionPath);
    if (treeItem != null) {
      wTree.setSelection(treeItem);
      wTree.showItem(treeItem);
      treeItemSelected(treeItem);
      treeItem.setExpanded(true);
    }
  }

  showLog();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:SpoonSlave.java


示例8: restoreSelectedObjects

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
public boolean restoreSelectedObjects() {
  TreeItem[] items = wTree.getSelection();
  boolean error = false;

  for ( int i = 0; i < items.length; i++ ) {
    final RepositoryElementMetaInterface repositoryObject = objectMap.get( ConstUI.getTreePath( items[i], 0 ) );
    if ( repositoryObject != null ) {
      try {
        rep.undeleteObject( repositoryObject );
      } catch ( Exception e ) {
        new ErrorDialog(
          shell,
          BaseMessages.getString( PKG, "RepositoryExplorerDialog.Trans.Delete.ErrorRestoring.Title" ), BaseMessages
            .getString( PKG, "RepositoryExplorerDialog.Trans.Delete.ErrorRestoring.Message" ), e );
        error = true;
      }
    }
  }
  refreshTree();

  return !error;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:RepositoryExplorerDialog.java


示例9: startRedrawTimer

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
private void startRedrawTimer() {

    redrawTimer = new Timer( "TransGraph: redraw timer" );
    TimerTask timtask = new TimerTask() {
      @Override
      public void run() {
        if ( !spoon.getDisplay().isDisposed() ) {
          spoon.getDisplay().asyncExec( new Runnable() {
            @Override
            public void run() {
              if ( !TransGraph.this.canvas.isDisposed() ) {
                TransGraph.this.canvas.redraw();
              }
            }
          } );
        }
      }
    };

    redrawTimer.schedule( timtask, 0L, ConstUI.INTERVAL_MS_TRANS_CANVAS_REFRESH );

  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:TransGraph.java


示例10: handleOK

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
public void handleOK()
{
    TreeItem ti[] = wTree.getSelection();
    if (ti.length == 1)
    {
        String tree[] = ConstUI.getTreeStrings(ti[0]);
        selection = rep.getDirectoryTree().findDirectory(tree);
        dispose();
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:11,代码来源:SelectDirectoryDialog.java


示例11: ok

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
private void ok()
{
	// Something has to be selected!
	if (wTree.getSelectionCount()>0)
	{
		TreeItem ti = wTree.getSelection()[0];
		
		// No directory!
		if (!ti.getForeground().equals(dircolor))
		{
			int level = ConstUI.getTreeLevel(ti);
			if (level>0)
			{
				String path[] = ConstUI.getTreeStrings(ti.getParentItem());
				objectName = ti.getText(0);
                   objectType = ti.getText(1);
				objectDirectory = rep.getDirectoryTree().findDirectory(path);
				
				if (objectDirectory!=null)
				{
					dispose();
				}
				else
				{
					MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR );
					mb.setMessage(Messages.getString("SelectObjectDialog.Dialog.DirectoryNotFound.Message")); //$NON-NLS-1$
					mb.setText(Messages.getString("SelectObjectDialog.Dialog.DirectoryNotFound.Title")); //$NON-NLS-1$
					mb.open();
				}
			}
		}
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:34,代码来源:SelectObjectDialog.java


示例12: newNote

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
public void newNote() {
  selrect = null;
  String title = Messages.getString("JobGraph.Dialog.EditNote.Title");
  String message = Messages.getString("JobGraph.Dialog.EditNote.Message");
  EnterTextDialog dd = new EnterTextDialog(shell, title, message, "");
  String n = dd.open();
  if (n != null) {
    NotePadMeta npi = new NotePadMeta(n, lastclick.x, lastclick.y, ConstUI.NOTE_MIN_SIZE, ConstUI.NOTE_MIN_SIZE);
    jobMeta.addNote(npi);
    spoon.addUndoNew(jobMeta, new NotePadMeta[] { npi }, new int[] { jobMeta.indexOfNote(npi) });
    redraw();
  }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:14,代码来源:JobGraph.java


示例13: newNote

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
public void newNote() {
  selrect = null;
  String title = Messages.getString("TransGraph.Dialog.NoteEditor.Title"); //$NON-NLS-1$
  String message = Messages.getString("TransGraph.Dialog.NoteEditor.Message"); //$NON-NLS-1$
  EnterTextDialog dd = new EnterTextDialog(shell, title, message, ""); //$NON-NLS-1$
  String n = dd.open();
  if (n != null) {
    NotePadMeta npi = new NotePadMeta(n, lastclick.x, lastclick.y, ConstUI.NOTE_MIN_SIZE, ConstUI.NOTE_MIN_SIZE);
    transMeta.addNote(npi);
    spoon.addUndoNew(transMeta, new NotePadMeta[] { npi }, new int[] { transMeta.indexOfNote(npi) });
    redraw();
  }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:14,代码来源:TransGraph.java


示例14: addDoubleClick

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
public static final void addDoubleClick(final TreeItem treeItem, final DoubleClickInterface doubleClick)
{
    final String[] path1 = ConstUI.getTreeStrings(treeItem);
    final Tree tree = treeItem.getParent();
    
    if (doubleClick!=null)
    {
        final SelectionAdapter selectionAdapter = new SelectionAdapter()
        {
            public void widgetDefaultSelected(SelectionEvent selectionEvent)
            {
                TreeItem[] items = tree.getSelection();
                for (int i=0;i<items.length;i++)
                {
                    String[] path2 = ConstUI.getTreeStrings(items[i]);
                    if (equalPaths(path1, path2)) doubleClick.action(treeItem);
                }
            }
        };
        tree.addSelectionListener(selectionAdapter);
        
        // Clean up when we do a refresh too.
        treeItem.addDisposeListener(new DisposeListener()
            {
                public void widgetDisposed(DisposeEvent disposeEvent)
                {
                    tree.removeSelectionListener(selectionAdapter);
                }
            }
        );
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:33,代码来源:TreeItemAccelerator.java


示例15: setExpandedFromMemory

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
private static void setExpandedFromMemory(Tree tree, String treeName, TreeItem treeItem)
{
    TreeMemory treeMemory = TreeMemory.getInstance();
    
    String[] path = ConstUI.getTreeStrings(treeItem);
    boolean expanded = treeMemory.isExpanded(treeName, path);
    treeItem.setExpanded(expanded);
    
    TreeItem[] items = treeItem.getItems();
    for (int i=0;i<items.length;i++)
    {
        setExpandedFromMemory(tree, treeName, items[i]);
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:15,代码来源:TreeMemory.java


示例16: handleOK

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
public void handleOK()
{
    TreeItem ti[] = wTree.getSelection();
    if (ti.length == 1)
    {
        String tree[] = ConstUI.getTreeStrings(ti[0]);
        selection = repositoryTree.findDirectory(tree);
        dispose();
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:11,代码来源:SelectDirectoryDialog.java


示例17: expandAllItems

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
private void expandAllItems(TreeItem[] treeitems,boolean expand)
{
  for (TreeItem item : treeitems) { 
	    item.setExpanded(expand);
	    TreeMemory.getInstance().storeExpanded(STRING_REPOSITORY_EXPLORER_TREE_NAME, ConstUI.getTreeStrings(item), expand);
	    if(item.getItemCount()>0)
	    	expandAllItems(item.getItems(),expand);
    }
  
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:11,代码来源:RepositoryExplorerDialog.java


示例18: delSelectedObjects

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
public boolean delSelectedObjects()
{
	TreeItem items[] = wTree.getSelection();
	boolean error = false;

	MessageBox mb = new MessageBox(shell, SWT.ICON_WARNING | SWT.YES | SWT.NO);
	mb.setMessage(BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Message1")+(items.length>1?BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Message2")+items.length+BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Message3"):BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Message4"))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
	mb.setText(BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Title")); //$NON-NLS-1$
	int answer = mb.open();
	
	if (answer!=SWT.YES)
	{
		return false;
	}
	
	for (int i=0;i<items.length;i++)
	{
		final RepositoryElementMetaInterface repositoryObject = objectMap.get(ConstUI.getTreePath(items[i], 0));
		if (repositoryObject!=null) {
			
			try {
				switch(repositoryObject.getObjectType()) {
				case TRANSFORMATION : rep.deleteTransformation(repositoryObject.getObjectId()); break;
				case JOB            : rep.deleteJob(repositoryObject.getObjectId()); break;
				default: 
					break;
				}
			} catch(Exception e) {
				new ErrorDialog(shell, BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.ErrorRemoving.Title"), BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.ErrorRemoving.Message")+repositoryObject.getName()+"]", e); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
				error=true;
			}
		}
	}
	refreshTree();
	
	return !error;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:38,代码来源:RepositoryExplorerDialog.java


示例19: newNote

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
public void newNote() {
  String title = BaseMessages.getString(PKG, "JobGraph.Dialog.EditNote.Title");
  String message = BaseMessages.getString(PKG, "JobGraph.Dialog.EditNote.Message");
  EnterTextDialog dd = new EnterTextDialog(shell, title, message, "");
  String n = dd.open();
  if (n != null) {
    NotePadMeta npi = new NotePadMeta(n, lastclick.x, lastclick.y, ConstUI.NOTE_MIN_SIZE, ConstUI.NOTE_MIN_SIZE);
      jobMeta.addNote(npi);
      spoon.addUndoNew(jobMeta, new NotePadMeta[] { npi }, new int[] { jobMeta.indexOfNote(npi) });
      redraw();
  } 
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:13,代码来源:JobGraph.java


示例20: editNote

import org.pentaho.di.ui.core.ConstUI; //导入依赖的package包/类
protected void editNote(NotePadMeta ni) {
  NotePadMeta before = (NotePadMeta) ni.clone();
  String title = BaseMessages.getString(PKG, "JobGraph.Dialog.EditNote.Title");
  
  NotePadDialog dd = new NotePadDialog(jobMeta, shell, title, ni);
  NotePadMeta n = dd.open();
  if (n != null)
  {
      ni.setChanged();
      ni.setNote(n.getNote());
      ni.setFontName(n.getFontName());
      ni.setFontSize(n.getFontSize());
      ni.setFontBold(n.isFontBold());
      ni.setFontItalic(n.isFontItalic());
      // font color
      ni.setFontColorRed(n.getFontColorRed());
      ni.setFontColorGreen(n.getFontColorGreen());
      ni.setFontColorBlue(n.getFontColorBlue());
      // background color
      ni.setBackGroundColorRed(n.getBackGroundColorRed());
      ni.setBackGroundColorGreen(n.getBackGroundColorGreen());
      ni.setBackGroundColorBlue(n.getBackGroundColorBlue());
      // border color
      ni.setBorderColorRed(n.getBorderColorRed());
      ni.setBorderColorGreen(n.getBorderColorGreen());
      ni.setBorderColorBlue(n.getBorderColorBlue());
      ni.setDrawShadow(n.isDrawShadow());

      spoon.addUndoChange(jobMeta, new NotePadMeta[] { before }, new NotePadMeta[] { ni }, new int[] { jobMeta
              .indexOfNote(ni) });
ni.width = ConstUI.NOTE_MIN_SIZE;
ni.height = ConstUI.NOTE_MIN_SIZE;
spoon.refreshGraph();
  }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:36,代码来源:JobGraph.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Waitable类代码示例发布时间:2022-05-23
下一篇:
Java DetectedSourceRoot类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap