Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/webobjects/woextensions/WOAppleScript.java


1   /*
2    * WOAppleScript.java
3    * © Copyright 2001 Apple Computer, Inc. All rights reserved.
4    * This a modified version.
5    * Original license: http://www.opensource.apple.com/apsl/
6    */
7   
8   package com.webobjects.woextensions;
9   
10  import com.webobjects.appserver.*;
11  import com.webobjects.foundation.*;
12  
13  /** @deprecated
14      The WOAppleScript component is deprecated.
15  */
16  public class WOAppleScript extends WOComponent {
17  
18      protected String _controller;
19  
20      protected String Undefined = "Undefined";
21      
22      public WOAppleScript(WOContext aContext)  {
23          super(aContext);
24          _controller = Undefined; // this marks an undefined id
25      }
26  
27      public boolean synchronizesVariablesWithBindings() {
28          return false;
29      }
30  
31      public String controller()  {
32          if (_controller == Undefined) {
33              _controller = (String) _WOJExtensionsUtil.valueForBindingOrNull("controller",this);
34          }
35          return _controller;
36      }
37  
38      public String height()  {
39          String aHeight;
40          String aController = controller();
41          if ((aController!=null) && aController.toLowerCase().equals("true")) {
42              aHeight = "25";
43          } else {
44              aHeight = valueForBinding("height").toString();
45          }
46  
47          return aHeight;
48      }
49  
50      public String width()  {
51          String aWidth;
52          String aController = controller();
53          if ((aController!=null) && aController.toLowerCase().equals("true")) {
54              aWidth = "108";
55          } else {
56              aWidth = valueForBinding("width").toString();
57          }
58          return aWidth;
59      }
60  }