Exemple #1
0
 private Bounds generateReactionConditions(IReaction chemObj, Color fg, double scale) {
   String title = chemObj.getProperty(CDKConstants.REACTION_CONDITIONS);
   if (title == null || title.isEmpty()) return new Bounds();
   return new Bounds(
       MarkedElement.markup(
           StandardGenerator.embedText(font, title, fg, 1 / scale), "conditions"));
 }
Exemple #2
0
 /**
  * Generate a bound element that is the title of the provided molecule. If title is not specified
  * an empty bounds is returned.
  *
  * @param chemObj molecule or reaction
  * @return bound element
  */
 private Bounds generateTitle(IChemObject chemObj, double scale) {
   String title = chemObj.getProperty(CDKConstants.TITLE);
   if (title == null || title.isEmpty()) return new Bounds();
   scale = 1 / scale * getParameterValue(RendererModel.TitleFontScale.class);
   return new Bounds(
       MarkedElement.markup(
           StandardGenerator.embedText(
               font, title, getParameterValue(RendererModel.TitleColor.class), scale),
           "title"));
 }
Exemple #3
0
 private Bounds generatePlusSymbol(double scale, Color fgcol) {
   return new Bounds(StandardGenerator.embedText(font, "+", fgcol, 1 / scale));
 }