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.driver;
import  com.jidesoft.pane.CollapsiblePane;
import static org.assertj.swing.assertions.Assertions.assertThat;

Peter Murray
public class CollapsiblePaneDriver extends JComponentDriver {
  public CollapsiblePaneDriver(Robot robot) {
  public void expand(final CollapsiblePane pane) {
	if (isExpanded(pane)) {
  public void collapse(final CollapsiblePane pane) {
	if (!isExpanded(pane)) {
  public boolean isExpanded(final CollapsiblePane pane) {
	GuiQuery<Booleanquery = new GuiQuery<Boolean>() {
	  protected Boolean executeInEDT() throws Throwable {
		return pane.isExpanded();
	return GuiActionRunner.execute(query);
  public void requireExpanded(CollapsiblePane pane) {
	assertThat(isExpanded(pane)).as("Expanded Property").isTrue();
  public void requireCollapsed(CollapsiblePane pane) {
	assertThat(isExpanded(pane)).as("Expanded Property").isFalse();
  // @RunsInEDT
  private void clickExpandCollapseButton(CollapsiblePane pane) {
	final JButton button = .finder().find(pane,
	// Pause.pause(500);
New to GrepCode? Check out our FAQ X