1 23 24 package org.objectweb.fractal.gui.model; 25 26 import java.util.List ; 27 28 32 33 public abstract class SharedInterface implements Interface { 34 35 38 39 protected SharedComponent owner; 40 41 44 45 protected Interface masterInterface; 46 47 54 55 SharedInterface ( 56 final SharedComponent owner, 57 final Interface masterInterface) 58 { 59 this.owner = owner; 60 this.masterInterface = masterInterface; 61 } 62 63 public Component getOwner () { 64 return owner; 65 } 66 67 public long getStatus () { 68 return masterInterface.getStatus(); 69 } 70 71 public void setStatus (final long status) { 72 } 74 75 public String getName () { 76 return masterInterface.getName(); 77 } 78 79 public void setName (final String name) { 80 masterInterface.setName(name); 81 } 82 83 public String getSignature () { 84 return masterInterface.getSignature(); 85 } 86 87 public void setSignature (final String signature) { 88 masterInterface.setSignature(signature); 89 } 90 91 public boolean isInternal () { 92 return masterInterface.isInternal(); 93 } 94 95 public boolean isOptional () { 96 return masterInterface.isOptional(); 97 } 98 99 public void setIsOptional (final boolean isOptional) { 100 masterInterface.setIsOptional(isOptional); 101 } 102 103 public boolean isCollection () { 104 return masterInterface.isCollection(); 105 } 106 107 public void setIsCollection (final boolean isCollection) { 108 masterInterface.setIsCollection(isCollection); 109 } 110 111 public Interface getMasterCollectionInterface () { 112 Interface i = masterInterface.getMasterCollectionInterface(); 113 return i == null ? null : owner.getInterface(i); 114 } 115 116 public List getSlaveCollectionInterfaces () { throw new RuntimeException ("Internal error"); 118 } 119 120 public Interface getComplementaryInterface () { 121 throw new RuntimeException ("Internal error"); 122 } 123 124 public Interface getMasterInterface () { 125 return masterInterface; 126 } 127 } 128 | Popular Tags |