wip history changes

This commit is contained in:
Jesse Boyd
2020-01-06 08:36:16 +00:00
parent b173c85c78
commit 195c4a7647
32 changed files with 442 additions and 287 deletions

View File

@ -71,5 +71,4 @@ public class LazyReference<T> {
refInfo.lock.unlock();
}
}
}

View File

@ -196,4 +196,34 @@ public abstract class PaginationBox extends MessageBox {
return lines.size();
}
}
public static class MergedPaginationBox extends PaginationBox {
private final PaginationBox[] values;
public MergedPaginationBox(String header, String pageCommand, PaginationBox... values) {
super(header, pageCommand);
this.values = values;
}
@Override
public Component getComponent(int number) {
for (PaginationBox box : values) {
int size = box.getComponentsSize();
if (size > number) {
return box.getComponent(number);
}
number -= size;
}
return null;
}
@Override
public int getComponentsSize() {
int size = 0;
for (PaginationBox box : values) {
size += box.getComponentsSize();
}
return size;
}
}
}