}
public void startExamplePanel()
{
ItsNatDocument itsNatDoc = getItsNatDocument();
ItsNatComponentManager compMgr = itsNatDoc.getItsNatComponentManager();
this.useSingleClickComp = (ItsNatHTMLInputCheckBox)compMgr.createItsNatComponentById("useSingleClickId");
useSingleClickComp.getToggleButtonModel().addItemListener(this);
NameValue[] artifacts = new NameValue[]{new NameValue("rootless","true")};
this.treeComp = (ItsNatFreeTree)compMgr.createItsNatComponentById("compId","freeTree",artifacts);
new FreeTreeDecorator(treeComp).bind();
DefaultTreeModel dataModel = (DefaultTreeModel)treeComp.getTreeModel();
DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode("Grey's Anatomy");
dataModel.setRoot(rootNode);
DefaultMutableTreeNode parentNode;
parentNode = addNode("Characters",rootNode,dataModel);
addNode("Meredith Grey",parentNode,dataModel);
addNode("Cristina Yang",parentNode,dataModel);
addNode("Alex Karev",parentNode,dataModel);
addNode("George O'Malley",parentNode,dataModel);
parentNode = addNode("Actors",rootNode,dataModel);
addNode("Ellen Pompeo",parentNode,dataModel);
addNode("Sandra Oh",parentNode,dataModel);
addNode("Justin Chambers",parentNode,dataModel);
addNode("T.R. Knight",parentNode,dataModel);
TreeSelectionModel selModel = treeComp.getTreeSelectionModel();
selModel.setSelectionMode(TreeSelectionModel.CONTIGUOUS_TREE_SELECTION);
selModel.addSelectionPath(new TreePath(parentNode.getPath())); // Actors
treeComp.addEventListener("click",this);
dataModel.addTreeModelListener(this);
selModel.addTreeSelectionListener(this);
treeComp.addTreeWillExpandListener(this);
this.removeButton = (ItsNatHTMLInputButton)compMgr.createItsNatComponentById("removeId");
removeButton.addEventListener("click",this);
this.itemComp = (ItsNatHTMLInputText)compMgr.createItsNatComponentById("itemId");
itemComp.setText(selModel.getSelectionPath().getLastPathComponent().toString());
this.posComp = (ItsNatHTMLInputText)compMgr.createItsNatComponentById("posId");
posComp.setText(Integer.toString(selModel.getMinSelectionRow()));
this.updateButton = (ItsNatHTMLInputButton)compMgr.createItsNatComponentById("updateId");
updateButton.addEventListener("click",this);
this.insertBeforeButton = (ItsNatHTMLInputButton)compMgr.createItsNatComponentById("insertBeforeId");
insertBeforeButton.addEventListener("click",this);
this.insertAfterButton = (ItsNatHTMLInputButton)compMgr.createItsNatComponentById("insertAfterId");
insertAfterButton.addEventListener("click",this);
this.insertChildButton = (ItsNatHTMLInputButton)compMgr.createItsNatComponentById("insertChildId");
insertChildButton.addEventListener("click",this);
this.joystickModeComp = (ItsNatHTMLInputCheckBox)compMgr.createItsNatComponentById("joystickModeId");
joystickModeComp.getToggleButtonModel().addItemListener(this);
joystickModeComp.setSelected(isJoystickModePreferred());
}