jcurzez
Class Area

java.lang.Object
  |
  +--jcurzez.AbstractWindow
        |
        +--jcurzez.Area

public class Area
extends AbstractWindow

An area. Unlike Screen, linewrap and scroll can be specified on creation.

Version:
0.0.3
Author:
Thomas Girard

Field Summary
 
Fields inherited from class jcurzez.AbstractWindow
buffer, cat, cursor, id, linewrap, parent, scroll
 
Constructor Summary
Area(AbstractWindow parent, int x1, int y1, int x2, int y2, boolean linewrap, boolean scroll)
          Constructs a new wndow with specified parent, coordinates, and properties.
Area(AbstractWindow parent, Rectangle rectangle, boolean linewrap, boolean scroll)
          Constructs a new Area with a parent, specified bounds and properties.
Area(int x1, int y1, int x2, int y2, boolean linewrap, boolean scroll)
          Contructs a new area with specified bounds and properties for linewrap and scroll.
Area(Rectangle rectangle)
          Creates a new Area using specified Rectangle.
Area(Rectangle rectangle, boolean linewrap, boolean scroll)
          Creates a new Area with specified bounds and properties.
 
Method Summary
 void beep()
          Emits a beep.
 void gotoXY(int x, int y)
          Invokes parent's gotoXY method.
 void printCell(int x, int y, Cell cell)
          Invokes parent's printCell method.
 void update()
          Updates the area.
 
Methods inherited from class jcurzez.AbstractWindow
clear, clearToBottom, clearToEndOfLine, copyCellsAt, deleteChar, deleteLine, equals, getCellsAt, getCursor, getId, getParent, getRectangle, getTabulationSize, hashCode, hasLinesWrapped, insertChar, insertLine, insertString, printChar, printString, refresh, removeExtraChars, toString, touch, wouldScroll
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Area

public Area(int x1,
            int y1,
            int x2,
            int y2,
            boolean linewrap,
            boolean scroll)
Contructs a new area with specified bounds and properties for linewrap and scroll. The parent of this area will be the screen.

Parameters:
x1 - x coordinate of the top left corner.
y1 - y coordinate of the top left corner.
x2 - x coordinate of the bottom right corner.
y2 - y coordinate of the bottom right corner.
linewrap - true to allow line wrapping.
scroll - true to allow autoscrolling.

Area

public Area(Rectangle rectangle)
Creates a new Area using specified Rectangle. The parent of this area will be the screen.

Parameters:
rectangle - the bounds for this area.

Area

public Area(Rectangle rectangle,
            boolean linewrap,
            boolean scroll)
Creates a new Area with specified bounds and properties. The parent of this area will be the screen.

Parameters:
rectangle - the bounds for this area.
linewrap - true to allow line wrapping.
scroll - true to allow autoscrolling.

Area

public Area(AbstractWindow parent,
            Rectangle rectangle,
            boolean linewrap,
            boolean scroll)
Constructs a new Area with a parent, specified bounds and properties.

Parameters:
parent - the parent of this area.
rectangle - the bounds for this area.
linewrap - true to allow line wrapping.
scroll - true to allow autoscrolling.

Area

public Area(AbstractWindow parent,
            int x1,
            int y1,
            int x2,
            int y2,
            boolean linewrap,
            boolean scroll)
Constructs a new wndow with specified parent, coordinates, and properties.

Parameters:
parent - the parent of this area.
x1 - x coordinate of the top left corner.
y1 - y coordinate of the top left corner.
x2 - x coordinate of the bottom right corner.
y2 - y coordinate of the bottom right corner.
linewrap - true to allow line wrapping.
scroll - true to allow autoscrolling.
Method Detail

beep

public void beep()
Emits a beep.

Specified by:
beep in class AbstractWindow
Following copied from class: jcurzez.AbstractWindow
See Also:
ScreenPeer.beep()

update

public void update()
Updates the area.

Specified by:
update in class AbstractWindow
Following copied from class: jcurzez.AbstractWindow
See Also:
ScreenPeer.update()

printCell

public void printCell(int x,
                      int y,
                      Cell cell)
Invokes parent's printCell method.

Specified by:
printCell in class AbstractWindow
Following copied from class: jcurzez.AbstractWindow
Parameters:
x - the x coordinate where to print the cell.
y - the y coordinate where to print the cell.
cell - the cell to print.
See Also:
ScreenPeer.printCell(int, int, jcurzez.Cell)

gotoXY

public void gotoXY(int x,
                   int y)
Invokes parent's gotoXY method.

Specified by:
gotoXY in class AbstractWindow
Following copied from class: jcurzez.AbstractWindow
Parameters:
x - the x coordinate where to move the cursor.
y - the y coordinate where to move the cursor.
See Also:
ScreenPeer.gotoXY(int, int)


Send me an email