Ignore:
Timestamp:
07/14/13 23:20:04 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • improve tree side notes
  • improve GUI layout
  • add foldable list of occured events to EventControl?
  • improve automatic type conversion in proxy listeners
  • implement several Access functionalities as algorithms independent of Access type
  • introduce draft base classes for distributed experiments
  • automatically register dependant Java classes to FramsClass? registry
  • add testing prime experiment and configuration
  • simplify and improve task dispatching

CHANGELOG:
Improve task dispatching in RemoteTree?.

GUI no longer hangs on connection problems.

Make all dispatchers joinables.

Refactorize Thread dispatcher.

Remove Task and PeriodicTask?.

Use Java utilities in those situations.

Reworking tasks dispatching.

Fix bug in EventControl? listener dispatching.

Minor improvements.

Add testing configuration for ExternalProcess? in GUI.

More improvement to prime.

Support for USERREADONLY in GUI.

Add that flag to various params in Java classes.

Remove redundant register clauses from several FramsClassAnnotations?.

Automatically gather and register dependant classes.

Add configuration for prime.

Improve Simulator class.

Add prime.xml configuration.

Introduce draft Experiment and Simulator classes.

Add prime experiment tests.

Enclose typical map with listeners into SimpleUniqueList?.

Needfile works in GUI.

Improve needfile handling in Browser.

More improvement with NeedFile?.

Implementing needfile.

Update test.

Rename ChangeEvent? to TestChangeEvent?.

Automatic argument type search in RemoteTree? listeners.

MultiParamLoader? uses AccessProvider?. By default old implementation
enclosed in AccessStash? or Registry.

Minor changes.

Rename SourceInterface? to Source.

Also improve toString of File and ListSource?.

Remove unused SimpleSource? class.

Add clearing in HistoryControl?.

Show entries in table at EventControl?.

Improve EventControl?.

Add listeners registration to EventControl?.

Add foldable table to HistoryControl?.

Add control row to Procedure and Event controls.

Improve layout of controls.

Another minor change to gui layout.

Minor improvement in the SliderControl?.

Minor changes.

Move ReflectionAccess?.Backend to separate file.

It was to cluttered.

Cleanup in ReflectionAccess?.

Move setMin, setMax, setDef to AccessOperations?.

Extract loading operation into AccessOperations?.

Append Framsticks to name of UnsupportedOperationException?.

The java.lang.UnsupportedOperationException? was shadowing this class.

Rename params.Util to params.ParamsUtil?.

Several improvements.

Minor changes.

Implement revert functionality.

Improve local changes management.

Minor improvement.

Remove methods rendered superfluous after SideNoteKey? improvement.

Improve SideNoteKey?.

It is now generic type, so explicit type specification at
call site is no more needed.

Introduce SideNoteKey? interface.

Only Objects implementing that key may be used as side note keys.

Minor improvements.

Use strings instead of ValueControls? in several gui mappings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/test/TestClass.java

    r100 r101  
    11package com.framsticks.test;
    22
    3 import java.util.Collections;
    4 import java.util.LinkedList;
    5 import java.util.List;
    63import java.util.Map;
    74
     
    118import com.framsticks.core.ListChange;
    129import com.framsticks.params.EventListener;
    13 import com.framsticks.params.UniqueListAccess;
     10import com.framsticks.params.EventListeners;
     11import com.framsticks.params.SimpleUniqueList;
    1412import com.framsticks.params.annotations.FramsClassAnnotation;
    1513import com.framsticks.params.annotations.ParamAnnotation;
     
    2624                "createChild",
    2725                "children_changed"
    28         },
    29         register = {
    30                 ChangeEvent.class,
    31                 TestChild.class,
    32                 ListChange.class
    3326        }
    3427)
     
    4033        protected String name = "test";
    4134        protected String history = "initial|";
    42         protected final List<EventListener<ChangeEvent>> historyListeners = new LinkedList<>();
    43         protected final List<EventListener<ListChange>> childrenListeners = new LinkedList<>();
     35        protected final EventListeners<TestChangeEvent> historyListeners = new EventListeners<>();
    4436
    45         protected final Map<String, TestChild> children = UniqueListAccess.createMap(TestChild.class, this);
    46         protected int counter = 0;
     37        protected final SimpleUniqueList<TestChild> children = new SimpleUniqueList<>(TestChild.class, 'c');
    4738
    4839        /**
     
    8980        @ParamAnnotation
    9081        public Map<String, TestChild> getChildren() {
    91                 return Collections.unmodifiableMap(children);
     82                return children.getView();
    9283        }
    9384
     
    111102                TestChild child = new TestChild(this);
    112103                child.name = name;
    113                 children.put(child.getUid(), child);
    114                 fireChildrenChange(child, ListChange.Action.Add);
     104                children.add(child);
    115105        }
    116106
    117107        protected void fireHistoryChange() {
    118                 for (EventListener<ChangeEvent> l : historyListeners) {
    119                         ChangeEvent event = new ChangeEvent();
    120                         event.history = history;
    121                         l.action(event);
    122                 }
     108                TestChangeEvent event = new TestChangeEvent();
     109                event.history = history;
     110                historyListeners.actionForAll(event);
    123111        }
    124112
    125         protected void fireChildrenChange(TestChild child, ListChange.Action action) {
    126                 ListChange change = new ListChange(action, UniqueListAccess.getNumberInMap(children, child), child.getUid());
    127                 for (EventListener<ListChange> l : childrenListeners) {
    128                         l.action(change);
    129                 }
    130         }
    131113
    132114        @ParamAnnotation(id = "history_changed")
    133         public void addHistoryListener(EventListener<ChangeEvent> listener) {
     115        public void addHistoryListener(EventListener<TestChangeEvent> listener) {
    134116                historyListeners.add(listener);
    135117        }
    136118
    137119        @ParamAnnotation(id = "history_changed")
    138         public void removeHistoryListener(EventListener<ChangeEvent> listener) {
     120        public void removeHistoryListener(EventListener<TestChangeEvent> listener) {
    139121                historyListeners.remove(listener);
    140122        }
     
    142124        @ParamAnnotation(id = "children_changed")
    143125        public void addChildrenListener(EventListener<ListChange> listener) {
    144                 childrenListeners.add(listener);
     126                children.addListener(listener);
    145127        }
    146128
    147129        @ParamAnnotation(id = "children_changed")
    148130        public void removeChildrenListener(EventListener<ListChange> listener) {
    149                 childrenListeners.remove(listener);
     131                children.removeListener(listener);
    150132        }
    151133
Note: See TracChangeset for help on using the changeset viewer.