Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

pkgView.TextItem Class Reference

Inheritance diagram for pkgView.TextItem:

Inheritance graph
[legend]
Collaboration diagram for pkgView.TextItem:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 16 of file TextItem.java.

Public Member Functions

 TextItem (String msg, int len)
void setText (String msg)
void moveRight ()
 used for arrowkeys
void moveLeft ()
 used for arrowkeys
void putChar (char ch)
 replace StringBuffer char at index
void eraseLine ()
 replace all chars with whitespace
String getText ()
void setSelected (boolean bFlag)
void redraw ()
void setAttribute (int value)
boolean isSelected ()
void setColors (int color1, int color2)
void setPosition (int y, int x)
int getRow ()
void enableEdit (boolean bFlag)


Constructor & Destructor Documentation

pkgView.TextItem.TextItem String  msg,
int  len
 

constructs a fixed width TextItem

Parameters:
msg .. the text field
len .. the text field fixed width with padding

Definition at line 34 of file TextItem.java.

References pkgView.TextItem.setText().


Member Function Documentation

void pkgView.TextItem.setText String  msg  ) 
 

stores text in the widget and pads to a fixed length so that stale text on the display will be erased

Parameters:
msg text message to be printed

Definition at line 50 of file TextItem.java.

Referenced by pkgMcj.PanelRow.clearRow(), pkgMcj.Mcj.errorMsg(), pkgMcj.Mcj.Mcj(), pkgMcj.MenuBar.MenuBar(), pkgMcj.PanelGrid.PanelGrid(), pkgMcj.PanelGrid.redraw(), pkgMcj.PanelGrid.setCurrentPath(), and pkgView.TextItem.TextItem().

String pkgView.TextItem.getText  ) 
 

gets text from the widget.

Returns:
String text

Definition at line 110 of file TextItem.java.

Referenced by pkgMcj.PanelGrid.redraw().

void pkgView.TextItem.setSelected boolean  bFlag  ) 
 

If the flag is true, set the widget selected. Else restore the default color. Note the screen must be refreshed by the calling method.

Parameters:
bFlag .. selection flag

Definition at line 120 of file TextItem.java.

Referenced by pkgMcj.Mcj.Mcj(), pkgMcj.MenuBar.MenuBar(), pkgMcj.PanelGrid.PanelGrid(), pkgMcj.PanelGrid.redraw(), and pkgMcj.DropMenu.redraw().

void pkgView.TextItem.redraw  ) 
 

redraws the text string with current attributes. This only writes to the screen buffer, the calling method must refresh the display.

Definition at line 130 of file TextItem.java.

References pkgView.ScreenKit.ttyMvAddStr().

Referenced by pkgMcj.Mcj.errorMsg(), pkgMcj.PanelRow.redraw(), pkgMcj.PanelGrid.redraw(), pkgMcj.MenuBar.redraw(), and pkgMcj.DropMenu.redraw().

void pkgView.TextItem.setAttribute int  value  ) 
 

sets the screen attribute used by ncurses.

Parameters:
value .. value of the attribute; NORMAL, BLINK, etc

Definition at line 147 of file TextItem.java.

Referenced by pkgMcj.Mcj.Mcj(), pkgMcj.MenuBar.MenuBar(), pkgMcj.PanelGrid.PanelGrid(), and pkgMcj.PanelRow.setAttributes().

boolean pkgView.TextItem.isSelected  ) 
 

Returns:
true if this widget is selected or active

Definition at line 155 of file TextItem.java.

void pkgView.TextItem.setColors int  color1,
int  color2
 

sets/changes default color and active color

Parameters:
color1 .. default color
color2 .. highlighted color

Definition at line 166 of file TextItem.java.

Referenced by pkgMcj.DropMenu.DropMenu(), pkgMcj.Mcj.Mcj(), pkgMcj.MenuBar.MenuBar(), pkgMcj.PanelGrid.PanelGrid(), and pkgMcj.PanelRow.setColors().

void pkgView.TextItem.setPosition int  y,
int  x
 

set position

Parameters:
y .. row
x .. column

Definition at line 177 of file TextItem.java.

Referenced by pkgMcj.DropMenu.DropMenu(), pkgMcj.Mcj.Mcj(), pkgMcj.MenuBar.MenuBar(), and pkgMcj.PanelGrid.PanelGrid().

int pkgView.TextItem.getRow  ) 
 

get position

Returns:
y .. row

Definition at line 187 of file TextItem.java.

void pkgView.TextItem.enableEdit boolean  bFlag  ) 
 

enables edit

Definition at line 195 of file TextItem.java.


The documentation for this class was generated from the following file:
SourceForge.net Logo