Examples of Refreshable


Examples of net.sf.myjaut.Refreshable

    public void add(final String key, final TextProperty<T> tp) {
        add(key, tp, new PropertyEditor<T>() {
            public JComponent getComponent(final T object, Property<T> property) {
                final JLabel result = new JLabel();
                tp.addListener(new Refreshable() {;
                    public void refresh() {
                        result.setText(tp.getText(object));
                    }
                });
                return result;
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.Refreshable

public final class RefreshHelperTest extends TasteTestCase {

  @Test
  public void testCallable() {
    MockRefreshable mock = new MockRefreshable();
    Refreshable helper = new RefreshHelper(mock);
    helper.refresh(null);
    assertEquals(1, mock.getCallCount());
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.Refreshable

    assertEquals(1, mock.getCallCount());
  }

  @Test
  public void testNoCallable() {
    Refreshable helper = new RefreshHelper(null);
    helper.refresh(null);
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.Refreshable

public final class RefreshHelperTest extends TasteTestCase {

  @Test
  public void testCallable() {
    MockRefreshable mock = new MockRefreshable();
    Refreshable helper = new RefreshHelper(mock);
    helper.refresh(null);
    assertEquals(1, mock.getCallCount());
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.Refreshable

    assertEquals(1, mock.getCallCount());
  }

  @Test
  public void testNoCallable() {
    Refreshable helper = new RefreshHelper(null);
    helper.refresh(null);
  }
View Full Code Here

Examples of org.apache.tiles.definition.Refreshable

                containerKey);
        if (container instanceof BasicTilesContainer) {
            BasicTilesContainer basic = (BasicTilesContainer) container;
            DefinitionsFactory factory = basic.getDefinitionsFactory();
            if (factory instanceof Refreshable) {
                Refreshable rFactory = (Refreshable) factory;
                if (rFactory.refreshRequired()) {
                    rFactory.refresh();
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.tiles.definition.Refreshable

        TilesContainer container = TilesAccess.getContainer(context);
        if (container instanceof BasicTilesContainer) {
            BasicTilesContainer basic = (BasicTilesContainer) container;
            DefinitionsFactory factory = basic.getDefinitionsFactory();
            if (factory instanceof Refreshable) {
                Refreshable rFactory = (Refreshable) factory;
                if (rFactory.refreshRequired()) {
                    rFactory.refresh();
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.tiles.definition.Refreshable

        TilesContainer container = TilesAccess.getContainer(context);
        if (container instanceof BasicTilesContainer) {
            BasicTilesContainer basic = (BasicTilesContainer) container;
            DefinitionsFactory factory = basic.getDefinitionsFactory();
            if (factory instanceof Refreshable) {
                Refreshable rFactory = (Refreshable) factory;
                if (rFactory.refreshRequired()) {
                    rFactory.refresh();
                }
            }
        }
    }
View Full Code Here

Examples of org.fusesource.ide.commons.tree.Refreshable

    final Node parent = node.getParent();
    if (parent instanceof Refreshable) {
      final Viewer viewer = getViewer(node);
      final Object firstSelection = Selections.getFirstSelection(viewer);
      final String text = node.toString();
      Refreshable refreshable = (Refreshable) parent;
      refreshable.refresh();
      if (viewer != null) {
        Viewers.async(new Runnable() {
          @Override
          public void run() {
            if (firstSelection == node) {
              selectChild(viewer, parent, text);
            } else {
              addExpanded(viewer, parent, text);
            }
          }});
      }
    } else if (node instanceof Refreshable) {
      Refreshable refreshable = (Refreshable) node;
      refreshable.refresh();
    }

  }
View Full Code Here

Examples of org.fusesource.ide.commons.tree.Refreshable

    final Node parent = node.getParent();
    if (parent instanceof Refreshable) {
      final LinkedList<String> path = new LinkedList<String>();
      final Node root = getRootAndAppendPath(path, node);
      final Viewer viewer = getViewer(node);
      Refreshable refreshable = (Refreshable) parent;
      refreshable.refresh();
      if (viewer != null) {
        Viewers.async(new Runnable() {
          @Override
          public void run() {
            selectPath(viewer, root, path);
          }});
      }
    } else if (node instanceof Refreshable) {
      Refreshable refreshable = (Refreshable) node;
      refreshable.refresh();
    }

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.