Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hpc-workflow-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FIJI
hpc-workflow-manager
Commits
028a86bf
Commit
028a86bf
authored
6 years ago
by
Jan Kožusznik
Browse files
Options
Downloads
Patches
Plain Diff
fix: iss1134
parent
6b39bfd7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/ui/SPIMPipelineProgressViewController.java
+29
-7
29 additions, 7 deletions
...spim_benchmark/ui/SPIMPipelineProgressViewController.java
with
29 additions
and
7 deletions
haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/ui/SPIMPipelineProgressViewController.java
+
29
−
7
View file @
028a86bf
...
...
@@ -44,14 +44,17 @@ import javafx.scene.paint.Color;
public
class
SPIMPipelineProgressViewController
extends
BorderPane
implements
CloseableControl
,
InitiableControl
{
public
final
static
Logger
log
=
LoggerFactory
.
getLogger
(
cz
.
it4i
.
fiji
.
haas_spim_benchmark
.
ui
.
SPIMPipelineProgressViewController
.
class
);
private
static
final
String
EMPTY_VALUE
=
"
\u2007\u2007\u2007
"
;
private
static
final
String
EMPTY_VALUE
=
""
;
private
static
final
int
PREFERRED_WIDTH
=
900
;
private
static
final
Map
<
JobState
,
Color
>
taskExecutionState2Color
=
new
HashMap
<>();
private
static
final
double
TIMEPOINT_TABLE_COLUMN_WIDTH_RATIO
=
6
;
static
{
taskExecutionState2Color
.
put
(
JobState
.
Running
,
Color
.
rgb
(
0xF2
,
0xD5
,
0x39
));
taskExecutionState2Color
.
put
(
JobState
.
Finished
,
Color
.
rgb
(
0x41
,
0xB2
,
0x80
));
...
...
@@ -180,12 +183,18 @@ public class SPIMPipelineProgressViewController extends BorderPane implements Cl
JavaFXRoutines
.
setCellValueFactory
(
this
.
tasks
,
i
++,
(
Function
<
Task
,
String
>)
v
->
Constants
.
BENCHMARK_TASK_NAME_MAP
.
get
(
v
.
getDescription
()));
double
tableColumnWidth
=
computeTableColumnWidth
(
computations
);
log
.
info
(
"table column width "
+
tableColumnWidth
);
for
(
TaskComputation
tc
:
computations
)
{
this
.
tasks
.
getColumns
().
add
(
new
TableColumn
<>(
tc
.
getTimepoint
()
+
""
));
TableColumn
<
ObservableValue
<
Task
>,
String
>
tableCol
;
this
.
tasks
.
getColumns
().
add
(
tableCol
=
new
TableColumn
<>(
columnHeader
(
tc
)));
int
index
=
i
++;
tableCol
.
setPrefWidth
(
tableColumnWidth
);
constructCellFactory
(
index
);
}
fixNotVisibleColumn
();
this
.
tasks
.
getItems
().
addAll
(
taskList
);
});
timer
.
schedule
(
new
TimerTask
()
{
...
...
@@ -197,6 +206,23 @@ public class SPIMPipelineProgressViewController extends BorderPane implements Cl
},
Constants
.
HAAS_UPDATE_TIMEOUT
,
Constants
.
HAAS_UPDATE_TIMEOUT
);
}
private
long
computeTableColumnWidth
(
List
<
TaskComputation
>
computations
)
{
return
Math
.
round
(
this
.
tasks
.
getColumns
().
get
(
0
)
.
getWidth
()
/
TIMEPOINT_TABLE_COLUMN_WIDTH_RATIO
*
(
1
+
Math
.
max
(
0
,
computeMaxColumnHeaderTextLenght
(
computations
)
-
1
)
/
2
));
}
private
int
computeMaxColumnHeaderTextLenght
(
List
<
TaskComputation
>
computations
)
{
return
columnHeader
(
computations
.
get
(
computations
.
size
()
-
1
)).
length
();
}
private
String
columnHeader
(
TaskComputation
taskComputation
)
{
return
taskComputation
.
getTimepoint
()
+
""
;
}
@SuppressWarnings
(
"unchecked"
)
private
void
constructCellFactory
(
int
index
)
{
JavaFXRoutines
.
setCellValueFactory
(
this
.
tasks
,
index
,
(
Function
<
Task
,
TaskComputation
>)
v
->
{
...
...
@@ -221,8 +247,4 @@ public class SPIMPipelineProgressViewController extends BorderPane implements Cl
private
void
updateTable
()
{
registry
.
update
();
}
private
void
fixNotVisibleColumn
()
{
// this.tasks.getColumns().add(new TableColumn<>(" "));
}
}
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