jcurzez
Class FillingPen

java.lang.Object
  |
  +--jcurzez.Pen
        |
        +--jcurzez.FillingPen

class FillingPen
extends Pen

FillingPen class has a cell attached, which represents the blank cell. It is used for filling new room created when one deletes a character, inserts a new line, and so on. Anytime this filling pen is updated, the empty cell is updated.

N.B: this class is package private.

Version:
0.0.3
Author:
Thomas Girard
See Also:
AbstractWindow, Cell

Field Summary
(package private)  Cell blankCell
          The blank cell.
 
Fields inherited from class jcurzez.Pen
attribute, background, foreground
 
Constructor Summary
(package private) FillingPen()
          Creates a new FillingPen.
(package private) FillingPen(int c, ForegroundColor foreground, BackgroundColor background, Attribute attribute)
          Creates a new FillingPen with specified attributes.
(package private) FillingPen(Pen p)
          Creates a new FillingPen, with specified pen.
 
Method Summary
 void setAttribute(Attribute attribute)
          Modifies blankCell.
 void setBackgroundColor(BackgroundColor background)
          Modifies blankCell.
 void setForegroundColor(ForegroundColor foreground)
          Modifies blankCell.
 
Methods inherited from class jcurzez.Pen
equals, getAttribute, getBackgroundColor, getForegroundColor, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

blankCell

final Cell blankCell
The blank cell. Updated whenever this is changed.

Constructor Detail

FillingPen

FillingPen()
Creates a new FillingPen. It defaults to white on black, with normal attributes.


FillingPen

FillingPen(Pen p)
Creates a new FillingPen, with specified pen.

Parameters:
p - the pen to use for filling.

FillingPen

FillingPen(int c,
           ForegroundColor foreground,
           BackgroundColor background,
           Attribute attribute)
Creates a new FillingPen with specified attributes.

Parameters:
c - the character to use for filling (should be ' ' ).
foreground - the foreground color to use for filling.
background - the background color to use for filling.
attribute - the attribute to use for filling.
Method Detail

setBackgroundColor

public void setBackgroundColor(BackgroundColor background)
Modifies blankCell.

Overrides:
setBackgroundColor in class Pen
Following copied from class: jcurzez.Pen
Parameters:
background - the new background color.

setForegroundColor

public void setForegroundColor(ForegroundColor foreground)
Modifies blankCell.

Overrides:
setForegroundColor in class Pen
Following copied from class: jcurzez.Pen
Parameters:
foreground - the new foreground color.

setAttribute

public void setAttribute(Attribute attribute)
Modifies blankCell.

Overrides:
setAttribute in class Pen
Following copied from class: jcurzez.Pen
Parameters:
attribute - the new attribute.


Send me an email