|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object charva.awt.Toolkit
Correct manage of FocusEvents public FocusEvent getLastFocusEvent() protected void setLastFocusEvent(FocusEvent ev_ )
Field Summary | |
static Color |
_defaultBackground
|
static Color |
_defaultForeground
|
static int |
A_ALTCHARSET
|
static int |
A_BLINK
|
static int |
A_BOLD
|
static int |
A_DIM
|
static int |
A_INVIS
|
static int |
A_NORMAL
|
static int |
A_REVERSE
|
static int |
A_STANDOUT
|
static int |
A_UNDERLINE
|
static int |
ACS_BTEE
|
static int |
ACS_BULLET
|
static int |
ACS_CKBOARD
|
static int |
ACS_DEGREE
|
static int |
ACS_DIAMOND
|
static int |
ACS_HLINE
|
static int |
ACS_LLCORNER
|
static int |
ACS_LRCORNER
|
static int |
ACS_LTEE
|
static int |
ACS_PLMINUS
|
static int |
ACS_PLUS
|
static int |
ACS_RTEE
|
static int |
ACS_S1
|
static int |
ACS_S9
|
static int |
ACS_TTEE
|
static int |
ACS_ULCORNER
|
static int |
ACS_URCORNER
|
static int |
ACS_VLINE
|
static char |
Auml
|
static int |
BLACK
|
static int |
BLUE
|
static int |
BUTTON1_CLICKED
|
static int |
BUTTON1_PRESSED
|
static int |
BUTTON1_RELEASED
|
static int |
BUTTON2_CLICKED
|
static int |
BUTTON2_PRESSED
|
static int |
BUTTON2_RELEASED
|
static int |
BUTTON3_CLICKED
|
static int |
BUTTON3_PRESSED
|
static int |
BUTTON3_RELEASED
|
static char |
Ccedil
|
static int |
CYAN
|
static char |
Eacute
|
static char |
Euml
|
static int |
GREEN
|
static boolean |
isColorEnabled
This flag is true is the system property "charva.color" has been set. |
static int |
KEY_MOUSE
|
static int |
MAGENTA
|
static char |
Ouml
|
static int |
RED
|
static char |
Uuml
|
static int |
WHITE
|
static int |
YELLOW
|
Method Summary | |
void |
addChar(int chr,
int attrib,
int colorpair_)
Add a character to the virtual terminal at the current cursor position. |
void |
addHorizontalLine(int length_,
int attrib_,
int colorpair)
Draw a horizontal line of the specified length starting at the current cursor position. |
void |
addString(java.lang.String str_,
int attrib_,
int colorpair_)
Add a string to the virtual terminal at the current cursor position. |
void |
addVerticalLine(int length_,
int attrib_,
int colorpair_)
Draw a vertical line of the specified length starting at the current cursor position. |
void |
beep()
Ring the terminal's bell. |
void |
blankBox(Point origin_,
Dimension size_)
|
void |
blankBox(Point origin_,
Dimension size_,
int colorpair_)
Blank out a box using the specified color pair. |
void |
blankBoxNative(int left_,
int top_,
int right_,
int bottom_,
int colorpair_)
Blank out the specified rectangle. |
void |
checkForKeystroke()
Wait up to 100msec for a keystroke (or mouse-event). |
void |
clear()
Clears the screen (calls the curses clear() function). |
void |
close()
Close the terminal window and restore terminal settings (calls the curses endwin() function). |
static int |
COLOR_PAIR_ATTRIBUTE(int pair_)
Emulates the terminfo COLOR_PAIR macro. |
void |
drawBox(Point origin_,
Dimension size_)
Draw a box. |
void |
drawBox(Point origin_,
Dimension size_,
int colorpair_)
Draw a box using the specified color pair. |
void |
drawBoxNative(int left_,
int top_,
int right_,
int bottom_,
int colorpair_)
|
void |
fireKeystroke(int key_)
Processes a keystroke that was pressed in the currently displayed window. |
void |
fireKeystroke(int key_,
Component source_)
Process a keystroke as if it was pressed while the focus was in the specified component. |
void |
fireMouseEvent(charva.awt.MouseEventInfo mouse_info)
Processes the mouse-click specified by mouse_info. |
boolean |
getBooleanCapability(java.lang.String capname_)
Provides an interface to the ncurses "tigetflag()" function. |
int |
getColorPairIndex(ColorPair pair_)
Returns the color-pair index corresponding to the specified color-pair. |
Point |
getCursor()
Get absolute cursor position |
Point |
getCursor(Point p_)
Get absolute cursor position. |
static Color |
getDefaultBackground()
Returns the default background color. |
static Color |
getDefaultForeground()
Returns the default foreground color. |
static Toolkit |
getDefaultToolkit()
This static method instantiates a Toolkit object if it does not already exist; and returns a reference to the instantiated Toolkit. |
FocusEvent |
getLastFocusEvent()
|
int |
getMaxColorPairs()
Returns the maximum number of color-pairs (provides an interface to the ncurses COLOR_PAIRS global variable). |
charva.awt.MouseEventInfo |
getMouseEventInfo()
Get information about a mouse event (i.e the coordinates, and which button was clicked). |
int |
getNumericCapability(java.lang.String capname_)
Provides an interface to the ncurses "tigetnum()" function. |
int |
getScreenColumns()
|
int |
getScreenRows()
|
Dimension |
getScreenSize()
|
java.lang.String |
getStringCapability(java.lang.String capname_)
Provides an interface to the ncurses "tigetstr()" function. |
EventQueue |
getSystemEventQueue()
|
Window |
getTopWindow()
Get the top window of the window stack. |
java.lang.String |
getTtyName()
Returns the tty device name (provides an interface to the Unix C function "ttyname()"). |
boolean |
hasColors()
Returns true if the terminal is capable of displaying colours. |
void |
initColorPair(int pair_,
int fgnd_,
int bgnd_)
Provides an interface to the terminfo "init_pair()" function. |
static boolean |
isActionKey(int _key)
Returns true if the key code is greater than 255, indicating that it is a function key. |
boolean |
isWindowDisplayed(Window window_)
Returns true if the specified window is currently displayed. |
static java.lang.String |
key2ASCII(int key_)
Convert the integer representation of a keystroke to an ASCII string. |
void |
print(java.lang.String str_)
Provides an interface to the ncurses "mcprint()" function to ship the specified string to a printer attached to the terminal. |
void |
putp(java.lang.String str_)
Provides an interface to the ncurses "putp()" function, to write a string to the terminal; the string must be a return value from getStringCapability(). |
void |
redrawWin()
Indicate to ncurses that all the lines on the screen have changed and need to be redrawn the next time Toolkit.sync() is called. |
void |
resetClipRect()
Reset the clipping rectangle to the screen size. |
void |
setClipRect(Rectangle clip_)
Set a clipping rectangle. |
void |
setClipRectNative(int left_,
int top_,
int right_,
int bottom_)
Set a clipping rectangle. |
void |
setCursor(int x_,
int y_)
Set absolute cursor position |
void |
setCursor(Point p)
Set absolute cursor position |
static void |
setDefaultBackground(Color color_)
Changes the default background color. |
static void |
setDefaultForeground(Color color_)
Changes the default foreground color. |
protected void |
setLastFocusEvent(FocusEvent ev_)
|
void |
startColors()
An interface to the terminfo "start_colors()" function. |
void |
sync()
Synchronize the state of the physical terminal with the state of the virtual terminal maintained by curses (ie provides an interface to the curses refresh() function). |
void |
triggerGarbageCollection(Component source_)
Trigger garbage collection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final char Auml
public static final char Ccedil
public static final char Eacute
public static final char Euml
public static final char Ouml
public static final char Uuml
public static final boolean isColorEnabled
public static final int A_NORMAL
public static final int A_STANDOUT
public static final int A_UNDERLINE
public static final int A_REVERSE
public static final int A_BLINK
public static final int A_DIM
public static final int A_BOLD
public static final int A_ALTCHARSET
public static final int A_INVIS
public static final int ACS_ULCORNER
public static final int ACS_LLCORNER
public static final int ACS_URCORNER
public static final int ACS_LRCORNER
public static final int ACS_LTEE
public static final int ACS_RTEE
public static final int ACS_BTEE
public static final int ACS_TTEE
public static final int ACS_HLINE
public static final int ACS_VLINE
public static final int ACS_PLUS
public static final int ACS_S1
public static final int ACS_S9
public static final int ACS_DIAMOND
public static final int ACS_CKBOARD
public static final int ACS_DEGREE
public static final int ACS_PLMINUS
public static final int ACS_BULLET
public static final int BLACK
public static final int RED
public static final int GREEN
public static final int YELLOW
public static final int BLUE
public static final int MAGENTA
public static final int CYAN
public static final int WHITE
public static Color _defaultForeground
public static Color _defaultBackground
public static final int KEY_MOUSE
public static final int BUTTON1_RELEASED
public static final int BUTTON1_PRESSED
public static final int BUTTON1_CLICKED
public static final int BUTTON2_RELEASED
public static final int BUTTON2_PRESSED
public static final int BUTTON2_CLICKED
public static final int BUTTON3_RELEASED
public static final int BUTTON3_PRESSED
public static final int BUTTON3_CLICKED
Method Detail |
public static Toolkit getDefaultToolkit()
public EventQueue getSystemEventQueue()
public Window getTopWindow()
public boolean isWindowDisplayed(Window window_)
public void fireKeystroke(int key_)
key_
- the keystroke that was pressed. If it is less than
256, it is a ASCII or ISO8859-1 code; otherwise it is a function
key as defined in the "VK_*" values.public void fireKeystroke(int key_, Component source_)
key_
- the keystroke that was pressed. If it is less than
256, it is an ASCII or ISO8859-1 code; otherwise it is a function
key as defined in the "VK_*" values.public FocusEvent getLastFocusEvent()
protected void setLastFocusEvent(FocusEvent ev_)
public void fireMouseEvent(charva.awt.MouseEventInfo mouse_info)
public void checkForKeystroke()
public static java.lang.String key2ASCII(int key_)
public void close()
public void clear()
public void setCursor(Point p)
public void setCursor(int x_, int y_)
public Point getCursor()
public Point getCursor(Point p_)
public void addChar(int chr, int attrib, int colorpair_)
public void addHorizontalLine(int length_, int attrib_, int colorpair)
public void addVerticalLine(int length_, int attrib_, int colorpair_)
public void addString(java.lang.String str_, int attrib_, int colorpair_)
public void drawBox(Point origin_, Dimension size_)
public void drawBox(Point origin_, Dimension size_, int colorpair_)
public void drawBoxNative(int left_, int top_, int right_, int bottom_, int colorpair_)
public void blankBox(Point origin_, Dimension size_)
public void blankBox(Point origin_, Dimension size_, int colorpair_)
origin_
- The top left corner of the rectangle.size_
- The dimensions of the rectangle to blank out.colorpair_
- The number of the color-pair (foreground+background)
to use for blanking the rectangle.public void blankBoxNative(int left_, int top_, int right_, int bottom_, int colorpair_)
public void setClipRect(Rectangle clip_)
public void setClipRectNative(int left_, int top_, int right_, int bottom_)
public void resetClipRect()
public void beep()
public int getScreenRows()
public int getScreenColumns()
public Dimension getScreenSize()
public boolean hasColors()
public int getMaxColorPairs()
public void startColors()
public int getColorPairIndex(ColorPair pair_) throws TerminfoCapabilityException
TerminfoCapabilityException
public void sync()
public void redrawWin()
public java.lang.String getStringCapability(java.lang.String capname_) throws TerminfoCapabilityException
TerminfoCapabilityException
public int getNumericCapability(java.lang.String capname_) throws TerminfoCapabilityException
TerminfoCapabilityException
public boolean getBooleanCapability(java.lang.String capname_) throws TerminfoCapabilityException
TerminfoCapabilityException
public void putp(java.lang.String str_)
public void print(java.lang.String str_) throws TerminfoCapabilityException
TerminfoCapabilityException
public void initColorPair(int pair_, int fgnd_, int bgnd_) throws TerminfoCapabilityException
TerminfoCapabilityException
public static int COLOR_PAIR_ATTRIBUTE(int pair_)
public java.lang.String getTtyName()
public static void setDefaultForeground(Color color_)
public static Color getDefaultForeground()
public static void setDefaultBackground(Color color_)
public static Color getDefaultBackground()
public void triggerGarbageCollection(Component source_)
System.gc()
will be
made after the event handler has completed (i.e. after drawing is
completed). This is a convenient, but OPTIONAL, way of ensuring
that the heap does not grow too large. Some experts say that it is
better not to call System.gc() explicitly from inside an application;
you take your pick.
source_
- the component that triggered the garbage collection
(not important).public charva.awt.MouseEventInfo getMouseEventInfo()
public static boolean isActionKey(int _key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |