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
3b35f6de
Commit
3b35f6de
authored
14 years ago
by
tpylak
Browse files
Options
Downloads
Patches
Plain Diff
fix scrollbars in plate layout
SVN: 19027
parent
fd531021
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/heatmaps/PlateLayouter.java
+30
-4
30 additions, 4 deletions
...ent/application/detailviewers/heatmaps/PlateLayouter.java
with
30 additions
and
4 deletions
screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/heatmaps/PlateLayouter.java
+
30
−
4
View file @
3b35f6de
...
@@ -86,6 +86,8 @@ public class PlateLayouter
...
@@ -86,6 +86,8 @@ public class PlateLayouter
private
static
final
int
MARGIN_SIZE_PX
=
10
;
private
static
final
int
MARGIN_SIZE_PX
=
10
;
private
static
final
int
WELL_SPACING_PX
=
2
;
// ------- internal fixed state
// ------- internal fixed state
private
final
PlateLayouterModel
model
;
private
final
PlateLayouterModel
model
;
...
@@ -165,7 +167,7 @@ public class PlateLayouter
...
@@ -165,7 +167,7 @@ public class PlateLayouter
SimpleModelComboBox
<
Integer
>
heatmapKindChooser
,
LayoutContainer
legendContainer
)
SimpleModelComboBox
<
Integer
>
heatmapKindChooser
,
LayoutContainer
legendContainer
)
{
{
LayoutContainer
container
=
new
LayoutContainer
();
LayoutContainer
container
=
new
LayoutContainer
();
//
container.setScrollMode(Scroll.AUTO);
container
.
setScrollMode
(
Scroll
.
AUTO
);
container
.
setLayout
(
new
RowLayout
());
container
.
setLayout
(
new
RowLayout
());
container
.
add
(
new
Text
(
container
.
add
(
new
Text
(
"Hold the mouse cursor over a well or click on it to get the details."
),
"Hold the mouse cursor over a well or click on it to get the details."
),
...
@@ -175,6 +177,14 @@ public class PlateLayouter
...
@@ -175,6 +177,14 @@ public class PlateLayouter
LayoutContainer
plateContainer
=
new
LayoutContainer
();
LayoutContainer
plateContainer
=
new
LayoutContainer
();
plateContainer
.
setLayout
(
new
ColumnLayout
());
plateContainer
.
setLayout
(
new
ColumnLayout
());
int
legendWidth
=
200
;
int
topChoosersHeight
=
70
;
// height of things above plate layout in this container
int
plateWidth
=
getPlateMatrixPixelWidth
(
renderedWells
);
int
plateHeight
=
getPlateMatrixPixelHeight
(
renderedWells
);
int
totalWidth
=
plateWidth
+
legendWidth
;
plateContainer
.
setSize
(
totalWidth
,
plateHeight
);
plateContainer
.
add
(
renderPlateLayout
(
renderedWells
));
plateContainer
.
add
(
renderPlateLayout
(
renderedWells
));
// space between the well's matrix and the legend
// space between the well's matrix and the legend
...
@@ -183,20 +193,36 @@ public class PlateLayouter
...
@@ -183,20 +193,36 @@ public class PlateLayouter
.
setPixelSize
(
PlateStyleSetter
.
WELL_BOX_SIZE_PX
,
PlateStyleSetter
.
WELL_BOX_SIZE_PX
);
.
setPixelSize
(
PlateStyleSetter
.
WELL_BOX_SIZE_PX
,
PlateStyleSetter
.
WELL_BOX_SIZE_PX
);
plateContainer
.
add
(
separator
);
plateContainer
.
add
(
separator
);
plateContainer
.
add
(
legendContainer
);
plateContainer
.
add
(
legendContainer
);
container
.
add
(
plateContainer
);
container
.
add
(
plateContainer
);
container
.
setSize
(
totalWidth
,
plateHeight
+
topChoosersHeight
);
return
container
;
return
container
;
}
}
private
static
int
getPlateMatrixPixelHeight
(
Component
[][]
renderedWells
)
{
int
boxes
=
renderedWells
.
length
+
1
;
return
WELL_SPACING_PX
*
(
boxes
+
1
)
+
PlateStyleSetter
.
WELL_BOX_SIZE_PX
*
boxes
;
}
private
static
int
getPlateMatrixPixelWidth
(
Component
[][]
renderedWells
)
{
int
boxes
=
getColumnsNum
(
renderedWells
)
+
1
;
return
WELL_SPACING_PX
*
(
boxes
+
1
)
+
PlateStyleSetter
.
WELL_BOX_SIZE_PX
*
boxes
;
}
private
static
LayoutContainer
renderPlateLayout
(
Component
[][]
renderedWells
)
private
static
LayoutContainer
renderPlateLayout
(
Component
[][]
renderedWells
)
{
{
LayoutContainer
plateMatrix
=
new
LayoutContainer
();
LayoutContainer
plateMatrix
=
new
LayoutContainer
();
int
columnsNum
=
getColumnsNum
(
renderedWells
)
+
1
;
int
columnsNum
=
getColumnsNum
(
renderedWells
)
+
1
;
TableLayout
layout
=
new
TableLayout
(
columnsNum
);
TableLayout
layout
=
new
TableLayout
(
columnsNum
);
layout
.
setCellSpacing
(
2
);
layout
.
setCellSpacing
(
WELL_SPACING_PX
);
plateMatrix
.
setLayout
(
layout
);
plateMatrix
.
setLayout
(
layout
);
plateMatrix
.
setScrollMode
(
Scroll
.
AUTO
);
plateMatrix
.
setAutoWidth
(
true
);
// NOTE: not sure if this is necessary
int
height
=
getPlateMatrixPixelHeight
(
renderedWells
);
plateMatrix
.
setHeight
(
height
);
addPlateWidgets
(
plateMatrix
,
renderedWells
);
addPlateWidgets
(
plateMatrix
,
renderedWells
);
return
plateMatrix
;
return
plateMatrix
;
...
...
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