Package org.apache.tapestry.contrib.tree.model

Examples of org.apache.tapestry.contrib.tree.model.ITreeStateModel


            objValueUID = context[0];
        }
    ComponentAddress objModelSourceAddress = (ComponentAddress)context[2];
    ITreeModelSource objTreeModelSource = (ITreeModelSource) objModelSourceAddress.findComponent(cycle);
    //ITreeModelSource objTreeModelSource = getTreeModelSource();
        ITreeStateModel objStateModel = objTreeModelSource.getTreeModel().getTreeStateModel();
        boolean bState = objStateModel.isUniqueKeyExpanded(objValueUID);

        if (bState) {
            objStateModel.collapse(objValueUID);
            fireNodeCollapsed(objValueUID, objTreeModelSource);
        } else {
            objStateModel.expandPath(objValueUID);
      fireNodeExpanded(objValueUID, objTreeModelSource);
        }
    }
View Full Code Here


        if(m_objNodeState == null){
      ITreeRowSource objTreeRowSource = getTreeRowSource();
      TreeRowObject objTreeRowObject = objTreeRowSource.getTreeRow();
            Object objValueUID = objTreeRowObject.getTreeNodeUID();
      ITreeModelSource objTreeModelSource = getTreeModelSource();
            ITreeStateModel objStateModel = objTreeModelSource.getTreeModel().getTreeStateModel();
            boolean bState = objStateModel.isUniqueKeyExpanded(objValueUID);
            m_objNodeState = new Boolean(bState);
        }
        return m_objNodeState.booleanValue();
    }
View Full Code Here

            objValueUID = context[0];
        }
    ComponentAddress objModelSourceAddress = (ComponentAddress)context[2];
    ITreeModelSource objTreeModelSource = (ITreeModelSource) objModelSourceAddress.findComponent(cycle);
    //ITreeModelSource objTreeModelSource = getTreeModelSource();
        ITreeStateModel objStateModel = objTreeModelSource.getTreeModel().getTreeStateModel();
        boolean bState = objStateModel.isUniqueKeyExpanded(objValueUID);

        if (bState) {
            objStateModel.collapse(objValueUID);
            fireNodeCollapsed(objValueUID, objTreeModelSource);
        } else {
            objStateModel.expandPath(objValueUID);
      fireNodeExpanded(objValueUID, objTreeModelSource);
        }
    }
View Full Code Here

        if(m_objNodeState == null){
      ITreeRowSource objTreeRowSource = getTreeRowSource();
      TreeRowObject objTreeRowObject = objTreeRowSource.getTreeRow();
            Object objValueUID = objTreeRowObject.getTreeNodeUID();
      ITreeModelSource objTreeModelSource = getTreeModelSource();
            ITreeStateModel objStateModel = objTreeModelSource.getTreeModel().getTreeStateModel();
            boolean bState = objStateModel.isUniqueKeyExpanded(objValueUID);
            m_objNodeState = new Boolean(bState);
        }
        return m_objNodeState.booleanValue();
    }
View Full Code Here

   * @see org.apache.tapestry.workbench.tree.examples.ISelectedFolderSource#getSelectedFolder()
   */
  public Collection getSelectedFolderChildren() {
    TreeTable objTreeTable = (TreeTable)getComponent("tree");
    ITreeModelSource objTreeModelSource = objTreeTable.getTreeModelSource();
    ITreeStateModel objTreeStateModel = objTreeModelSource.getTreeModel().getTreeStateModel();
    Object objSelectedNodeUID = objTreeStateModel.getSelectedNode();
    ITreeNode objSelectedNode = null;
    if(objSelectedNodeUID != null)
      objSelectedNode = (ITreeNode)getTreeModel().getTreeDataModel().getObject(objSelectedNodeUID);
    else{
      objSelectedNode = (ITreeNode)getTreeModel().getTreeDataModel().getRoot();
View Full Code Here

   * @see org.apache.tapestry.workbench.tree.examples.ISelectedFolderSource#getSelectedNodeName()
   */
  public String getSelectedNodeName() {
    TreeTable objTreeTable = (TreeTable)getComponent("tree");
    ITreeModelSource objTreeModelSource = objTreeTable.getTreeModelSource();
    ITreeStateModel objTreeStateModel = objTreeModelSource.getTreeModel().getTreeStateModel();
    Object objSelectedNodeUID = objTreeStateModel.getSelectedNode();
    ITreeNode objSelectedNode = null;
    if(objSelectedNodeUID != null)
      objSelectedNode = (ITreeNode)getTreeModel().getTreeDataModel().getObject(objSelectedNodeUID);
    else{
      objSelectedNode = (ITreeNode)getTreeModel().getTreeDataModel().getRoot();
View Full Code Here

  /**
   * @see org.apache.tapestry.workbench.tree.examples.ISelectedFolderSource#getSelectedFolder()
   */
  public Collection getSelectedFolderChildren() {
    TreeView objTreeView = (TreeView)getComponent("treeView");
    ITreeStateModel objTreeStateModel = objTreeView.getTreeModel().getTreeStateModel();
    Object objSelectedNodeUID = objTreeStateModel.getSelectedNode();
    ITreeNode objSelectedNode = null;
    if(objSelectedNodeUID != null)
      objSelectedNode = (ITreeNode)getTreeModel().getTreeDataModel().getObject(objSelectedNodeUID);
    else{
      objSelectedNode = (ITreeNode)getTreeModel().getTreeDataModel().getRoot();
View Full Code Here

  /**
   * @see org.apache.tapestry.workbench.tree.examples.ISelectedFolderSource#getSelectedNodeName()
   */
  public String getSelectedNodeName() {
    TreeView objTreeView = (TreeView)getComponent("treeView");
    ITreeStateModel objTreeStateModel = objTreeView.getTreeModel().getTreeStateModel();
    Object objSelectedNodeUID = objTreeStateModel.getSelectedNode();
    ITreeNode objSelectedNode = null;
    if(objSelectedNodeUID != null)
      objSelectedNode = (ITreeNode)getTreeModel().getTreeDataModel().getObject(objSelectedNodeUID);
    else{
      objSelectedNode = (ITreeNode)getTreeModel().getTreeDataModel().getRoot();
View Full Code Here

        }

        public boolean isOpen() {
            ITreeDataModel objDataModel =
        m_objTreeModelSource.getTreeModel().getTreeDataModel();
            ITreeStateModel objStateModel =
        m_objTreeModelSource.getTreeModel().getTreeStateModel();
            Object objUniqueKey = objDataModel.getUniqueKey(m_objNode, null);
            return objStateModel.isUniqueKeyExpanded(objUniqueKey);
        }
View Full Code Here

        }

        public boolean isSelected(){
            ITreeDataModel objDataModel =
        m_objTreeModelSource.getTreeModel().getTreeDataModel();
            ITreeStateModel objStateModel =
        m_objTreeModelSource.getTreeModel().getTreeStateModel();
            Object objUniqueKey = objDataModel.getUniqueKey(m_objNode, null);
            return objUniqueKey.equals(objStateModel.getSelectedNode());
        }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.contrib.tree.model.ITreeStateModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.