gnu.jemacs.buffer
Class EWindow

java.lang.Object
  extended by gnu.jemacs.buffer.EWindow
Direct Known Subclasses:
SwingWindow, SwtWindow

public abstract class EWindow
extends java.lang.Object


Field Summary
 Buffer buffer
           
protected  int charHeight
          Nominal height in pixels of a character, if non-zero.
protected  int charWidth
          Nominal width in pixels of a character, if non-zero.
 EFrame frame
           
protected  EWindow nextWindow
          Next window in cyclic window ordering.
protected  int[] pendingKeys
           
protected  int pendingLength
           
protected  EWindow prevWindow
          Previous window in cyclic window ordering.
 
Constructor Summary
EWindow(Buffer buffer)
           
 
Method Summary
 void delete()
           
protected  void deleteNoValidate()
           
 void deleteOtherWindows()
           
 Buffer getBuffer()
           
protected abstract  void getCharSize()
           
 EFrame getFrame()
           
abstract  int getHeight()
          Get the current height (in pixels) of this window.
 int getHeightInLines()
           
 EWindow getNextWindow(boolean forwards)
          Return the next/previous window in the cyclic order of windows.
 EWindow getNextWindowInFrame(int count)
           
 EWindow getOtherWindow(boolean forwards)
          Return the next/previous EWindow in the cyclic order of windows.
abstract  int getPoint()
          Returns the "Emacs value" (1-origin) of point.
static EWindow getSelected()
           
abstract  int getWidth()
          Get the current width (in pixels) of this window.
 int getWidthInColumns()
           
 void handleCommand(java.lang.Object command)
           
 void handleKey(int code)
           
protected  void linkSibling(EWindow window, boolean horizontal)
          Link a new window after this.
 java.lang.Object lookupKey(int key)
           
 void pushPrefix(int prefix)
           
 void requestFocus()
           
 void setBuffer(Buffer buffer)
           
abstract  void setDot(int offset)
           
 void setFrame(EFrame frame)
           
 void setPoint(int point)
           
 void setSelected()
           
static void setSelected(EWindow window)
           
abstract  EWindow split(Buffer buffer, int lines, boolean horizontal)
          Split this window into two.
 EWindow split(int lines, boolean horizontal)
          Split this window into two, showing this buffer in both windows.
abstract  java.lang.Object tooLong(int pendingLength)
           
 java.lang.String toString()
           
protected  void unlink()
           
abstract  void unselect()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

frame

public EFrame frame

buffer

public Buffer buffer

pendingKeys

protected int[] pendingKeys

pendingLength

protected int pendingLength

prevWindow

protected EWindow prevWindow
Previous window in cyclic window ordering.


nextWindow

protected EWindow nextWindow
Next window in cyclic window ordering.


charHeight

protected int charHeight
Nominal height in pixels of a character, if non-zero.


charWidth

protected int charWidth
Nominal width in pixels of a character, if non-zero.

Constructor Detail

EWindow

public EWindow(Buffer buffer)
Method Detail

getSelected

public static EWindow getSelected()

setSelected

public void setSelected()

unselect

public abstract void unselect()

setSelected

public static void setSelected(EWindow window)

requestFocus

public void requestFocus()

getFrame

public EFrame getFrame()

setFrame

public final void setFrame(EFrame frame)

getBuffer

public Buffer getBuffer()

setBuffer

public void setBuffer(Buffer buffer)

getPoint

public abstract int getPoint()
Returns the "Emacs value" (1-origin) of point.


setPoint

public final void setPoint(int point)

setDot

public abstract void setDot(int offset)

split

public final EWindow split(int lines,
                           boolean horizontal)
Split this window into two, showing this buffer in both windows.

Returns:
the new wndow.

split

public abstract EWindow split(Buffer buffer,
                              int lines,
                              boolean horizontal)
Split this window into two. Display Var>buffer in the new window.

Returns:
the new window.

linkSibling

protected final void linkSibling(EWindow window,
                                 boolean horizontal)
Link a new window after this.


unlink

protected final void unlink()

getNextWindow

public EWindow getNextWindow(boolean forwards)
Return the next/previous window in the cyclic order of windows. Returns null if this is the last/first window in this EFrame.


getOtherWindow

public final EWindow getOtherWindow(boolean forwards)
Return the next/previous EWindow in the cyclic order of windows. Returns first/last if this is the last/first window in this EFrame.


getNextWindowInFrame

public final EWindow getNextWindowInFrame(int count)

delete

public void delete()

deleteNoValidate

protected void deleteNoValidate()

deleteOtherWindows

public void deleteOtherWindows()

getCharSize

protected abstract void getCharSize()

getWidth

public abstract int getWidth()
Get the current width (in pixels) of this window.


getHeight

public abstract int getHeight()
Get the current height (in pixels) of this window.


getHeightInLines

public int getHeightInLines()

getWidthInColumns

public int getWidthInColumns()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

pushPrefix

public void pushPrefix(int prefix)

lookupKey

public java.lang.Object lookupKey(int key)

tooLong

public abstract java.lang.Object tooLong(int pendingLength)

handleKey

public void handleKey(int code)

handleCommand

public void handleCommand(java.lang.Object command)