Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
minerva
core
Commits
c2b216e7
Commit
c2b216e7
authored
7 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
drawCompartment method parameters simplified
parent
811912ce
No related branches found
No related tags found
1 merge request
!44
Resolve "semantic zoom"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
converter-graphics/src/main/java/lcsb/mapviewer/converter/graphics/AbstractImageGenerator.java
+6
-9
6 additions, 9 deletions
.../mapviewer/converter/graphics/AbstractImageGenerator.java
with
6 additions
and
9 deletions
converter-graphics/src/main/java/lcsb/mapviewer/converter/graphics/AbstractImageGenerator.java
+
6
−
9
View file @
c2b216e7
...
...
@@ -689,7 +689,7 @@ public abstract class AbstractImageGenerator {
// draw only compartment that don't have parents (aren't included in any
// compartment/complexes)
if
(
compartment
.
getCompartment
()
==
null
)
{
drawCompartment
(
compartment
,
params
.
isNested
(),
params
.
getVisibleLayoutsForElement
(
compartment
),
params
);
drawCompartment
(
compartment
,
params
.
getVisibleLayoutsForElement
(
compartment
),
params
);
}
}
...
...
@@ -724,8 +724,6 @@ public abstract class AbstractImageGenerator {
*
* @param compartment
* object that we want to draw
* @param nested
* are the compartments drawn in hierarchical view
* @param visibleLayouts
* list of {@link ColorSchema} used for coloring element in layouts
* @param params
...
...
@@ -733,8 +731,7 @@ public abstract class AbstractImageGenerator {
* @throws DrawingException
* thrown when there was a problem with drawing {@link Compartment}
*/
protected
void
drawCompartment
(
final
Compartment
compartment
,
final
boolean
nested
,
List
<
ColorSchema
>
visibleLayouts
,
Params
params
)
throws
DrawingException
{
protected
void
drawCompartment
(
final
Compartment
compartment
,
List
<
ColorSchema
>
visibleLayouts
,
Params
params
)
throws
DrawingException
{
// If 'compartment' has not the big enough visibility level then should not
// be visible.
...
...
@@ -749,7 +746,7 @@ public abstract class AbstractImageGenerator {
*/
boolean
fill
=
true
;
if
(
compartment
.
getTransparencyLevel
()
<=
level
||
!
nested
)
{
if
(
compartment
.
getTransparencyLevel
()
<=
level
||
!
params
.
nested
)
{
fill
=
false
;
}
...
...
@@ -757,13 +754,13 @@ public abstract class AbstractImageGenerator {
BioEntityConverterImpl
converter
=
new
BioEntityConverterImpl
(
compartment
,
colorExtractor
);
ConverterParams
compartmentParams
=
new
ConverterParams
().
textCentered
(
fill
).
level
(
level
).
semanticZoomingOn
(
params
.
semanticZoom
);
if
(
nested
)
{
if
(
params
.
nested
)
{
compartmentParams
.
fill
(
fill
).
scale
(
Math
.
max
(
scale
,
1
));
}
// we draw compartment only when we have hierarchical view or it's
// standard compartment (not the pathway)
if
(
nested
||
!(
compartment
instanceof
PathwayCompartment
))
{
if
(
params
.
nested
||
!(
compartment
instanceof
PathwayCompartment
))
{
try
{
converter
.
draw
(
compartment
,
graphics
,
compartmentParams
,
visibleLayouts
);
}
catch
(
Exception
e
)
{
...
...
@@ -787,7 +784,7 @@ public abstract class AbstractImageGenerator {
if
(
element
instanceof
Species
)
{
drawSpecies
((
Species
)
element
,
params
.
getVisibleLayoutsForElement
(
element
),
params
);
}
else
if
(
element
instanceof
Compartment
)
{
drawCompartment
((
Compartment
)
element
,
nested
,
params
.
getVisibleLayoutsForElement
(
element
),
params
);
drawCompartment
((
Compartment
)
element
,
params
.
getVisibleLayoutsForElement
(
element
),
params
);
}
else
{
// if a child is not a compartment or a species then we have a
// problem
...
...
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