gnu.jemacs.buffer

Class EWindow

Known Direct 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(Object command)
void
handleKey(int code)
protected void
linkSibling(EWindow window, boolean horizontal)
Link a new window after this.
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.
String
toString()
abstract Object
tooLong(int pendingLength)
protected void
unlink()
abstract void
unselect()

Field Details

buffer

public Buffer buffer

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.

frame

public EFrame frame

nextWindow

protected EWindow nextWindow
Next window in cyclic window ordering.

pendingKeys

protected int[] pendingKeys

pendingLength

protected int pendingLength

prevWindow

protected EWindow prevWindow
Previous window in cyclic window ordering.

Constructor Details

EWindow

public EWindow(Buffer buffer)

Method Details

delete

public void delete()

deleteNoValidate

protected void deleteNoValidate()

deleteOtherWindows

public void deleteOtherWindows()

getBuffer

public Buffer getBuffer()

getCharSize

protected abstract void getCharSize()

getFrame

public EFrame getFrame()

getHeight

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

getHeightInLines

public int getHeightInLines()

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.

getNextWindowInFrame

public final EWindow getNextWindowInFrame(int count)

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.

getPoint

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

getSelected

public static EWindow getSelected()

getWidth

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

getWidthInColumns

public int getWidthInColumns()

handleCommand

public void handleCommand(Object command)

handleKey

public void handleKey(int code)

linkSibling

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

lookupKey

public Object lookupKey(int key)

pushPrefix

public void pushPrefix(int prefix)

requestFocus

public void requestFocus()

setBuffer

public void setBuffer(Buffer buffer)

setDot

public abstract void setDot(int offset)

setFrame

public final void setFrame(EFrame frame)

setPoint

public final void setPoint(int point)

setSelected

public void setSelected()

setSelected

public static void setSelected(EWindow window)

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.

split

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

toString

public String toString()

tooLong

public abstract Object tooLong(int pendingLength)

unlink

protected final void unlink()

unselect

public abstract void unselect()