question: public Element store ( Object o ) { PortalIcon p = ( PortalIcon ) o ; if ( ! p . isActive ( ) ) { return null ; } Element element = new Element ( "PortalIcon" ) ; storeCommonAttributes ( p , element ) ; element . setAttribute ( "scale" , String . valueOf ( p . getScale ( ) ) ) ; element . setAttribute ( "rotate" , String . valueOf ( p . getDegrees ( ) ) ) ; Portal portal = p . getPortal ( ) ; if ( portal == null ) { log . info ( "PortalIcon has no associated Portal." ) ; return null ; } element . setAttribute ( "portalName" , portal . getName ( ) ) ; if ( portal . getToBlock ( ) != null ) { element . setAttribute ( "toBlockName" , portal . getToBlockName ( ) ) ; } if ( portal . getFromBlockName ( ) != null ) { element . setAttribute ( "fromBlockName" , portal . getFromBlockName ( ) ) ; } element . setAttribute ( "arrowSwitch" , "" + ( p . getArrowSwitch ( ) ? "yes" : "no" ) ) ; element . setAttribute ( "arrowHide" , "" + ( p . getArrowHide ( ) ? "yes" : "no" ) ) ; element . setAttribute ( "class" , "jmri.jmrit.display.controlPanelEditor.configurexml.PortalIconXml" ) ; return element ; }
target:  Default implementation for storing the contents of a PortalIcon