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
public boolean getShowDesktopEntryNumber() { Element el = settingsFile.getRootElement().getChild(SETTING_SHOWDESKTOPENTRYNUMBER); if (el != null) return el.getText().equals("1"); return false; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
public boolean getShowEntryHeadline() { Element el = settingsFile.getRootElement().getChild(SETTING_SHOWENTRYHEADLINE); if (el != null) return el.getText().equals("1"); return false; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Gets the setting for the extended quick input of keywords. * @return {@code true} if the extended keyword-quickinput should be activated *///from w ww . ja va2s. c o m public int getQuickInputExtended() { Element el = settingsFile.getRootElement().getChild(SETTING_QUICKINPUTEXTENDED); if (el != null) { try { return Integer.parseInt(el.getText()); } catch (NumberFormatException e) { return 0; } } return 0; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Gets the spell-correction-variable. If true, the grids in lists and tables should be displayed. * @return //from w w w . j a v a 2 s .co m */ public boolean getSpellCorrect() { Element el = settingsFile.getRootElement().getChild(SETTING_SPELLCORRECT); if (el != null) return el.getText().equals("1"); return false; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
/** * Gets the steno-variable. If true, steno is activated, false otherwise * @return {@code true} if steno is activated, false otherwise */// w w w .j a va2s . c om public boolean getStenoActivated() { Element el = settingsFile.getRootElement().getChild(SETTING_STENOACTIVATED); if (el != null) return el.getText().equals("1"); return false; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
public boolean getHighlightWholeWord() { Element el = settingsFile.getRootElement().getChild(SETTING_HIGHLIGHTWHOLEWORD); if (el != null) return el.getText().equals("1"); return false; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
public boolean getHighlightWholeWordSearch() { Element el = settingsFile.getRootElement().getChild(SETTING_HIGHLIGHTWHOLEWORDSEARCH); if (el != null) return el.getText().equals("1"); return false; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
public Font getTableFont() { Element el = settingsFile.getRootElement().getChild(SETTING_TABLEFONT); if (el != null) { return new Font(el.getText(), Font.PLAIN, 12); }//from w w w . j a v a 2 s. c o m return null; }
From source file:de.danielluedecke.zettelkasten.database.Settings.java
License:Open Source License
public Font getDesktopOutlineFont() { Element el = settingsFile.getRootElement().getChild(SETTING_DESKTOPOUTLINEFONT); if (el != null) { return new Font(el.getText(), Font.PLAIN, 12); }/*w w w .j a v a 2 s.c om*/ return null; }
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 w w .j a va2 s .c o m * - FONTSIZE<br> * - FONTCOLOR<br> * - FONTSTYLE<br> * - FONTWEIGHT<br> * @return the related font-information as string. */ public String getMainfont(int what) { Element el = settingsFile.getRootElement().getChild(SETTING_MAINFONT); 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; }