/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * Copyright (c) 2007, 2017 Association for Decentralized Information Management
* in Industry THTH ry.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
public static class A extends TextNode {
- MonitorTextGridResult cache = null;
+ transient MonitorTextGridResult cache = null;
private static final long serialVersionUID = -4519849713591842241L;
}
}
- private int computeRows() {
+ public int computeRows() {
MaxY maxy = new MaxY();
nodes.forEachKey(maxy);
return maxy.max;
}
public void removeRow(int y) {
+ rowIds.remove(y);
List<Cell> row = peekRowCells(y);
if (row.isEmpty())
return;
}
@Override
- public void render(Graphics2D g2d) {
- Vec2d delta = getDelta(FACTOR);
- if(delta != null)
- setTransform(AffineTransform.getTranslateInstance(delta.x, delta.y-2.1*computeRows()*(up ? 1.0 : 0.0)));
- else
- setTransform(AffineTransform.getTranslateInstance(0, -2.1*computeRows()*(up ? 1.0 : 0.0)));
- super.render(g2d);
+ public void refresh() {
+ Vec2d delta = getDelta(FACTOR);
+ if(delta != null)
+ setTransform(AffineTransform.getTranslateInstance(delta.x, delta.y-2.1*computeRows()*(up ? 1.0 : 0.0)));
+ else
+ setTransform(AffineTransform.getTranslateInstance(0, -2.1*computeRows()*(up ? 1.0 : 0.0)));
+ super.refresh();
}
@Override
@Override
public int getEventMask() {
- return EventTypes.MouseDragBeginMask | EventTypes.KeyPressedMask;
+ return EventTypes.MouseDragBeginMask | EventTypes.MouseMovedMask | EventTypes.MouseButtonReleasedMask | EventTypes.KeyPressedMask;
}
private static boolean isEventDummy(MouseDragBegin e) {