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/gui/tree/TreeNode.java

    r100 r101  
    44import java.util.Iterator;
    55import java.util.LinkedList;
    6 import java.util.List;
    76
    87import org.apache.logging.log4j.LogManager;
     
    1110import com.framsticks.core.Node;
    1211import com.framsticks.core.Path;
     12import com.framsticks.core.SideNoteKey;
    1313import com.framsticks.core.Tree;
    1414import com.framsticks.gui.Frame;
     
    5959                hashCode = System.identityHashCode(path.getTopObject());
    6060
    61                 if (getTree().getSideNote(path.getTopObject(), getTreeModel().createdTag, Object.class) == getTreeModel().createdTag) {
     61                if (isMarked(path.getTree(), path.getTopObject(), getTreeModel().createdTag, false)) {
    6262                        return;
    6363                }
    6464
    6565                // path.getTree().putSideNote(path.getTopObject(), Textual.class, path.getTextual());
    66                 path.getTree().putSideNote(path.getTopObject(), getTreeModel().createdTag, getTreeModel().createdTag);
     66                mark(path.getTree(), path.getTopObject(), getTreeModel().createdTag, true);
    6767
    6868                /** Iterate over all EventParams and for matching ValueParams register listeners. */
     
    239239                }
    240240                Access access = bindAccessForTreeObject(child);
    241                 CompositeParam param = getTree().getSideNote(child, CompositeParam.class, CompositeParam.class);
     241                CompositeParam param = getTree().getSideNote(child, Path.OBJECT_PARAM_KEY);
    242242                String name = param.getId();
    243243
     
    262262        }
    263263
    264         // public static class Textual {
    265         // }
    266264
    267265        public String getTextual() {
    268266                return textual;
    269                 // return getTree().getSideNote(lock(), Textual.class, String.class);
    270         }
    271 
    272         protected final Object listenersTag = new Object();
    273 
    274         public List<EventListener<?>> getListeners() {
    275                 @SuppressWarnings("unchecked")
    276                 List<EventListener<?>> result = getTree().getSideNote(lock(), listenersTag, List.class);
    277                 if (result == null) {
    278                         result = new LinkedList<>();
    279                         getTree().putSideNote(lock(), listenersTag, result);
    280                 }
    281 
    282                 return result;
    283         }
     267        }
     268
     269        @SuppressWarnings("rawtypes")
     270        protected final SideNoteKey<LinkedList> listenersTag = SideNoteKey.make(LinkedList.class);
    284271
    285272        protected <A> void tryAddListener(final Path path, final EventParam eventParam, Class<A> argumentType, final EventListener<A> listener) {
    286273                getTree().addListener(path, eventParam, listener, argumentType, new FutureHandler<Void>(getFrame()) {
     274                        @SuppressWarnings("unchecked")
    287275                        @Override
    288276                        protected void result(Void result) {
    289277                                assert getFrame().isActive();
    290278                                log.debug("registered gui listener for {} at {}", eventParam, path);
    291                                 getListeners().add(listener);
     279                                getOrCreateSideNote(getTree(), lock(), listenersTag).add(listener);
    292280                        }
    293281                });
Note: See TracChangeset for help on using the changeset viewer.