source: java/main/src/main/java/com/framsticks/gui/Panel.java @ 98

Last change on this file since 98 was 98, checked in by psniegowski, 11 years ago

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 size: 2.2 KB
Line 
1package com.framsticks.gui;
2
3import com.framsticks.params.AccessInterface;
4import com.framsticks.params.CompositeParam;
5import com.framsticks.params.FramsClass;
6
7import javax.swing.*;
8import javax.swing.tree.TreePath;
9
10import org.apache.log4j.Logger;
11
12/**
13 * Author: Piotr Śniegowski
14 */
15@SuppressWarnings("serial")
16public abstract class Panel extends JPanel {
17
18        private static final Logger log = Logger.getLogger(Panel.class);
19
20
21        public static class Parameters {
22                public final TreeAtFrame treeAtFrame;
23                public final CompositeParam param;
24                public final FramsClass framsClass;
25
26                public Parameters(TreeAtFrame treeAtFrame, CompositeParam param, FramsClass framsClass) {
27                        this.treeAtFrame = treeAtFrame;
28                        this.param = param;
29                        this.framsClass = framsClass;
30                }
31        }
32
33        // private static final Logger log = Logger.getLogger(Panel.class.getName());
34
35        protected TreePath currentTreePath;
36        protected final TreeAtFrame treeAtFrame;
37        protected final Frame frame;
38        protected final String className;
39        protected final FramsClass framsClass;
40        protected final CompositeParam param;
41        protected String uniqueName = "?";
42
43        public Panel(Parameters parameters) {
44                this.treeAtFrame = parameters.treeAtFrame;
45                this.frame = parameters.treeAtFrame.getFrame();
46                this.framsClass = parameters.framsClass;
47                this.param = parameters.param;
48                this.className = parameters.param.getContainedTypeName();
49                this.setName(parameters.param.getFramsTypeName());
50                log.debug("created panel: " + this);
51        }
52
53
54
55        public final Frame getFrame() {
56                return frame;
57        }
58
59        /**
60         * @return the currentTreePath
61         */
62        public TreePath getCurrentTreePath() {
63                return currentTreePath;
64        }
65
66        /**
67         * @param currentTreePath the currentTreePath to set
68         */
69        public void setCurrentTreePath(TreePath currentTreePath) {
70                this.currentTreePath = currentTreePath;
71        }
72
73        public final TreeAtFrame getTreeAtFrame() {
74                return treeAtFrame;
75        }
76
77
78        public final String getClassName() {
79                return className;
80        }
81
82        public abstract void pullValuesFromLocalToUser(AccessInterface access);
83
84        @Override
85        public String toString() {
86                return param.toString() + "(" + uniqueName + ")";
87        }
88
89        public final String getUniqueName() {
90                return uniqueName;
91        }
92
93        public abstract String getTitle();
94}
Note: See TracBrowser for help on using the repository browser.