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

/**
 * This method returns 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.//from ww w  . j a  v  a 2s.  com
 * 
 * @return the value for which the original font size should be increased.
 */
public int getTableFontSize() {
    Element el = settingsFile.getRootElement().getChild(SETTING_TABLEFONTSIZE);
    if (el != null)
        return Integer.parseInt(el.getText());
    return 0;
}

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

License:Open Source License

public int getDesktopOutlineFontSize() {
    Element el = settingsFile.getRootElement().getChild(SETTING_DESKTOPOUTLINEFONTSIZE);
    if (el != null)
        return Integer.parseInt(el.getText());
    return 0;/*w w w. j  a v a2s.  c  o  m*/
}

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

License:Open Source License

/**
 * This method returns the index-value for the manual timestamp that can be inserted when
 * editing a new entry (see CNewEntry-dlg). For the different String-values that are used
 * to create the DateFormat, see {@code CConstants.manualTimestamp}.
 *
 * @return the index-value for the manual timestamp
 *//*  w  w w.jav  a  2  s.  c  om*/
public int getManualTimestamp() {
    Element el = settingsFile.getRootElement().getChild(SETTING_MANUALTIMESTAMP);
    if (el != null)
        return Integer.parseInt(el.getText());
    return 0;
}

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

License:Open Source License

/**
 * This method returns the default font-size for textfields in the CNewEntry-dialog. The user cannot
 * choose the font or color, but at least a bigger font-size for better viewing is
 * possible.// w ww.jav  a 2s .  co  m
 *
 * @return the value for which the original font size should be increased.
 */
public int getTextfieldFontSize() {
    Element el = settingsFile.getRootElement().getChild(SETTING_TEXTFIELDFONTSIZE);
    if (el != null)
        return Integer.parseInt(el.getText());
    return 0;
}

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

License:Open Source License

public int getLastUsedSetBibyKeyChoice() {
    Element el = settingsFile.getRootElement().getChild(SETTING_LASTUSEDSETBIBKEYCHOICE);
    if (el != null)
        return Integer.parseInt(el.getText());
    return CSetBibKey.CHOOSE_BIBKEY_FROM_DB;
}

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

License:Open Source License

public int getLastUsedSetBibyKeyType() {
    Element el = settingsFile.getRootElement().getChild(SETTING_LASTUSEDSETBIBKEYTYPE);
    if (el != null)
        return Integer.parseInt(el.getText());
    return CSetBibKey.TYPE_BIBKEY_NEW;
}

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

License:Open Source License

public int getLastUsedBibtexImportSource() {
    Element el = settingsFile.getRootElement().getChild(SETTING_LASTUSEDSETBIBIMPORTSOURCE);
    if (el != null)
        return Integer.parseInt(el.getText());
    return CImportBibTex.BIBTEX_SOURCE_DB;
}

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

License:Open Source License

/**
 * Gets the setting for the thumbnail activation. This value indicates whether iamges
 * should always be display in original size, or whether large images should be resized
 * /*from w  ww .j  ava 2 s . c o  m*/
 * @return {@code true} if large images should be resized.
 */
public boolean getImageResize() {
    Element el = settingsFile.getRootElement().getChild(SETTING_IMGRESIZE);
    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 getShowTableBorder() {
    Element el = settingsFile.getRootElement().getChild(SETTING_SHOWTABLEBORDER);
    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 getShowLuhmannEntryNumber() {
    Element el = settingsFile.getRootElement().getChild(SETTING_SHOWLUHMANNENTRYNUMBER);
    if (el != null)
        return el.getText().equals("1");
    return false;
}