1
4
5 import org.aswing.ASWingConstants;
6 import org.aswing.Component;
7 import org.aswing.plaf.SeparatorUI;
8 import org.aswing.UIManager;
9
10
22 class org.aswing.JSeparator extends Component {
23
24
27 public static var HORIZONTAL:Number = ASWingConstants.HORIZONTAL;
28
31 public static var VERTICAL:Number = ASWingConstants.VERTICAL;
32
33 private var orientation:Number;
34
35
41 public function JSeparator(orientation:Number){
42 this.orientation = (orientation == undefined ? HORIZONTAL : orientation);
43 setFocusable(false);
44 updateUI();
45 }
46
47 public function getUI():SeparatorUI{
48 return SeparatorUI(ui);
49 }
50
51 public function setUI(ui:SeparatorUI):Void{
52 super.setUI(ui);
53 }
54
55 public function updateUI():Void{
56 setUI(SeparatorUI(UIManager.getUI(this)));
57 }
58
59 public function getUIClassID():String{
60 return "SeparatorUI";
61 }
62
63 public function getOrientation():Number{
64 return orientation;
65 }
66
67 public function setOrientation(orientation:Number):Void{
68 if (this.orientation != orientation){
69 this.orientation = orientation;
70 revalidate();
71 repaint();
72 }
73 }
74 }
75