public class RW3270Field extends Object
RW3270.getField(int
cursorPosition).
This class is useful for working with 3270 fields. For example,
if you wanted to enter data from a GUI textField:
| Modifier and Type | Field and Description |
|---|---|
static int |
BLACK |
static int |
BLUE |
static int |
DEEP_BLUE |
static int |
DEFAULT_BGCOLOR |
static int |
DEFAULT_FGCOLOR |
static int |
GREEN |
static int |
GREY |
static int |
ORANGE |
static int |
PALE_GREEN |
static int |
PALE_TURQUOISE |
static int |
PINK |
static int |
PURPLE |
static int |
RED |
static int |
TURQUOISE |
static int |
WHITE |
static int |
YELLOW |
| Modifier | Constructor and Description |
|---|---|
protected |
RW3270Field(RW3270Char fa,
RW3270 rw)
Not seen by end-programmers.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBackgroundColor() |
int |
getBegin()
Returns the data buffer address of the first character in this
field.
|
RW3270Char[] |
getChars()
Gets an array of RW3270Char objects representing the contents of this field.
|
char[] |
getDisplayChars()
Gets an array of characters containing the display representation of this
field.
|
int |
getEnd()
Returns the data buffer address of the last character in this field.
|
int |
getFieldAttribute() |
int |
getForegroundColor() |
int |
getHighlighting() |
boolean |
isBold() |
boolean |
isHidden() |
boolean |
isHighIntensity() |
boolean |
isModified() |
void |
isModified(boolean b)
Deprecated.
since 0.2 preferred method is setModified
|
boolean |
isNumeric() |
boolean |
isProtected()
Checks the field to see if the current field is an 'input'
field (unprotected)
|
protected void |
isProtected(boolean b) |
protected void |
setBegin(int i) |
void |
setData(String s)
If the field is an input field (unprotected), this method will set the
field to the specified String.
|
protected void |
setEnd(int i)
Sets the data buffer address of the last character in this field.
|
void |
setModified(boolean b)
Sets the MDT for this field.
|
int |
size()
This method returns the size, in characters of the current field.
|
String |
toString()
Returns a string representation of the field.
|
public static final int DEFAULT_BGCOLOR
public static final int BLUE
public static final int RED
public static final int PINK
public static final int GREEN
public static final int TURQUOISE
public static final int YELLOW
public static final int DEFAULT_FGCOLOR
public static final int BLACK
public static final int DEEP_BLUE
public static final int ORANGE
public static final int PURPLE
public static final int PALE_GREEN
public static final int PALE_TURQUOISE
public static final int GREY
public static final int WHITE
protected RW3270Field(RW3270Char fa, RW3270 rw)
public boolean isProtected()
true if the field is protected,
false otherwise.protected void isProtected(boolean b)
protected void setBegin(int i)
public int getBegin()
protected void setEnd(int i)
public int getEnd()
public boolean isModified()
true if this field has been modified by
the operatorpublic void isModified(boolean b)
throws IsProtectedException
IsProtectedExceptionpublic void setModified(boolean b)
throws IsProtectedException
If you change the data via the setData() method this method is called for you automatically. Otherwise, be sure to call this method whenever you change the data in an unprotected (input) field.
b - true if the field has been modified.IsProtectedExceptionpublic RW3270Char[] getChars()
This method is only useful if you need to operate on the individual RW3270Char
objects. For display of data buffer (screen), use getDisplayChars()
instead.
RW3270Char objects.RW3270Charpublic char[] getDisplayChars()
Specifically, hidden and null characters are represented by an ' '
public void setData(String s) throws IOException, IsProtectedException
s - The string to insert into this fieldIOException - thrown if the string is longer than the fieldIsProtectedException - thrown if the current field is protectedpublic int size()
Be aware that this includes the Field Attribute for the field, as well as the characters
public int getForegroundColor()
public int getBackgroundColor()
public int getHighlighting()
public boolean isHidden()
true if the field is hidden (i.e. password
field), dalse otherwise.public boolean isBold()
true if the field is bold,
false if it is not.public boolean isNumeric()
public boolean isHighIntensity()
public int getFieldAttribute()
Copyright © 2013. All Rights Reserved.