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

Quick Search    Search Deep

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


1   /*
2    * WOAssociationEventRow.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  import com.webobjects.eocontrol.*;
13  
14  public class WOAssociationEventRow extends WOEventRow {
15      public WOAssociationEventRow(WOContext aContext)  {
16          super(aContext);
17      }
18  
19      public String declarationName()
20      {
21          return ((WOAssociation.Event)event).declarationName();
22      }
23  
24      public String bindingName()
25      {
26          String binding, keyPath;
27          boolean isPush;
28  
29          binding = ((WOAssociation.Event)event).bindingName();
30          keyPath = ((WOAssociation.Event)event).keyPath();
31          isPush = ((WOAssociation.Event)event).isPush();
32          String pushText = ((isPush) ? "push" : "pull");
33          if (!keyPath.equals(binding)) {
34              return keyPath+" = "+binding+" : "+ pushText;
35          } else {
36              return keyPath + " : "+ pushText;
37          }
38      }
39  
40      public String hyperlinkTitle()
41      {
42          return declarationName()+" : "+ event.signatureOfType(WOEvent.ComponentSignature);
43      }
44  
45      public String backgroundColor()
46      {
47          if (((WOAssociation.Event)event).isPush())
48              return "#cccccc";
49          else
50              return "#eeeeee";
51      }
52  }