2107 |
24 Mar 06 |
nicklas |
1 |
<%-- $Id$ |
2107 |
24 Mar 06 |
nicklas |
2 |
------------------------------------------------------------------ |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Nicklas Nordborg |
2107 |
24 Mar 06 |
nicklas |
5 |
|
2304 |
22 May 06 |
jari |
6 |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
7 |
Available at http://base.thep.lu.se/ |
2107 |
24 Mar 06 |
nicklas |
8 |
|
2107 |
24 Mar 06 |
nicklas |
9 |
BASE is free software; you can redistribute it and/or |
2107 |
24 Mar 06 |
nicklas |
10 |
modify it under the terms of the GNU General Public License |
4476 |
05 Sep 08 |
jari |
11 |
as published by the Free Software Foundation; either version 3 |
2107 |
24 Mar 06 |
nicklas |
12 |
of the License, or (at your option) any later version. |
2107 |
24 Mar 06 |
nicklas |
13 |
|
2107 |
24 Mar 06 |
nicklas |
14 |
BASE is distributed in the hope that it will be useful, |
2107 |
24 Mar 06 |
nicklas |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2107 |
24 Mar 06 |
nicklas |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2107 |
24 Mar 06 |
nicklas |
17 |
GNU General Public License for more details. |
2107 |
24 Mar 06 |
nicklas |
18 |
|
2107 |
24 Mar 06 |
nicklas |
19 |
You should have received a copy of the GNU General Public License |
4511 |
11 Sep 08 |
jari |
20 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
2107 |
24 Mar 06 |
nicklas |
21 |
------------------------------------------------------------------ |
2107 |
24 Mar 06 |
nicklas |
22 |
|
2107 |
24 Mar 06 |
nicklas |
23 |
|
2107 |
24 Mar 06 |
nicklas |
24 |
@author Nicklas |
2107 |
24 Mar 06 |
nicklas |
25 |
@version 2.0 |
2107 |
24 Mar 06 |
nicklas |
26 |
--%> |
5426 |
24 Sep 10 |
nicklas |
27 |
<%@ page pageEncoding="UTF-8" session="false" |
2107 |
24 Mar 06 |
nicklas |
28 |
import="net.sf.basedb.core.SessionControl" |
2107 |
24 Mar 06 |
nicklas |
29 |
import="net.sf.basedb.core.DbControl" |
2107 |
24 Mar 06 |
nicklas |
30 |
import="net.sf.basedb.core.Item" |
5208 |
08 Jan 10 |
nicklas |
31 |
import="net.sf.basedb.core.Type" |
2107 |
24 Mar 06 |
nicklas |
32 |
import="net.sf.basedb.core.ItemContext" |
2107 |
24 Mar 06 |
nicklas |
33 |
import="net.sf.basedb.core.Permission" |
2107 |
24 Mar 06 |
nicklas |
34 |
import="net.sf.basedb.core.Formula" |
4918 |
04 May 09 |
nicklas |
35 |
import="net.sf.basedb.core.IntensityTransform" |
2733 |
16 Oct 06 |
nicklas |
36 |
import="net.sf.basedb.core.Coloring" |
2107 |
24 Mar 06 |
nicklas |
37 |
import="net.sf.basedb.core.RawDataType" |
2107 |
24 Mar 06 |
nicklas |
38 |
import="net.sf.basedb.core.RawDataTypes" |
2119 |
28 Mar 06 |
nicklas |
39 |
import="net.sf.basedb.core.RawDataProperty" |
2949 |
24 Nov 06 |
martin |
40 |
import="net.sf.basedb.core.Project" |
2107 |
24 Mar 06 |
nicklas |
41 |
import="net.sf.basedb.core.PermissionDeniedException" |
2733 |
16 Oct 06 |
nicklas |
42 |
import="net.sf.basedb.util.Values" |
2107 |
24 Mar 06 |
nicklas |
43 |
import="net.sf.basedb.clients.web.Base" |
2107 |
24 Mar 06 |
nicklas |
44 |
import="net.sf.basedb.clients.web.util.HTML" |
5501 |
18 Nov 10 |
nicklas |
45 |
import="net.sf.basedb.core.plugin.GuiContext" |
5501 |
18 Nov 10 |
nicklas |
46 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
5501 |
18 Nov 10 |
nicklas |
47 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
5501 |
18 Nov 10 |
nicklas |
48 |
import="net.sf.basedb.clients.web.extensions.edit.EditUtil" |
7604 |
25 Feb 19 |
nicklas |
49 |
import="net.sf.basedb.clients.web.extensions.tabcontrol.TabAction" |
5501 |
18 Nov 10 |
nicklas |
50 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
2107 |
24 Mar 06 |
nicklas |
51 |
import="java.util.List" |
2107 |
24 Mar 06 |
nicklas |
52 |
%> |
2107 |
24 Mar 06 |
nicklas |
53 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2107 |
24 Mar 06 |
nicklas |
54 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
6144 |
21 Sep 12 |
nicklas |
55 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
2107 |
24 Mar 06 |
nicklas |
56 |
<% |
2107 |
24 Mar 06 |
nicklas |
57 |
final Item itemType = Item.FORMULA; |
2107 |
24 Mar 06 |
nicklas |
58 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
2107 |
24 Mar 06 |
nicklas |
59 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
2107 |
24 Mar 06 |
nicklas |
60 |
final int itemId = cc.getId(); |
2107 |
24 Mar 06 |
nicklas |
61 |
final String ID = sc.getId(); |
2107 |
24 Mar 06 |
nicklas |
62 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
63 |
final DbControl dc = sc.newDbControl(":Edit "+itemType); |
2107 |
24 Mar 06 |
nicklas |
64 |
try |
2107 |
24 Mar 06 |
nicklas |
65 |
{ |
2107 |
24 Mar 06 |
nicklas |
66 |
String title = null; |
2107 |
24 Mar 06 |
nicklas |
67 |
Formula formula = null; |
2107 |
24 Mar 06 |
nicklas |
68 |
Formula.Type currentType = null; |
5208 |
08 Jan 10 |
nicklas |
69 |
Type currentValueType = Type.FLOAT; |
2107 |
24 Mar 06 |
nicklas |
70 |
Formula.Parser currentParser = null; |
3558 |
16 Jul 07 |
nicklas |
71 |
Formula.AverageMethod currentAverageMethod = null; |
2107 |
24 Mar 06 |
nicklas |
72 |
RawDataType currentRawDataType = null; |
2949 |
24 Nov 06 |
martin |
73 |
RawDataType defaultRawDataType = null; |
4918 |
04 May 09 |
nicklas |
74 |
IntensityTransform currentSourceIntensityTransform = null; |
4918 |
04 May 09 |
nicklas |
75 |
IntensityTransform currentResultIntensityTransform = null; |
2107 |
24 Mar 06 |
nicklas |
76 |
List<String> expressions = null; |
2733 |
16 Oct 06 |
nicklas |
77 |
Coloring coloring = null; |
2107 |
24 Mar 06 |
nicklas |
78 |
|
2949 |
24 Nov 06 |
martin |
79 |
int activeProjectId = sc.getActiveProjectId(); |
2949 |
24 Nov 06 |
martin |
80 |
if (activeProjectId > 0) |
2949 |
24 Nov 06 |
martin |
81 |
{ |
2949 |
24 Nov 06 |
martin |
82 |
Project activeProject = Project.getById(dc, activeProjectId); |
2949 |
24 Nov 06 |
martin |
83 |
defaultRawDataType = activeProject.getDefaultRawDataType(); |
2949 |
24 Nov 06 |
martin |
84 |
} |
2107 |
24 Mar 06 |
nicklas |
85 |
if (itemId == 0) |
2107 |
24 Mar 06 |
nicklas |
86 |
{ |
2107 |
24 Mar 06 |
nicklas |
87 |
title = "Create formula"; |
2107 |
24 Mar 06 |
nicklas |
88 |
cc.removeObject("item"); |
2597 |
25 Aug 06 |
nicklas |
89 |
String recentType = cc.getRecent("FormulaType", 0); |
2597 |
25 Aug 06 |
nicklas |
90 |
String filterType = cc.getPropertyValue("type"); |
2597 |
25 Aug 06 |
nicklas |
91 |
if (filterType != null) currentType = Formula.Type.fromValue(Values.getInt(filterType)); |
2597 |
25 Aug 06 |
nicklas |
92 |
if (currentType == null && recentType != null) currentType = Formula.Type.valueOf(recentType); |
2597 |
25 Aug 06 |
nicklas |
93 |
if (currentType == null) currentType = Formula.Type.COLUMN_EXPRESSION; |
2107 |
24 Mar 06 |
nicklas |
94 |
currentParser = Formula.Parser.fromValue(Values.getInt(cc.getPropertyValue("parser"), |
2107 |
24 Mar 06 |
nicklas |
95 |
Formula.Parser.JEP.getValue())); |
3558 |
16 Jul 07 |
nicklas |
96 |
currentAverageMethod = Formula.AverageMethod.fromValue(Values.getInt(cc.getPropertyValue("averageMethod"), |
3558 |
16 Jul 07 |
nicklas |
97 |
Formula.AverageMethod.ARITHMETIC_MEAN.getValue())); |
2107 |
24 Mar 06 |
nicklas |
98 |
currentRawDataType = RawDataTypes.getRawDataType(cc.getPropertyValue("rawDataType")); |
2597 |
25 Aug 06 |
nicklas |
99 |
if (currentRawDataType == null) |
2597 |
25 Aug 06 |
nicklas |
100 |
{ |
2597 |
25 Aug 06 |
nicklas |
101 |
currentRawDataType = RawDataTypes.getRawDataType(cc.getRecent("RawDataType", 0)); |
2597 |
25 Aug 06 |
nicklas |
102 |
} |
4918 |
04 May 09 |
nicklas |
103 |
if (cc.getPropertyValue("sourceIntensityTransform") != null) |
4918 |
04 May 09 |
nicklas |
104 |
{ |
4918 |
04 May 09 |
nicklas |
105 |
currentSourceIntensityTransform = IntensityTransform.fromValue(Values.getInt(cc.getPropertyValue("sourceIntensityTransform"))); |
4918 |
04 May 09 |
nicklas |
106 |
} |
4918 |
04 May 09 |
nicklas |
107 |
if (cc.getPropertyValue("resultIntensityTransform") != null) |
4918 |
04 May 09 |
nicklas |
108 |
{ |
4918 |
04 May 09 |
nicklas |
109 |
currentResultIntensityTransform = IntensityTransform.fromValue(Values.getInt(cc.getPropertyValue("resultIntensityTransform"))); |
4918 |
04 May 09 |
nicklas |
110 |
} |
2733 |
16 Oct 06 |
nicklas |
111 |
coloring = new Coloring(); |
2733 |
16 Oct 06 |
nicklas |
112 |
coloring.setUsingColors(Values.getBoolean(cc.getPropertyValue("coloring.usingColors"))); |
2733 |
16 Oct 06 |
nicklas |
113 |
coloring.setLogarithmic(Values.getBoolean(cc.getPropertyValue("coloring.logarithmic"))); |
2733 |
16 Oct 06 |
nicklas |
114 |
coloring.setMinValue(Values.getFloat(cc.getPropertyValue("coloring.minValue"), null)); |
2733 |
16 Oct 06 |
nicklas |
115 |
coloring.setMidValue(Values.getFloat(cc.getPropertyValue("coloring.midValue"), null)); |
2733 |
16 Oct 06 |
nicklas |
116 |
coloring.setMaxValue(Values.getFloat(cc.getPropertyValue("coloring.maxValue"), null)); |
2949 |
24 Nov 06 |
martin |
117 |
|
2949 |
24 Nov 06 |
martin |
118 |
currentRawDataType = currentRawDataType != null ? currentRawDataType : defaultRawDataType; |
2107 |
24 Mar 06 |
nicklas |
119 |
} |
2107 |
24 Mar 06 |
nicklas |
120 |
else |
2107 |
24 Mar 06 |
nicklas |
121 |
{ |
2107 |
24 Mar 06 |
nicklas |
122 |
formula = Formula.getById(dc, itemId); |
6314 |
02 Sep 13 |
nicklas |
123 |
formula.checkPermission(Permission.WRITE); |
2107 |
24 Mar 06 |
nicklas |
124 |
currentParser = formula.getParser(); |
3558 |
16 Jul 07 |
nicklas |
125 |
currentAverageMethod = formula.getAverageMethod(); |
2107 |
24 Mar 06 |
nicklas |
126 |
currentType = formula.getFormulaType(); |
5208 |
08 Jan 10 |
nicklas |
127 |
currentValueType = formula.getValueType(); |
2107 |
24 Mar 06 |
nicklas |
128 |
currentRawDataType = formula.getRawDataType(); |
4918 |
04 May 09 |
nicklas |
129 |
currentSourceIntensityTransform = formula.getSourceIntensityTransform(); |
4918 |
04 May 09 |
nicklas |
130 |
currentResultIntensityTransform = formula.getResultIntensityTransform(); |
2107 |
24 Mar 06 |
nicklas |
131 |
expressions = formula.getFormulas(); |
2733 |
16 Oct 06 |
nicklas |
132 |
coloring = formula.getColoring(); |
2107 |
24 Mar 06 |
nicklas |
133 |
cc.setObject("item", formula); |
2107 |
24 Mar 06 |
nicklas |
134 |
title = "Edit formula -- " + HTML.encodeTags(formula.getName()); |
2107 |
24 Mar 06 |
nicklas |
135 |
} |
5501 |
18 Nov 10 |
nicklas |
136 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), formula); |
7604 |
25 Feb 19 |
nicklas |
137 |
ExtensionsInvoker<TabAction> invoker = EditUtil.useEditExtensions(jspContext); |
2107 |
24 Mar 06 |
nicklas |
138 |
%> |
6314 |
02 Sep 13 |
nicklas |
139 |
<base:page type="popup" title="<%=title%>" id="edit-page"> |
6314 |
02 Sep 13 |
nicklas |
140 |
<base:head scripts="tabcontrol-2.js,~formulas.js" styles="tabcontrol.css"> |
5501 |
18 Nov 10 |
nicklas |
141 |
<ext:scripts context="<%=jspContext%>" /> |
5501 |
18 Nov 10 |
nicklas |
142 |
<ext:stylesheets context="<%=jspContext%>" /> |
2107 |
24 Mar 06 |
nicklas |
143 |
</base:head> |
6314 |
02 Sep 13 |
nicklas |
144 |
<base:body > |
5916 |
19 Dec 11 |
nicklas |
145 |
<h1><%=title%> <base:help tabcontrol="settings" /></h1> |
6162 |
10 Oct 12 |
nicklas |
146 |
<form action="index.jsp?ID=<%=ID%>" method="post" name="formula"> |
2107 |
24 Mar 06 |
nicklas |
147 |
<input type="hidden" name="cmd" value="UpdateItem"> |
2107 |
24 Mar 06 |
nicklas |
148 |
|
5916 |
19 Dec 11 |
nicklas |
149 |
<t:tabcontrol id="settings" |
5916 |
19 Dec 11 |
nicklas |
150 |
subclass="content dialogtabcontrol" |
6314 |
02 Sep 13 |
nicklas |
151 |
position="bottom" remember="<%=formula != null%>" |
5501 |
18 Nov 10 |
nicklas |
152 |
extensions="<%=invoker%>"> |
6314 |
02 Sep 13 |
nicklas |
153 |
<t:tab id="info" title="Formula" helpid="formula.edit"> |
5916 |
19 Dec 11 |
nicklas |
154 |
<table class="fullform input100"> |
2107 |
24 Mar 06 |
nicklas |
155 |
<tr> |
5916 |
19 Dec 11 |
nicklas |
156 |
<th>Name</th> |
6314 |
02 Sep 13 |
nicklas |
157 |
<td><input class="text required auto-init" data-auto-init="<%=formula == null ? "focus-select" : "focus" %>" |
6314 |
02 Sep 13 |
nicklas |
158 |
type="text" name="name" |
2107 |
24 Mar 06 |
nicklas |
159 |
value="<%=HTML.encodeTags(formula == null ? Values.getString(cc.getPropertyValue("name"), "New formula") : formula.getName())%>" |
5916 |
19 Dec 11 |
nicklas |
160 |
maxlength="<%=Formula.MAX_NAME_LENGTH%>"></td> |
5916 |
19 Dec 11 |
nicklas |
161 |
<td></td> |
2107 |
24 Mar 06 |
nicklas |
162 |
</tr> |
2107 |
24 Mar 06 |
nicklas |
163 |
<tr> |
5916 |
19 Dec 11 |
nicklas |
164 |
<th>Type</th> |
2107 |
24 Mar 06 |
nicklas |
165 |
<td> |
6314 |
02 Sep 13 |
nicklas |
166 |
<select name="type" class="required" id="formulaType" style="width: 15em;"> |
2107 |
24 Mar 06 |
nicklas |
167 |
<% |
2107 |
24 Mar 06 |
nicklas |
168 |
for (Formula.Type type : Formula.Type.values()) |
2107 |
24 Mar 06 |
nicklas |
169 |
{ |
2107 |
24 Mar 06 |
nicklas |
170 |
String selected = type == currentType ? "selected" : ""; |
6314 |
02 Sep 13 |
nicklas |
171 |
Type valueType = type.getValueType(); |
2107 |
24 Mar 06 |
nicklas |
172 |
%> |
6314 |
02 Sep 13 |
nicklas |
173 |
<option value="<%=type.name()%>" <%=selected%> |
6314 |
02 Sep 13 |
nicklas |
174 |
data-supports-colors="<%=type.canUseColoring() ? 1 : 0 %>" |
6314 |
02 Sep 13 |
nicklas |
175 |
data-supports-average="<%=type.supportsAverage() ? 1 : 0 %>" |
6314 |
02 Sep 13 |
nicklas |
176 |
data-value-type="<%=valueType == null ? "" : valueType.name() %>" |
6314 |
02 Sep 13 |
nicklas |
177 |
><%=HTML.encodeTags(type.toString())%> |
2107 |
24 Mar 06 |
nicklas |
178 |
<% |
2107 |
24 Mar 06 |
nicklas |
179 |
} |
2107 |
24 Mar 06 |
nicklas |
180 |
%> |
2107 |
24 Mar 06 |
nicklas |
181 |
</select> |
2107 |
24 Mar 06 |
nicklas |
182 |
</td> |
5916 |
19 Dec 11 |
nicklas |
183 |
<td></td> |
2107 |
24 Mar 06 |
nicklas |
184 |
</tr> |
2107 |
24 Mar 06 |
nicklas |
185 |
<tr> |
5916 |
19 Dec 11 |
nicklas |
186 |
<th>Parser</th> |
2107 |
24 Mar 06 |
nicklas |
187 |
<td> |
5916 |
19 Dec 11 |
nicklas |
188 |
<select name="parser" class="required" style="width: 15em;"> |
2107 |
24 Mar 06 |
nicklas |
189 |
<% |
2107 |
24 Mar 06 |
nicklas |
190 |
for (Formula.Parser parser : Formula.Parser.values()) |
2107 |
24 Mar 06 |
nicklas |
191 |
{ |
2107 |
24 Mar 06 |
nicklas |
192 |
String selected = parser == currentParser ? "selected" : ""; |
2107 |
24 Mar 06 |
nicklas |
193 |
%> |
2107 |
24 Mar 06 |
nicklas |
194 |
<option value="<%=parser.name()%>" <%=selected%>><%=HTML.encodeTags(parser.toString())%> |
2107 |
24 Mar 06 |
nicklas |
195 |
<% |
2107 |
24 Mar 06 |
nicklas |
196 |
} |
2107 |
24 Mar 06 |
nicklas |
197 |
%> |
2107 |
24 Mar 06 |
nicklas |
198 |
</select> |
2107 |
24 Mar 06 |
nicklas |
199 |
</td> |
5916 |
19 Dec 11 |
nicklas |
200 |
<td></td> |
2107 |
24 Mar 06 |
nicklas |
201 |
</tr> |
2107 |
24 Mar 06 |
nicklas |
202 |
<tr> |
5916 |
19 Dec 11 |
nicklas |
203 |
<th>Raw data type</th> |
2107 |
24 Mar 06 |
nicklas |
204 |
<td> |
6314 |
02 Sep 13 |
nicklas |
205 |
<select name="rawdatatype" id="rawdatatype" style="width: 15em;"> |
2107 |
24 Mar 06 |
nicklas |
206 |
<option value="">- none - |
2107 |
24 Mar 06 |
nicklas |
207 |
<% |
5574 |
18 Feb 11 |
nicklas |
208 |
for (RawDataType rdt : RawDataTypes.getSortedRawDataTypes(new RawDataTypes.NameComparator())) |
2107 |
24 Mar 06 |
nicklas |
209 |
{ |
2107 |
24 Mar 06 |
nicklas |
210 |
String selected = rdt == currentRawDataType ? "selected" : ""; |
2107 |
24 Mar 06 |
nicklas |
211 |
%> |
6314 |
02 Sep 13 |
nicklas |
212 |
<option value="<%=rdt.getId()%>" <%=selected%> |
6314 |
02 Sep 13 |
nicklas |
213 |
data-channels="<%=rdt.getChannels()%>" |
6314 |
02 Sep 13 |
nicklas |
214 |
><%=HTML.encodeTags(rdt.getName())%> |
2107 |
24 Mar 06 |
nicklas |
215 |
<% |
2107 |
24 Mar 06 |
nicklas |
216 |
} |
2107 |
24 Mar 06 |
nicklas |
217 |
%> |
2107 |
24 Mar 06 |
nicklas |
218 |
</select> |
2107 |
24 Mar 06 |
nicklas |
219 |
</td> |
5916 |
19 Dec 11 |
nicklas |
220 |
<td></td> |
2107 |
24 Mar 06 |
nicklas |
221 |
</tr> |
2107 |
24 Mar 06 |
nicklas |
222 |
<tr> |
5916 |
19 Dec 11 |
nicklas |
223 |
<th>Channels</th> |
6314 |
02 Sep 13 |
nicklas |
224 |
<td><input <%=currentRawDataType != null ? "class=\"text disabled\" disabled" : "class=\"text required\""%> |
6314 |
02 Sep 13 |
nicklas |
225 |
type="text" name="channels" id="channels" |
5916 |
19 Dec 11 |
nicklas |
226 |
style="width:15em;" |
2107 |
24 Mar 06 |
nicklas |
227 |
value="<%=formula == null ? (currentRawDataType == null ? Values.getInt(cc.getPropertyValue("channels")) : currentRawDataType.getChannels()) : formula.getChannels()%>" |
6314 |
02 Sep 13 |
nicklas |
228 |
maxlength="10" |
2107 |
24 Mar 06 |
nicklas |
229 |
></td> |
5916 |
19 Dec 11 |
nicklas |
230 |
<td></td> |
2107 |
24 Mar 06 |
nicklas |
231 |
</tr> |
5916 |
19 Dec 11 |
nicklas |
232 |
<tr class="big"> |
5916 |
19 Dec 11 |
nicklas |
233 |
<th>Expressions</th> |
2107 |
24 Mar 06 |
nicklas |
234 |
<td> |
5916 |
19 Dec 11 |
nicklas |
235 |
<table> |
2107 |
24 Mar 06 |
nicklas |
236 |
<tr> |
2107 |
24 Mar 06 |
nicklas |
237 |
<td> |
6314 |
02 Sep 13 |
nicklas |
238 |
<select name="expressions" id="expressions" size="3" style="width: 26em;" |
6314 |
02 Sep 13 |
nicklas |
239 |
multiple class="required"> |
2107 |
24 Mar 06 |
nicklas |
240 |
<% |
2107 |
24 Mar 06 |
nicklas |
241 |
if (expressions != null) |
2107 |
24 Mar 06 |
nicklas |
242 |
{ |
2107 |
24 Mar 06 |
nicklas |
243 |
for (String expression : expressions) |
2107 |
24 Mar 06 |
nicklas |
244 |
{ |
2107 |
24 Mar 06 |
nicklas |
245 |
%> |
2107 |
24 Mar 06 |
nicklas |
246 |
<option><%=HTML.encodeTags(expression)%> |
2107 |
24 Mar 06 |
nicklas |
247 |
<% |
2107 |
24 Mar 06 |
nicklas |
248 |
} |
2107 |
24 Mar 06 |
nicklas |
249 |
} |
2107 |
24 Mar 06 |
nicklas |
250 |
%> |
2107 |
24 Mar 06 |
nicklas |
251 |
</select> |
2107 |
24 Mar 06 |
nicklas |
252 |
</td> |
6314 |
02 Sep 13 |
nicklas |
253 |
<td><base:button id="btnRemoveExpression" title="Remove" /></td> |
6144 |
21 Sep 12 |
nicklas |
254 |
<td></td> |
2107 |
24 Mar 06 |
nicklas |
255 |
</tr> |
2107 |
24 Mar 06 |
nicklas |
256 |
<tr> |
2107 |
24 Mar 06 |
nicklas |
257 |
<td> |
6314 |
02 Sep 13 |
nicklas |
258 |
<input type="text" name="expression" id="expression" class="text" style="width: 26em;" |
6314 |
02 Sep 13 |
nicklas |
259 |
maxlength="<%=Formula.MAX_FORMULA_LENGTH%>"> |
2107 |
24 Mar 06 |
nicklas |
260 |
</td> |
2107 |
24 Mar 06 |
nicklas |
261 |
<td> |
6314 |
02 Sep 13 |
nicklas |
262 |
<base:button id="btnAddExpression" title="Add" /> |
2107 |
24 Mar 06 |
nicklas |
263 |
</td> |
2119 |
28 Mar 06 |
nicklas |
264 |
<td> |
6314 |
02 Sep 13 |
nicklas |
265 |
<base:button |
6314 |
02 Sep 13 |
nicklas |
266 |
id="btnExpressionBuilder" |
5946 |
03 Feb 12 |
nicklas |
267 |
image="expression_builder.png" |
2222 |
09 May 06 |
nicklas |
268 |
title="Expression builder…" /> |
2119 |
28 Mar 06 |
nicklas |
269 |
</td> |
2107 |
24 Mar 06 |
nicklas |
270 |
</table> |
2107 |
24 Mar 06 |
nicklas |
271 |
</td> |
5916 |
19 Dec 11 |
nicklas |
272 |
<td></td> |
2107 |
24 Mar 06 |
nicklas |
273 |
</tr> |
3558 |
16 Jul 07 |
nicklas |
274 |
<tr> |
5916 |
19 Dec 11 |
nicklas |
275 |
<th>Value type</th> |
5208 |
08 Jan 10 |
nicklas |
276 |
<td> |
5916 |
19 Dec 11 |
nicklas |
277 |
<select name="valueType" style="width: 15em;"> |
5208 |
08 Jan 10 |
nicklas |
278 |
<option value="">- unknown - |
5208 |
08 Jan 10 |
nicklas |
279 |
<% |
5208 |
08 Jan 10 |
nicklas |
280 |
for (Type type : Type.values()) |
5208 |
08 Jan 10 |
nicklas |
281 |
{ |
5208 |
08 Jan 10 |
nicklas |
282 |
String selected = type == currentValueType ? "selected" : ""; |
5208 |
08 Jan 10 |
nicklas |
283 |
%> |
5208 |
08 Jan 10 |
nicklas |
284 |
<option value="<%=type.name()%>" <%=selected%>><%=HTML.encodeTags(type.toString())%> |
5208 |
08 Jan 10 |
nicklas |
285 |
<% |
5208 |
08 Jan 10 |
nicklas |
286 |
} |
5208 |
08 Jan 10 |
nicklas |
287 |
%> |
5208 |
08 Jan 10 |
nicklas |
288 |
</select> |
5208 |
08 Jan 10 |
nicklas |
289 |
</td> |
5916 |
19 Dec 11 |
nicklas |
290 |
<td></td> |
5208 |
08 Jan 10 |
nicklas |
291 |
</tr> |
5208 |
08 Jan 10 |
nicklas |
292 |
<tr> |
5916 |
19 Dec 11 |
nicklas |
293 |
<th>Avg. method</th> |
3558 |
16 Jul 07 |
nicklas |
294 |
<td> |
5916 |
19 Dec 11 |
nicklas |
295 |
<select name="averageMethod" class="required" style="width: 15em;"> |
3558 |
16 Jul 07 |
nicklas |
296 |
<% |
3558 |
16 Jul 07 |
nicklas |
297 |
for (Formula.AverageMethod method : Formula.AverageMethod.values()) |
3558 |
16 Jul 07 |
nicklas |
298 |
{ |
3558 |
16 Jul 07 |
nicklas |
299 |
String selected = method == currentAverageMethod ? "selected" : ""; |
3558 |
16 Jul 07 |
nicklas |
300 |
%> |
3558 |
16 Jul 07 |
nicklas |
301 |
<option value="<%=method.name()%>" <%=selected%>><%=HTML.encodeTags(method.toString())%> |
3558 |
16 Jul 07 |
nicklas |
302 |
<% |
3558 |
16 Jul 07 |
nicklas |
303 |
} |
3558 |
16 Jul 07 |
nicklas |
304 |
%> |
3558 |
16 Jul 07 |
nicklas |
305 |
</select> |
3558 |
16 Jul 07 |
nicklas |
306 |
</td> |
5916 |
19 Dec 11 |
nicklas |
307 |
<td></td> |
3558 |
16 Jul 07 |
nicklas |
308 |
</tr> |
2733 |
16 Oct 06 |
nicklas |
309 |
<tr> |
5916 |
19 Dec 11 |
nicklas |
310 |
<th>Intensity<br>transformation</th> |
5916 |
19 Dec 11 |
nicklas |
311 |
<td> |
5916 |
19 Dec 11 |
nicklas |
312 |
<b>Source</b> |
5916 |
19 Dec 11 |
nicklas |
313 |
<select name="sourceIntensityTransform" style="width: 15em;"> |
4918 |
04 May 09 |
nicklas |
314 |
<option value="">- any - |
4918 |
04 May 09 |
nicklas |
315 |
<% |
4918 |
04 May 09 |
nicklas |
316 |
for (IntensityTransform t : IntensityTransform.values()) |
4918 |
04 May 09 |
nicklas |
317 |
{ |
4918 |
04 May 09 |
nicklas |
318 |
String selected = t == currentSourceIntensityTransform ? "selected" : ""; |
4918 |
04 May 09 |
nicklas |
319 |
%> |
4918 |
04 May 09 |
nicklas |
320 |
<option value="<%=t.name()%>" <%=selected%>><%=HTML.encodeTags(t.toString())%> |
4918 |
04 May 09 |
nicklas |
321 |
<% |
4918 |
04 May 09 |
nicklas |
322 |
} |
4918 |
04 May 09 |
nicklas |
323 |
%> |
4918 |
04 May 09 |
nicklas |
324 |
</select> |
5916 |
19 Dec 11 |
nicklas |
325 |
<b>Result</b> |
5916 |
19 Dec 11 |
nicklas |
326 |
<select name="resultIntensityTransform" style="width: 15em;"> |
4918 |
04 May 09 |
nicklas |
327 |
<option value="">- any - |
4918 |
04 May 09 |
nicklas |
328 |
<% |
4918 |
04 May 09 |
nicklas |
329 |
for (IntensityTransform t : IntensityTransform.values()) |
4918 |
04 May 09 |
nicklas |
330 |
{ |
4918 |
04 May 09 |
nicklas |
331 |
String selected = t == currentResultIntensityTransform ? "selected" : ""; |
4918 |
04 May 09 |
nicklas |
332 |
%> |
4918 |
04 May 09 |
nicklas |
333 |
<option value="<%=t.name()%>" <%=selected%>><%=HTML.encodeTags(t.toString())%> |
4918 |
04 May 09 |
nicklas |
334 |
<% |
4918 |
04 May 09 |
nicklas |
335 |
} |
4918 |
04 May 09 |
nicklas |
336 |
%> |
4918 |
04 May 09 |
nicklas |
337 |
</select> |
4918 |
04 May 09 |
nicklas |
338 |
</td> |
5916 |
19 Dec 11 |
nicklas |
339 |
<td></td> |
4918 |
04 May 09 |
nicklas |
340 |
</tr> |
4918 |
04 May 09 |
nicklas |
341 |
<tr> |
5916 |
19 Dec 11 |
nicklas |
342 |
<th></th> |
2733 |
16 Oct 06 |
nicklas |
343 |
<td> |
5812 |
17 Oct 11 |
nicklas |
344 |
<input type="checkbox" name="use_colors" id="useColors" value="1" |
6314 |
02 Sep 13 |
nicklas |
345 |
<%=coloring.isUsingColors() ? "checked" : "" %>> |
5916 |
19 Dec 11 |
nicklas |
346 |
<label for="useColors"><b>Use colors</b></label> |
2733 |
16 Oct 06 |
nicklas |
347 |
|
5916 |
19 Dec 11 |
nicklas |
348 |
<input type="checkbox" name="logarithmic" id="logarithmic" value="1" |
5916 |
19 Dec 11 |
nicklas |
349 |
<%=coloring.isLogarithmic() ? "checked" : "" %>> |
5916 |
19 Dec 11 |
nicklas |
350 |
<label for="logarithmic"><b>Logarithmic</b></label> |
5916 |
19 Dec 11 |
nicklas |
351 |
</td> |
5916 |
19 Dec 11 |
nicklas |
352 |
<td></td> |
5916 |
19 Dec 11 |
nicklas |
353 |
</tr> |
5916 |
19 Dec 11 |
nicklas |
354 |
<tr> |
5916 |
19 Dec 11 |
nicklas |
355 |
<th class="subprompt"></th> |
5916 |
19 Dec 11 |
nicklas |
356 |
<td> |
2733 |
16 Oct 06 |
nicklas |
357 |
<b>Min value</b> |
6314 |
02 Sep 13 |
nicklas |
358 |
<input type="text" class="text" name="min_value" id="min_value" style="width: 6em;" |
2733 |
16 Oct 06 |
nicklas |
359 |
value="<%=Values.formatNumber(coloring.getMinValue(), -1)%>" |
6314 |
02 Sep 13 |
nicklas |
360 |
maxlength="6"> |
2733 |
16 Oct 06 |
nicklas |
361 |
<b>Mid value</b> |
6314 |
02 Sep 13 |
nicklas |
362 |
<input type="text" class="text" name="mid_value" id="mid_value" style="width: 6em;" |
2733 |
16 Oct 06 |
nicklas |
363 |
value="<%=Values.formatNumber(coloring.getMidValue(), -1)%>" |
6314 |
02 Sep 13 |
nicklas |
364 |
maxlength="6"> |
2733 |
16 Oct 06 |
nicklas |
365 |
<b>Max value</b> |
6314 |
02 Sep 13 |
nicklas |
366 |
<input type="text" class="text" name="max_value" id="max_value" style="width: 6em;" |
2733 |
16 Oct 06 |
nicklas |
367 |
value="<%=Values.formatNumber(coloring.getMaxValue(), -1)%>" |
6314 |
02 Sep 13 |
nicklas |
368 |
maxlength="6"> |
2733 |
16 Oct 06 |
nicklas |
369 |
</td> |
5916 |
19 Dec 11 |
nicklas |
370 |
<td></td> |
2733 |
16 Oct 06 |
nicklas |
371 |
</tr> |
5916 |
19 Dec 11 |
nicklas |
372 |
<tr class="dynamic"> |
5916 |
19 Dec 11 |
nicklas |
373 |
<th>Description</th> |
5916 |
19 Dec 11 |
nicklas |
374 |
<td> |
6217 |
14 Dec 12 |
nicklas |
375 |
<textarea class="text" rows="4" name="description" id="description" |
2107 |
24 Mar 06 |
nicklas |
376 |
><%=HTML.encodeTags(formula == null ? cc.getPropertyValue("description") : formula.getDescription())%></textarea> |
2107 |
24 Mar 06 |
nicklas |
377 |
</td> |
5916 |
19 Dec 11 |
nicklas |
378 |
<td style="width: 20px;"> |
6215 |
13 Dec 12 |
nicklas |
379 |
<base:zoom textarea="description" title="Description" /> |
5916 |
19 Dec 11 |
nicklas |
380 |
</td> |
2107 |
24 Mar 06 |
nicklas |
381 |
</tr> |
2107 |
24 Mar 06 |
nicklas |
382 |
</table> |
2107 |
24 Mar 06 |
nicklas |
383 |
</t:tab> |
2107 |
24 Mar 06 |
nicklas |
384 |
</t:tabcontrol> |
5916 |
19 Dec 11 |
nicklas |
385 |
</form> |
2107 |
24 Mar 06 |
nicklas |
386 |
|
5916 |
19 Dec 11 |
nicklas |
387 |
<div class="legend"> |
5946 |
03 Feb 12 |
nicklas |
388 |
<base:icon image="required.png" />= required information |
5916 |
19 Dec 11 |
nicklas |
389 |
</div> |
5916 |
19 Dec 11 |
nicklas |
390 |
|
5916 |
19 Dec 11 |
nicklas |
391 |
<base:buttongroup subclass="dialogbuttons"> |
6314 |
02 Sep 13 |
nicklas |
392 |
<base:button id="btnSave" title="Save" /> |
6314 |
02 Sep 13 |
nicklas |
393 |
<base:button id="close" title="Cancel" /> |
5916 |
19 Dec 11 |
nicklas |
394 |
</base:buttongroup> |
2107 |
24 Mar 06 |
nicklas |
395 |
</base:body> |
2107 |
24 Mar 06 |
nicklas |
396 |
</base:page> |
2107 |
24 Mar 06 |
nicklas |
397 |
<% |
2107 |
24 Mar 06 |
nicklas |
398 |
} |
2107 |
24 Mar 06 |
nicklas |
399 |
finally |
2107 |
24 Mar 06 |
nicklas |
400 |
{ |
2107 |
24 Mar 06 |
nicklas |
401 |
if (dc != null) dc.close(); |
2107 |
24 Mar 06 |
nicklas |
402 |
} |
2107 |
24 Mar 06 |
nicklas |
403 |
%> |