Package com.subgraph.vega.api.model.web

Examples of com.subgraph.vega.api.model.web.IWebEntity


public class Sorter extends ViewerSorter {
  public int category(Object element) {
    if(!(element instanceof IWebEntity))
      return 3;
    final IWebEntity we = (IWebEntity) element;
    return (we.isVisited()) ? (1) : (2);
  }
View Full Code Here


  private static class UnvisitedFilter extends ViewerFilter {

    @Override
    public boolean select(Viewer viewer, Object parentElement, Object element) {
      if(element instanceof IWebEntity) {
        final IWebEntity entity = (IWebEntity) element;
        return entity.isVisited();
      }
      return false;
    }
View Full Code Here

      }
    };
  }
 
  private void handleNewWebEntity(NewWebEntityEvent event) {
    final IWebEntity entity = event.getEntity();
    if(entity instanceof IWebHost) {
      webHosts.add((IWebHost) entity);
    }
    refreshViewer();
  }
View Full Code Here

  }

  @Override
  public Color getForeground(Object element) {
    if(element instanceof IWebEntity) {
      IWebEntity we = (IWebEntity) element;
      return (we.isVisited()) ? (null) : (UNVISITED_COLOR);
    }     
    return null;
  }
View Full Code Here

TOP

Related Classes of com.subgraph.vega.api.model.web.IWebEntity

Copyright © 2018 www.massapicom. 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.