summaryrefslogtreecommitdiff
path: root/swat/apps/qooxdoo-examples/test/Border_1.html
blob: 6aa6af6253bf6a67c51f49b5476856aad5142002 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>qooxdoo &raquo; Demo</title>
  <link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/>
  <!--[if IE]>
  <link type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/>
  <![endif]-->
  <script type="text/javascript" src="../../script/qx.js"></script>
</head>
<body>
  <script type="text/javascript" src="../../script/layout.js"></script>

  <div id="demoDescription">
    <p>Test for qx.renderer.border.Border, a cross-browser advanced border engine.
    Each instance of qx.renderer.border.Border allows to affect multiple QxTerminators.
    When the one property of the qx.renderer.border.Border change, it informs all bounded
    QxTerminators to rerender the border.</p>

    <p>The qx.renderer.border.Border constructor also allows you to convert a string
    (css-like) into and qx.renderer.border.Border instance (last example).</p>
  </div>

  <script type="text/javascript">
  qx.core.Init.getInstance().defineMain(function()
  {
    var d = qx.ui.core.ClientDocument.getInstance();



    var c1 = new qx.ui.basic.Terminator;
    with(c1)
    {
      setTop(48);
      setLeft(20);
      setWidth(150);
      setHeight(40);
      setBackgroundColor(new qx.renderer.color.Color("#fff"));
    };
    d.add(c1);

    var c2 = new qx.ui.basic.Terminator;
    with(c2)
    {
      setTop(48);
      setLeft(200);
      setWidth(150);
      setHeight(40);
      setBackgroundColor(new qx.renderer.color.Color("#fff"));
    };
    d.add(c2);

    var b1 = new qx.renderer.border.Border;

    // before set border properties
    c1.setBorder(b1);

    b1.setWidth(2);
    b1.setStyle("solid");
    b1.setColor(new qx.renderer.color.Color("black"));
    b1.setBottomStyle("dotted");
    b1.setTopColor(new qx.renderer.color.Color("blue"));

    // after set border properties
    c2.setBorder(b1);








    var c3 = new qx.ui.basic.Terminator;
    with(c3)
    {
      setTop(110);
      setLeft(20);
      setWidth(40);
      setHeight(40);
      setBackgroundColor(new qx.renderer.color.ColorObject("threedface"));
    };
    d.add(c3);

    c3.setBorder(qx.renderer.border.BorderPresets.getInstance().thinInset);

    var c4 = new qx.ui.basic.Terminator;
    with(c4)
    {
      setTop(110);
      setLeft(80);
      setWidth(40);
      setHeight(40);
      setBackgroundColor(new qx.renderer.color.ColorObject("threedface"));
    };
    d.add(c4);

    c4.setBorder(qx.renderer.border.BorderPresets.getInstance().thinOutset);

    var c5 = new qx.ui.basic.Terminator;
    with(c5)
    {
      setTop(110);
      setLeft(140);
      setWidth(40);
      setHeight(40);
      setBackgroundColor(new qx.renderer.color.ColorObject("threedface"));
    };
    d.add(c5);

    c5.setBorder(qx.renderer.border.BorderPresets.getInstance().inset);


    var c6 = new qx.ui.basic.Terminator;
    with(c6)
    {
      setTop(110);
      setLeft(200);
      setWidth(40);
      setHeight(40);
      setBackgroundColor(new qx.renderer.color.ColorObject("threedface"));
    };
    d.add(c6);

    c6.setBorder(qx.renderer.border.BorderPresets.getInstance().outset);


    var c7 = new qx.ui.basic.Terminator;
    with(c7)
    {
      setTop(110);
      setLeft(260);
      setWidth(40);
      setHeight(40);
      setBackgroundColor(new qx.renderer.color.ColorObject("threedface"));
    };
    d.add(c7);

    c7.setBorder(qx.renderer.border.BorderPresets.getInstance().groove);

    var c8 = new qx.ui.basic.Terminator;
    with(c8)
    {
      setTop(110);
      setLeft(320);
      setWidth(40);
      setHeight(40);
      setBackgroundColor(new qx.renderer.color.ColorObject("threedface"));
    };
    d.add(c8);

    c8.setBorder(qx.renderer.border.BorderPresets.getInstance().ridge);



    var c9 = new qx.ui.basic.Terminator;
    with(c9)
    {
      setTop(110);
      setLeft(380);
      setWidth(40);
      setHeight(40);
      setBackgroundColor(new qx.renderer.color.ColorObject("threedface"));
    };
    d.add(c9);

    var b2 = qx.renderer.border.Border.fromString("2px solid red");
    c9.setBorder(b2);
    
    
    
    // Color Themes
    qx.manager.object.ColorManager.getInstance().createThemeList(d, 220, 248);
  });
  </script>
</body>
</html>