Package ca.odell.glazedlists

Examples of ca.odell.glazedlists.BasicEventList


     * Prepare for the test.
     */
    public void setUp() {
        textMatcherEditor = new TextMatcherEditor(GlazedLists.toStringTextFilterator());
        threadedMatcherEditor = new ThreadedMatcherEditor(textMatcherEditor);
        filterList = new FilterList(new BasicEventList(), threadedMatcherEditor);

        matchAll = new MatcherEditor.Event(threadedMatcherEditor, MatcherEditor.Event.MATCH_ALL, Matchers.trueMatcher());
        matchNone = new MatcherEditor.Event(threadedMatcherEditor, MatcherEditor.Event.MATCH_NONE, Matchers.falseMatcher());
        matchRelaxed = new MatcherEditor.Event(threadedMatcherEditor, MatcherEditor.Event.RELAXED, threadedMatcherEditor.getMatcher());
        matchConstrained = new MatcherEditor.Event(threadedMatcherEditor, MatcherEditor.Event.CONSTRAINED, threadedMatcherEditor.getMatcher());
View Full Code Here


        display.dispose();
    }

    private static void createIssuesTable(Shell shell) {

        BasicEventList issuesEventList = new BasicEventList();

        Composite comp1 = new Composite(shell, SWT.NONE);
        comp1.setLayout(new FillLayout());

        final KTable table = new KTable(comp1, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL
View Full Code Here

         * Create the buffered list model. We want to use an ObservableEventList so that
         * it can be used as the root event list of the master form model.
         * @return ObservableList to use
         */
        protected ObservableList createBufferedListModel() {
            return new ObservableEventList( new BasicEventList() );
        }
View Full Code Here

*
* @author Peter De Bruycker
*/
public class ValueModel2EventListBridgeTests extends TestCase {
    public void testValueHolderMustContainCollection() {
        EventList eventList = new BasicEventList();

        ValueModel valueModel = new ValueHolder("test");

        try {
            new ValueModel2EventListBridge(valueModel, eventList);
View Full Code Here

    public void testAutomaticSynchronization() {
        List list1 = Arrays.asList(new String[] { "item 1", "item2", "item3" });
        List list2 = Arrays.asList(new String[] { "item 4", "item5", "item6" });

        EventList eventList = new BasicEventList();
        ValueModel valueModel = new ValueHolder(list1);

        ValueModel2EventListBridge bridge = new ValueModel2EventListBridge(valueModel, eventList);
        assertEquals("auto sync: data copied in constructor", list1, eventList);
View Full Code Here

    public void testManualSynchronization() {
        List list1 = Arrays.asList(new String[] { "item 1", "item2", "item3" });
        List list2 = Arrays.asList(new String[] { "item 4", "item5", "item6" });

        EventList eventList = new BasicEventList();
        ValueModel valueModel = new ValueHolder(list1);

        ValueModel2EventListBridge bridge = new ValueModel2EventListBridge(valueModel, eventList, true);
        assertTrue("manual sync: data not copied in constructor", eventList.isEmpty());

        bridge.synchronize();
        assertEquals("sync copies data", list1, eventList);

        valueModel.setValue(list2);
View Full Code Here

    owner = anOwner;
  }


  protected JScrollPane initializeProjects( JPanel theButtonPanel ) {
    projectsEventList = new BasicEventList();
   
    // used to filter names
       filterEditor = new JTextField(15);
        theButtonPanel.add( new JLabel( "Name Filter" ));
        theButtonPanel.add( filterEditor );
View Full Code Here

  private JTable blackListTable;
  private JLabel blackListLabel;

  public TraceViewPanel(TraceModel traceModel) {

    EventList methodList = new BasicEventList();
    methodList.addAll(traceModel.getMethodKeyBlackList());
    SortedList sortedMethodList = new SortedList(methodList, NoOpComparator.INSTANCE);
    TableModel tableModel = new EventTableModel(sortedMethodList, new MethodKeyTableFormat());
    blackListTable = new JTable();
    blackListTable.setModel(tableModel);
    new TableComparatorChooser(blackListTable, sortedMethodList, true);
View Full Code Here

  private static final Logger LOG = Logger.getLogger(StatsViewerPanel.class);

  public StatsViewerPanel(Collection methodKeyAccumulators) {

    EventList accumulatorsEventList = new BasicEventList();
    accumulatorsEventList.addAll(methodKeyAccumulators);
    TableFormat tableFormat = new StatsTableFormat();
    StatsMatcherEditor classMatcherEditor = new StatsMatcherEditor(StatsMatcherEditor.FIELD_CLASS);
    StatsMatcherEditor methodMatcherEditor = new StatsMatcherEditor(StatsMatcherEditor.FIELD_METHOD);
    StatsMatcherEditor signatureMatcherEditor = new StatsMatcherEditor(StatsMatcherEditor.FIELD_SIGNATURE);
    accumulatorsEventList = new FilterList(accumulatorsEventList, classMatcherEditor);
View Full Code Here

  public void buildView(ViewContext context) throws Exception {

    Reader reader = context.openReader();
    try {
      BufferedReader lineReader = new BufferedReader(reader);
      List methodKeyAccumulators = new BasicEventList();
      String line;
      // throw the first 2 lines away
      // lineReader.readLine();
      lineReader.readLine();
      DelimitedReader delimitedReader = new DelimitedReader(lineReader, StatOutput.getDelimitedFormat());
      while (delimitedReader.next()) {
        MethodKeyAccumulator accumulator = readAccumulator(delimitedReader);
        methodKeyAccumulators.add(accumulator);
      }
      context.setComponent(new StatsViewerPanel(methodKeyAccumulators));
    } finally {
      IOUtil.close(reader);
    }
View Full Code Here

TOP

Related Classes of ca.odell.glazedlists.BasicEventList

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.