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

HIGHLIGHTS:

CHANGELOG:
Get data also on tree expansion.

Use nice framstick icon for empty nodes.

Update panel after reload if it is current.

Add shallow reload procedure.

Cut Gui prefix from several tree classes.

Bring back counter of GuiTreeNode?.

Use IdentityHashMap? were it is more appriopriate.

Remove TreeListener?.

Do not use TreeListener? in GUI.

Minor change.

Done migration to GuiTreeModel?.

BrowserTest? in that version always crashes frams.linux.

Move rendering implementation into GuiAbstractNode?.

Use hand-crafted list in GuiTreeNode?.

Generally, it would be a great place for WeakIdentityHashMap?
(but there is none in Java Collection Framework).

Remove superfluous logging.

Fix bug in GuiTreeNode?.

Use IdentityHashMap? instead of HashMap?.

Improve structure update.

Filter out invalid uids in UniqueListAccess?.

Improve TreeCellRenderer?.

Add filtering in TrackConsole?.

Improve TreeModel?.

More changes.

More improvements.

More changes.

Remove TreeNode?.

Support MetaNode? in the GuiTreeModel?.

Implement more in GuiTreeModel?.

Add CompositeParam? interface to FramsClass? and AccessInterface?.

Allow access by number to UniqueList?.

Add UidComparator?.

Use TreeMap? as a default accessee in unique list.

It keeps order of keys.

Introduce classes to use with new TreeModel?.

Another step.

Migrate from TreeNode? to Node in many places.

Remove some uses of TreeNode? as DefaultMutableTreeNode?.

Remove Path from TreeNode? interface.

Remove Path from TreeNode?.

Add Path recration from node feature.

Reworking TreeCellRenderer?.

Minor change of TreeOperations? interface.

Remove last methods from TreeNode?.

Another minor step.

Do not store reference to TreeAtFrame? in TreeNode?.

Add proxy exceptionHandler to StatusBar?.

Move panels management to TreeAtFrame?.

Store localChanges in the NodeAtFrame?.

More cleanup.

Move name computing to TreeCellRenderer?.

Move tooltip and icon computations to TreeCellRenderer?.

More dispatches removed.

Remove most dispatching from TreeNode?.

TreeNode? does not actually redispatch tasks.

Make Tree embedded in Browser use SwingDispatcher?.

Make lazy binding of Tree with Dispatcher.

Minor changes.

Organizational change in AbstractTree?.

Make AbstractTree? compose from Thread instead of inherit from it.

Make SwingDispatcher? and AtOnceDispatcher? Joinable compatible.

Add ListPanelProvider?.

Improve Controls readonly and enabled handling.

Properly pass ExceptionHandlers? in more places.

Make Tree.get accept ValueParam?.

  • This is to allow access number of list elements.

Remove not needed get redirection in ClientAtServer?.

Rename tryResolve to tryGet.

Unify tryResolveAndGet into tryResolve.

Remove resolveTop from Tree interface.

Make Tree.get accept Future<Path>.

Use get to implement resolveTop also in ObjectTree?.

Unify resolveTop and get in RemoteTree?.

Another minor step.

More minor changes in tree operations.

Minor organizational changes.

In RemoteTree? first fetch info for root.

Reworking resolving.

Minor changes.

Make ListAccess? return proxy iterators (instead of creating temporary collection).

Let AccessInterface? return Iterable<Param>.

Improve resolving.

More improvements.

First working completion in ManagedConsole?.

Rename resolve to resolveTop.

This reflects the actuall functionality.

Change semantic of tryResolve and tryResolveAndGet.

File:
1 edited

Legend:

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

    r97 r98  
    33import com.framsticks.core.Tree;
    44import com.framsticks.core.Path;
     5import com.framsticks.gui.Frame;
    56import com.framsticks.gui.Gui;
    6 import com.framsticks.gui.TreeNode;
    77import com.framsticks.params.Param;
    88import com.framsticks.params.ValueParam;
     
    1515import javax.swing.*;
    1616import javax.swing.border.BevelBorder;
     17import javax.swing.tree.TreePath;
    1718
    1819import org.apache.log4j.Logger;
     
    2021import java.awt.event.ActionEvent;
    2122import java.awt.event.ActionListener;
    22 import java.util.HashMap;
     23import java.util.IdentityHashMap;
    2324import java.util.LinkedList;
    2425import java.util.List;
     
    3233        protected final JButton procedureButton;
    3334
    34         final protected Map<ValueParam, ValueControl> components = new HashMap<>();
     35        final protected Map<ValueParam, ValueControl> components = new IdentityHashMap<>();
    3536
    3637        public ProcedureControl(ProcedureParam procedureParam) {
     
    5455                        @Override
    5556                        public void actionPerformed(ActionEvent e) {
    56                                 TreeNode treeNode = owner.getCurrentTreeNode();
    57                                 assert treeNode != null;
    5857
    59                                 log.debug("calling " + getParam() + " on " + treeNode);
    60                                 final Path path = treeNode.getTreePath();
     58                                final Path path = getFrame().getTreeModel().convertToPath(getCurrentTreePath());
    6159
    6260                                final List<Object> arguments = new LinkedList<Object>();
     
    9391
    9492        @Override
    95         public TreeNode getCurrentTreeNode() {
    96                 return owner.getCurrentTreeNode();
    97         }
    98 
    99         @Override
    10093        public ProcedureParam getParam() {
    10194                return (ProcedureParam) param;
    10295        }
    10396
     97        @Override
     98        protected void updateEnabled(boolean enabled) {
     99                procedureButton.setEnabled(enabled);
     100                for (ValueControl vc : components.values()) {
     101                        vc.setUserEnabled(enabled);
     102                }
     103        }
     104
     105        @Override
     106        public Frame getFrame() {
     107                return owner.getFrame();
     108        }
     109
     110        @Override
     111        public TreePath getCurrentTreePath() {
     112                return owner.getCurrentTreePath();
     113        }
     114
    104115}
Note: See TracChangeset for help on using the changeset viewer.