cd /home/idv/idv/ucar/unidata/apps/example
less idv.rbiand note the skin entry:
<!--The different user interfaces available --> <resources name="idv.resource.skin"> <resource location="/ucar/unidata/apps/example/resources/skin.xml" label="Example>Example UI"> <property name="view_class" value="ucar.unidata.idv.MapViewManager"/> </resource> </resources>
To:<idv.view place="Center" class="${view_class}"/>
<panel layout="border" place="Center"> <label text="Example Skin" fontsize="24" place="North"/> <idv.view place="Center" class="${view_class}"/> </panel>
java ucar.unidata.ui.XmlUi skin.xml
java ucar.unidata.apps.example.ExampleIdv
e.g.:<property name="default" value="true"/>
<resource location="/ucar/unidata/apps/example/resources/skin.xml" label="Example>Example UI"> <property name="view_class" value="ucar.unidata.idv.MapViewManager"/> <property name="default" value="true"/> </resource>
<resources name="idv.resource.skin" loadmore="false">
<example.label text="Example Skin" place="North"/>
public Component createComponent(Element node, String id) { String tagName = node.getTagName(); if(tagName.equals("example.label")) { JLabel label = new JLabel(XmlUtil.getAttribute(node, XmlUi.ATTR_TEXT)); label.setForeground(Color.red); return label; } return super.createComponent(node, id); }
public IdvWindow createNewWindow(List viewManagers, boolean notifyCollab, String title, String skinPath, Element skinRoot) {...}
if(!testNewWindow) { return super.createNewWindow(viewManagers, notifyCollab,title, skinPath, skinRoot); }