AMADEUS html plain
This sketchy text is generated by AMADEUS
* import java.awt.
class Item39Listener
class Item39Listener implements ActionListener
Edit + Default text color
vajab ta"iustamist (teksti osa?)
AmFrame frame;
Item39Listener(AmFrame fr)
konstruktor
public void actionPerformed(ActionEvent event)
AmCanvas c = (AmCanvas)(frame.viewArea);
Graphics g = c.getGraphics();
g.translate(c.start.x, c.start.y);
int kind = c.selection.kind();
??kind
? Selection.PRIMITIVE:
Color col = Default.foregroundColor;
seada col
? (c.selection.start.primitive instanceof PrimitiveHead)
? (c.selection.start.scheme instanceof Sketch)
col = Default.sketchHeadColor;
<======
col = Default.branchHeadColor;
<======
? (c.selection.start.primitive instanceof PrimitiveMember)
? (c.selection.start.primitive.type == Primitive.CONDITION)
col = Default.conditionColor;
text.setColor
c.selection.start.primitive.text.setColor(col, Default.commentColor);
c.frame.contents.affected = c.selection.start.scheme;
c.selection.start.primitive.text.invalidate();
<======
? Selection.PRIMITIVETEXT:
col = Default.foregroundColor;
seada col
? (c.selection.start.primitive instanceof PrimitiveHead)
? (c.selection.start.scheme instanceof Sketch)
col = Default.sketchHeadColor;
<======
col = Default.branchHeadColor;
<======
? (c.selection.start.primitive instanceof PrimitiveMember)
? (c.selection.start.primitive.type == Primitive.CONDITION)
col = Default.conditionColor;
text.setColor
c.selection.start.primitive.text.setColor(col);
c.frame.contents.affected = c.selection.start.scheme;
c.selection.start.primitive.text.invalidate();
<======;
? Selection.PRIMITIVECOMMENT:
? Selection.SCHEMECOMMENT2SCHEMECOMMENT:
Row r = c.selection.start.row;
row.setColor voi valitud osale sy.color = Default.commentColor
? (c.selection.start == c.selection.end)
c.selection.start.row.setColor(Default.commentColor);
<======
int i = c.selection.start.noInRow;
int j = c.selection.end.noInRow;
* int k = i; k < j; k++
r.getElement(k);
? (r.sy != null)
r.sy.color = Default.commentColor;
<------
invalideerida kommentaar
? (kind == Selection.PRIMITIVECOMMENT)
c.selection.start.primitive.text.comment.invalidate();
<======
c.selection.start.scheme.comment.invalidate();
c.frame.contents.affected = c.selection.start.scheme;
//Rectangle rec = c.selection.area();
//c.X = rec.x + c.start.x; c.Y = rec.y + c.start.y;
//c.W = rec.width; c.H = rec.height;
//c.own = true; c.repaint(c.X, c.Y, c.W, c.H);
frame.refresh();