AMADEUS html plain
This sketchy text is generated by AMADEUS
import java.awt.*;
class Caret
class Caret extends Cursor
int shift;
kaugus pikselites rea algusest
int height;
Caret(Scheme s)
konstruktor
SWING!
void drawx(Graphics g)
identne draw()-ga
g.setXORMode(Default.backgroundColor);
g.setColor(Default.caretColor);
//SWING!
g.drawLine(row.x + shift, row.y+3, row.x + shift, row.y + height+2);
g.drawLine(row.x + shift, row.y+3,
row.x + shift, row.y + height+2);
? true//Am.isWindows
g.setPaintMode();
void draw(Graphics g)
g.setXORMode(Default.backgroundColor);
g.setColor(Default.caretColor);
g.drawLine(row.x + shift, row.y+3, row.x + shift, row.y + height+2);
g.drawLine(row.x + shift, row.y+3,
row.x + shift, row.y + height+2);
? true//Am.isWindows
g.setPaintMode();
void adjustToZoom()
kui vaate suurus on suumitud
JK 17.01.07
<======
shift = 0;
* int i = 0; i < noInRow; i++
row.getElement(i);
? (row.sy != null)
on symbol
shift += row.sy.width() ;
-1
height = row.sy.ascent();
<======
shift--;
Caret make_Copy()
Caret car = new Caret(scheme);
car.shift = shift;
car.height = height;
car.primitive = primitive;
car.text = text;
car.row = row;
car.noInRow = noInRow;
<======car
hu"pped
public void goTo(Scheme s)
scheme = s;
moveToParentHome();
moveToRowHome();
public void goTo(Cursor cur)
scheme = cur.scheme;
primitive = cur.primitive;
text = cur.text;
row = cur.row;
//noInRow = cur.noInRow;
JK 11.01.06
//JK 11.01.06
? (row == null)
moveToParentHome();
moveToRowHome();
peaks veel minema paremale kuni noInRow ./......
JK 11.01.06
? (row == null)
moveToParentHome();
<======
moveToRowHome();
peab veel minema paremale kuni noInRow
* int i = 0; i < cur.noInRow-1; i++
liikumine reas
public void moveToRowHome()
eeldab: row
//System.out.println("Caret:moveToParentHome");
super.moveToRowHome();
row.getElement(0);
? (row.sy != null)
on symbol
shift = row.sy.width() - 1;
height = row.sy.ascent();
<======
public void moveToRowEnd()
eeldab: row
int v = row.elements.size();
* ; noInRow != v ;
public void moveToPrimitiveText()
peremees-primitiivi teksti algusse
super.moveToPrimitiveText();
row.getElement(0);
? (row.sy != null)
on symbol
shift = row.sy.width() - 1;
height = row.sy.ascent();
<======
public boolean moveToHead(int i)
minna peremees-skeemi pa"ise elemendile i
? (!super.moveToHead(i))
<======false
row.getElement(0);
? (row.sy != null)
on symbol
shift = row.sy.width() - 1;
height = row.sy.ascent();
<======
<======true
suunatud liikumine
public boolean moveDirectDown()
ALGJAVA
eeldab: kui inScheme, siis kursor on paigas
kui !inScheme, siis ainult scheme (liigub skeemialgusse)
int keepShift = shift;
? (!super.moveDirectDown())
//System.out.println("Caret:" + "super:EI SAA ALLA MINNA" );
<======false
row.getElement(noInRow-1);
? (row.sy != null)
on symbol
shift = row.sy.width() - 1;
<======
on pilt
? (row.im != null)
shift = row.im.width() - 1;
<======
on hypersymbol !!!!!!!
...
<======true
public boolean moveDown()
eeldab: kui inScheme, siis kursor on paigas
kui !inScheme, siis ainult scheme (liigub skeemialgusse)
int keepShift = shift;
? (!super.moveDown())
//System.out.println("Caret:" + "super:EI SAA ALLA MINNA" );
<======false
row.getElement(noInRow-1);
? (row.sy != null)
on symbol
shift = row.sy.width() - 1;
<======
on pilt
? (row.im != null)
shift = row.im.width() - 1;
<======
on hypersymbol !!!!!!!
...
<======true
public boolean moveRight()
? (!inScheme())
moveToParentHome();
<======true
? (noInRow == row.elements.size())
<======moveDown()
noInRow++;
row.getElement(noInRow-1);
? (row.sy != null)
on symbol
shift += row.sy.width();
<======
on pilt
? (row.im != null)
shift += row.im.width();
<======
<======true
public boolean moveUp()
<======false
? (row != null)
shift = row.width - 1;
<======
<======true
public boolean moveLeft()
? (!inScheme())
moveToParentHome();
<======true
<======moveUp()
noInRow--;
row.getElement(noInRow);
? (row.sy != null)
on symbol
shift -= row.sy.width();
<======
on pilt
? (row.im != null)
shift -= row.im.width();
<======
<======true