Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
63d894b0
Commit
63d894b0
authored
14 years ago
by
tpylak
Browse files
Options
Downloads
Patches
Plain Diff
LMS-1838 heatmap interfaces
SVN: 18687
parent
9ddfa559
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/HeatmapUtil.java
+37
-4
37 additions, 4 deletions
...ent/web/client/application/detailviewers/HeatmapUtil.java
with
37 additions
and
4 deletions
screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/HeatmapUtil.java
+
37
−
4
View file @
63d894b0
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
package
ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers
;
package
ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -30,7 +32,17 @@ public class HeatmapUtil
...
@@ -30,7 +32,17 @@ public class HeatmapUtil
static
class
Color
static
class
Color
{
{
String
hexColor
;
private
final
String
hexColor
;
public
Color
(
String
hexColor
)
{
this
.
hexColor
=
hexColor
;
}
public
String
getHexColor
()
{
return
hexColor
;
}
}
}
static
class
HeatmapScaleRange
static
class
HeatmapScaleRange
...
@@ -40,9 +52,6 @@ public class HeatmapUtil
...
@@ -40,9 +52,6 @@ public class HeatmapUtil
Color
color
;
Color
color
;
}
}
// 0x67001F; 0xB2182B; 0xD6604D; 0xF4A582; 0xFDDBC7; 0xF7F7F7; 0xD1E5F0; 0x92C5DE; 0x4393C3;
// 0x2166AC; 0x053061;
// ---
// ---
static
interface
IHeatmapRenderer
<
T
>
static
interface
IHeatmapRenderer
<
T
>
...
@@ -74,12 +83,36 @@ public class HeatmapUtil
...
@@ -74,12 +83,36 @@ public class HeatmapUtil
}
}
@SuppressWarnings
(
"unused"
)
static
class
StringHeatmapRenderer
implements
IHeatmapRenderer
<
String
>
static
class
StringHeatmapRenderer
implements
IHeatmapRenderer
<
String
>
{
{
private
static
final
List
<
String
>
DEFAULT_COLORS
=
Arrays
.
asList
(
"#67001F"
,
"#B2182B"
,
"#D6604D"
,
"#F4A582"
,
"#FDDBC7"
,
"#F7F7F7"
,
"#D1E5F0"
,
"#92C5DE"
,
"#4393C3"
,
"#2166AC"
,
"#053061"
);
private
final
Set
<
String
>
values
;
private
final
List
<
Color
>
scaleColors
;
public
StringHeatmapRenderer
(
Set
<
String
>
values
)
public
StringHeatmapRenderer
(
Set
<
String
>
values
)
{
{
this
(
values
,
asColors
(
DEFAULT_COLORS
));
}
private
static
List
<
Color
>
asColors
(
List
<
String
>
defaultColors
)
{
List
<
Color
>
colors
=
new
ArrayList
<
Color
>();
for
(
String
color
:
DEFAULT_COLORS
)
{
colors
.
add
(
new
Color
(
color
));
}
return
colors
;
}
public
StringHeatmapRenderer
(
Set
<
String
>
values
,
List
<
Color
>
scaleColors
)
{
this
.
values
=
values
;
this
.
scaleColors
=
scaleColors
;
}
}
public
Color
getColor
(
String
value
)
public
Color
getColor
(
String
value
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment