AMADEUS html plain
This sketchy text is generated by AMADEUS
import java.util.*;
import java.awt.*;
class UndoSetStyleInRow
class UndoSetStyleInRow extends Undo
Row r;
Selection keepSelection;
Vector colors;
vanad va"rvid
Vector fonts;
vanad fondid
int i;
esimese eemaldatud elemendi nr reas
int j;
viimase eemaldatud elemendi nr reas
UndoSetStyleInRow(Selection sel, Row rr, int ii, int jj)
keepSelection = sel.makeCopy();
r = rr;
i = ii;
j = jj;
colors = new Vector();
fonts = new Vector();
* int k = i; k <= jj; k++
r.getElement(k);
? (r.sy != null)
colors.addElement(r.sy.color);
fonts.addElement(r.sy.font);
public void undo(Editor ed)
? ed.isRedoing
ed.stack.push(new UndoSetStyleInRow(keepSelection,r,i,j));
<======
ed.redoStack.push(new UndoSetStyleInRow(keepSelection,r,i,j));
* int m = 0, k = i; k <= j; k++, m++
r.getElement(k);
? (r.sy != null)
r.sy.color = (Color)(colors.elementAt(m));
r.sy.font = (Font)(fonts.elementAt(m));