source: java/main/src/main/java/com/framsticks/gui/console/TrackConsole.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.0 KB
Line 
1package com.framsticks.gui.console;
2
3import java.awt.BorderLayout;
4import java.awt.event.ActionEvent;
5import java.awt.event.ActionListener;
6
7import javax.swing.Box;
8import javax.swing.BoxLayout;
9import javax.swing.JCheckBox;
10
11import com.framsticks.communication.Connection;
12import com.framsticks.communication.ConnectionListener;
13import com.framsticks.params.annotations.AutoAppendAnnotation;
14import com.framsticks.params.annotations.FramsClassAnnotation;
15
16@FramsClassAnnotation
17public class TrackConsole extends Console implements ConnectionListener {
18
19        volatile boolean writeOut = true;
20        volatile boolean writeIn = true;
21
22        public TrackConsole() {
23        }
24
25        @AutoAppendAnnotation
26        public TrackConsole setConnection(Connection connection) {
27                this.connection = connection;
28                return this;
29        }
30
31        @Override
32        protected void joinableStart() {
33                super.joinableStart();
34                connection.getListeners().add(this);
35        }
36
37        @Override
38        protected void joinableInterrupt() {
39                connection.getListeners().remove(this);
40                super.joinableInterrupt();
41        }
42
43        @Override
44        public void connectionOutgoing(String line) {
45                if (writeOut) {
46                        dispatchWrite(line);
47                }
48        }
49
50        @Override
51        public void connectionIncomming(String line) {
52                if (writeIn) {
53                        dispatchWrite(line);
54                }
55        }
56
57        @Override
58        protected void initializeGui() {
59                super.initializeGui();
60
61                final Box box = new Box(BoxLayout.LINE_AXIS);
62
63                final JCheckBox outCheckbox = new JCheckBox();
64                outCheckbox.setText("Show out");
65                outCheckbox.setSelected(true);
66                outCheckbox.addActionListener(new ActionListener() {
67                        @Override
68                        public void actionPerformed(ActionEvent arg0) {
69                                writeOut = outCheckbox.isSelected();
70                        }
71                });
72
73                final JCheckBox inCheckbox = new JCheckBox();
74                inCheckbox.setText("Show in");
75                inCheckbox.setSelected(true);
76                inCheckbox.addActionListener(new ActionListener() {
77                        @Override
78                        public void actionPerformed(ActionEvent arg0) {
79                                writeIn = inCheckbox.isSelected();
80                        }
81                });
82
83                box.add(outCheckbox);
84                box.add(Box.createHorizontalStrut(10));
85                box.add(inCheckbox);
86
87                panel.add(box, BorderLayout.PAGE_END);
88        }
89
90}
Note: See TracBrowser for help on using the repository browser.