gzz.view
Class ZZViewContext

java.lang.Object
  |
  +--gzz.view.ZZViewContext
All Implemented Interfaces:
ViewContext

public class ZZViewContext
extends java.lang.Object
implements ViewContext

An implementation of ViewContext reading its data from the zzstructure (XXX not complete).

Currently this doesn't work correctly, because we don't have the structures worked out. So the only thing this does right so far is returning the window cell.

See Also:
Fallback

Field Summary
 Cell window
           
 
Fields inherited from interface gzz.view.ViewContext
rcsid
 
Constructor Summary
ZZViewContext(Cell window)
           
 
Method Summary
 Cell getAccursed()
          Get the accursed cell.
 CellView getCellView()
           
 java.util.List getCursorColors(Cell c)
          Get the colors of all colored cursors on a cell.
 int getCursorOffset(Cell c)
          Get the offset of the line cursor on a given cell, if any.
 Dim[] getDims()
          Get the dimension list.
 View getView()
           
 Cell getWindow()
          Get the maincell of the window, if available.
 boolean isMarked(Cell c)
          Whether a given cell is marked by the current mark set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

window

public final Cell window
Constructor Detail

ZZViewContext

public ZZViewContext(Cell window)
Method Detail

getAccursed

public Cell getAccursed()
Description copied from interface: ViewContext
Get the accursed cell.

Specified by:
getAccursed in interface ViewContext

getCursorColors

public java.util.List getCursorColors(Cell c)
Description copied from interface: ViewContext
Get the colors of all colored cursors on a cell. Return null if there are no colored cursors on this cell.

Specified by:
getCursorColors in interface ViewContext

getDims

public Dim[] getDims()
Description copied from interface: ViewContext
Get the dimension list.

Specified by:
getDims in interface ViewContext

getCursorOffset

public int getCursorOffset(Cell c)
Description copied from interface: ViewContext
Get the offset of the line cursor on a given cell, if any. If no line cursor should be rendered on the given cell, return -1.

Specified by:
getCursorOffset in interface ViewContext

isMarked

public boolean isMarked(Cell c)
Description copied from interface: ViewContext
Whether a given cell is marked by the current mark set.

Specified by:
isMarked in interface ViewContext

getView

public View getView()
Specified by:
getView in interface ViewContext

getCellView

public CellView getCellView()
Specified by:
getCellView in interface ViewContext

getWindow

public Cell getWindow()
Description copied from interface: ViewContext
Get the maincell of the window, if available. This cell can be used to acquire more metadata about how to render the view. If there is no maincell for the window (because we're running in fallback mode), an UnsupportedOperationException is thrown.

Specified by:
getWindow in interface ViewContext