Example usage for org.jdom2 Element setText

List of usage examples for org.jdom2 Element setText

Introduction

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

Prototype

public Element setText(final String text) 

Source Link

Document

Sets the content of the element to be the text given.

Usage

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

License:Open Source License

public void setDesktopOutlineFontSize(int size) {
    Element el = settingsFile.getRootElement().getChild(SETTING_DESKTOPOUTLINEFONTSIZE);
    if (null == el) {
        el = new Element(SETTING_DESKTOPOUTLINEFONTSIZE);
        settingsFile.getRootElement().addContent(el);
    }//  w  w w. j  a  va  2 s  . c o  m
    el.setText(String.valueOf(size));
}

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

License:Open Source License

/**
 * This method sets 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}.
 *
 * @param val the index-value for the manual timestamp
 *///from w  ww  . ja  va  2  s.  c  o  m
public void setManualTimestamp(int val) {
    Element el = settingsFile.getRootElement().getChild(SETTING_MANUALTIMESTAMP);
    if (null == el) {
        el = new Element(SETTING_MANUALTIMESTAMP);
        settingsFile.getRootElement().addContent(el);
    }
    el.setText(String.valueOf(val));
}

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

License:Open Source License

/**
 * This method sets 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./*from  w w w  . j a  v  a  2s  .c  om*/
 *
 * @param size the value for which the original font-size should be increased
 */
public void setTextfieldFontSize(int size) {
    Element el = settingsFile.getRootElement().getChild(SETTING_TEXTFIELDFONTSIZE);
    if (null == el) {
        el = new Element(SETTING_TEXTFIELDFONTSIZE);
        settingsFile.getRootElement().addContent(el);
    }
    el.setText(String.valueOf(size));
}

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

License:Open Source License

public void setLastUsedSetBibyKeyChoice(int choice) {
    Element el = settingsFile.getRootElement().getChild(SETTING_LASTUSEDSETBIBKEYCHOICE);
    if (null == el) {
        el = new Element(SETTING_LASTUSEDSETBIBKEYCHOICE);
        settingsFile.getRootElement().addContent(el);
    }//www . j a  v  a  2s .  c om
    el.setText(String.valueOf(choice));
}

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

License:Open Source License

public void setLastUsedSetBibyKeyType(int type) {
    Element el = settingsFile.getRootElement().getChild(SETTING_LASTUSEDSETBIBKEYTYPE);
    if (null == el) {
        el = new Element(SETTING_LASTUSEDSETBIBKEYTYPE);
        settingsFile.getRootElement().addContent(el);
    }//w  w  w.  java  2  s.co  m
    el.setText(String.valueOf(type));
}

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

License:Open Source License

public void setLastUsedBibtexImportSource(int source) {
    Element el = settingsFile.getRootElement().getChild(SETTING_LASTUSEDSETBIBIMPORTSOURCE);
    if (null == el) {
        el = new Element(SETTING_LASTUSEDSETBIBIMPORTSOURCE);
        settingsFile.getRootElement().addContent(el);
    }//from  w  w  w.j  a va 2 s .c  o  m
    el.setText(String.valueOf(source));
}

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

License:Open Source License

/**
 * Sets 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 a  va 2 s .c om
 * @param val whether thumbnail-display is enabled or not
 */
public void setImageResize(boolean val) {
    Element el = settingsFile.getRootElement().getChild(SETTING_IMGRESIZE);
    if (null == el) {
        el = new Element(SETTING_IMGRESIZE);
        settingsFile.getRootElement().addContent(el);
    }
    el.setText((val) ? "1" : "0");
}

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

License:Open Source License

public void setShowTableBorder(boolean val) {
    Element el = settingsFile.getRootElement().getChild(SETTING_SHOWTABLEBORDER);
    if (null == el) {
        el = new Element(SETTING_SHOWTABLEBORDER);
        settingsFile.getRootElement().addContent(el);
    }/*  w  ww. j av a2s.c  om*/
    el.setText((val) ? "1" : "0");
}

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

License:Open Source License

public void setShowLuhmannEntryNumber(boolean val) {
    Element el = settingsFile.getRootElement().getChild(SETTING_SHOWLUHMANNENTRYNUMBER);
    if (null == el) {
        el = new Element(SETTING_SHOWLUHMANNENTRYNUMBER);
        settingsFile.getRootElement().addContent(el);
    }// w w w. j  a  v  a2s.c  om
    el.setText((val) ? "1" : "0");
}

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

License:Open Source License

public void setShowDesktopEntryNumber(boolean val) {
    Element el = settingsFile.getRootElement().getChild(SETTING_SHOWDESKTOPENTRYNUMBER);
    if (null == el) {
        el = new Element(SETTING_SHOWDESKTOPENTRYNUMBER);
        settingsFile.getRootElement().addContent(el);
    }//from  ww  w .  j  av  a  2  s.c  o  m
    el.setText((val) ? "1" : "0");
}