|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--display.CharDisplay
A simple character display.
Field Summary | |
static int |
BOLD
Make character bold. |
static int |
debug
Enable debug messages. |
static int |
INVERT
Invert character. |
static int |
NORMAL
Make character normal. |
static int |
RESIZE_FONT
Resize the font to the new screensize. |
static int |
RESIZE_NONE
Do nothing when the container is resized. |
static int |
RESIZE_SCREEN
Resize the width and height of the characterscreen. |
static boolean |
SCROLL_DOWN
Scroll down when inserting a line. |
static boolean |
SCROLL_UP
Scroll up when inserting a line. |
static int |
UNDERLINE
Underline character. |
java.lang.String |
version
If you need the runtime version, just ask this variable. |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
CharDisplay()
Create a character display with size 80x24 and Font "Courier", size 12. |
|
CharDisplay(int width,
int height)
Create a character display with specific size, Font is "Courier", size 12. |
|
CharDisplay(int width,
int height,
java.lang.String fname,
int fsize)
Create a character display with specific size, font and font size. |
|
CharDisplay(java.lang.String fname,
int fsize)
Create a character display with 80x24 and specific font and font size. |
Method Summary | |
void |
deleteArea(int c,
int l,
int w,
int h)
Delete a rectangular portion of the screen. |
void |
deleteChar(int c,
int l)
Delete a character at a given position on the screen. |
void |
deleteLine(int l)
Delete a line at a specific position. |
int |
getAttributes(int c,
int l)
Get the attributes for the specified position. |
int |
getBottomMargin()
Get the bottom scroll margin. |
int |
getBufferSize()
Retrieve current scrollback buffer size. |
char |
getChar(int c,
int l)
Get the character at the specified position. |
int |
getColumns()
Get amount of columns on the screen. |
java.awt.Dimension |
getCursorPos()
Get the current cursor position. |
int |
getMaxBufferSize()
Retrieve maximum buffer Size. |
int |
getRows()
Get amount of rows on the screen. |
int |
getTopMargin()
Get the top scroll margin. |
int |
getWindowBase()
Get the current window base. |
boolean |
handleEvent(java.awt.Event evt)
Handle mouse events for copy & paste |
void |
insertChar(int c,
int l,
char ch,
int attributes)
Insert a character at a specific position on the screen. |
void |
insertLine(int l)
Insert a blank line at a specific position. |
void |
insertLine(int l,
boolean scrollDown)
Insert a blank line at a specific position. |
void |
insertLine(int l,
int n)
Insert blank lines at a specific position. |
void |
insertLine(int l,
int n,
boolean scrollDown)
Insert blank lines at a specific position. |
java.awt.Insets |
insets()
The insets of the character display define the border. |
void |
markLine(int l,
int n)
Mark lines to be updated with redraw(). |
java.awt.Color |
notbold(java.awt.Color colr)
|
void |
paint(java.awt.Graphics g)
Paint the current screen. |
java.awt.Dimension |
preferredSize()
Return the preferred Size of the character display. |
void |
putChar(int c,
int l,
char ch)
Put a character on the screen with normal font and outline. |
void |
putChar(int c,
int l,
char ch,
int attributes)
Put a character on the screen with specific font and outline. |
void |
putString(int c,
int l,
java.lang.String s)
Put a String at a specific position. |
void |
putString(int c,
int l,
java.lang.String s,
int attributes)
Put a String at a specific position giving all characters the same attributes. |
void |
redraw()
Redraw marked lines. |
void |
reshape(int x,
int y,
int w,
int h)
Reshape character display according to resize strategy. |
void |
setBorder(int thickness,
boolean raised)
Set the border thickness and the border type. |
void |
setBottomMargin(int l)
Set the bottom scroll margin for the screen. |
void |
setBufferSize(int amount)
Set scrollback buffer size. |
void |
setCursorPos(int c,
int l)
Puts the cursor at the specified position. |
void |
setResizeStrategy(int strategy)
Set the strategy when window is resized. |
void |
setScrollbar(java.lang.String position)
Set the scrollbar position. |
void |
setTopMargin(int l)
Set the top scroll margin for the screen. |
void |
setWindowBase(int line)
Set the current window base. |
void |
setWindowSize(int width,
int height)
Change the size of the screen. |
java.awt.Dimension |
size()
Return the real size in points of the character display. |
void |
update(java.awt.Graphics g)
Update the display. |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getInsets,
getLayout,
getMaximumSize,
getMinimumSize,
getPreferredSize,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
paramString,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
removeNotify,
setFont,
setLayout,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public java.lang.String version
public static final int debug
public static final boolean SCROLL_UP
public static final boolean SCROLL_DOWN
public static final int RESIZE_NONE
public static final int RESIZE_SCREEN
public static final int RESIZE_FONT
public static final int NORMAL
public static final int BOLD
public static final int UNDERLINE
public static final int INVERT
Constructor Detail |
public CharDisplay()
public CharDisplay(int width, int height)
public CharDisplay(java.lang.String fname, int fsize)
public CharDisplay(int width, int height, java.lang.String fname, int fsize)
Method Detail |
public java.awt.Color notbold(java.awt.Color colr)
public void putChar(int c, int l, char ch)
c
- x-coordinate (column)l
- y-coordinate (line)ch
- the character to show on the screeninsertChar(int, int, char, int)
,
deleteChar(int, int)
,
redraw()
public void putChar(int c, int l, char ch, int attributes)
c
- x-coordinate (column)l
- y-coordinate (line)ch
- the character to show on the screenattributes
- the character attributesBOLD
,
UNDERLINE
,
INVERT
,
NORMAL
,
insertChar(int, int, char, int)
,
deleteChar(int, int)
,
redraw()
public char getChar(int c, int l)
c
- x-coordinate (column)l
- y-coordinate (line)putChar(int, int, char)
public int getAttributes(int c, int l)
c
- x-coordinate (column)l
- y-coordinate (line)putChar(int, int, char)
public void insertChar(int c, int l, char ch, int attributes)
c
- x-coordinate (column)l
- y-coordinate (line)ch
- the character to insertattributes
- the character attributesBOLD
,
UNDERLINE
,
INVERT
,
NORMAL
,
putChar(int, int, char)
,
deleteChar(int, int)
,
redraw()
public void deleteChar(int c, int l)
c
- x-coordinate (column)l
- y-coordinate (line)putChar(int, int, char)
,
insertChar(int, int, char, int)
,
redraw()
public void putString(int c, int l, java.lang.String s)
c
- x-coordinate (column)l
- y-coordinate (line)s
- the string to be shown on the screenBOLD
,
UNDERLINE
,
INVERT
,
NORMAL
,
putChar(int, int, char)
,
insertLine(int)
,
deleteLine(int)
,
redraw()
public void putString(int c, int l, java.lang.String s, int attributes)
c
- x-coordinate (column)l
- y-coordinate (line)s
- the string to be shown on the screenattributes
- character attributesBOLD
,
UNDERLINE
,
INVERT
,
NORMAL
,
putChar(int, int, char)
,
insertLine(int)
,
deleteLine(int)
,
redraw()
public void insertLine(int l)
l
- the y-coordinate to insert the linedeleteLine(int)
,
redraw()
public void insertLine(int l, int n)
l
- the y-coordinate to insert the linen
- amount of lines to be inserteddeleteLine(int)
,
redraw()
public void insertLine(int l, boolean scrollDown)
l
- the y-coordinate to insert the linescrollDown
- scroll downdeleteLine(int)
,
SCROLL_UP
,
SCROLL_DOWN
,
redraw()
public void insertLine(int l, int n, boolean scrollDown)
l
- the y-coordinate to insert the linen
- number of lines to be insertedscrollDown
- scroll downdeleteLine(int)
,
SCROLL_UP
,
SCROLL_DOWN
,
redraw()
public void deleteLine(int l)
l
- the y-coordinate to insert the linedeleteLine(int)
public void deleteArea(int c, int l, int w, int h)
c
- x-coordinate (column)l
- y-coordinate (row)w
- with of the area in charactersh
- height of the area in charactersdeleteChar(int, int)
,
deleteLine(int)
,
redraw
public void setCursorPos(int c, int l)
c
- columnl
- linepublic java.awt.Dimension getCursorPos()
Dimension
public void setTopMargin(int l)
l
- line that is the marginpublic int getTopMargin()
public void setBottomMargin(int l)
l
- line that is the marginpublic int getBottomMargin()
public void setBufferSize(int amount)
amount
- new size of the bufferpublic int getBufferSize()
setBufferSize(int)
public int getMaxBufferSize()
getBufferSize()
public void setWindowBase(int line)
line
- the line where the screen window startssetBufferSize
,
getBufferSize
public int getWindowBase()
setWindowBase
public void setWindowSize(int width, int height)
columns
- width of the screencolumns
- height of the screenpublic void setResizeStrategy(int strategy)
strategy
- the strategyRESIZE_NONE
,
RESIZE_FONT
,
RESIZE_SCREEN
public int getRows()
public int getColumns()
public void setBorder(int thickness, boolean raised)
thickness
- border thickness in pixels, zero means no borderraised
- a boolean indicating a raised or embossed borderpublic void setScrollbar(java.lang.String position)
position
- the position of the scrollbarpublic void markLine(int l, int n)
l
- starting linen
- amount of lines to be updatedredraw()
public void redraw()
markLine(int, int)
public void update(java.awt.Graphics g)
public void paint(java.awt.Graphics g)
public void reshape(int x, int y, int w, int h)
setResizeStrategy(int)
public java.awt.Dimension size()
Dimension
public java.awt.Dimension preferredSize()
size
public java.awt.Insets insets()
public boolean handleEvent(java.awt.Event evt)
evt
- the event that occuredEvent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |