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

/**
 * Retrieves the setting which java-look'n'feel the user wants to have set
 * @return the string for the look'n'feel's classname
 *//* w w w. jav a 2s .  co m*/
public String getLookAndFeel() {
    Element el = settingsFile.getRootElement().getChild(SETTING_LAF);
    String retval = "";
    if (el != null)
        retval = el.getText();
    return retval;
}

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

License:Open Source License

/**
 * Gets the show-grid-variable. If true, the <i>horizontal</i> grids in lists and tables 
 * should be displayed.//from   w w w  .  j  a v a2 s  .c  om
 * 
 * @return {@code true} if the <i>horizontal</i> grids in lists and tables should be displayed,
 * flase otherwise
 */
public boolean getShowGridHorizontal() {
    Element el = settingsFile.getRootElement().getChild(SETTING_SHOWGRID_HORIZONTAL);
    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 show-grid-variable. If true, the <i>vertical</i> grids in lists and tables 
 * should be displayed./*w  w  w  .  j av a 2  s  . c  o  m*/
 * 
 * @return {@code true} if the <i>vertical</i> grids in lists and tables should be displayed,
 * flase otherwise
 */
public boolean getShowGridVertical() {
    Element el = settingsFile.getRootElement().getChild(SETTING_SHOWGRID_VERTICAL);
    if (el != null)
        return el.getText().equals("1");
    return false;
}

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.
 * @return {@code true} if the search should include synonyms, false otherwise
 */// w  w w .j a v  a 2s  .  co m
public boolean getSearchAlwaysSynonyms() {
    Element el = settingsFile.getRootElement().getChild(SETTING_SEARCHALWAYSSYNONYMS);
    if (el != null)
        return el.getText().equals("1");
    return false;
}

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

License:Open Source License

/**
 * Whether or not keyword-synonyms should be displayed in the jTableKeywords
 * @return {@code true} keyword-synonyms should be displayed in the jTableKeywords, false otherwise
 */// w  w  w .  j ava  2 s.  c  o m
public boolean getShowSynonymsInTable() {
    Element el = settingsFile.getRootElement().getChild(SETTING_SHOWSYNONYMSINTABLE);
    if (el != null)
        return el.getText().equals("1");
    return false;
}

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

License:Open Source License

/**
 * This setting gets the spacing between table cells.
 * @return a dimension value, holding the horizontal and vertical cellspacing-values
 *///from w ww  . ja v  a 2  s .c  o m
public Dimension getCellSpacing() {
    Element el = settingsFile.getRootElement().getChild(SETTING_CELLSPACING);
    if (el != null) {
        // parse both string-values to an array
        String[] dummy = el.getText().split(",");
        // first value indicates horizontal spacing
        int space_hor = Integer.parseInt(dummy[0]);
        // second value indicates vertical distance
        int space_ver = Integer.parseInt(dummy[1]);
        // return values as dimension
        return new Dimension(space_hor, space_ver);
    }
    return new Dimension(1, 1);
}

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

License:Open Source License

/**
 * Gets the setting for the quick input of keywords.
 * @return {@code true} if the keyword-quickinput should be activated
 *//* ww w . j  a  v a 2s.  c  o m*/
public boolean getQuickInput() {
    Element el = settingsFile.getRootElement().getChild(SETTING_QUICKINPUT);
    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 autobackup-option.
 * @return {@code true} if autobackup should be activated
 *//*from   ww w. j  ava2  s .  c  om*/
public boolean getAutoBackup() {
    Element el = settingsFile.getRootElement().getChild(SETTING_AUTOBACKUP);
    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 minimize to tray-option.
 * @return {@code true} if minimizing to tray should be activated
 *//*from  www  .  j  a v a2 s . c om*/
public boolean getMinimizeToTray() {
    Element el = settingsFile.getRootElement().getChild(SETTING_MINIMIZETOTRAY);
    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 autobackup-option.
 * @return {@code true} if autobackup should be activated
 *///from w ww . j a  va 2s  .  co  m
public boolean getAutoUpdate() {
    Element el = settingsFile.getRootElement().getChild(SETTING_AUTOUPDATE);
    if (el != null)
        return el.getText().equals("1");
    return false;
}