source: java/main/src/main/java/com/framsticks/gui/table/ProcedureColumn.java @ 105

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

HIGHLIGHTS:

  • import refactorization: move Tree, Path, etc.

from core to structure package

  • initial serialization implementation
  • improve PrimeExperiment? test
  • many organizational changes and convenience improvements

CHANGELOG:
Make registry in AbstractTree? final.

Move most classes from core to structure package.

Minor changes.

Switch names of Future and FutureHandler?.

Rename ExceptionResultHandler? to ExceptionHandler?.

Rename ExceptionHandler? to ExceptionDispatcherHandler?.

Fix bug in ParamCandidate? cache.

Add missing synchronization to the BufferedDispatcher?.

Develop @Serialized support.

Rework serialization further.

Add serialization/deserialization interface to ValueParam?.

Move getStorageType and isNumeric from Param down to params hierarchy.

Minor changes.

Improve param type induction.

Add TestSerializedClass? for testing new serialization.

Add info files gor GenePool? and Population.

Add standard.expt exemplary netfile.

Add type name field to PropertiesObject?.

Use PropertiesObject? for PropertiesAccess? instead of ordinary map.

Hide getFramsClass is several more places.

More unification accross FramsClass?, Access and Path.

Add ParamCollection?.

Simplify interface for getting params from FramsClass?, Access
or Path.

Make Access.call() interface variadic.

Add arguments(args) convenience wrapper around new Object[] {args}.

Upgrade to apache.commons.lang version 3.1

Minor improvement with Response constructors.

Develop proper result printing in ClientAtServer?.

Add experimentNetsave to PrimeExperiment?.

File size: 1.1 KB
Line 
1package com.framsticks.gui.table;
2
3import com.framsticks.gui.controls.ProcedureControl;
4import com.framsticks.params.CompositeParam;
5import com.framsticks.params.types.ProcedureParam;
6import com.framsticks.structure.Path;
7
8import static com.framsticks.params.ParamsUtil.arguments;
9
10public class ProcedureColumn extends Column {
11
12        public ProcedureColumn(ProcedureParam param, TableModel tableModel) {
13                super(param, tableModel);
14        }
15
16        @Override
17        public ProcedureParam getParam() {
18                return (ProcedureParam) param;
19        }
20
21        @Override
22        public Class<?> getColumnClass() {
23                return ProcedureParam.class;
24        }
25
26        @Override
27        public Object getValueAt(int rowIndex) {
28                return param;
29        }
30
31        @Override
32        public int setValueAt(int rowIndex, Object value) {
33                CompositeParam param = tableModel.getAccess().getCompositeParam(rowIndex);
34                if (param == null) {
35                        return 0;
36                }
37                Path path = tableModel.getListPanel().getCurrentPath().appendParam(param).tryFindResolution();
38                if (!path.isResolved()) {
39                        return 0;
40                }
41                ProcedureControl.callProcedure(path, getParam(), arguments(), tableModel.getFrame());
42                return 0;
43        }
44
45        @Override
46        public boolean isEditable() {
47                return true;
48        }
49
50}
Note: See TracBrowser for help on using the repository browser.