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 setPreferredAssembler(Assembler assembler) {
    Element el = root.getChild(SETTING_PREF_ASM);
    if (null == el) {
        el = new Element(SETTING_PREF_ASM);
        root.addContent(el);/*from   w  w  w.j a v a2  s . com*/
    }
    el.setText(String.valueOf(assembler.getID()));
}

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

License:Open Source License

public void setSidebarSort(int sortstyle) {
    Element el = root.getChild(SETTING_SIDEBAR_SORT);
    if (null == el) {
        el = new Element(SETTING_SIDEBAR_SORT);
        root.addContent(el);//w  w  w .  j ava 2s . co  m
    }
    el.setText(String.valueOf(sortstyle));
}

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

License:Open Source License

public void setColorScheme(int scheme) {
    Element el = root.getChild(SETTING_SYNTAX_SCHEME);
    if (null == el) {
        el = new Element(SETTING_SYNTAX_SCHEME);
        root.addContent(el);//  ww  w  .  j a va 2  s  . co  m
    }
    el.setText(String.valueOf(scheme));
}

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

License:Open Source License

public void setCheckForUpdates(boolean val) {
    Element el = root.getChild(SETTING_CHECKUPDATES);
    if (null == el) {
        el = new Element(SETTING_CHECKUPDATES);
        root.addContent(el);/* w w  w  .  ja va 2  s.  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 setFindFieldFocus(boolean val) {
    Element el = root.getChild(SETTING_FINDFIELDFOCUS);
    if (null == el) {
        el = new Element(SETTING_FINDFIELDFOCUS);
        root.addContent(el);//from w  w w  .j a  va 2 s .  com
    }
    el.setText(val == Boolean.TRUE ? "1" : "0");
}

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

License:Open Source License

public void setAlternativeAssemblyMode(boolean val) {
    Element el = root.getChild(SETTING_ALT_ASM_MODE);
    if (null == el) {
        el = new Element(SETTING_ALT_ASM_MODE);
        root.addContent(el);/*from  w w  w .j  ava 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 setShowLineHightlight(boolean val) {
    Element el = root.getChild(SETTING_SHOW_LINEHIGLIGHT);
    if (null == el) {
        el = new Element(SETTING_SHOW_LINEHIGLIGHT);
        root.addContent(el);//from   ww w .  jav 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 setShowBufferSize(boolean val) {
    Element el = root.getChild(SETTING_SHOW_BUFFERSIZE);
    if (null == el) {
        el = new Element(SETTING_SHOW_BUFFERSIZE);
        root.addContent(el);/*  ww w  . j a va 2 s  .  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 setShowExtensionInTab(boolean val) {
    Element el = root.getChild(SETTING_SHOW_EXT_IN_TAB);
    if (null == el) {
        el = new Element(SETTING_SHOW_EXT_IN_TAB);
        root.addContent(el);//ww w.j ava2  s  .com
    }
    el.setText(val == Boolean.TRUE ? "1" : "0");
}

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

License:Open Source License

public void setShowCloseButton(boolean val) {
    Element el = root.getChild(SETTING_SHOW_CLOSEBUTTON);
    if (null == el) {
        el = new Element(SETTING_SHOW_CLOSEBUTTON);
        root.addContent(el);//from w ww .j  av  a2 s.c o m
    }
    el.setText(val == Boolean.TRUE ? "1" : "0");
}