Class FormArea

  • All Implemented Interfaces:
    ClipboardTranslator.Provider, RegionTextQueryTranslator.Provider, Area, HotPoint, HotPointControl, Lines
    Direct Known Subclasses:
    FormPopup, MessageArea, WizardArea

    public class FormArea
    extends NavigationArea
    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
    Multiline edit can be only a single in 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.

    • Field Detail

      • nextAutoNameNum

        protected int nextAutoNameNum
      • multilineEditLines

        protected MutableLines multilineEditLines
      • multilineEditHotPoint

        protected final HotPointShift multilineEditHotPoint
      • multilineEditRegionPoint

        protected final RegionPointShift multilineEditRegionPoint
      • multilineEditCaption

        protected String multilineEditCaption
      • multilineEditEnabled

        protected boolean multilineEditEnabled
    • Method Detail

      • clear

        public void clear()
      • hasItemWithName

        public boolean hasItemWithName​(String itemName)
      • getItemNewAutoName

        public String getItemNewAutoName()
      • getItemTypeOnLine

        public FormArea.Type getItemTypeOnLine​(int index)
      • getItemCount

        public int getItemCount()
      • getItemNameOnLine

        public String getItemNameOnLine​(int index)
      • getItemObj

        public Object getItemObj​(int index)
      • getItemObjByName

        public Object getItemObjByName​(String itemName)
      • addEdit

        public boolean addEdit​(String itemName,
                               String caption)
      • addEdit

        public boolean addEdit​(String itemName,
                               String caption,
                               String initialText)
      • addEdit

        public boolean addEdit​(String itemName,
                               String caption,
                               String initialText,
                               Object obj,
                               boolean enabled)
      • setEnteredText

        public void setEnteredText​(String itemName,
                                   String newText)
      • getEnteredText

        public String getEnteredText​(String itemName)
      • getEnteredText

        public String getEnteredText​(int lineIndex)
      • addUniRef

        public boolean addUniRef​(String itemName,
                                 String caption,
                                 String initialUniRef,
                                 Object obj,
                                 boolean enabled)
      • getUniRefInfo

        public UniRefInfo getUniRefInfo​(int lineIndex)
      • getSelectedListItem

        public Object getSelectedListItem​(String itemName)
      • addCheckbox

        public boolean addCheckbox​(String itemName,
                                   String caption,
                                   boolean initialState,
                                   Object obj,
                                   boolean enabled)
      • addCheckbox

        public boolean addCheckbox​(String itemName,
                                   String caption,
                                   boolean initialState)
      • getCheckboxState

        public boolean getCheckboxState​(String itemName)
      • addStatic

        public boolean addStatic​(String itemName,
                                 String caption)
      • addStatic

        public boolean addStatic​(String caption)
      • isMultilineEditActivated

        public boolean isMultilineEditActivated()
      • isMultilineEditEnabled

        public boolean isMultilineEditEnabled()
      • multilineEditHasCaption

        public boolean multilineEditHasCaption()
      • activateMultilineEdit

        public boolean activateMultilineEdit​(String caption,
                                             String[] lines,
                                             boolean enabled)
      • activateMultilineEdit

        public boolean activateMultilineEdit​(String caption,
                                             String[] lines)
      • getMultilineEditText

        public String getMultilineEditText()
      • getMultilineEditLines

        public String[] getMultilineEditLines()
      • removeItemOnLine

        public boolean removeItemOnLine​(int index)
      • removeItemByName

        public boolean removeItemByName​(String itemName)
      • getLineCount

        public int getLineCount()
      • getLine

        public String getLine​(int index)
      • getAreaName

        public String getAreaName()
      • setAreaName

        public void setAreaName​(String name)
      • findItemByIndex

        protected FormArea.Item findItemByIndex​(int index)
      • updateItems

        protected void updateItems()
      • isMultilineEditCovering

        protected boolean isMultilineEditCovering​(int x,
                                                  int y)