Package com.iizix

Interface IEntry

All Superinterfaces:
IComponent, IGProp<GProp<?>[]>, IMessageBox, IPropCnr

public interface IEntry extends IComponent
The IEntry interface is used for entry-capable components (such as entry field, multiple-line entry field, combobox and spin button). It is an extension of IComponent.
Author:
Christopher Mindus
  • Method Details

    • setSelection

      boolean setSelection(int start, int end)
      Sets the selection of the entry field from start to end positions. If start is larger than end, the selection is inverted. If the start and/or end positions are larger than the contents of the field, the position in question will be set to the smaller value. The end position is exclusive when end is larger than start, otherwise the start position is exclusive.
      Parameters:
      start - The start position of the selection.
      end - The end position of the selection.
      Returns:
      true if the selection changed, false for no change.
    • selectAll

      boolean selectAll()
      Sets the selection of the entire entry field, leaving the cursor at the first position. This is the same as calling setSelection(length,0).
      Returns:
      true if the selection changed, false for no change.
    • getSelection

      int[] getSelection()
      Gets the selection of the entry field, int[0] is the start, int[1] is the end position.
      Returns:
      a new array of two integers.
    • getSelection

      int[] getSelection(int[] returnValue)
      Gets the selection of the entry field, int[0] is the start, int[1] is the end position.
      Parameters:
      returnValue - an int array of length 2 or more. The two first int's are set to the selection positions.
      Returns:
      a new array of two integers if the parameter returnValue is not of minimum length of 2, otherwise the returnValue int array.
    • getSelectionLH

      int getSelectionLH()
      Gets the selection of the entry field. Note: Do not use this method when the length of the entry field is larger than 0xFFFF or 65535. Otherwise this is the preferred method to get the selection.
      Returns:
      LH, low-high words as start=LH&0xFFFF and end=LH>>8.
    • copy

      String copy()
      Copies the current selection of the entry field to the clipboard. If no selection is present, the entire entry field contents is copied to clipboard.
      Returns:
      The copied string.
    • cut

      String cut()
      Cuts the current selection of the entry field to the clipboard. If no selection is present, the entire entry field contents is cut to clipboard.
      Returns:
      The cut string.
    • append

      String append()
      Appends the current selection of the entry field to the clipboard. If no selection is present, the entire entry field contents is appended to clipboard.
      Returns:
      The appended string.
    • paste

      String paste()
      Pastes the clipboard into the current selection of the entry field. If no selection is present, the entire entry field contents is replaced with the contents of the clipboard.
      Returns:
      The pasted string, or empty string if the clipboard doesn't contain a valid text format.
    • delete

      String delete()
      Deletes the current selection of the entry field. If no selection is present, the entire entry field contents is deleted.
      Returns:
      The copied string.