gzz.view
Class AbstractViewContext

java.lang.Object
  |
  +--gzz.view.AbstractViewContext
All Implemented Interfaces:
java.lang.Cloneable, ViewContext

public class AbstractViewContext
extends java.lang.Object
implements ViewContext, java.lang.Cloneable

An implementation of ViewContext providing set methods for almost all methods of ViewContext.


Field Summary
 
Fields inherited from interface gzz.view.ViewContext
rcsid
 
Constructor Summary
AbstractViewContext()
           
 
Method Summary
 java.lang.Object clone()
           
 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.
 void setAccursed(Cell c)
           
 void setCellView(CellView cellView)
           
 void setCursorOffset(int offs)
           
 void setDims(Dim[] dims)
           
 void setView(View view)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractViewContext

public AbstractViewContext()
Method Detail

setAccursed

public void setAccursed(Cell c)

getAccursed

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

Specified by:
getAccursed in interface ViewContext

setDims

public void setDims(Dim[] dims)

getDims

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

Specified by:
getDims in interface ViewContext

setCursorOffset

public void setCursorOffset(int offs)

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

setView

public void setView(View view)

getView

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

setCellView

public void setCellView(CellView cellView)

getCellView

public CellView getCellView()
Specified by:
getCellView 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

getWindow

public Cell getWindow()
               throws java.lang.UnsupportedOperationException
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
java.lang.UnsupportedOperationException

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

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object