private class BoolFormat.BoolBuf extends DisplayFormat.Presentation
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.StringBuffer |
bufChars
Presentation chars.
|
presCursorPos, presInsertMode
Constructor and Description |
---|
BoolBuf()
Constructs clear presentation.
|
BoolBuf(logical varLogical)
Constructs presentation initialized with given logical variable.
|
Modifier and Type | Method and Description |
---|---|
void |
checkFormat()
No action.
|
boolean |
deleteBack()
Erases one symbol before the cursor position.
|
boolean |
deleteCurrent()
Erases one symbol in the cursor position.
|
boolean |
finishEdit()
Indicates completion of an edit.
|
private java.lang.String |
guessBool(char distinct)
Strings for boolean values may have the same beginning.
|
boolean |
input(char ch)
Inputs character.
|
boolean |
isFixedFont()
Determine if this format must use the DEFAULT-FIXED-FONT, if no font is specified.
|
boolean |
isUnknown()
Returns if the presentation currently represents the
unknown value . |
boolean |
moveCursorBegin()
Moves cursor to the beginning of the field.
|
boolean |
moveCursorEnd()
Moves cursor to the end of the field.
|
boolean |
moveCursorLeft()
Moves cursor one character to the left.
|
boolean |
moveCursorRight()
Moves cursor one character to the right.
|
java.lang.String |
toScreenValue()
Formats the data as a string that is ready for display.
|
void |
toVar(BaseDataType var)
Instantiates a variable that is equivalent to the presentation's
internal representation.
|
activate, getCursorPos, getInitialCursorPos, getInsertMode, getLastPos, isFixedNumeric, isLastCharEntered, isNegative, isOptionalLeftSign, setCursorPos, setInsertMode, setLastCharEntered, toScreenValue, validateFormat
java.lang.StringBuffer bufChars
null
which means UNKNOWN value. Unfortunately logical
editor may contain incomplete content so it is not possible to keep
only logical value.public BoolBuf()
public BoolBuf(logical varLogical)
varLogical
- Initial value.public boolean isFixedFont()
isFixedFont
in class DisplayFormat.Presentation
false
.public void checkFormat()
checkFormat
in class DisplayFormat.Presentation
public boolean isUnknown()
unknown value
. If any editing has occurred, then this
will return false
even if the editing is not complete.isUnknown
in class DisplayFormat.Presentation
true
if this is unknown
.public boolean deleteBack()
deleteBack
in class DisplayFormat.Presentation
true
if input is accepted (nevertheless it
may be silently ignored in reality).public boolean deleteCurrent()
deleteCurrent
in class DisplayFormat.Presentation
true
if input is accepted (nevertheless it
may be silently ignored in reality).public boolean input(char ch)
input
in class DisplayFormat.Presentation
ch
- Input charactertrue
if input is accepted (nevertheless it
may be silently ignored in reality).public boolean moveCursorLeft()
moveCursorLeft
in class DisplayFormat.Presentation
true
if input is accepted (nevertheless it
may be silently ignored in reality).public boolean moveCursorRight()
moveCursorRight
in class DisplayFormat.Presentation
true
if input is accepted (nevertheless it
may be silently ignored in reality).public boolean moveCursorBegin()
moveCursorBegin
in class DisplayFormat.Presentation
true
if input is accepted (nevertheless it
may be silently ignored in reality).public boolean moveCursorEnd()
moveCursorEnd
in class DisplayFormat.Presentation
true
if input is accepted (nevertheless it
may be silently ignored in reality).public boolean finishEdit()
finishEdit
in class DisplayFormat.Presentation
false
.public java.lang.String toScreenValue()
toScreenValue
in class DisplayFormat.Presentation
public void toVar(BaseDataType var)
toVar
in class DisplayFormat.Presentation
var
- A variable which must be compatible with the format.private java.lang.String guessBool(char distinct)
distinct
- The first char after the common part.null
.