org.cyberiantiger.mudclient.ui
Class ConsoleModel

java.lang.Object
  extended byorg.cyberiantiger.mudclient.ui.ConsoleModel
All Implemented Interfaces:
Console

public class ConsoleModel
extends java.lang.Object
implements Console

A Class to represent a text based console


Field Summary
protected  java.util.List actions
           
protected  java.util.Set views
           
 
Fields inherited from interface org.cyberiantiger.console.Console
BLACK, BLUE, BOLD, CYAN, DEFAULT, FLASH, GREEN, MAGENTA, RED, REVERSE, WHITE, YELLOW
 
Constructor Summary
ConsoleModel(int width, int height, int bufferSize)
           
 
Method Summary
 void addAction(ConsoleAction action)
           
 void addView(ConsoleModelListener view)
           
 void beep()
           
 void cancelSelection()
           
 void clearScreen()
           
 void drawString(char[] chars)
           
 void drawString(char[] chars, int offset, int len)
           
 void drawString(java.lang.String str)
           
 void endSelection(java.awt.Point end)
           
 int getBufferSize()
           
protected  Line getCurrentLine()
           
 int getCursorX()
           
 int getCursorY()
           
 int getHeight()
           
 Line getLine(int line)
           
 int getLineOffset()
           
 java.lang.String getSelection()
           
 java.awt.Point getSelectionEnd()
           
 java.awt.Point getSelectionStart()
           
 Line getViewLine(int line)
           
 int getWidth()
           
 boolean hasSelection()
           
 void moveCursorX(int x)
           
 void moveCursorY(int y)
           
 void removeView(ConsoleModelListener view)
           
 void resize(int width, int height)
           
 void setBackground(int color)
           
 void setBold(boolean bold)
           
 void setCursorX(int x)
           
 void setCursorY(int y)
           
 void setFlash(boolean flash)
           
 void setForeground(int color)
           
 void setLineOffset(int lineOffset)
           
 void setReverse(boolean reverse)
           
 void startSelection(java.awt.Point start)
           
 java.lang.String toString()
           
protected  void updateViews()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

actions

protected java.util.List actions

views

protected java.util.Set views
Constructor Detail

ConsoleModel

public ConsoleModel(int width,
                    int height,
                    int bufferSize)
Method Detail

getBufferSize

public int getBufferSize()
Specified by:
getBufferSize in interface Console

getWidth

public int getWidth()
Specified by:
getWidth in interface Console

getHeight

public int getHeight()
Specified by:
getHeight in interface Console

resize

public void resize(int width,
                   int height)
Specified by:
resize in interface Console

moveCursorX

public void moveCursorX(int x)
Specified by:
moveCursorX in interface Console

moveCursorY

public void moveCursorY(int y)
Specified by:
moveCursorY in interface Console

getCursorX

public int getCursorX()
Specified by:
getCursorX in interface Console

getCursorY

public int getCursorY()
Specified by:
getCursorY in interface Console

setCursorX

public void setCursorX(int x)
Specified by:
setCursorX in interface Console

setCursorY

public void setCursorY(int y)
Specified by:
setCursorY in interface Console

drawString

public void drawString(java.lang.String str)
Specified by:
drawString in interface Console

drawString

public void drawString(char[] chars)
Specified by:
drawString in interface Console

drawString

public void drawString(char[] chars,
                       int offset,
                       int len)
Specified by:
drawString in interface Console

setForeground

public void setForeground(int color)
Specified by:
setForeground in interface Console

setBackground

public void setBackground(int color)
Specified by:
setBackground in interface Console

setBold

public void setBold(boolean bold)
Specified by:
setBold in interface Console

setFlash

public void setFlash(boolean flash)
Specified by:
setFlash in interface Console

setReverse

public void setReverse(boolean reverse)
Specified by:
setReverse in interface Console

clearScreen

public void clearScreen()
Specified by:
clearScreen in interface Console

addAction

public void addAction(ConsoleAction action)
Specified by:
addAction in interface Console

beep

public void beep()
Specified by:
beep in interface Console

toString

public java.lang.String toString()

addView

public void addView(ConsoleModelListener view)

removeView

public void removeView(ConsoleModelListener view)

updateViews

protected void updateViews()

getLine

public Line getLine(int line)

getCurrentLine

protected Line getCurrentLine()

setLineOffset

public void setLineOffset(int lineOffset)

getLineOffset

public int getLineOffset()

getViewLine

public Line getViewLine(int line)

startSelection

public void startSelection(java.awt.Point start)

endSelection

public void endSelection(java.awt.Point end)

cancelSelection

public void cancelSelection()

hasSelection

public boolean hasSelection()

getSelectionStart

public java.awt.Point getSelectionStart()

getSelectionEnd

public java.awt.Point getSelectionEnd()

getSelection

public java.lang.String getSelection()


Copyright © 2003 OSJava. All Rights Reserved.