01: package xui.samples.carousel.components;
02:
03: import com.xoetrope.swing.XRotatedText;
04: import net.xoetrope.xui.*;
05: import net.xoetrope.swing.*;
06:
07: /**
08: * Demonstarte some features of the rotated text component
09: * <p>Copyright: Xoetrope Ltd. (c) 2001-2006</p>
10: * <p>License: see license.txt</p>
11: * <p>$Revision: 1.6 $</p>
12: */
13: public class Rotated extends XPage {
14: private XRotatedText rotated;
15:
16: public Rotated() {
17: }
18:
19: public void pageCreated() {
20: rotated = ((XRotatedText) findComponent("rotated"));
21: }
22:
23: /**
24: * Change the number of columns in the flow area
25: */
26: public void showColumns() {
27: int cols = rotated.getNumColumns();
28: if (cols < 2)
29: rotated.setNumColumns(2);
30: else
31: rotated.setNumColumns(1);
32: rotated.init();
33: }
34: }
|