All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.objogate.wl.swing.matcher.ComponentMatchers Maven / Gradle / Ivy

The newest version!
package com.objogate.wl.swing.matcher;

import javax.swing.AbstractButton;
import java.awt.Component;
import org.hamcrest.Matcher;

//TODO (nat): move these to the appropriate component driver classes
public class ComponentMatchers {
    public static  AbstractButtonAcceleratorMatcher withMnemonicKey(int keyCode) {
        return new AbstractButtonAcceleratorMatcher(keyCode);
    }

    public static  AbstractButtonTextMatcher withButtonText(String text) {
        return new AbstractButtonTextMatcher(text);
    }

    public static Matcher withFocus() {
        return new HasFocusMatcher();
    }

    /**
     * @deprecated Use {@link JLabelTextMatcher#withLabelText(Matcher)} instead
     */
    public static JLabelTextMatcher withLabelText(Matcher text) {
      return JLabelTextMatcher.withLabelText(text);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy