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
/** * this method sets the initiated fields (checkboxes) for the find-dialog, which * is opened from the main window. depending on this variable (and the set bits of it) * we can figure out which checkboxes should be initially selected. * // w w w . j ava2 s.c o m * @param nr an integer value, where the single bits indicate whether a checkbox should be * selected or not. */ public void setSearchOptions(int nr) { Element el = settingsFile.getRootElement().getChild(SETTING_SEARCHOPTION); if (null == el) { el = new Element(SETTING_SEARCHOPTION); settingsFile.getRootElement().addContent(el); } el.setText(String.valueOf(nr)); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * this method sets the initiated fields (checkboxes) for the export-dialog, which * is opened from the main window. depending on this variable (and the set bits of it) * we can figure out which checkboxes should be initially selected. * * @param val an integer value, where the single bits indicate whether a checkbox should be * selected or not.//ww w.j a v a 2 s . com */ public void setExportParts(int val) { Element el = settingsFile.getRootElement().getChild(SETTING_EXPORTPARTS); if (null == el) { el = new Element(SETTING_EXPORTPARTS); settingsFile.getRootElement().addContent(el); } el.setText(String.valueOf(val)); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * @param val an integer value indicating which export-format (docx, rtf, txt...) was lastly * selected by the user.//from w ww. ja v a 2 s . c om */ public void setExportFormat(int val) { Element el = settingsFile.getRootElement().getChild(SETTING_EXPORTFORMAT); if (null == el) { el = new Element(SETTING_EXPORTFORMAT); settingsFile.getRootElement().addContent(el); } el.setText(String.valueOf(val)); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * @param val an integer value indicating which export-format (docx, rtf, txt...) was lastly * selected by the user.//from ww w.jav a2s . c om */ public void setDesktopExportFormat(int val) { Element el = settingsFile.getRootElement().getChild(SETTING_DESKTOPEXPORTFORMAT); if (null == el) { el = new Element(SETTING_DESKTOPEXPORTFORMAT); settingsFile.getRootElement().addContent(el); } el.setText(String.valueOf(val)); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * @param val an integer value indicating whether the user wants to export the desktop-data (entries) * with their comments, without comments or if only entries with comments at all should be exported. * <br><br>/* ww w .j a v a 2s.c o m*/ * Use following constants:<br> * - {@code EXP_COMMENT_YES}<br> * - {@code EXP_COMMENT_NO}<br> * - {@code EXP_COMMENT_ONLY}<br> */ public void setDesktopCommentExport(int val) { Element el = settingsFile.getRootElement().getChild(SETTING_DESKTOPCOMMENTEXPORT); if (null == el) { el = new Element(SETTING_DESKTOPCOMMENTEXPORT); settingsFile.getRootElement().addContent(el); } el.setText(String.valueOf(val)); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * this method sets the initiated fields (checkboxes) for the replace-dialog, which * is opened from the main window. depending on this variable (and the set bits of it) * we can figure out which checkboxes should be initially selected. * * @param nr an integer value, where the single bits indicate whether a checkbox should be * selected or not./*from ww w .ja va 2 s .co m*/ */ public void setReplaceOptions(int nr) { Element el = settingsFile.getRootElement().getChild(SETTING_REPLACEOPTION); if (null == el) { el = new Element(SETTING_REPLACEOPTION); settingsFile.getRootElement().addContent(el); } el.setText(String.valueOf(nr)); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * This method sets the last used search term which was entered in the main window's * find dialog./*from ww w. jav a2 s. c o m*/ * * @param searchterm the last used search term for the find dialog */ public void setSearchWhat(String searchterm) { Element el = settingsFile.getRootElement().getChild(SETTING_SEARCHWHAT); if (null == el) { el = new Element(SETTING_SEARCHWHAT); settingsFile.getRootElement().addContent(el); } el.setText(searchterm); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * This method sets the last used replace term which was entered in the main window's * replace dialog.//from w w w . j a v a 2s . c o m * * @param replaceterm the last used replace term for the replace dialog */ public void setReplaceWhat(String replaceterm) { Element el = settingsFile.getRootElement().getChild(SETTING_REPLACEWHAT); if (null == el) { el = new Element(SETTING_REPLACEWHAT); settingsFile.getRootElement().addContent(el); } el.setText(replaceterm); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Sets the logical combination for filtering the link-list when the user * selectes a keyword in the jListKeywords. See method "filterLinks()" in "ZettelkastenView.java" * for more details//from w ww .j a v a 2 s . co m * @param path */ public void setLogKeywordlist(String path) { Element el = settingsFile.getRootElement().getChild(SETTING_LOGKEYWORDLIST); if (null == el) { el = new Element(SETTING_LOGKEYWORDLIST); settingsFile.getRootElement().addContent(el); } el.setText(path); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Saves the look'n'feel setting so we know which look'n'feel to be set * when the program is started./*w ww . jav a 2s . c o m*/ * @param laf (the look'n'feel's classname) */ public void setLookAndFeel(String laf) { Element el = settingsFile.getRootElement().getChild(SETTING_LAF); if (null == el) { el = new Element(SETTING_LAF); settingsFile.getRootElement().addContent(el); } el.setText(laf); }