List of usage examples for org.jdom2 Element setText
public Element setText(final String text)
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Changes settings for the header-2-font (the font used for the main-entry's 2nd heading-tags). * @param value (the new value for the font-characteristic) * @param what (indicates, which font-characteristic we want to have. use following constants:<br> * - FONTNAME<br>/*w ww .j av a 2s . co m*/ * - FONTSIZE<br> * - FONTCOLOR<br> * - FONTSTYLE<br> * - FONTWEIGHT<br> */ public void setQuoteFont(String value, int what) { Element el = settingsFile.getRootElement().getChild(SETTING_QUOTEFONT); if (null == el) { el = new Element(SETTING_QUOTEFONT); settingsFile.getRootElement().addContent(el); } switch (what) { case FONTNAME: el.setText(value); break; case FONTSIZE: el.setAttribute("size", value); break; case FONTCOLOR: el.setAttribute("color", value); break; } }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Changes settings for the header-2-font (the font used for the main-entry's 2nd heading-tags). * @param value (the new value for the font-characteristic) * @param what (indicates, which font-characteristic we want to have. use following constants:<br> * - FONTNAME<br>//ww w .j a va 2s .c o m * - FONTSIZE<br> * - FONTCOLOR<br> * - FONTSTYLE<br> * - FONTWEIGHT<br> */ public void setEntryHeadeFont(String value, int what) { Element el = settingsFile.getRootElement().getChild(SETTING_ENTRYHEADERFONT); if (null == el) { el = new Element(SETTING_ENTRYHEADERFONT); settingsFile.getRootElement().addContent(el); } switch (what) { case FONTNAME: el.setText(value); break; case FONTSIZE: el.setAttribute("size", value); break; case FONTCOLOR: el.setAttribute("color", value); break; } }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
public void setManlinkColor(String col) { Element el = settingsFile.getRootElement().getChild(SETTING_MANLINKCOLOR); if (null == el) { el = new Element(SETTING_MANLINKCOLOR); settingsFile.getRootElement().addContent(el); }//from w w w . j a va 2s . c om el.setText(col); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
public void setFootnoteLinkColor(String col) { Element el = settingsFile.getRootElement().getChild(SETTING_FNLINKCOLOR); if (null == el) { el = new Element(SETTING_FNLINKCOLOR); settingsFile.getRootElement().addContent(el); }/*from w w w .ja va 2 s .c om*/ el.setText(col); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
public void setLinkColor(String col) { Element el = settingsFile.getRootElement().getChild(SETTING_LINKCOLOR); if (null == el) { el = new Element(SETTING_LINKCOLOR); settingsFile.getRootElement().addContent(el); }//from w w w . j av a2 s. c om el.setText(col); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
public void setEntryHeadingBackgroundColor(String col) { Element el = settingsFile.getRootElement().getChild(SETTING_ENTRYHEADERBACKGROUNDCOLOR); if (null == el) { el = new Element(SETTING_ENTRYHEADERBACKGROUNDCOLOR); settingsFile.getRootElement().addContent(el); }/*ww w . j a v a 2s . c om*/ el.setText(col); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
public void setQuoteBackgroundColor(String col) { Element el = settingsFile.getRootElement().getChild(SETTING_QUOTEBACKGROUNDCOLOR); if (null == el) { el = new Element(SETTING_QUOTEBACKGROUNDCOLOR); settingsFile.getRootElement().addContent(el); }/*from w w w . jav a 2s. co m*/ el.setText(col); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
public void setMainBackgroundColor(String col) { Element el = settingsFile.getRootElement().getChild(SETTING_MAINBACKGROUNDCOLOR); if (null == el) { el = new Element(SETTING_MAINBACKGROUNDCOLOR); settingsFile.getRootElement().addContent(el); }/*from w w w . ja va 2 s .c o m*/ el.setText(col); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
public void setContentBackgroundColor(String col) { Element el = settingsFile.getRootElement().getChild(SETTING_CONTENTBACKGROUNDCOLOR); if (null == el) { el = new Element(SETTING_CONTENTBACKGROUNDCOLOR); settingsFile.getRootElement().addContent(el); }/* w ww. j a v a2s . c om*/ el.setText(col); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
public void setShowAtStartup(int value) { Element el = settingsFile.getRootElement().getChild(SETTING_SHOWATSTARTUP); if (null == el) { el = new Element(SETTING_SHOWATSTARTUP); settingsFile.getRootElement().addContent(el); }// w w w .j av a2s . c om el.setText(String.valueOf(value)); }