source: java/main/src/main/java/com/framsticks/gui/tree/MetaNode.java @ 99

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

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 size: 1.1 KB
Line 
1package com.framsticks.gui.tree;
2
3import java.util.LinkedList;
4import java.util.List;
5
6
7import com.framsticks.gui.ImageProvider;
8
9public class MetaNode extends AbstractNode {
10
11        protected List<AbstractNode> children = new LinkedList<>();
12        protected String name = "meta node";
13
14        /**
15         * @return the children
16         */
17        public List<AbstractNode> getChildren() {
18                return children;
19        }
20
21        /**
22         * @return the name
23         */
24        public String getName() {
25                return name;
26        }
27
28        /**
29         * @param name the name to set
30         */
31        public void setName(String name) {
32                this.name = name;
33        }
34
35        @Override
36        public int getChildCount() {
37                return children.size();
38        }
39
40        @Override
41        public AbstractNode getChild(int number) {
42                return children.get(number);
43        }
44
45        @Override
46        public int getIndexOfChild(AbstractNode child) {
47                return children.indexOf(child);
48        }
49
50        @Override
51        public String toString() {
52                return name;
53        }
54
55        @Override
56        public boolean isLeaf() {
57                return false;
58        }
59
60        @Override
61        public void render(TreeCellRenderer renderer) {
62                renderer.setIcon(ImageProvider.loadImage(ImageProvider.SERVER));
63                renderer.setText(name);
64                renderer.setToolTipText("?");
65        }
66
67}
Note: See TracBrowser for help on using the repository browser.