struts2 tree标签源代码

本文详细介绍了 Struts2 中 Dojo 插件的 TreeTag 组件,包括其属性设置和功能实现。TreeTag 用于创建树形结构的数据展示组件,并支持丰富的自定义选项。

package org.apache.struts2.dojo.views.jsp.ui;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.dojo.components.Tree;
import org.apache.struts2.views.jsp.ui.AbstractClosingTag;

import com.opensymphony.xwork2.util.ValueStack;

/**
 * @see Tree
 */
public class TreeTag extends AbstractClosingTag {

    private static final long serialVersionUID = 2735218501058548013L;

    protected String toggle;
    protected String selectedNotifyTopics;
    protected String expandedNotifyTopics;
    protected String collapsedNotifyTopics;
    protected String rootNode;
    protected String childCollectionProperty;
    protected String nodeTitleProperty;
    protected String nodeIdProperty;
    protected String showRootGrid;

    protected String showGrid;
    protected String blankIconSrc;
    protected String gridIconSrcL;
    protected String gridIconSrcV;
    protected String gridIconSrcP;
    protected String gridIconSrcC;
    protected String gridIconSrcX;
    protected String gridIconSrcY;
    protected String expandIconSrcPlus;
    protected String expandIconSrcMinus;
    protected String iconWidth;
    protected String iconHeight;
    protected String toggleDuration;
    protected String templateCssPath;
    protected String href;
    protected String errorNotifyTopics;
   
    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new Tree(stack,req,res);
    }

    protected void populateParams() {
        super.populateParams();

        Tree tree = (Tree) component;
        tree.setChildCollectionProperty(childCollectionProperty);
        tree.setNodeIdProperty(nodeIdProperty);
        tree.setNodeTitleProperty(nodeTitleProperty);
        tree.setRootNode(rootNode);
        tree.setToggle(toggle);
        tree.setSelectedNotifyTopics(selectedNotifyTopics);
        tree.setExpandedNotifyTopics(expandedNotifyTopics);
        tree.setCollapsedNotifyTopics(collapsedNotifyTopics);
        tree.setShowRootGrid(showRootGrid);

        tree.setShowGrid(showGrid);
        tree.setBlankIconSrc(blankIconSrc);
        tree.setGridIconSrcL(gridIconSrcC);
        tree.setGridIconSrcV(gridIconSrcV);
        tree.setGridIconSrcP(gridIconSrcP);
        tree.setGridIconSrcC(gridIconSrcC);
        tree.setGridIconSrcX(gridIconSrcX);
        tree.setGridIconSrcY(gridIconSrcY);
        tree.setExpandIconSrcPlus(expandIconSrcPlus);
        tree.setExpandIconSrcMinus(expandIconSrcMinus);
        tree.setIconWidth(iconWidth);
        tree.setIconHeight(iconHeight);
        tree.setToggleDuration(toggleDuration);
        tree.setTemplateCssPath(templateCssPath);
        tree.setHref(href);
        tree.setErrorNotifyTopics(errorNotifyTopics);
    }

    public String getToggle() {
        return toggle;
    }

    public void setToggle(String toggle) {
        this.toggle = toggle;
    }

    @Deprecated
    public void setTreeSelectedTopic(String treeSelectedTopic) {
        this.selectedNotifyTopics = treeSelectedTopic;
    }

    @Deprecated
    public void setTreeExpandedTopic(String treeExpandedTopic) {
        this.expandedNotifyTopics = treeExpandedTopic;
    }

    @Deprecated
    public void setTreeCollapsedTopic(String treeCollapsedTopic) {
        this.collapsedNotifyTopics = treeCollapsedTopic;
    }

    public String getRootNode() {
        return rootNode;
    }

    public void setRootNode(String rootNode) {
        this.rootNode = rootNode;
    }

    public String getChildCollectionProperty() {
        return childCollectionProperty;
    }

    public void setChildCollectionProperty(String childCollectionProperty) {
        this.childCollectionProperty = childCollectionProperty;
    }

    public String getNodeTitleProperty() {
        return nodeTitleProperty;
    }

    public void setNodeTitleProperty(String nodeTitleProperty) {
        this.nodeTitleProperty = nodeTitleProperty;
    }

    public String getNodeIdProperty() {
        return nodeIdProperty;
    }

    public void setNodeIdProperty(String nodeIdProperty) {
        this.nodeIdProperty = nodeIdProperty;
    }

    public String getShowRootGrid() {
        return showRootGrid;
    }

    public void setShowRootGrid(String showRootGrid) {
        this.showRootGrid = showRootGrid;
    }

    public String getBlankIconSrc() {
        return blankIconSrc;
    }

    public void setBlankIconSrc(String blankIconSrc) {
        this.blankIconSrc = blankIconSrc;
    }

    public String getExpandIconSrcMinus() {
        return expandIconSrcMinus;
    }

    public void setExpandIconSrcMinus(String expandIconSrcMinus) {
        this.expandIconSrcMinus = expandIconSrcMinus;
    }

    public String getExpandIconSrcPlus() {
        return expandIconSrcPlus;
    }

    public void setExpandIconSrcPlus(String expandIconSrcPlus) {
        this.expandIconSrcPlus = expandIconSrcPlus;
    }

    public String getGridIconSrcC() {
        return gridIconSrcC;
    }

    public void setGridIconSrcC(String gridIconSrcC) {
        this.gridIconSrcC = gridIconSrcC;
    }

    public String getGridIconSrcL() {
        return gridIconSrcL;
    }

    public void setGridIconSrcL(String gridIconSrcL) {
        this.gridIconSrcL = gridIconSrcL;
    }

    public String getGridIconSrcP() {
        return gridIconSrcP;
    }

    public void setGridIconSrcP(String gridIconSrcP) {
        this.gridIconSrcP = gridIconSrcP;
    }

    public String getGridIconSrcV() {
        return gridIconSrcV;
    }

    public void setGridIconSrcV(String gridIconSrcV) {
        this.gridIconSrcV = gridIconSrcV;
    }

    public String getGridIconSrcX() {
        return gridIconSrcX;
    }

    public void setGridIconSrcX(String gridIconSrcX) {
        this.gridIconSrcX = gridIconSrcX;
    }

    public String getGridIconSrcY() {
        return gridIconSrcY;
    }

    public void setGridIconSrcY(String gridIconSrcY) {
        this.gridIconSrcY = gridIconSrcY;
    }

    public String getIconHeight() {
        return iconHeight;
    }

    public void setIconHeight(String iconHeight) {
        this.iconHeight = iconHeight;
    }

    public String getIconWidth() {
        return iconWidth;
    }

    public void setIconWidth(String iconWidth) {
        this.iconWidth = iconWidth;
    }

    public String getTemplateCssPath() {
        return templateCssPath;
    }

    public void setTemplateCssPath(String templateCssPath) {
        this.templateCssPath = templateCssPath;
    }

    public String getToggleDuration() {
        return toggleDuration;
    }

    public void setToggleDuration(String toggleDuration) {
        this.toggleDuration = toggleDuration;
    }

    public String getShowGrid() {
        return showGrid;
    }

    public void setShowGrid(String showGrid) {
        this.showGrid = showGrid;
    }

    public void setCollapsedNotifyTopics(String collapsedNotifyTopics) {
        this.collapsedNotifyTopics = collapsedNotifyTopics;
    }

    public void setExpandedNotifyTopics(String expandedNotifyTopics) {
        this.expandedNotifyTopics = expandedNotifyTopics;
    }

    public void setSelectedNotifyTopics(String selectedNotifyTopics) {
        this.selectedNotifyTopics = selectedNotifyTopics;
    }

    public void setHref(String href) {
        this.href = href;
    }

    public void setErrorNotifyTopics(String errorNotifyTopics) {
        this.errorNotifyTopics = errorNotifyTopics;
    }
}

【无人机】基于改进粒子群算法的无人机路径规划研究[和遗传算法、粒子群算法进行比较](Matlab代码实现)内容概要:本文围绕基于改进粒子群算法的无人机路径规划展开研究,重点探讨了在复杂环境中利用改进粒子群算法(PSO)实现无人机三维路径规划的方法,并将其与遗传算法(GA)、标准粒子群算法等传统优化算法进行对比分析。研究内容涵盖路径规划的多目标优化、避障策略、航路点约束以及算法收敛性和寻优能力的评估,所有实验均通过Matlab代码实现,提供了完整的仿真验证流程。文章还提到了多种智能优化算法在无人机路径规划中的应用比较,突出了改进PSO在收敛速度和全局寻优方面的优势。; 适合人群:具备一定Matlab编程基础和优化算法知识的研究生、科研人员及从事无人机路径规划、智能优化算法研究的相关技术人员。; 使用场景及目标:①用于无人机在复杂地形或动态环境下的三维路径规划仿真研究;②比较不同智能优化算法(如PSO、GA、蚁群算法、RRT等)在路径规划中的性能差异;③为多目标优化问题提供算法选型和改进思路。; 阅读建议:建议读者结合文中提供的Matlab代码进行实践操作,重点关注算法的参数设置、适应度函数设计及路径约束处理方式,同时可参考文中提到的多种算法对比思路,拓展到其他智能优化算法的研究与改进中。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值