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


Java TransAction类代码示例

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


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

示例1: undoAction

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
public void undoAction(UndoInterface undoInterface) {
	if (undoInterface == null)
		return;

	TransAction ta = undoInterface.previousUndo();
	if (ta == null)
		return;

	setUndoMenu(undoInterface); // something changed: change the menu

	if (undoInterface instanceof TransMeta)
		delegates.trans.undoTransformationAction((TransMeta) undoInterface, ta);
	if (undoInterface instanceof JobMeta)
		delegates.jobs.undoJobAction((JobMeta) undoInterface, ta);

	// Put what we undo in focus
	if (undoInterface instanceof TransMeta) {
		TransGraph transGraph = delegates.trans.findTransGraphOfTransformation((TransMeta) undoInterface);
		transGraph.forceFocus();
	}
	if (undoInterface instanceof JobMeta) {
		JobGraph jobGraph = delegates.jobs.findJobGraphOfJob((JobMeta) undoInterface);
		jobGraph.forceFocus();
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:26,代码来源:Spoon.java

示例2: redoAction

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
public void redoAction(UndoInterface undoInterface) {
	if (undoInterface == null)
		return;

	TransAction ta = undoInterface.nextUndo();
	if (ta == null)
		return;

	setUndoMenu(undoInterface); // something changed: change the menu

	if (undoInterface instanceof TransMeta)
		delegates.trans.redoTransformationAction((TransMeta) undoInterface, ta);
	if (undoInterface instanceof JobMeta)
		delegates.jobs.redoJobAction((JobMeta) undoInterface, ta);

	// Put what we redo in focus
	if (undoInterface instanceof TransMeta) {
		TransGraph transGraph = delegates.trans.findTransGraphOfTransformation((TransMeta) undoInterface);
		transGraph.forceFocus();
	}
	if (undoInterface instanceof JobMeta) {
		JobGraph jobGraph = delegates.jobs.findJobGraphOfJob((JobMeta) undoInterface);
		jobGraph.forceFocus();
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:26,代码来源:Spoon.java

示例3: setUndoMenu

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
/**
 * Sets the text and enabled settings for the undo and redo menu items
 * 
 * @param undoInterface
 *            the object which holds the undo/redo information
 */
public void setUndoMenu(UndoInterface undoInterface) {
	if (shell.isDisposed())
		return;

	TransAction prev = undoInterface != null ? undoInterface.viewThisUndo() : null;
	TransAction next = undoInterface != null ? undoInterface.viewNextUndo() : null;

	// Set the menubar text
	menuBar.setTextById(UNDO_MENUITEM, prev == null ? UNDO_UNAVAILABLE : Messages.getString("Spoon.Menu.Undo.Available", prev.toString())); //$NON-NLS-1$
	menuBar.setTextById(REDO_MENUITEM, next == null ? REDO_UNAVAILABLE : Messages.getString("Spoon.Menu.Redo.Available", next.toString())); //$NON-NLS-1$

	// Set the enabled flags
	menuBar.setEnableById(UNDO_MENUITEM, prev != null);
	menuBar.setEnableById(REDO_MENUITEM, next != null);
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:22,代码来源:Spoon.java

示例4: insertRowBefore

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
private void insertRowBefore()
{
	if (readonly) return;
	
       TableItem row = activeTableItem;
       if (row==null) return;
       int rownr = table.indexOf(row);
       
	TableItem item = new TableItem(table, SWT.NONE, rownr);		
	item.setText(1, "");
	
	// Add undo information
	TransAction ta = new TransAction();
	String str[] = getItemText(item);
	ta.setNew(new String[][] { str }, new int[] { rownr });
	addUndo(ta);
	
	setRowNums();
	
	edit(rownr, 1);
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:22,代码来源:TableView.java

示例5: insertRowAfter

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
private void insertRowAfter()
{
	if (readonly) return;
	
       TableItem row = activeTableItem;
       if (row==null) return;
       int rownr = table.indexOf(row);
       
	TableItem item = new TableItem(table, SWT.NONE, rownr+1);
	item.setText(1, "");

	// Add undo information
	TransAction ta = new TransAction();
	String str[] = getItemText(item);
	ta.setNew(new String[][] { str }, new int[] { rownr+1 });
	addUndo(ta);
	
	setRowNums();

	edit(rownr+1, 1);	
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:22,代码来源:TableView.java

示例6: moveRowDown

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
private void moveRowDown()
{
       if (activeTableItem==null) return;
       
	if (activeTableRow<table.getItemCount()-1)
	{
		moveRow(activeTableRow, activeTableRow+1);
		
           TransAction ta = new TransAction();
		ta.setItemMove(new int[] { activeTableRow }, new int[] { activeTableRow+1 } );
		addUndo(ta);
		
           activeTableRow++;
           activeTableItem = table.getItem(activeTableRow);
           
		selectRows(activeTableRow, activeTableRow);
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:19,代码来源:TableView.java

示例7: moveRowUp

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
private void moveRowUp()
{
       if (activeTableItem==null) return;
       
       if (activeTableRow>0)
	{
		moveRow(activeTableRow, activeTableRow-1);

		TransAction ta = new TransAction();
		ta.setItemMove(new int[] { activeTableRow }, new int[] { activeTableRow-1} );
		addUndo(ta);

           activeTableRow--;
           activeTableItem = table.getItem(activeTableRow);
           
           selectRows(activeTableRow, activeTableRow);
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:19,代码来源:TableView.java

示例8: addUndo

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
private void addUndo(TransAction ta)
{
	while (undo.size()>undo_position+1 && undo.size()>0)
	{
		int last = undo.size()-1;
		undo.remove(last);
	}

	undo.add(ta);
	undo_position++;
  	
	while (undo.size()>props.getMaxUndo())
	{
		undo.remove(0);
		undo_position--;
	}

	setUndoMenu();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:20,代码来源:TableView.java

示例9: undoAction

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
public void undoAction(UndoInterface undoInterface) {
  if (undoInterface == null)
    return;

  TransAction ta = undoInterface.previousUndo();
  if (ta == null)
    return;

  setUndoMenu(undoInterface); // something changed: change the menu

  if (undoInterface instanceof TransMeta)
    delegates.trans.undoTransformationAction((TransMeta) undoInterface, ta);
  if (undoInterface instanceof JobMeta)
    delegates.jobs.undoJobAction((JobMeta) undoInterface, ta);

  // Put what we undo in focus
  if (undoInterface instanceof TransMeta) {
    TransGraph transGraph = delegates.trans.findTransGraphOfTransformation((TransMeta) undoInterface);
    transGraph.forceFocus();
  }
  if (undoInterface instanceof JobMeta) {
    JobGraph jobGraph = delegates.jobs.findJobGraphOfJob((JobMeta) undoInterface);
    jobGraph.forceFocus();
  }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:26,代码来源:Spoon.java

示例10: redoAction

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
public void redoAction(UndoInterface undoInterface) {
  if (undoInterface == null)
    return;

  TransAction ta = undoInterface.nextUndo();
  if (ta == null)
    return;

  setUndoMenu(undoInterface); // something changed: change the menu

  if (undoInterface instanceof TransMeta)
    delegates.trans.redoTransformationAction((TransMeta) undoInterface, ta);
  if (undoInterface instanceof JobMeta)
    delegates.jobs.redoJobAction((JobMeta) undoInterface, ta);

  // Put what we redo in focus
  if (undoInterface instanceof TransMeta) {
    TransGraph transGraph = delegates.trans.findTransGraphOfTransformation((TransMeta) undoInterface);
    transGraph.forceFocus();
  }
  if (undoInterface instanceof JobMeta) {
    JobGraph jobGraph = delegates.jobs.findJobGraphOfJob((JobMeta) undoInterface);
    jobGraph.forceFocus();
  }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:26,代码来源:Spoon.java

示例11: insertRowAfter

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
private void insertRowAfter() {
  if (readonly)
    return;

  TableItem row = activeTableItem;
  if (row == null)
    return;
  int rownr = table.indexOf(row);

  TableItem item = new TableItem(table, SWT.NONE, rownr + 1);
  item.setText(1, "");

  // Add undo information
  TransAction ta = new TransAction();
  String str[] = getItemText(item);
  ta.setNew(new String[][] { str }, new int[] { rownr + 1 });
  addUndo(ta);

  setRowNums();

  edit(rownr + 1, 1);
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:23,代码来源:TableView.java

示例12: addUndo

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
private void addUndo(TransAction ta) {
  while (undo.size() > undo_position + 1 && undo.size() > 0) {
    int last = undo.size() - 1;
    undo.remove(last);
  }

  undo.add(ta);
  undo_position++;

  while (undo.size() > props.getMaxUndo()) {
    undo.remove(0);
    undo_position--;
  }

  setUndoMenu();
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:17,代码来源:TableView.java

示例13: setUndoMenu

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
private void setUndoMenu() {
  TransAction prev = viewPreviousUndo();
  TransAction next = viewNextUndo();

  if (prev != null) {
    miEditUndo.setEnabled(true);
    miEditUndo.setText(OsHelper.customizeMenuitemText(BaseMessages.getString(PKG, "TableView.menu.Undo", prev.toString())));
  } else {
    miEditUndo.setEnabled(false);
    miEditUndo.setText(OsHelper.customizeMenuitemText(BaseMessages.getString(PKG, "TableView.menu.UndoNotAvailable")));
  }

  if (next != null) {
    miEditRedo.setEnabled(true);
    miEditRedo.setText(OsHelper.customizeMenuitemText(BaseMessages.getString(PKG, "TableView.menu.Redo", next.toString())));
  } else {
    miEditRedo.setEnabled(false);
    miEditRedo.setText(OsHelper.customizeMenuitemText(BaseMessages.getString(PKG, "TableView.menu.RedoNotAvailable")));
  }

}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:22,代码来源:TableView.java

示例14: addUndo

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
private void addUndo( TransAction ta ) {
  while ( undo.size() > undoPosition + 1 && undo.size() > 0 ) {
    int last = undo.size() - 1;
    undo.remove( last );
  }

  undo.add( ta );
  undoPosition++;

  while ( undo.size() > props.getMaxUndo() ) {
    undo.remove( 0 );
    undoPosition--;
  }

  setUndoMenu();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:TableView.java

示例15: clear

import org.pentaho.di.core.undo.TransAction; //导入依赖的package包/类
public void clear() {
	setName( null );
	setFilename( null );

	jobcopies = new ArrayList<JobEntryCopy>();
	jobentries = new ArrayList<JobEntryInterface>();
	jobhops = new ArrayList<JobHopMeta>();
	notes = new ArrayList<NotePadMeta>();
	databases = new ArrayList<DatabaseMeta>();
	slaveServers = new ArrayList<SlaveServer>();

	logConnection = null;
	logTable = null;
	arguments = null;

	max_undo = Const.MAX_UNDO;

	undo = new ArrayList<TransAction>();
	undo_position = -1;

	addDefaults();
	setChanged(false);

	created_user = "-"; //$NON-NLS-1$
	created_date = new Date();

	modifiedUser = "-"; //$NON-NLS-1$
	modifiedDate = new Date();
	directory = new RepositoryDirectory();
	description = null;
	jobStatus = -1;
	jobVersion = null;
	extendedDescription = null;
	useBatchId = true;
	logfieldUsed = true;

	// setInternalKettleVariables(); Don't clear the internal variables for
	// ad-hoc jobs, it's ruins the previews
	// etc.
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:41,代码来源:JobMeta.java


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