List of usage examples for com.mongodb BasicDBObject containsField
public boolean containsField(final String field)
From source file:tango.parameter.BooleanParameter.java
License:Open Source License
@Override public void dbGet(BasicDBObject DBO) { //System.out.println("Boolean:"+id); //System.out.println("DBO:"+DBO.get(id)); if (DBO.containsField(id)) setSelected(DBO.getBoolean(id)); }
From source file:tango.parameter.ChoiceParameter.java
License:Open Source License
@Override public void dbGet(BasicDBObject DBO) { if (DBO.containsField(id)) { choice.setSelectedItem(DBO.getString(id)); }//from w w w . j a v a 2 s . c o m setColor(); }
From source file:tango.parameter.DoubleParameter.java
License:Open Source License
@Override public void dbGet(BasicDBObject DBO) { if (DBO.containsField(id) && DBO.get(id) != null) { number.setValue(DBO.getDouble(id)); }//from w ww . j a v a 2 s.c o m setColor(); }
From source file:tango.parameter.FileParameter.java
License:Open Source License
@Override public void dbGet(BasicDBObject DBO) { if (DBO.containsField(id)) { curDir = new File(DBO.getString(id)); }// w w w .j a v a 2 s .c o m }
From source file:tango.parameter.IntParameter.java
License:Open Source License
@Override public void dbGet(BasicDBObject DBO) { if (DBO.containsField(id) && DBO.get(id) != null) { number.setValue(DBO.getInt(id)); }/*from www. ja v a 2s. com*/ setColor(); }
From source file:tango.parameter.MeasurementParameter.java
License:Open Source License
@Override public void dbGet(BasicDBObject DBO) { if (DBO.containsField(id)) { Object o = DBO.get(id);// www. j a va 2s . com if (!(o instanceof BasicDBObject)) return; BasicDBObject subDBO = (BasicDBObject) o; String m = subDBO.getString("method"); if (m != null && m.length() > 0) { if (plugin != null) { for (Parameter p : getParameters()) p.removeFromContainer(mainBox); Parameter[] keys = getKeys(); if (keys != null) for (Parameter p : keys) p.removeFromContainer(keyBox); } getPlug(m); if (plugin != null) { for (Parameter p : getParameters()) p.dbGet(subDBO); if (subDBO.containsField("keys")) { BasicDBObject keysDBO = (BasicDBObject) subDBO.get("keys"); Parameter[] keys = getKeys(); if (keys != null) for (Parameter p : keys) p.dbGet(keysDBO); } displayParameters(); } selecting = true; choice.setSelectedItem(m); selecting = false; } } setColor(); }
From source file:tango.parameter.NumberParameter.java
License:Open Source License
@Override public void dbGet(BasicDBObject DBO) { if (DBO.containsField(id)) { setValue(DBO.get(id)); } setColor(); }
From source file:tango.parameter.PluginParameter.java
License:Open Source License
@Override public void dbGet(BasicDBObject DBO) { if (DBO.containsField(id)) { Object o = DBO.get(id);/*w ww. ja v a 2s.c om*/ if (!(o instanceof BasicDBObject)) return; BasicDBObject subDBO = (BasicDBObject) o; toggleVisibility(!subDBO.getBoolean("isCollapsed", false)); lastConfig = subDBO; String m = subDBO.getString("method"); if (m != null && m.length() > 0) { if (plugin != null) for (Parameter p : getParameters()) p.removeFromContainer(mainBox); getPlug(m); if (plugin != null) { for (Parameter p : getParameters()) p.dbGet(subDBO); displayParameters(); } selecting = true; choice.setSelectedItem(m); selecting = false; } } setColor(); }
From source file:tango.parameter.SettingsParameter.java
License:Open Source License
@Override public void dbGet(BasicDBObject DBO) { if (DBO.containsField(id)) { String settings = DBO.getString(id); if (Utils.contains(choice, settings, true)) { choice.setSelectedItem(settings); }//w ww . j av a 2s. com } setColor(); }
From source file:tango.parameter.SliderDoubleParameter.java
License:Open Source License
@Override public void dbGet(BasicDBObject DBO) { if (DBO.containsField(id) && DBO.get(id) != null) { double value = DBO.getDouble(id); if (value < this.min) setSliderValue(min);// w w w .ja v a 2s .c o m else if (value > this.max) setSliderValue(max); else setSliderValue(value); } setColor(); }