// (c) Tuomas J. Lukka package gzz.view; import gzz.client.*; import gzz.*; import gzz.errors.*; import gzz.vob.*; import java.util.*; /** An implementation of ViewContext providing set methods * for almost all methods of ViewContext. */ public class AbstractViewContext implements ViewContext { Cell accursed; Dim[] dims; int cursorOffset; View view; CellInBox cellView; CellInBox cellContentView; public void setAccursed(Cell c) { accursed = c; cursorOffset = -1; } public Cell getAccursed() { return accursed; } public void setDims(Dim[] dims) { this.dims = dims; } public Dim[] getDims() { return dims; } public void setCursorOffset(int offs) { cursorOffset = offs; } public int getCursorOffset(Cell c) { if(c == accursed) return cursorOffset; return -1; } public void setView(View view) { this.view = view; } public View getView() { return view; } public void setCellView(CellInBox cellView) { this.cellView = cellView; } public CellInBox getCellView() { return cellView; } public void setCellContentView(CellInBox cellContentView) { this.cellContentView = cellContentView; } public CellInBox getCellContentView() { return cellContentView; } public boolean isMarked(Cell c) { return false; } public Cell getWindow() throws UnsupportedOperationException { throw new UnsupportedOperationException(); } public List getCursorColors(Cell c) { return null; } }