本文整理汇总了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--;
}
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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 );
}
}
示例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 );
}
示例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--;
}
}
示例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--;
}
}
示例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--;
}
}