Class SearchField

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
IpaMapSearchField, TableSearchField

public class SearchField extends JPanel
A search field with optional context button. The field displayes a prompt when the text field text is empty.
See Also:
  • Field Details

    • ctxButton

      protected ca.phon.ui.text.SearchField.SearchFieldButton ctxButton
      Search context button
    • endButton

      protected ca.phon.ui.text.SearchField.SearchFieldButton endButton
    • queryField

      protected final PromptedTextField queryField
  • Constructor Details

    • SearchField

      public SearchField()
      Search icon
    • SearchField

      public SearchField(String prompt)
  • Method Details

    • createClearIcon

      public BufferedImage createClearIcon()
    • createSearchIcon

      public BufferedImage createSearchIcon()
    • setFocusable

      public void setFocusable(boolean b)
      Overrides:
      setFocusable in class Component
    • getQuery

      public String getQuery()
      Get the query text
      Returns:
      query text
    • getAction

      public Action getAction()
    • setAction

      public void setAction(Action action)
    • onShowContextMenu

      public void onShowContextMenu(PhonActionEvent<Void> pae)
      Displays the context menu for the component. By default, this displays a single option for clearing the text field. Subclasses should override to define custom options.
      Parameters:
      pae -
    • getContextButton

      public JButton getContextButton()
    • getEndButton

      public JButton getEndButton()
    • getPrompt

      public String getPrompt()
    • setPrompt

      public void setPrompt(String prompt)
    • getColumns

      public int getColumns()
    • setColumns

      public void setColumns(int columns)
    • getDocument

      public Document getDocument()
    • getTextField

      public PromptedTextField getTextField()
    • setupPopupMenu

      protected void setupPopupMenu(JPopupMenu menu)
      Setup popup menu.
      Parameters:
      menu -
    • setState

      public void setState(String state)
    • getState

      public PromptedTextField.FieldState getState()
    • getText

      public String getText()
    • setText

      public void setText(String s)
    • onClearText

      public void onClearText(PhonActionEvent<Void> pae)