List of usage examples for org.jdom2 Element getText
public String getText()
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Retrieves settings for the mainfont (the font used for the main-entry-textfield). * @param what (indicates, which font-characteristic we want to have. use following constants:<br> * - FONTNAME<br>//from w ww. j a v a 2 s . co m * - FONTSIZE<br> * - FONTCOLOR<br> * - FONTSTYLE<br> * - FONTWEIGHT<br> * @return the related font-information as string. */ public String getAuthorFont(int what) { Element el = settingsFile.getRootElement().getChild(SETTING_AUTHORFONT); String retval = ""; if (el != null) { switch (what) { case FONTNAME: retval = el.getText(); break; case FONTSIZE: retval = el.getAttributeValue("size"); break; case FONTCOLOR: retval = el.getAttributeValue("color"); break; case FONTSTYLE: retval = el.getAttributeValue("style"); break; case FONTWEIGHT: retval = el.getAttributeValue("weight"); break; } } return retval; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
public String getCodeFont(int what) { Element el = settingsFile.getRootElement().getChild(SETTING_CODEFONT); String retval = ""; if (el != null) { switch (what) { case FONTNAME: retval = el.getText(); break; case FONTSIZE: retval = el.getAttributeValue("size"); break; case FONTCOLOR: retval = el.getAttributeValue("color"); break; case FONTSTYLE: retval = el.getAttributeValue("style"); break; case FONTWEIGHT: retval = el.getAttributeValue("weight"); break; }/*from w ww . j a va 2 s . c o m*/ } return retval; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Retrieves settings for the mainfont (the font used for the main-entry-textfield). * @param what (indicates, which font-characteristic we want to have. use following constants:<br> * - FONTNAME<br>/* w w w. j ava 2 s. c o m*/ * - FONTSIZE<br> * - FONTCOLOR<br> * - FONTSTYLE<br> * - FONTWEIGHT<br> * @return the related font-information as string. */ public String getRemarksFont(int what) { Element el = settingsFile.getRootElement().getChild(SETTING_REMARKSFONT); String retval = ""; if (el != null) { switch (what) { case FONTNAME: retval = el.getText(); break; case FONTSIZE: retval = el.getAttributeValue("size"); break; case FONTCOLOR: retval = el.getAttributeValue("color"); break; case FONTSTYLE: retval = el.getAttributeValue("style"); break; case FONTWEIGHT: retval = el.getAttributeValue("weight"); break; } } return retval; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Retrieves settings for the desktop-window's main headers. * @param what (indicates, which font-characteristic we want to have. use following constants:<br> * - FONTNAME<br>//from w ww . j a v a2s. c om * - FONTSIZE<br> * - FONTCOLOR<br> * - FONTSTYLE<br> * - FONTWEIGHT<br> * @return the related font-information as string. */ public String getDesktopHeaderfont(int what) { Element el = settingsFile.getRootElement().getChild(SETTING_DESKTOPHEADERFONT); String retval = ""; if (el != null) { switch (what) { case FONTNAME: retval = el.getText(); break; case FONTSIZE: retval = el.getAttributeValue("size"); break; case FONTCOLOR: retval = el.getAttributeValue("color"); break; case FONTSTYLE: retval = el.getAttributeValue("style"); break; case FONTWEIGHT: retval = el.getAttributeValue("weight"); break; } } return retval; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Retrieves settings for the desktop-window's item headers (additional display items). * @param what (indicates, which font-characteristic we want to have. use following constants:<br> * - FONTNAME<br>/*from w ww . j a v a2 s. com*/ * - FONTSIZE<br> * - FONTCOLOR<br> * - FONTSTYLE<br> * - FONTWEIGHT<br> * @return the related font-information as string. */ public String getDesktopItemHeaderfont(int what) { Element el = settingsFile.getRootElement().getChild(SETTING_DESKTOPITEMHEADERFONT); String retval = ""; if (el != null) { switch (what) { case FONTNAME: retval = el.getText(); break; case FONTSIZE: retval = el.getAttributeValue("size"); break; case FONTCOLOR: retval = el.getAttributeValue("color"); break; case FONTSTYLE: retval = el.getAttributeValue("style"); break; case FONTWEIGHT: retval = el.getAttributeValue("weight"); break; } } return retval; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Retrieves settings for the desktop-window's items (additional display items). * @param what (indicates, which font-characteristic we want to have. use following constants:<br> * - FONTNAME<br>/*w ww .j a va 2 s . com*/ * - FONTSIZE<br> * - FONTCOLOR<br> * - FONTSTYLE<br> * - FONTWEIGHT<br> * @return the related font-information as string. */ public String getDesktopItemfont(int what) { Element el = settingsFile.getRootElement().getChild(SETTING_DESKTOPITEMFONT); String retval = ""; if (el != null) { switch (what) { case FONTNAME: retval = el.getText(); break; case FONTSIZE: retval = el.getAttributeValue("size"); break; case FONTCOLOR: retval = el.getAttributeValue("color"); break; case FONTSTYLE: retval = el.getAttributeValue("style"); break; case FONTWEIGHT: retval = el.getAttributeValue("weight"); break; } } return retval; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Retrieves settings for the style of highlighting the search terms in the search result window. * @param what indicates, which style-characteristic we want to have. use following constants:<br> * - FONTSIZE<br>//from w ww. ja v a 2s.co m * - FONTCOLOR<br> * - FONTSTYLE<br> * - FONTWEIGHT<br> * @param style * @return the related style-information as string. */ public String getHighlightSearchStyle(int what, int style) { String hs_style; switch (style) { case HtmlUbbUtil.HIGHLIGHT_STYLE_SEARCHRESULTS: hs_style = SETTING_HIGHLIGHTSEARCHSTYLE; break; case HtmlUbbUtil.HIGHLIGHT_STYLE_KEYWORDS: hs_style = SETTING_HIGHLIGHTKEYWORDSTYLE; break; case HtmlUbbUtil.HIGHLIGHT_STYLE_LIVESEARCH: hs_style = SETTING_HIGHLIGHTLIVESEARCHSTYLE; break; default: hs_style = SETTING_HIGHLIGHTSEARCHSTYLE; break; } Element el = settingsFile.getRootElement().getChild(hs_style); String retval = ""; if (el != null) { switch (what) { case FONTNAME: retval = el.getText(); break; case FONTSIZE: retval = el.getAttributeValue("size"); break; case FONTCOLOR: retval = el.getAttributeValue("color"); break; case FONTSTYLE: retval = el.getAttributeValue("style"); break; case FONTWEIGHT: retval = el.getAttributeValue("weight"); break; } } return retval; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Retrieves settings for the desktop-window's comment font. * @param what (indicates, which font-characteristic we want to have. use following constants:<br> * - FONTNAME<br>//from w ww. jav a 2s . com * - FONTSIZE<br> * - FONTCOLOR<br> * - FONTSTYLE<br> * - FONTWEIGHT<br> * @return the related font-information as string. */ public String getDesktopCommentfont(int what) { Element el = settingsFile.getRootElement().getChild(SETTING_DESKTOPCOMMENTFONT); String retval = ""; if (el != null) { switch (what) { case FONTNAME: retval = el.getText(); break; case FONTSIZE: retval = el.getAttributeValue("size"); break; case FONTCOLOR: retval = el.getAttributeValue("color"); break; case FONTSTYLE: retval = el.getAttributeValue("style"); break; case FONTWEIGHT: retval = el.getAttributeValue("weight"); break; } } return retval; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Retrieves settings for the titlefont (the font used for the main-entry's title). * @param what (indicates, which font-characteristic we want to have. use following constants:<br> * - FONTNAME<br>/*from w ww . j a v a 2 s. c o m*/ * - FONTSIZE<br> * - FONTCOLOR<br> * - FONTSTYLE<br> * - FONTWEIGHT<br> * @return the related font-information as string. */ public String getTitleFont(int what) { Element el = settingsFile.getRootElement().getChild(SETTING_TITLEFONT); String retval = ""; if (el != null) { switch (what) { case FONTNAME: retval = el.getText(); break; case FONTSIZE: retval = el.getAttributeValue("size"); break; case FONTCOLOR: retval = el.getAttributeValue("color"); break; case FONTSTYLE: retval = el.getAttributeValue("style"); break; case FONTWEIGHT: retval = el.getAttributeValue("weight"); break; } } return retval; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Retrieves settings for the titlefont (the font used for the main-entry's title). * @param what (indicates, which font-characteristic we want to have. use following constants:<br> * - FONTNAME<br>// w w w. j a va 2s . c om * - FONTSIZE<br> * - FONTCOLOR<br> * - FONTSTYLE<br> * - FONTWEIGHT<br> * @return the related font-information as string. */ public String getAppendixHeaderFont(int what) { Element el = settingsFile.getRootElement().getChild(SETTING_APPENDIXHEADERFONT); String retval = ""; if (el != null) { switch (what) { case FONTNAME: retval = el.getText(); break; case FONTSIZE: retval = el.getAttributeValue("size"); break; case FONTCOLOR: retval = el.getAttributeValue("color"); break; case FONTSTYLE: retval = el.getAttributeValue("style"); break; case FONTWEIGHT: retval = el.getAttributeValue("weight"); break; } } return retval; }