Ignore:
Timestamp:
07/10/13 22:41:02 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGTS:

  • complete events implementation
  • add CLI in Java Framsticks server
  • add automatic registration for events in GUI
  • improve objects fetching (object are never overwritten with new instances)
  • properly react for ListChange? events
  • add ListPanel? with table view
    • columns to be shown may be statically specified in configuration
    • currently modyfying data through tables is not available
  • improve maven configuration
    • configuration file may be specified without touching pom.xml

CHANGELOG:
Extract constants from Flags into ParamFlags? and SetStateFlags?.

Extract flags I/O to FlagsUtils? class.

Configured maven to exec given resource configuration.

For example:
mvn exec:exec -Dframsticks.config=/configs/managed-console.xml

Cleanup pom.xml

Rename ObjectTree? to LocalTree? (also make LocalTree? and RemoteTree? final).

Minor change.

Add maximum number of columns in ListPanelProvider?.

Improve ColumnsConfig? interpretation.

Automatically fill FramsClass?.name if trying to construct empty.

Improve identitifer case mangling in XmlLoader?.

Introduce configurable ColumnsConfig?.

Draft working version of ListPanel?.

Table is being shown (although empty).

More improvements to table building.

Move some functionality from Frame to TreeModel?.

Move tree classes in gui to separate package.

Remove old table related classes.

Add draft implementation of TableModel?.

Redirect ParamBuilder?.forAccess to AccessInterface?.

Optimize ParamBuilder?.forAccess()

Do not clear list when loading.

Do not load fetched values directly.

Implement different AccessInterface? copying policy.

Optimize fetching values routine.

Remove Mode enum (work out get semantics).

Some improvements to ListChange? handling.

Improve UniqueListAccess?.

Add reaction for ListChanges? in the TreeNode?.

EventListeners? are being added in the TreeNode?.

Listeners for ListParams? are now very naive (they download
whole list).

Automatially register on events in GUI.

Events are working in RemoteTree? and Server.

Move listeners to the ClientSideManagedConnection?.

Remove old classes responsible for event subscriptions.

Improve event reading.

Improve events handling at server side.

Add register attribute in FramsClassAnnotation?
to automatically also register other classes.

Registering events works.

Setup for remote listeners registration.

More improvements.

Minor changes.

Add rootTree to the ClientAtServer?.

Moving CLI to the ClientAtServer?.

Fix bug: use Void.TYPE instead of Void.class

More development around CLI.

  • Improve Path resolving.

Add synthetic root to ObjectTree?.

It is needed to allow sybling for the original root
that would containg CLI.

Some work with registering events in RemoteTree?.

Draft implementation of listener registering in RemoteTree?.

Support events registration in the ObjectTree?.

Add events support to ReflectionAccess?.

EventParam? is recognized by ParamCandidate?.

Prepare interface for Events across project.

Add EventListener? and API for listeners in Tree.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/gui/Frame.java

    r98 r99  
    3838import org.apache.log4j.Logger;
    3939
    40 import com.framsticks.core.Mode;
    4140import com.framsticks.core.Path;
    4241import com.framsticks.core.Tree;
    43 import com.framsticks.core.TreeOperations;
    44 import com.framsticks.gui.view.TreeCellRenderer;
    45 import com.framsticks.params.AccessInterface;
     42import com.framsticks.gui.tree.MetaNode;
     43import com.framsticks.gui.tree.TreeCellRenderer;
     44import com.framsticks.gui.tree.TreeModel;
     45import com.framsticks.gui.tree.TreeNode;
    4646import com.framsticks.util.dispatching.Dispatching;
    4747import com.framsticks.util.dispatching.FutureHandler;
     
    126126                        @Override
    127127                        public void valueChanged(TreeSelectionEvent e) {
    128                                 chooseTreeNode(e.getNewLeadSelectionPath());
     128                                treeModel.chooseTreeNode(e.getNewLeadSelectionPath());
    129129                        }
    130130                });
     
    139139                        @Override
    140140                        public void treeExpanded(TreeExpansionEvent e) {
    141                                 loadChildren(treeModel.convertToPath(e.getPath()), false);
     141                                // loadChildren(treeModel.convertToPath(e.getPath()), false);
    142142                        }
    143143                });
     
    243243                        public void actionPerformed(ActionEvent actionEvent) {
    244244
    245                                 loadPath(treeModel.convertToPath(jtree.getSelectionPath()), true);
     245                                treeModel.loadPath(treeModel.convertToPath(jtree.getSelectionPath()), true);
    246246                        }
    247247                });
     
    258258                Tree tree = path.getTree();
    259259
    260                 log.info("trying mount: " + path);
     260                log.debug("trying mount: " + path);
    261261                if (!tree.getAssignedRoot().isResolved()) {
    262                         tree.get(path, Mode.FETCH, new FutureHandler<Path>(this) {
     262                        tree.get(path, new FutureHandler<Path>(this) {
    263263
    264264                                @Override
     
    275275                treeAtFrames.put(tree, e);
    276276
    277                 rootNode.getChildren().add(new TreeNode(tree.getAssignedRoot()));
     277                rootNode.getChildren().add(new TreeNode(e, Path.to(tree, "/")));
    278278                e.rootNode = tree.getAssignedRoot();
    279279                treeModel.nodeStructureChanged(new TreePath(rootNode));
     
    311311        }
    312312
    313         public void loadChildren(Path path, boolean reload) {
    314                 if (path == null) {
    315                         return;
     313        public void updatePanelIfIsLeadSelection(TreePath treePath, Path path) {
     314                assert isActive();
     315                if (treePath.equals(jtree.getSelectionPath())) {
     316                        treeAtFrames.get(path.getTree()).useOrCreatePanel(treePath);
    316317                }
    317                 AccessInterface access = TreeOperations.bindAccess(path);
    318 
    319                 int count = access.getCompositeParamCount();
    320                 for (int i = 0; i < count; ++i) {
    321                         Path childPath = path.appendParam(access.getCompositeParam(i)).tryFindResolution();
    322                         loadPath(childPath, reload);
    323                 }
    324 
    325         }
    326 
    327         public void loadPath(Path path, boolean reload) {
    328                 if (path == null) {
    329                         return;
    330                 }
    331                 if (path.isResolved() && !reload) {
    332                         return;
    333                 }
    334                 path.getTree().get(path, Mode.FETCH, new FutureHandler<Path>(this) {
    335                         @Override
    336                         protected void result(Path result) {
    337                                 final TreePath treePath = treeModel.convertToTreePath(result);
    338 
    339                                 treeModel.nodeStructureChanged(treePath);
    340                                 if (treePath.equals(jtree.getSelectionPath())) {
    341                                         treeAtFrames.get(result.getTree()).useOrCreatePanel(treePath);
    342                                 }
    343                         }
    344                 });
    345         }
    346 
    347         public void chooseTreeNode(final TreePath treePath) {
    348                 assert isActive();
    349                 if (treePath == null) {
    350                         return;
    351                 }
    352                 if (treeModel.isChanging()) {
    353                         return;
    354                 }
    355 
    356                 Path path = treeModel.convertToPath(treePath);
    357                 if (path == null) {
    358                         return;
    359                 }
    360                 path = path.assureResolved();
    361                 final Tree tree = path.getTree();
    362 
    363                 treeAtFrames.get(tree).useOrCreatePanel(treePath);
    364                 loadChildren(path, false);
    365 
    366         }
     318        }
     319
    367320
    368321
     
    420373
    421374        /**
     375         * @return the jtree
     376         */
     377        public JTree getJtree() {
     378                return jtree;
     379        }
     380
     381        /**
    422382         * @return the treeModel
    423383         */
     
    426386        }
    427387
     388        /**
     389         * @return the rootNode
     390         */
     391        public MetaNode getRootNode() {
     392                return rootNode;
     393        }
     394
     395        /**
     396         * @return the treeAtFrames
     397         */
     398        public Map<Tree, TreeAtFrame> getTreeAtFrames() {
     399                return treeAtFrames;
     400        }
     401
    428402}
Note: See TracChangeset for help on using the changeset viewer.