/*******************************************************************************
- * 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) {
+ protected static boolean isEventDummy(MouseDragBegin e) {
if (e.controlPosition.distance(0, 0) == 0
&& e.screenPosition.distance(0, 0) == 0
&& e.buttons == 0) {
}
}
- private boolean dragging = false;
- private Point2D dragBegin = null;
- private Point2D currentDrag = null;
+ protected boolean dragging = false;
+ protected Point2D dragBegin = null;
+ protected Point2D currentDrag = null;
private Function1<Vec2d, Boolean> translator = null;
private static double FACTOR = 1.0;