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 show-grid-variable. If true, the <i>horizontal</i> grids in lists and tables should * be displayed./*from ww w . jav a2 s .c om*/ * * @param show true if the grids should be displayed, false otherweise */ public void setShowGridHorizontal(boolean show) { Element el = settingsFile.getRootElement().getChild(SETTING_SHOWGRID_HORIZONTAL); if (null == el) { el = new Element(SETTING_SHOWGRID_HORIZONTAL); settingsFile.getRootElement().addContent(el); } el.setText((show) ? "1" : "0"); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Sets the show-grid-variable. If true, the <i>vertical</i> grids in lists and tables should * be displayed./* w w w . j a v a2s. c o m*/ * * @param show true if the grids should be displayed, false otherweise */ public void setShowGridVertical(boolean show) { Element el = settingsFile.getRootElement().getChild(SETTING_SHOWGRID_VERTICAL); if (null == el) { el = new Element(SETTING_SHOWGRID_VERTICAL); settingsFile.getRootElement().addContent(el); } el.setText((show) ? "1" : "0"); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Whether or not the searches from the tables, which are not started via the find-dialog, but via * the (context-)menus, should include synonym-search or not. * @param val true if the search should include synonyms, false otherwise *//* w w w. ja v a 2s. c om*/ public void setSearchAlwaysSynonyms(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_SEARCHALWAYSSYNONYMS); if (null == el) { el = new Element(SETTING_SEARCHALWAYSSYNONYMS); settingsFile.getRootElement().addContent(el); } el.setText((val) ? "1" : "0"); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Whether or not keyword-synonyms should be displayed in the jTableKeywords * @param val true keyword-synonyms should be displayed in the jTableKeywords, false otherwise *//*from w w w . j av a 2s .co m*/ public void setShowSynonymsInTable(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_SHOWSYNONYMSINTABLE); if (null == el) { el = new Element(SETTING_SHOWSYNONYMSINTABLE); settingsFile.getRootElement().addContent(el); } el.setText((val) ? "1" : "0"); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * This setting stores the spacing between table cells. * @param hor the horizontal distance between the table cells * @param ver the vertical distance between the table cells *///from w ww . j a v a 2s.c o m public void setCellSpacing(int hor, int ver) { Element el = settingsFile.getRootElement().getChild(SETTING_CELLSPACING); if (null == el) { el = new Element(SETTING_CELLSPACING); settingsFile.getRootElement().addContent(el); } // create string builder StringBuilder dummy = new StringBuilder(""); // add horizontal value dummy.append(String.valueOf(hor)); // add separating comma dummy.append(","); // add vertical value dummy.append(String.valueOf(ver)); // store values el.setText(dummy.toString()); }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Sets the setting for the keyword-quick-input when editing new entries.. * @param val true if the keyword-quickinput should be activated *//*from w w w . j a v a2 s .c o m*/ public void setQuickInput(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_QUICKINPUT); if (null == el) { el = new Element(SETTING_QUICKINPUT); 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 autobackup-option * @param val true if the autobackup should be activated *//*from w w w.ja v a 2s . c o m*/ public void setAutoBackup(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_AUTOBACKUP); if (null == el) { el = new Element(SETTING_AUTOBACKUP); 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 minimizing to tray-option * @param val true if minimizing to tray should be activated *//* w w w .ja v a2s. c om*/ public void setMinimizeToTray(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_MINIMIZETOTRAY); if (null == el) { el = new Element(SETTING_MINIMIZETOTRAY); 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 autobackup-option * @param val true if the autobackup should be activated *//*from w ww .j a va 2s.c om*/ public void setAutoUpdate(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_AUTOUPDATE); if (null == el) { el = new Element(SETTING_AUTOUPDATE); 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 warning dialog in the desktop window, that tells the user * if added entries already have been added before, should be shown or not. * @param val {@code true} if the warning dialog in the desktop window, that tells the user * if added entries already have been added before, should be shown *//* w w w . j ava 2s .co m*/ public void setHideMultipleDesktopOccurencesDlg(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_HIDEMULTIPLEDESKTOPOCCURENCESDLG); if (null == el) { el = new Element(SETTING_HIDEMULTIPLEDESKTOPOCCURENCESDLG); settingsFile.getRootElement().addContent(el); } el.setText((val) ? "1" : "0"); }