Class FindDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants, ActionMap

public class FindDialog extends JDialog implements ActionMap
This class represents a Dialog that lets the user searching for text inside an SVG document.
See Also:
  • Field Details

    • RESOURCES

      protected static final String RESOURCES
      The resource file name
      See Also:
    • FIND_ACTION

      public static final String FIND_ACTION
      See Also:
    • CLEAR_ACTION

      public static final String CLEAR_ACTION
      See Also:
    • CLOSE_ACTION

      public static final String CLOSE_ACTION
      See Also:
    • bundle

      protected static ResourceBundle bundle
      The resource bundle
    • resources

      protected static ResourceManager resources
      The resource manager
    • buttonFactory

      protected ButtonFactory buttonFactory
      The button factory
    • gvtRoot

      protected GraphicsNode gvtRoot
      The GVT root into which text is searched.
    • walker

      protected GVTTreeWalker walker
      The GVTTreeWalker used to scan the GVT Tree.
    • currentIndex

      protected int currentIndex
      The current index in the TextNode's string.
    • findButton

      protected JButton findButton
      The next button.
    • clearButton

      protected JButton clearButton
      The next button.
    • closeButton

      protected JButton closeButton
      The cancel button.
    • caseSensitive

      protected JCheckBox caseSensitive
      The case sensitive button.
    • svgCanvas

      protected JSVGCanvas svgCanvas
      The canvas.
    • highlightButton

      protected JRadioButton highlightButton
      The highlight button.
    • highlightCenterButton

      protected JRadioButton highlightCenterButton
      The highlight and center button.
    • highlightCenterZoomButton

      protected JRadioButton highlightCenterZoomButton
      The highlight center and zoom button.
    • listeners

      protected Map listeners
      The map that contains the listeners
  • Constructor Details

    • FindDialog

      public FindDialog(JSVGCanvas svgCanvas)
      Constructs a new FindDialog.
    • FindDialog

      public FindDialog(Frame owner, JSVGCanvas svgCanvas)
      Constructs a new FindDialog.
  • Method Details

    • createFindPanel

      protected JPanel createFindPanel()
      Creates the Find panel.
    • createShowResultPanel

      protected JPanel createShowResultPanel()
    • createButtonsPanel

      protected JPanel createButtonsPanel()
      Creates the buttons panel
    • setGraphicsNode

      public void setGraphicsNode(GraphicsNode gvtRoot)
      Sets the graphics node into which text is searched.
      Parameters:
      gvtRoot - the GVT root node
    • getNext

      protected GraphicsNode getNext(String text)
      Returns the next GraphicsNode that matches the specified string or null if any.
      Parameters:
      text - the text to match
    • match

      protected int match(GraphicsNode node, String text, int index)
      Returns the index inside the specified TextNode of the specified text, or -1 if not found.
      Parameters:
      node - the graphics node to check
      text - the text use to match
      index - the index from which to start
    • showSelectedGraphicsNode

      protected void showSelectedGraphicsNode()
      Shows the current selected TextNode.
    • getAction

      public Action getAction(String key) throws MissingListenerException
      Returns the action associated with the given string or null on error
      Specified by:
      getAction in interface ActionMap
      Parameters:
      key - the key mapped with the action to get
      Throws:
      MissingListenerException - if the action is not found