Example usage for org.jdom2 Element getText

List of usage examples for org.jdom2 Element getText

Introduction

In this page you can find the example usage for org.jdom2 Element getText.

Prototype

public String getText() 

Source Link

Document

Returns the textual content directly held under this element as a string.

Usage

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

public String getContentBackgroundColor() {
    Element el = settingsFile.getRootElement().getChild(SETTING_CONTENTBACKGROUNDCOLOR);
    String retval = "ffffff";
    if (el != null)
        retval = el.getText();
    return retval;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

public int getShowAtStartup() {
    Element el = settingsFile.getRootElement().getChild(SETTING_SHOWATSTARTUP);
    int retval = 0;
    if (el != null) {
        try {//from ww w .  j  a  va  2 s.  com
            retval = Integer.parseInt(el.getText());
        } catch (NumberFormatException e) {
            retval = 0;
        }
    }
    return retval;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * This method keeps the selection of the combobox in the search dialog (CSearchDlg), which stores
 * the information whether the user wanted to search for entries with a certain create-date, changed-date
 * or both.//from  w  w w  . j  a v a2s  .c om
 *
 * @return the index of the selected item.
 */
public int getSearchComboTime() {
    Element el = settingsFile.getRootElement().getChild(SETTING_SEARCHCOMBOTIME);
    int retval = 0;
    if (el != null) {
        try {
            retval = Integer.parseInt(el.getText());
        } catch (NumberFormatException e) {
            retval = 0;
        }
    }
    return retval;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * When the user wants to search for entries with a certain creation or modified-date, this
 * setting stores the values from the last entered date-input from the user
 *
 * @return a string value, comma separated, which holds to dates: the beginning and the end-date
 * of the period the user wanted to search for entries.
 *//*from   w w w. ja  v a2  s. c om*/
public String getSearchDateTime() {
    Element el = settingsFile.getRootElement().getChild(SETTING_SEARCHDATETIME);
    String retval = "";
    if (el != null)
        retval = el.getText();
    return retval;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * /*w  ww  .j  a  va2  s .  c om*/
 * @return 
 */
public boolean getShowIcons() {
    Element el = settingsFile.getRootElement().getChild(SETTING_SHOWICONS);
    boolean retval = true;
    if (el != null)
        retval = el.getText().equals("1");
    return retval;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * //from w w w  .  ja  v  a 2  s  .  c  o  m
 * @return 
 */
public boolean getShowAllIcons() {
    Element el = settingsFile.getRootElement().getChild(SETTING_SHOWALLICONS);
    boolean retval = true;
    if (el != null)
        retval = el.getText().equals("1");
    return retval;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * @return returns the last used bibtex-format, i.e. the format (encoding) of the currently
 * attached bibtex-file. following constants are used:<br>
 * 0: UTF-8 (Bibliographix)<br>/* w w  w  .j a v a 2 s .c  o m*/
 * 1: UTF-8 (Citavi)<br>
 * 2: ISO8859_1 (Emacs with AucTex/RefTex)<br>
 * 3: UTF-8 (Endnote)<br>
 * 4: ISO8859_1 (JabRef)<br>
 * 5: UTF-8 (Refworks)
 */
public int getLastUsedBibtexFormat() {
    Element el = settingsFile.getRootElement().getChild(SETTING_LASTUSEDBIBTEXFORMAT);
    int retval = 0;
    if (el != null) {
        try {
            retval = Integer.parseInt(el.getText());
        } catch (NumberFormatException e) {
            retval = 0;
        }
    }
    return retval;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * @return returns the display-option of the desktop window, i.e.
 * whether comments should be displayed in the desktop window or not,
 * or if only comments should be displayed.
 * /*from w  ww . j a  v  a2  s .co  m*/
 * following constants are used:<br>
 * <ul>
 * <li>Constants.DESKTOP_WITH_COMMENTS</li>
 * <li>Constants.DESKTOP_WITHOUT_COMMENTS</li>
 * <li>Constants.DESKTOP_ONLY_COMMENTS</li>
 * </ul>
 */
public int getDesktopCommentDisplayOptions() {
    Element el = settingsFile.getRootElement().getChild(SETTING_DESKTOPSHOWCOMMENTS);
    int retval = Constants.DESKTOP_WITH_COMMENTS;
    if (el != null) {
        try {
            retval = Integer.parseInt(el.getText());
        } catch (NumberFormatException e) {
            retval = 0;
        }
    }
    return retval;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

public String getShowUpdateHintVersion() {
    Element el = settingsFile.getRootElement().getChild(SETTING_SHOWUPDATEHINTVERSION);
    if (el != null)
        return el.getText();
    return "0";
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

public boolean getUseXDGOpen() {
    Element el = settingsFile.getRootElement().getChild(SETTING_USEXDGOPEN);
    boolean retval = true;
    if (el != null)
        retval = el.getText().equals("1");
    return retval;
}