/** * Default implementation for storing the static contents of the serial port implementation * * @param object Object to store, of type PositionableLabel * @return Element containing the complete info */ public Element store(Object object) { getInstance(object); Element e = new Element("connection"); // many of the following are required by the DTD; failing to include // them makes the XML file unreadable, but at least the next // invocation of the program can then continue. storeCommon(e, adapter); if (adapter.getCurrentPortName() != null) { e.setAttribute("port", adapter.getCurrentPortName()); } else { e.setAttribute("port", rb.getString("noneSelected")); } if (adapter.getCurrentBaudRate() != null) { e.setAttribute("speed", adapter.getCurrentBaudRate()); } else { e.setAttribute("speed", rb.getString("noneSelected")); } e.setAttribute("class", this.getClass().getName()); extendElement(e); return e; }