Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Devrim Gunyel
core
Commits
a05cf8f3
Commit
a05cf8f3
authored
Apr 26, 2019
by
Piotr Gawron
Browse files
font size must be int
parent
6d379f36
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
a05cf8f3
...
...
@@ -60,6 +60,7 @@ minerva (12.3.0~alpha.0) unstable; urgency=low
having the aa change information
* Bug fix: plugin contect element width is adjusted when link to tabs are
wrapped in more than one line (#758)
* Bug fix: export to CellDesigner preserve font size (#803)
minerva (12.2.2) stable; urgency=medium
* Bug fix: downloading overlays didn'
t
work
from
admin
panel
when
project
...
...
converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/LayerXmlParser.java
View file @
a05cf8f3
...
...
@@ -572,7 +572,7 @@ public class LayerXmlParser {
result
.
append
(
" y=\""
+
layer
.
getY
()
+
"\" "
);
result
.
append
(
" w=\""
+
layer
.
getWidth
()
+
"\" "
);
result
.
append
(
" h=\""
+
layer
.
getHeight
()
+
"\"/>"
);
result
.
append
(
"<celldesigner:font size=\""
+
layer
.
getFontSize
()
+
"\"/>"
);
result
.
append
(
"<celldesigner:font size=\""
+
layer
.
getFontSize
()
.
intValue
()
+
"\"/>"
);
result
.
append
(
"</celldesigner:layerSpeciesAlias>\n"
);
return
result
.
toString
();
}
...
...
converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/alias/AbstractAliasXmlParser.java
View file @
a05cf8f3
...
...
@@ -21,67 +21,71 @@ import lcsb.mapviewer.model.map.species.Element;
*/
public
abstract
class
AbstractAliasXmlParser
<
T
extends
Element
>
{
/**
* Default class logger.
*/
@SuppressWarnings
(
"unused"
)
private
Logger
logger
=
Logger
.
getLogger
(
AbstractAliasXmlParser
.
class
.
getName
());
/**
* Default class logger.
*/
@SuppressWarnings
(
"unused"
)
private
Logger
logger
=
Logger
.
getLogger
(
AbstractAliasXmlParser
.
class
.
getName
());
/**
* Set of common functions used in parsing cell designer xml.
*/
private
CommonXmlParser
commonParser
=
new
CommonXmlParser
();
/**
* Set of common functions used in parsing cell designer xml.
*/
private
CommonXmlParser
commonParser
=
new
CommonXmlParser
();
/**
* Parse object from the xml node.
*
* @param node
* xml node to parse
*
* @return parsed object
* @throws InvalidXmlSchemaException
* thrown when xmlString is invalid
*/
abstract
T
parseXmlAlias
(
Node
node
)
throws
InvalidXmlSchemaException
;
/**
* Parse object from the xml node.
*
* @param node
* xml node to parse
*
* @return parsed object
* @throws InvalidXmlSchemaException
* thrown when xmlString is invalid
*/
abstract
T
parseXmlAlias
(
Node
node
)
throws
InvalidXmlSchemaException
;
/**
* Parse object from the xml string.
*
* @param xmlString
* xml string
* @return parsed object
* @throws InvalidXmlSchemaException
* thrown when xmlString is invalid
*/
public
T
parseXmlAlias
(
String
xmlString
)
throws
InvalidXmlSchemaException
{
Document
doc
=
XmlParser
.
getXmlDocumentFromString
(
xmlString
);
NodeList
root
=
doc
.
getChildNodes
();
return
parseXmlAlias
(
root
.
item
(
0
));
/**
* Parse object from the xml string.
*
* @param xmlString
* xml string
* @return parsed object
* @throws InvalidXmlSchemaException
* thrown when xmlString is invalid
*/
public
T
parseXmlAlias
(
String
xmlString
)
throws
InvalidXmlSchemaException
{
Document
doc
=
XmlParser
.
getXmlDocumentFromString
(
xmlString
);
NodeList
root
=
doc
.
getChildNodes
();
return
parseXmlAlias
(
root
.
item
(
0
));
}
}
/**
* Method that transform object into CellDesigner xml.
*
* @param alias
* object to be transformed
* @return CellDesigner xml representation of the alias
*/
abstract
String
toXml
(
T
alias
);
/**
* Method that transform object into CellDesigner xml.
*
* @param alias
* object to be transformed
* @return CellDesigner xml representation of the alias
*/
abstract
String
toXml
(
T
alias
);
/**
* @return the commonParser
*/
CommonXmlParser
getCommonParser
()
{
return
commonParser
;
}
/**
* @return the commonParser
*/
CommonXmlParser
getCommonParser
()
{
return
commonParser
;
}
/**
* @param commonParser
* the commonParser to set
*/
void
setCommonParser
(
CommonXmlParser
commonParser
)
{
this
.
commonParser
=
commonParser
;
}
/**
* @param commonParser
* the commonParser to set
*/
void
setCommonParser
(
CommonXmlParser
commonParser
)
{
this
.
commonParser
=
commonParser
;
}
protected
String
createFontTag
(
T
alias
)
{
return
"<celldesigner:font size=\""
+
alias
.
getFontSize
().
intValue
()
+
"\"/>"
;
}
}
converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/alias/ComplexAliasXmlParser.java
View file @
a05cf8f3
This diff is collapsed.
Click to expand it.
converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/alias/SpeciesAliasXmlParser.java
View file @
a05cf8f3
...
...
@@ -239,7 +239,7 @@ public class SpeciesAliasXmlParser extends AbstractAliasXmlParser<Species> {
sb
.
append
(
"h=\""
+
species
.
getHeight
()
+
"\" "
);
sb
.
append
(
"/>\n"
);
sb
.
append
(
"<celldesigner:font size=\""
+
species
.
getFontSize
()
+
"\"/>\n"
);
sb
.
append
(
createFontTag
(
species
)
);
// TODO to be improved
sb
.
append
(
"<celldesigner:view state=\"usual\"/>\n"
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment