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
/** * Sets the setting for the highlighting of search results. when activated, the search terms * in the search results window (CSearchResults) are highlighted. * @param val {@code true} if search terms should be highlighted *//* w ww . j a v a 2 s. c o m*/ public void setHighlightSearchResults(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_HIGHLIGHTSEARCHRESULTS); if (null == el) { el = new Element(SETTING_HIGHLIGHTSEARCHRESULTS); settingsFile.getRootElement().addContent(el); } el.setText((val) ? "1" : "0"); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Sets the setting for the highlighting of keywords in the main frame's entry-content. * when activated, the keywords of an entry that appear in the entry-content are highlighted. * @param val {@code true} if keywords should be highlighted *///from w w w. java 2 s.c o m public void setHighlightKeyword(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_HIGHLIGHTKEYWORDS); if (null == el) { el = new Element(SETTING_HIGHLIGHTKEYWORDS); settingsFile.getRootElement().addContent(el); } el.setText((val) ? "1" : "0"); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Sets the setting for showing an entry from the search results window immediatley. * when activated, a selected entry in the search results window is immediately displayed * in the main window.// ww w . ja v a 2 s . c om * @param val {@code true} if entry should be displayed at once */ public void setShowSearchEntry(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_SHOWSEARCHENTRY); if (null == el) { el = new Element(SETTING_SHOWSEARCHENTRY); settingsFile.getRootElement().addContent(el); } el.setText((val) ? "1" : "0"); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Sets the setting whether the footnotes should be superscripted or not. A superscripted * footnote is displayed smaller, but changes the line-height. * @param val use true, if footnote should be superscripted *//*from ww w . ja v a2 s.c om*/ public void setSupFootnote(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_SUPFOOTNOTE); if (null == el) { el = new Element(SETTING_SUPFOOTNOTE); settingsFile.getRootElement().addContent(el); } el.setText((val) ? "1" : "0"); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Sets the setting whether a click on the footnotes should open the tab with the authorlist * and select the related author or not. * @param val {@code true} if footnote should show the related author in the tabbed pane *//* w w w . ja v a 2 s.co m*/ public void setJumpFootnote(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_JUMPFOOTNOTE); if (null == el) { el = new Element(SETTING_JUMPFOOTNOTE); settingsFile.getRootElement().addContent(el); } el.setText((val) ? "1" : "0"); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Sets the setting whether a search request should search in entries within a certain * date-range.// w w w .j av a 2 s .c om * @param val {@code true} if search should look for entries with a certain date (timestamp) */ public void setSearchTime(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_SEARCHTIME); if (null == el) { el = new Element(SETTING_SEARCHTIME); settingsFile.getRootElement().addContent(el); } el.setText((val) ? "1" : "0"); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Sets the setting which logicalk-combination the user chose for the last search request. * @param val 0 if search was log-and; 1 for log-or and 2 for log-not. *//* w ww.j a v a 2 s . co m*/ public void setSearchLog(int val) { Element el = settingsFile.getRootElement().getChild(SETTING_SEARCHLOG); if (null == el) { el = new Element(SETTING_SEARCHLOG); settingsFile.getRootElement().addContent(el); } el.setText(String.valueOf(val)); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Sets the setting for the thumbnail width of images. This value indicates the maximum * width of images which are displayed in the textfield. larger images are resized to fit * the preferred maximum size and a link to the original image is inserted. * /*from w ww . ja v a2 s . co m*/ * @param val the preferred maximum width of an image */ public void setImageResizeWidth(int val) { Element el = settingsFile.getRootElement().getChild(SETTING_IMGRESIZEWIDTH); if (null == el) { el = new Element(SETTING_IMGRESIZEWIDTH); settingsFile.getRootElement().addContent(el); } el.setText(String.valueOf(val)); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Sets the setting for the thumbnail width of images. This value indicates the maximum * width of images which are displayed in the textfield. larger images are resized to fit * the preferred maximum size and a link to the original image is inserted. * /*from w ww . ja va2 s . c o m*/ * @param val the preferred maximum width of an image */ public void setImageResizeHeight(int val) { Element el = settingsFile.getRootElement().getChild(SETTING_IMGRESIZEHEIGHT); if (null == el) { el = new Element(SETTING_IMGRESIZEHEIGHT); 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 default font-size for tables and lists. The user cannot * choose the font or color, but at least a bigger font-size for better viewing is * possible.// www .ja v a 2 s . c o m * * @param size the value for which the original font-size should be increased */ public void setTableFontSize(int size) { Element el = settingsFile.getRootElement().getChild(SETTING_TABLEFONTSIZE); if (null == el) { el = new Element(SETTING_TABLEFONTSIZE); settingsFile.getRootElement().addContent(el); } el.setText(String.valueOf(size)); }