Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Copyright 2012-2015 the original author or authors.
package org.assertj.swing.jide.components;
import java.awt.*;
import  com.jidesoft.status.LabelStatusBarItem;
import  com.jidesoft.status.StatusBar;
import static org.assertj.swing.assertions.Assertions.assertThat;
A Driver for the Jide StatusBar class.

Peter Murray
public class StatusBarDriver extends JComponentDriver {
  public StatusBarDriver(Robot robot) {
  public void requireText(StatusBar barString text) {
	LabelStatusBarItem labelItem = getLabelItem(bar);
  public void containsText(StatusBar barString text) {
	LabelStatusBarItem item = getLabelItem(bar);
  private static LabelStatusBarItem getLabelItem(StatusBar bar) {
	for (Component c : bar.getComponents()) {
	  if (c instanceof LabelStatusBarItem) {
		return (LabelStatusBarItem) c;
	return null;
New to GrepCode? Check out our FAQ X