kendoUI中window控件的使用

今天主要的工作是完成了部门模版维护功能的页面,其中页面中主要使用了kendo的treeview控件、grid控件、和window控件。由于treeview 和grid和之前模块的页面相似,所以今天花费了一定时间了解了window控件。下面列出window的基础demo。

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link rel="stylesheet" href="styles/kendo.common.min.css" />
    <link rel="stylesheet" href="styles/kendo.default.min.css" />
    <link rel="stylesheet" href="styles/kendo.dataviz.min.css" />
    <link rel="stylesheet" href="styles/kendo.dataviz.default.min.css" />

    <script src="js/jquery.min.js"></script>
    <script src="js/kendo.all.min.js"></script>
</head>
<body>

        <div id="example">
            <div id="window">
                <div class="armchair"><img src="../content/web/window/armchair-402.png" alt="Artek Alvar Aalto - Armchair 402" /> Artek Alvar Aalto - Armchair 402</div>
                <p>Alvar Aalto is one of the greatest names in modern architecture and design. Glassblowers at the iittala factory still meticulously handcraft the legendary vases that are variations on one theme, fluid organic shapes that let the end user decide the use. Interpretations of the shape in new colors and materials add to the growing Alvar Aalto Collection that remains true to his original design.</p>

                <p>Born Hugo Alvar Henrik Aalto (February 3, 1898 - May 11, 1976) in Kuortane, Finland, was noted for his humanistic approach to modernism. He studied architecture at the Helsinki University of Technology from 1916 to 1921. In 1924 he married architect Aino Marsio.</p>

                <p>Alvar Aalto was one of the first and most influential architects of the Scandinavian modern movement, and a member of the Congres Internationaux d'Architecture Moderne. Major architectural works include the Finlandia Hall in Helsinki, Finland, and the campus of Helsinki University of Technology.</p>

                <p>Source: <a href="http://www.aalto.com/about-alvar-aalto.html" title="About Alvar Aalto">www.aalto.com</a></p>
            </div>

            <span id="undo" style="display:none" class="k-button">Click here to open the window.</span>

            <script>
                $(document).ready(function() {
                    var window = $("#window"),
                        undo = $("#undo")
                                .bind("click", function() {
                                    window.data("kendoWindow").open();
                                    undo.hide();
                                });

                    var onClose = function() {
                        undo.show();
                    }

                    if (!window.data("kendoWindow")) {
                        window.kendoWindow({
                            width: "600px",
                            title: "About Alvar Aalto",
                            actions: [
                                "Pin",
                                "Minimize",
                                "Maximize",
                                "Close"
                            ],
                            close: onClose
                        });
                    }
                });
            </script>

            <style>

                #example
                {
                    min-height:500px;
                }

                #undo {
                    text-align: center;
                    position: absolute;
                    white-space: nowrap;
                    padding: 1em;
                    cursor: pointer;
                }
                .armchair {
                    float: left;
                    margin: 30px 30px 120px 30px;
                    text-align: center;
                }
                .armchair img {
                    display: block;
                    margin-bottom: 10px;
                }
            </style>
        </div>


</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
WindowBuilder 是一个用于创建 Java 用户界面的开发工具,它可以与 Eclipse 集成使用使用 WindowBuilder 可以快速、方便地设计和布局 Swing 和 SWT GUI 应用程序。 WindowBuilder 提供了可视化界面设计工具,可以通过拖放和调整控件来创建界面。你可以选择使用 Swing 或 SWT 进行界面的设计。通过 WindowBuilder,你可以很容易地添加按钮、标签、文本框、列表框等控件,并设置它们的属性和样式。 使用 WindowBuilder,你可以直观地设计界面,并实时预览你的设计效果。你可以在设计界面时,很方便地调整控件的大小、位置和布局。可以使用布局管理器来自动定位和调整控件的位置和大小。 WindowBuilder 还支持代码生成功能,可以自动生成与界面相关的 Java 代码。这样你可以通过界面设计器快速生成复杂的界面结构和代码框架,省去手动编写大量代码的麻烦。 使用 WindowBuilder,你可以更加高效地开发 Java GUI 应用程序。它简化了界面设计的过程,减少了手动编写代码的工作量,让你可以更专注于业务逻辑的实现。 总而言之,WindowBuilder 是一个强大而灵活的工具,可以大大提高 Java GUI 应用程序开发的效率和质量,让你能够快速构建出优秀的界面。无论你是初学者还是经验丰富的开发者,都可以通过使用 WindowBuilder 来简化 GUI 应用程序的开发过程。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值