Skip to content

Commit 1858897

Browse files
author
mpschr
committed
add data transformation to AggregationDataSourcePage
1 parent c626123 commit 1858897

File tree

6 files changed

+272
-240
lines changed

6 files changed

+272
-240
lines changed

org.gitools.api/src/main/java/org/gitools/api/matrix/IMatrixIterable.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222
package org.gitools.api.matrix;
2323

24+
import org.gitools.api.analysis.IAggregator;
2425
import org.gitools.api.analysis.IProgressMonitor;
2526

2627
import java.util.Collection;
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package org.gitools.api.matrix;
2+
3+
4+
5+
public abstract class TransformFunction extends AbstractMatrixFunction<Double, Double>{
6+
//abstract IMatrixPosition getPosition();
7+
8+
protected String name;
9+
protected String description;
10+
protected IMatrixPosition position;
11+
12+
public TransformFunction(String name) {
13+
this.name = name;
14+
this.description = "";
15+
}
16+
17+
public String getName() {
18+
return name;
19+
}
20+
21+
public void setName(String name) {
22+
this.name = name;
23+
}
24+
25+
26+
public String getDescription() {
27+
return description;
28+
}
29+
30+
public IMatrixPosition getPosition() {
31+
return position;
32+
}
33+
34+
35+
@Override
36+
public String toString() {
37+
return name;
38+
}
39+
40+
}

org.gitools.heatmap/src/main/java/org/gitools/heatmap/decorator/impl/NonEventToNullFunction.java

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,46 +22,23 @@
2222
package org.gitools.heatmap.decorator.impl;
2323

2424

25-
import org.gitools.api.matrix.AbstractMatrixFunction;
26-
import org.gitools.api.matrix.IMatrixPosition;
25+
import org.gitools.api.matrix.TransformFunction;
2726
import org.gitools.utils.colorscale.INumericColorScale;
2827

2928
import javax.xml.bind.annotation.XmlTransient;
3029

31-
public abstract class NonEventToNullFunction<T extends INumericColorScale> extends AbstractMatrixFunction<Double, Double> {
32-
33-
private String name;
30+
public abstract class NonEventToNullFunction<T extends INumericColorScale> extends TransformFunction {
3431

3532
@XmlTransient
3633
private T colorScale;
3734

38-
protected IMatrixPosition position;
39-
4035
protected NonEventToNullFunction(T colorScale, String name) {
41-
this.name = name;
36+
super(name);
4237
this.colorScale = colorScale;
4338
}
4439

4540
public T getColorScale() {
4641
return colorScale;
4742
}
4843

49-
public IMatrixPosition getPosition() {
50-
return position;
51-
}
52-
53-
public String getName() {
54-
return name;
55-
}
56-
57-
public void setName(String name) {
58-
this.name = name;
59-
}
60-
61-
public abstract String getDescription();
62-
63-
@Override
64-
public String toString() {
65-
return name;
66-
}
6744
}
Lines changed: 120 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,120 @@
1-
<?xml version="1.1" encoding="UTF-8" ?>
2-
3-
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
4-
<NonVisualComponents>
5-
<Component class="javax.swing.ButtonGroup" name="allOrSelected">
6-
</Component>
7-
</NonVisualComponents>
8-
<AuxValues>
9-
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
10-
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
11-
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
12-
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
13-
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
14-
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
15-
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
16-
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
17-
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
18-
</AuxValues>
19-
20-
<Layout>
21-
<DimensionLayout dim="0">
22-
<Group type="103" groupAlignment="0" attributes="0">
23-
<Group type="102" attributes="0">
24-
<EmptySpace max="-2" attributes="0"/>
25-
<Group type="103" groupAlignment="0" attributes="0">
26-
<Component id="valueCb" alignment="0" min="-2" pref="364" max="-2" attributes="0"/>
27-
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
28-
<Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
29-
<Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
30-
<Component id="aggregatorCb" alignment="0" min="-2" pref="364" max="-2" attributes="0"/>
31-
<Component id="useAllRb" alignment="0" min="-2" max="-2" attributes="0"/>
32-
<Component id="useSelectedRb" alignment="0" min="-2" max="-2" attributes="0"/>
33-
<Component id="separateAggregationCb" alignment="0" min="-2" max="-2" attributes="0"/>
34-
</Group>
35-
<EmptySpace pref="204" max="32767" attributes="0"/>
36-
</Group>
37-
</Group>
38-
</DimensionLayout>
39-
<DimensionLayout dim="1">
40-
<Group type="103" groupAlignment="0" attributes="0">
41-
<Group type="102" alignment="0" attributes="0">
42-
<EmptySpace max="-2" attributes="0"/>
43-
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
44-
<EmptySpace type="unrelated" max="-2" attributes="0"/>
45-
<Component id="valueCb" min="-2" max="-2" attributes="0"/>
46-
<EmptySpace type="separate" max="-2" attributes="0"/>
47-
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
48-
<EmptySpace max="-2" attributes="0"/>
49-
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
50-
<EmptySpace max="-2" attributes="0"/>
51-
<Component id="aggregatorCb" min="-2" max="-2" attributes="0"/>
52-
<EmptySpace min="-2" pref="15" max="-2" attributes="0"/>
53-
<Component id="separateAggregationCb" min="-2" max="-2" attributes="0"/>
54-
<EmptySpace type="separate" max="-2" attributes="0"/>
55-
<Component id="useAllRb" min="-2" max="-2" attributes="0"/>
56-
<EmptySpace max="-2" attributes="0"/>
57-
<Component id="useSelectedRb" min="-2" max="-2" attributes="0"/>
58-
<EmptySpace pref="83" max="32767" attributes="0"/>
59-
</Group>
60-
</Group>
61-
</DimensionLayout>
62-
</Layout>
63-
<SubComponents>
64-
<Component class="javax.swing.JComboBox" name="valueCb">
65-
<Properties>
66-
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
67-
<StringArray count="4">
68-
<StringItem index="0" value="Item 1"/>
69-
<StringItem index="1" value="Item 2"/>
70-
<StringItem index="2" value="Item 3"/>
71-
<StringItem index="3" value="Item 4"/>
72-
</StringArray>
73-
</Property>
74-
</Properties>
75-
</Component>
76-
<Component class="javax.swing.JLabel" name="jLabel1">
77-
<Properties>
78-
<Property name="text" type="java.lang.String" value="Select data value"/>
79-
</Properties>
80-
</Component>
81-
<Component class="javax.swing.JComboBox" name="aggregatorCb">
82-
<Properties>
83-
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
84-
<StringArray count="4">
85-
<StringItem index="0" value="Item 1"/>
86-
<StringItem index="1" value="Item 2"/>
87-
<StringItem index="2" value="Item 3"/>
88-
<StringItem index="3" value="Item 4"/>
89-
</StringArray>
90-
</Property>
91-
</Properties>
92-
</Component>
93-
<Component class="javax.swing.JLabel" name="jLabel2">
94-
<Properties>
95-
<Property name="text" type="java.lang.String" value="Value aggregation"/>
96-
</Properties>
97-
</Component>
98-
<Component class="javax.swing.JLabel" name="jLabel3">
99-
<Properties>
100-
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
101-
<Font name="DejaVu Sans" size="11" style="0"/>
102-
</Property>
103-
<Property name="text" type="java.lang.String" value="The way the the row/column will be aggregated into one value"/>
104-
</Properties>
105-
</Component>
106-
<Component class="javax.swing.JRadioButton" name="useAllRb">
107-
<Properties>
108-
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
109-
<ComponentRef name="allOrSelected"/>
110-
</Property>
111-
<Property name="selected" type="boolean" value="true"/>
112-
<Property name="text" type="java.lang.String" value="use all"/>
113-
</Properties>
114-
<Events>
115-
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="useAllRbActionPerformed"/>
116-
</Events>
117-
</Component>
118-
<Component class="javax.swing.JRadioButton" name="useSelectedRb">
119-
<Properties>
120-
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
121-
<ComponentRef name="allOrSelected"/>
122-
</Property>
123-
<Property name="text" type="java.lang.String" value="use selected"/>
124-
</Properties>
125-
<Events>
126-
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="useSelectedRbActionPerformed"/>
127-
</Events>
128-
</Component>
129-
<Component class="javax.swing.JCheckBox" name="separateAggregationCb">
130-
<Properties>
131-
<Property name="text" type="java.lang.String" value="aggregate sperately for annotation groups"/>
132-
</Properties>
133-
<Events>
134-
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="separateAggregationCbActionPerformed"/>
135-
</Events>
136-
</Component>
137-
</SubComponents>
138-
</Form>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.gitools.ui.app.heatmap.header.wizard.heatmapheader.AggregationDataSourcePage">
3+
<grid id="27dc6" binding="rootPanel" layout-manager="FormLayout">
4+
<rowspec value="center:max(d;4px):noGrow"/>
5+
<rowspec value="top:4dlu:noGrow"/>
6+
<rowspec value="center:max(d;4px):noGrow"/>
7+
<rowspec value="top:4dlu:noGrow"/>
8+
<rowspec value="center:max(d;4px):noGrow"/>
9+
<rowspec value="top:4dlu:noGrow"/>
10+
<rowspec value="center:max(d;4px):noGrow"/>
11+
<rowspec value="top:4dlu:noGrow"/>
12+
<rowspec value="center:max(d;4px):noGrow"/>
13+
<rowspec value="top:4dlu:noGrow"/>
14+
<rowspec value="center:max(d;4px):noGrow"/>
15+
<rowspec value="top:4dlu:noGrow"/>
16+
<rowspec value="center:max(d;4px):noGrow"/>
17+
<rowspec value="top:4dlu:noGrow"/>
18+
<rowspec value="center:max(d;4px):noGrow"/>
19+
<colspec value="fill:max(d;4px):noGrow"/>
20+
<colspec value="left:4dlu:noGrow"/>
21+
<colspec value="fill:max(d;4px):noGrow"/>
22+
<colspec value="left:4dlu:noGrow"/>
23+
<colspec value="fill:d:grow"/>
24+
<colspec value="left:4dlu:noGrow"/>
25+
<colspec value="fill:max(d;4px):noGrow"/>
26+
<constraints>
27+
<xy x="20" y="20" width="546" height="400"/>
28+
</constraints>
29+
<properties/>
30+
<border type="none"/>
31+
<children>
32+
<component id="df684" class="javax.swing.JLabel">
33+
<constraints>
34+
<grid row="4" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
35+
<forms/>
36+
</constraints>
37+
<properties>
38+
<text value="Select Aggregation of values"/>
39+
</properties>
40+
</component>
41+
<component id="2992a" class="javax.swing.JLabel">
42+
<constraints>
43+
<grid row="2" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
44+
<forms/>
45+
</constraints>
46+
<properties>
47+
<font style="1"/>
48+
<text value="Select data value (layer)"/>
49+
</properties>
50+
</component>
51+
<component id="68456" class="javax.swing.JLabel">
52+
<constraints>
53+
<grid row="12" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
54+
<forms/>
55+
</constraints>
56+
<properties>
57+
<text value="Transform data before aggregation"/>
58+
</properties>
59+
</component>
60+
<component id="6f8c2" class="javax.swing.JCheckBox" binding="separateAggregationCb">
61+
<constraints>
62+
<grid row="6" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
63+
<forms/>
64+
</constraints>
65+
<properties>
66+
<text value="aggregate by annotation groups"/>
67+
</properties>
68+
</component>
69+
<component id="8bdff" class="javax.swing.JRadioButton" binding="useAllRb">
70+
<constraints>
71+
<grid row="8" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
72+
<forms/>
73+
</constraints>
74+
<properties>
75+
<text value="aggregate all"/>
76+
</properties>
77+
</component>
78+
<component id="544dd" class="javax.swing.JRadioButton" binding="useSelectedRb">
79+
<constraints>
80+
<grid row="10" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
81+
<forms/>
82+
</constraints>
83+
<properties>
84+
<text value="aggregate selected"/>
85+
</properties>
86+
</component>
87+
<component id="7de67" class="javax.swing.JComboBox" binding="valueCb">
88+
<constraints>
89+
<grid row="2" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
90+
<forms/>
91+
</constraints>
92+
<properties/>
93+
</component>
94+
<component id="df1e3" class="javax.swing.JComboBox" binding="aggregatorCb">
95+
<constraints>
96+
<grid row="4" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
97+
<forms/>
98+
</constraints>
99+
<properties/>
100+
</component>
101+
<component id="2eade" class="javax.swing.JComboBox" binding="transformationCb">
102+
<constraints>
103+
<grid row="12" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
104+
<forms/>
105+
</constraints>
106+
<properties/>
107+
</component>
108+
<component id="b2bc3" class="javax.swing.JLabel" binding="functionDescription">
109+
<constraints>
110+
<grid row="14" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
111+
<forms/>
112+
</constraints>
113+
<properties>
114+
<font style="2"/>
115+
<text value="Label"/>
116+
</properties>
117+
</component>
118+
</children>
119+
</grid>
120+
</form>

0 commit comments

Comments
 (0)