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


Java TransAction.setChanged方法代码示例

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


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

示例1: addUndo

import org.pentaho.di.core.undo.TransAction; //导入方法依赖的package包/类
public void addUndo(Object from[], Object to[], int pos[], Point prev[], Point curr[], int type_of_change, boolean nextAlso) {
	// First clean up after the current position.
	// Example: position at 3, size=5
	// 012345
	// ^
	// remove 34
	// Add 4
	// 01234

	while (undo.size() > undo_position + 1 && undo.size() > 0) {
		int last = undo.size() - 1;
		undo.remove(last);
	}

	TransAction ta = new TransAction();
	switch (type_of_change) {
	case TYPE_UNDO_CHANGE:
		ta.setChanged(from, to, pos);
		break;
	case TYPE_UNDO_DELETE:
		ta.setDelete(from, pos);
		break;
	case TYPE_UNDO_NEW:
		ta.setNew(from, pos);
		break;
	case TYPE_UNDO_POSITION:
		ta.setPosition(from, pos, prev, curr);
		break;
	}
	undo.add(ta);
	undo_position++;

	if (undo.size() > max_undo) {
		undo.remove(0);
		undo_position--;
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:38,代码来源:JobMeta.java

示例2: checkChanged

import org.pentaho.di.core.undo.TransAction; //导入方法依赖的package包/类
private void checkChanged(String[] before[] , String[] after[], int index[] )
{
	if (field_changed) // Did we change anything: if so, add undo information
	{
		TransAction ta = new TransAction();
		ta.setChanged(before, after, index);
		addUndo(ta);
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:10,代码来源:TableView.java

示例3: copyToAll

import org.pentaho.di.core.undo.TransAction; //导入方法依赖的package包/类
private void copyToAll()
{
       TableItem row = activeTableItem;
       if (row==null || row.isDisposed()) return;
       int colnr = activeTableColumn;
       
	if (colnr==0) return;
	
	String str = row.getText(colnr);
	
	// Get undo information: all columns
	int size = table.getItemCount();
	
	String[] before[] = new String[size][];
	String[] after[]  = new String[size][];
	int      index[]  = new int[size];
	
	for (int i=0;i<table.getItemCount();i++)
	{
		TableItem item = table.getItem(i);
		
		index[i] = i;
		before[i] = getItemText(item);
		
		item.setText(colnr, str);
		
		after[i] = getItemText(item);
	}

	// Add the undo information!
	TransAction ta = new TransAction();
	ta.setChanged(before, after, index);
	addUndo(ta);
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:35,代码来源:TableView.java

示例4: checkChanged

import org.pentaho.di.core.undo.TransAction; //导入方法依赖的package包/类
private void checkChanged(String[] before[], String[] after[], int index[]) {
  if (field_changed) // Did we change anything: if so, add undo information
  {
    TransAction ta = new TransAction();
    ta.setChanged(before, after, index);
    addUndo(ta);
  }
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:9,代码来源:TableView.java

示例5: copyToAll

import org.pentaho.di.core.undo.TransAction; //导入方法依赖的package包/类
private void copyToAll() {
  TableItem row = activeTableItem;
  if (row == null || row.isDisposed())
    return;
  int colnr = activeTableColumn;

  if (colnr == 0)
    return;

  String str = row.getText(colnr);

  // Get undo information: all columns
  int size = table.getItemCount();

  String[] before[] = new String[size][];
  String[] after[] = new String[size][];
  int index[] = new int[size];

  for (int i = 0; i < table.getItemCount(); i++) {
    TableItem item = table.getItem(i);

    index[i] = i;
    before[i] = getItemText(item);

    item.setText(colnr, str);

    after[i] = getItemText(item);
  }

  // Add the undo information!
  TransAction ta = new TransAction();
  ta.setChanged(before, after, index);
  addUndo(ta);
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:35,代码来源:TableView.java

示例6: checkChanged

import org.pentaho.di.core.undo.TransAction; //导入方法依赖的package包/类
private void checkChanged( String[][] before, String[][] after, int[] index ) {
  // Did we change anything: if so, add undo information
  if ( fieldChanged ) {
    TransAction ta = new TransAction();
    ta.setChanged( before, after, index );
    addUndo( ta );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:9,代码来源:TableView.java

示例7: copyToAll

import org.pentaho.di.core.undo.TransAction; //导入方法依赖的package包/类
private void copyToAll() {
  TableItem row = activeTableItem;
  if ( row == null || row.isDisposed() ) {
    return;
  }
  int colnr = activeTableColumn;

  if ( colnr == 0 ) {
    return;
  }

  String str = row.getText( colnr );

  // Get undo information: all columns
  int size = table.getItemCount();

  String[][] before = new String[size][];
  String[][] after = new String[size][];
  int[] index = new int[size];

  for ( int i = 0; i < table.getItemCount(); i++ ) {
    TableItem item = table.getItem( i );

    index[i] = i;
    before[i] = getItemText( item );

    item.setText( colnr, str );

    after[i] = getItemText( item );
  }

  // Add the undo information!
  TransAction ta = new TransAction();
  ta.setChanged( before, after, index );
  addUndo( ta );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:37,代码来源:TableView.java

示例8: addUndo

import org.pentaho.di.core.undo.TransAction; //导入方法依赖的package包/类
/**
 * Add an undo operation to the undo list
 *
 * @param from array of objects representing the old state
 * @param to array of objectes representing the new state
 * @param pos An array of object locations
 * @param prev An array of points representing the old positions
 * @param curr An array of points representing the new positions
 * @param type_of_change The type of change that's being done to the transformation.
 * @param nextAlso indicates that the next undo operation needs to follow this one.
 */
public void addUndo(Object from[], Object to[], int pos[], Point prev[], Point curr[], int type_of_change, boolean nextAlso)
{
    // First clean up after the current position.
    // Example: position at 3, size=5
    // 012345
    // ^
    // remove 34
    // Add 4
    // 01234

    while (undo.size() > undo_position + 1 && undo.size() > 0)
    {
        int last = undo.size() - 1;
        undo.remove(last);
    }

    TransAction ta = new TransAction();
    switch (type_of_change)
    {
    case TYPE_UNDO_CHANGE:
        ta.setChanged(from, to, pos);
        break;
    case TYPE_UNDO_DELETE:
        ta.setDelete(from, pos);
        break;
    case TYPE_UNDO_NEW:
        ta.setNew(from, pos);
        break;
    case TYPE_UNDO_POSITION:
        ta.setPosition(from, pos, prev, curr);
        break;
    }
    ta.setNextAlso(nextAlso);
    undo.add(ta);
    undo_position++;

    if (undo.size() > max_undo)
    {
        undo.remove(0);
        undo_position--;
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:54,代码来源:TransMeta.java

示例9: addUndo

import org.pentaho.di.core.undo.TransAction; //导入方法依赖的package包/类
/**
 * Adds an undo operation to the undo list.
 *
 * @param from array of objects representing the old state
 * @param to array of objectes representing the new state
 * @param pos An array of object locations
 * @param prev An array of points representing the old positions
 * @param curr An array of points representing the new positions
 * @param type_of_change The type of change that's being done to the transformation.
 * @param nextAlso indicates that the next undo operation needs to follow this one.
 */
public void addUndo(Object from[], Object to[], int pos[], Point prev[], Point curr[], int type_of_change, boolean nextAlso)
{
    // First clean up after the current position.
    // Example: position at 3, size=5
    // 012345
    // ^
    // remove 34
    // Add 4
    // 01234

    while (undo.size() > undo_position + 1 && undo.size() > 0)
    {
        int last = undo.size() - 1;
        undo.remove(last);
    }

    TransAction ta = new TransAction();
    switch (type_of_change)
    {
    case TYPE_UNDO_CHANGE:
        ta.setChanged(from, to, pos);
        break;
    case TYPE_UNDO_DELETE:
        ta.setDelete(from, pos);
        break;
    case TYPE_UNDO_NEW:
        ta.setNew(from, pos);
        break;
    case TYPE_UNDO_POSITION:
        ta.setPosition(from, pos, prev, curr);
        break;
    }
    ta.setNextAlso(nextAlso);
    undo.add(ta);
    undo_position++;

    if (undo.size() > max_undo)
    {
        undo.remove(0);
        undo_position--;
    }
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:54,代码来源:TransMeta.java

示例10: addUndo

import org.pentaho.di.core.undo.TransAction; //导入方法依赖的package包/类
@Override
public void addUndo( Object[] from, Object[] to, int[] pos, Point[] prev, Point[] curr, int type_of_change,
                     boolean nextAlso ) {
  // First clean up after the current position.
  // Example: position at 3, size=5
  // 012345
  // ^
  // remove 34
  // Add 4
  // 01234

  while ( undo.size() > undo_position + 1 && undo.size() > 0 ) {
    int last = undo.size() - 1;
    undo.remove( last );
  }

  TransAction ta = new TransAction();
  switch ( type_of_change ) {
    case TYPE_UNDO_CHANGE:
      ta.setChanged( from, to, pos );
      break;
    case TYPE_UNDO_DELETE:
      ta.setDelete( from, pos );
      break;
    case TYPE_UNDO_NEW:
      ta.setNew( from, pos );
      break;
    case TYPE_UNDO_POSITION:
      ta.setPosition( from, pos, prev, curr );
      break;
    default:
      break;
  }
  undo.add( ta );
  undo_position++;

  if ( undo.size() > max_undo ) {
    undo.remove( 0 );
    undo_position--;
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:42,代码来源:AbstractMeta.java


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