Package org.luwrain.controls
Class FormArea
java.lang.Object
org.luwrain.controls.NavigationArea
org.luwrain.controls.FormArea
- All Implemented Interfaces:
ClipboardTranslator.Provider
,RegionTextQueryTranslator.Provider
,Area
,HotPoint
,HotPointControl
,Lines
- Direct Known Subclasses:
Area
,FormPopup
,MessageArea
,WizardArea
The area with a set of controls.
FormArea
lets the user to
interact with a number of controls of various types in one single
area. The controls can be of the following types:
- Single line edits
- Checkboxes
- Lists
- UniRefs
- Static items
- Multiline edit
FormArea
and always
placed at the bottom below of all other controls. Controls of all
other types can be inserted multiple times and in the arbitrary order.
Each control, except of multiline edit, has associated name which
helps the developer reference this control. As well, each control can
be associated with some object given by an opaque Object
reference. The purpose of this object every developer may define
completely freely as it could be convenient for a particular purpose.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected final class
static interface
static interface
static interface
static enum
-
Field Summary
Modifier and TypeFieldDescriptionprotected final ControlContext
protected final List<FormArea.Item>
protected MultilineEdit
protected List<FormArea.MultilineEditChangeListener>
protected MutableMarkedLines
protected final HotPointShift
protected String
protected boolean
protected String
protected int
Fields inherited from class org.luwrain.controls.NavigationArea
clipboardTranslator, hotPointX, hotPointY, regionPoint, regionTextQueryTranslator
-
Constructor Summary
ConstructorDescriptionFormArea
(ControlContext context) FormArea
(ControlContext context, String name) FormArea
(ControlContext context, String name, int textLenLimit) -
Method Summary
Modifier and TypeMethodDescriptionboolean
activateMultilineEdit
(String caption, String[] text) boolean
activateMultilineEdit
(String caption, String[] text, boolean enabled) boolean
activateMultilineEdit
(String caption, MutableMarkedLines content, MultilineEdit.Params params, boolean enabled) boolean
addCheckbox
(String itemName, String caption, boolean initialState) boolean
addCheckbox
(String itemName, String caption, boolean initialState, Object obj, boolean enabled) boolean
boolean
boolean
boolean
addList
(String itemName, String caption, Object initialSelectedItem, FormArea.ListChoosing listChoosing, Object obj, boolean enabled) boolean
boolean
boolean
boolean
boolean
void
announceLine
(int index, String line) void
clear()
createMultilineEditParams
(ControlContext context, MutableLines lines) protected FormArea.Item
findItemByIndex
(int index) protected FormArea.Item
findItemByName
(String itemName) boolean
getCheckboxState
(String itemName) getEnteredText
(int lineIndex) getEnteredText
(String itemName) int
getItemNameOnLine
(int index) getItemObj
(int index) getItemObjByName
(String itemName) getItemTypeOnLine
(int index) getLine
(int index) int
String[]
getMultilineEditText
(String lineSeparator) int
getNewHotPointX
(int oldHotPointY, int newHotPointY, int oldHotPointX, String oldLine, String newLine) getSelectedListItem
(String itemName) getUniRefInfo
(int lineIndex) getUniRefInfo
(String itemName) boolean
hasItemWithName
(String itemName) boolean
boolean
boolean
boolean
isPointInMultilineEdit
(int x, int y) boolean
protected void
notifyChangeListeners
(Event event) boolean
onAreaQuery
(AreaQuery query) boolean
onInputEvent
(InputEvent event) boolean
onSystemEvent
(SystemEvent event) boolean
removeItemByName
(String itemName) boolean
removeItemOnLine
(int index) void
setAreaName
(String name) void
setEnteredText
(String itemName, String newText) protected void
boolean
Methods inherited from class org.luwrain.controls.NavigationArea
beginHotPointTrans, defaultLineAnnouncement, endHotPointTrans, getAreaActions, getHotPointX, getHotPointY, getLineNotNull, getNextBlockLine, getPrevBlockLine, getRegionPoint, getValidLineCount, isBlockBoundLine, onAltEnd, onAltHome, onAltLeft, onAltRight, onClipboardCopy, onClipboardCopyAll, onDeleteRegion, onEnd, onHome, onMoveDown, onMoveLeft, onMoveRight, onMoveUp, onPageDown, onPageUp, onRegionTextQuery, redraw, reset, setHotPoint, setHotPointX, setHotPointY
-
Field Details
-
context
-
items
-
name
-
nextAutoNameNum
protected int nextAutoNameNum -
mlEditContent
-
mlEdit
-
mlEditChangeListeners
-
mlEditHotPoint
-
multilineEditCaption
-
multilineEditEnabled
protected boolean multilineEditEnabled
-
-
Constructor Details
-
FormArea
-
FormArea
-
FormArea
-
-
Method Details
-
clear
public void clear() -
hasItemWithName
-
getItemNewAutoName
-
getItemTypeOnLine
-
getItemCount
public int getItemCount() -
getItemNameOnLine
-
getItemObj
-
getItemObjByName
-
addEdit
-
addEdit
-
addEdit
-
addPasswd
-
setEnteredText
-
getEnteredText
-
getEnteredText
-
addUniRef
-
getUniRefInfo
-
getUniRefInfo
-
addList
public boolean addList(String itemName, String caption, Object initialSelectedItem, FormArea.ListChoosing listChoosing, Object obj, boolean enabled) -
getSelectedListItem
-
addCheckbox
-
addCheckbox
-
getCheckboxState
-
addStatic
-
addStatic
-
addStatic
-
isMultilineEditActivated
public boolean isMultilineEditActivated() -
isMultilineEditEnabled
public boolean isMultilineEditEnabled() -
multilineEditHasCaption
public boolean multilineEditHasCaption() -
createMultilineEditParams
-
activateMultilineEdit
public boolean activateMultilineEdit(String caption, MutableMarkedLines content, MultilineEdit.Params params, boolean enabled) -
activateMultilineEdit
-
activateMultilineEdit
-
updateMultilineEdit
-
getMultilineEditHotPoint
-
isHotPointInMultilineEdit
public boolean isHotPointInMultilineEdit() -
isPointInMultilineEdit
public boolean isPointInMultilineEdit(int x, int y) -
getMultilineEditText
-
getMultilineEditText
-
getMultilineEditContent
-
removeItemOnLine
public boolean removeItemOnLine(int index) -
removeItemByName
-
getMultilineEditChangeListeners
-
onInputEvent
- Specified by:
onInputEvent
in interfaceArea
- Overrides:
onInputEvent
in classNavigationArea
-
onSystemEvent
- Specified by:
onSystemEvent
in interfaceArea
- Overrides:
onSystemEvent
in classNavigationArea
-
onAreaQuery
- Specified by:
onAreaQuery
in interfaceArea
- Overrides:
onAreaQuery
in classNavigationArea
-
getLineCount
public int getLineCount() -
getLine
-
announceLine
- Overrides:
announceLine
in classNavigationArea
-
getNewHotPointX
public int getNewHotPointX(int oldHotPointY, int newHotPointY, int oldHotPointX, String oldLine, String newLine) - Overrides:
getNewHotPointX
in classNavigationArea
-
getAreaName
-
setAreaName
-
findItemByIndex
-
findItemByName
-
updateItems
protected void updateItems() -
notifyChangeListeners
-