junit.extensions.jfcunit.finder
Class JPopupMenuFinder

java.lang.Object
  extended byjunit.extensions.jfcunit.finder.Finder
      extended byjunit.extensions.jfcunit.finder.JPopupMenuFinder

public class JPopupMenuFinder
extends Finder

Title: Find a popup menu given the invoker.

Description: Locate the popup menu associated with the invoker.

Copyright: Copyright (c) 2003

Company: JFCUnit OpenSource Project

Version:
1.0
Author:
Kevin Wilson

Field Summary
private  java.awt.Component m_invoker
          The Invoker of the Popup Menu.
 
Fields inherited from class junit.extensions.jfcunit.finder.Finder
OP_CONTAINS, OP_ENDSWITH, OP_EQUALS, OP_MATCH, OP_STARTSWITH
 
Constructor Summary
JPopupMenuFinder(java.awt.Component invoker)
          Constructor.
 
Method Summary
 java.awt.Component getInvoker()
          Get the invoker to be matched.
 void setInvoker(java.awt.Component invoker)
          Set the invoker to be matched.
 boolean testComponent(java.awt.Component comp)
          For JPopupMenu components validate return all Components with the invoker.
 
Methods inherited from class junit.extensions.jfcunit.finder.Finder
createPatternMatcher, evaluate, find, find, find, find, findAll, findAll, findAll, findAll, findComponentList, getDebug, getDefaultWait, getOperation, getOperation, getOperationString, getShowDebug, getWait, isCaseIndependent, isValidForProcessing, matchPattern, matchPattern, matchPattern, pause, recreatePatternMatcher, setCaseIndependent, setDebug, setDefaultWait, setIgnoreVisibility, setOperation, setShowDebug, setWait
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_invoker

private java.awt.Component m_invoker
The Invoker of the Popup Menu.

Constructor Detail

JPopupMenuFinder

public JPopupMenuFinder(java.awt.Component invoker)
Constructor.

Parameters:
invoker - Component which is used to determine which menu to return.
Method Detail

setInvoker

public final void setInvoker(java.awt.Component invoker)
Set the invoker to be matched.

Parameters:
invoker - Component invoker to be matched.

getInvoker

public final java.awt.Component getInvoker()
Get the invoker to be matched.

Returns:
Component invoker to be matched.

testComponent

public boolean testComponent(java.awt.Component comp)
For JPopupMenu components validate return all Components with the invoker.

Specified by:
testComponent in class Finder
Parameters:
comp - Component to be tested.
Returns:
boolean true if the invokers of the JPopupMenu matches the invoker passed in the constructor.


Licensed under: GNU Lesser General Public License, Ver 2.1, February 1999