abbot.finder.matchers
Class JMenuItemMatcher

java.lang.Object
  extended by abbot.finder.matchers.JMenuItemMatcher
All Implemented Interfaces:
Matcher
Direct Known Subclasses:
JMenuMatcher

public class JMenuItemMatcher
extends Object
implements Matcher

Matches a JMenuItem given a simple label or a menu path of the format "menu|submenu|menuitem", for example "File|Open|Can of worms".

Version:
$Id: JMenuItemMatcher.java 2235 2007-03-08 09:37:51Z gdavison $
Author:
twall

Constructor Summary
JMenuItemMatcher(String label)
           
 
Method Summary
static String getPath(JMenuItem item)
           
 boolean matches(Component c)
          Return whether the given Component matches some lookup criteria.
static List splitMenuPath(String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMenuItemMatcher

public JMenuItemMatcher(String label)
Method Detail

getPath

public static String getPath(JMenuItem item)

splitMenuPath

public static List splitMenuPath(String path)
Parameters:
path - A path of the form File|Open|Can of worms
Returns:
A list of strings, File, File|Open, File|Open|Can of worms

matches

public boolean matches(Component c)
Description copied from interface: Matcher
Return whether the given Component matches some lookup criteria.

Specified by:
matches in interface Matcher


Copyright © 2002-2008 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge