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.relaunch64.popelganda.database.Settings.java

License:Open Source License

public void setShowToolbar(boolean val) {
    Element el = root.getChild(SETTING_SHOW_TOOLBAR);
    if (null == el) {
        el = new Element(SETTING_SHOW_TOOLBAR);
        root.addContent(el);/*from   ww w . j  a  v  a 2  s. co  m*/
    }
    el.setText(val == Boolean.TRUE ? "1" : "0");
}

From source file:de.relaunch64.popelganda.database.Settings.java

License:Open Source License

public void setShowToolbarText(boolean val) {
    Element el = root.getChild(SETTING_SHOW_TOOLBARTEXT);
    if (null == el) {
        el = new Element(SETTING_SHOW_TOOLBARTEXT);
        root.addContent(el);/*  ww  w  . ja v  a  2  s  . co  m*/
    }
    el.setText(val == Boolean.TRUE ? "1" : "0");
}

From source file:de.relaunch64.popelganda.database.Settings.java

License:Open Source License

public void setSuggestionSortIgnoresCase(boolean val) {
    Element el = root.getChild(SETTING_SUGGEST_SORT_CASE);
    if (null == el) {
        el = new Element(SETTING_SUGGEST_SORT_CASE);
        root.addContent(el);/*w  w  w  .j  a v a2s  . c  o m*/
    }
    el.setText(val == Boolean.TRUE ? "1" : "0");
}

From source file:de.relaunch64.popelganda.database.Settings.java

License:Open Source License

public void setSaveOnCompile(boolean val) {
    Element el = root.getChild(SETTING_SAVEONCOMPILE);
    if (null == el) {
        el = new Element(SETTING_SAVEONCOMPILE);
        root.addContent(el);//from w  w w .  j ava 2s.  c  om
    }
    el.setText(val == Boolean.TRUE ? "1" : "0");
}

From source file:de.relaunch64.popelganda.database.Settings.java

License:Open Source License

public void setNimbusOnOSX(boolean val) {
    Element el = root.getChild(SETTING_NIMBUS_ON_OSX);
    if (null == el) {
        el = new Element(SETTING_NIMBUS_ON_OSX);
        root.addContent(el);/*from  www  .  ja  v  a 2  s .  c om*/
    }
    el.setText(val == Boolean.TRUE ? "1" : "0");
}

From source file:de.relaunch64.popelganda.database.Settings.java

License:Open Source License

public void setUseScrollTabs(boolean val) {
    Element el = root.getChild(SETTING_USE_SCROLL_TABS);
    if (null == el) {
        el = new Element(SETTING_USE_SCROLL_TABS);
        root.addContent(el);/* w  w w .  j  a  va  2  s . c  om*/
    }
    el.setText(val == Boolean.TRUE ? "1" : "0");
}

From source file:de.relaunch64.popelganda.database.Settings.java

License:Open Source License

public void setReopenOnStartup(boolean val) {
    Element el = root.getChild(SETTING_REOPEN_FILES_ON_STARTUP);
    if (null == el) {
        el = new Element(SETTING_REOPEN_FILES_ON_STARTUP);
        root.addContent(el);/*  w  w w  .  ja va  2 s  .c om*/
    }
    el.setText(val == Boolean.TRUE ? "1" : "0");
}

From source file:de.relaunch64.popelganda.database.Settings.java

License:Open Source License

public void setTabWidth(int tabwidth) {
    Element el = root.getChild(SETTING_TABWIDTH);
    if (null == el) {
        el = new Element(SETTING_TABWIDTH);
        root.addContent(el);/*from  w w  w  .  j  a v  a2s. c om*/
    }
    el.setText(String.valueOf(tabwidth));
}

From source file:de.relaunch64.popelganda.database.Settings.java

License:Open Source License

public void setListGotoIndex(int tabwidth) {
    Element el = root.getChild(SETTING_LISTGOTOINDEX);
    if (null == el) {
        el = new Element(SETTING_LISTGOTOINDEX);
        root.addContent(el);/*  ww  w. j  a  va  2s.  c o  m*/
    }
    el.setText(String.valueOf(tabwidth));
}

From source file:de.relaunch64.popelganda.database.Settings.java

License:Open Source License

public void setDividerLocation(int pos) {
    Element el = root.getChild(SETTING_DIVIDER_LOCATION);
    if (null == el) {
        el = new Element(SETTING_DIVIDER_LOCATION);
        root.addContent(el);//from w  w w  .j  a  v a  2  s .c o  m
    }
    el.setText(String.valueOf(pos));
}