Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Devrim Gunyel
core
Commits
2a37bea3
Commit
2a37bea3
authored
Oct 25, 2019
by
Piotr Gawron
Browse files
fontSize cannot be null
parent
a6493bf3
Changes
3
Hide whitespace changes
Inline
Side-by-side
converter-graphics/src/main/java/lcsb/mapviewer/converter/graphics/bioEntity/element/compartment/CompartmentConverter.java
View file @
2a37bea3
...
...
@@ -42,10 +42,7 @@ public abstract class CompartmentConverter<T extends Compartment> extends Elemen
* Default alpha level for semi-transparent borders.
*/
protected
static
final
int
HIGH_ALPHA_LEVEL
=
127
;
/**
* Default font size.
*/
private
static
final
int
DEFAULT_FONT_SIZE
=
10
;
/**
* Default class logger.
*/
...
...
@@ -231,10 +228,7 @@ public abstract class CompartmentConverter<T extends Compartment> extends Elemen
compartment
.
getHeight
()
-
(
compartment
.
getNamePoint
().
getY
()
-
compartment
.
getY
()));
}
double
fontSize
=
DEFAULT_FONT_SIZE
*
params
.
getScale
();
if
(
compartment
.
getFontSize
()
!=
null
)
{
fontSize
=
compartment
.
getFontSize
()
*
params
.
getScale
();
}
double
fontSize
=
compartment
.
getFontSize
()
*
params
.
getScale
();
String
fontName
=
Font
.
SANS_SERIF
;
Color
tmpColor
=
graphics
.
getColor
();
try
{
...
...
converter-graphics/src/main/java/lcsb/mapviewer/converter/graphics/bioEntity/element/species/ComplexConverter.java
View file @
2a37bea3
...
...
@@ -147,10 +147,7 @@ public class ComplexConverter extends SpeciesConverter<Complex> {
String
text
=
getText
(
complex
);
try
{
graphics
.
setColor
(
complex
.
getFontColor
());
double
fontSize
=
DEFAULT_SPECIES_FONT_SIZE
;
if
(
complex
.
getFontSize
()
!=
null
)
{
fontSize
=
complex
.
getFontSize
();
}
double
fontSize
=
complex
.
getFontSize
();
int
size
=
(
int
)
FontFinder
.
findMaxFontSize
(
params
.
getScale
()
*
fontSize
,
Font
.
SANS_SERIF
,
graphics
,
complex
.
getBorder
(),
text
);
FontFinder
.
drawText
(
size
,
Font
.
SANS_SERIF
,
graphics
,
complex
.
getBorder
(),
text
);
...
...
converter-graphics/src/main/java/lcsb/mapviewer/converter/graphics/bioEntity/element/species/SpeciesConverter.java
View file @
2a37bea3
...
...
@@ -132,10 +132,7 @@ public abstract class SpeciesConverter<T extends Species> extends ElementConvert
* description
*/
protected
Font
getFont
(
final
Species
species
,
ConverterParams
params
)
{
double
fontSize
=
DEFAULT_SPECIES_FONT_SIZE
;
if
(
species
.
getFontSize
()
!=
null
)
{
fontSize
=
species
.
getFontSize
();
}
double
fontSize
=
species
.
getFontSize
();
return
new
Font
(
Font
.
SANS_SERIF
,
0
,
(
int
)
(
fontSize
*
params
.
getScale
()));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment