Adventure at Umalu  22nd March, 2013
Rogue-like Dungeon Crawler, written in Java
 All Classes Functions Variables Pages
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
jade.ui.TermPanel Class Reference
Inheritance diagram for jade.ui.TermPanel:
jade.ui.Terminal jade.ui.TiledTermPanel

Classes

class  Screen
 

Public Member Functions

 TermPanel (int columns, int rows, int fontSize)
 
 TermPanel ()
 
JPanel panel ()
 
char getKey () throws InterruptedException
 
void keyPressed (KeyEvent e)
 
void refreshScreen ()
 
- Public Member Functions inherited from jade.ui.Terminal
 Terminal ()
 
void bufferChar (Coordinate coord, ColoredChar ch)
 
final void bufferChar (int x, int y, ColoredChar ch)
 
ColoredChar charAt (Coordinate coord)
 
final ColoredChar charAt (int x, int y)
 
final void bufferString (int x, int y, String str, Color color)
 
final void bufferString (Coordinate coord, String str, Color color)
 
final void bufferString (int x, int y, String str)
 
final void bufferString (Coordinate coord, String str)
 
void clearBuffer ()
 
void saveBuffer ()
 
void recallBuffer ()
 
void registerCamera (Camera camera, Coordinate screenCenter)
 
final void registerCamera (Camera camera, int screenCenterX, int screenCenterY)
 
Coordinate cameraCenter (Camera camera)
 
boolean cameraRegistered (Camera camera)
 
void unregisterCamera (Camera camera)
 
void bufferCamera (Camera camera)
 
final void bufferCameras ()
 

Static Public Member Functions

static TermPanel getFramedTerminal (String title)
 

Static Public Attributes

static final int DEFAULT_COLS = 80
 
static final int DEFAULT_ROWS = 33
 
static final int DEFAULT_SIZE = 12
 

Protected Member Functions

 TermPanel (Screen screen)
 
Screen screen ()
 
- Protected Member Functions inherited from jade.ui.Terminal
final Map< Coordinate,
ColoredChar
getBuffer ()
 

Static Protected Member Functions

static void frameTermPanel (TermPanel term, String title)
 

Detailed Description

Implements a

on a

JPanel

, which can then be embedded into any container able to use a

JPanel

.

Constructor & Destructor Documentation

jade.ui.TermPanel.TermPanel ( int  columns,
int  rows,
int  fontSize 
)

Constructs a new

with the given dimensions. Note that the rows and columns can be changed by resizing the underlying JPanel, but font size is fixed.

Parameters
columnsthe default number of columns to display
rowsthe default number of rows to display
fontSizethe size of each tile
jade.ui.TermPanel.TermPanel ( )

Constructs a new

with the default dimensions. There will be 80 columns, 24 rows, and a font size of 12.

Member Function Documentation

static TermPanel jade.ui.TermPanel.getFramedTerminal ( String  title)
static

Constructs and returns a new

with default dimensions, which is placed inside a

JFrame

. The

will initially have 80 columns, 24 rows, and a font size of 12.

Parameters
titlethe title of the
JFrame
Returns
a new with default dimensions.
char jade.ui.TermPanel.getKey ( ) throws InterruptedException
virtual

Returns the next key press as a

char

. This method block until a key press is available.

Returns
the next key press
Exceptions
InterruptedException

Implements jade.ui.Terminal.

JPanel jade.ui.TermPanel.panel ( )

Returns the underlying

JPanel

display of the

. This

JPanel

can then be embedded in any other container like a normal

JPanel

.

Returns
the underlying
JPanel
display of the
void jade.ui.TermPanel.refreshScreen ( )
virtual

Refreshes the screen to reflect the current state of the buffer. Until this method is called, no changes to the buffer should be displayed.

Exceptions
InterruptedException

Implements jade.ui.Terminal.

Reimplemented in jade.ui.TiledTermPanel.


The documentation for this class was generated from the following file: