Changeset 681
- Timestamp:
- 08/29/12 10:05:50 (12 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-core-events-test/src/test/java/de/ugoe/cs/quest/eventcore/guimodel/AbstractDefaultGUIElementTest.java
r655 r681 123 123 } 124 124 125 @Override 126 public String getStringIdentifier() { 127 return "DUMMY"; 128 } 129 125 130 } 126 131 -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/Event.java
r655 r681 161 161 String id = type.toString(); 162 162 if( target!=null ) { 163 id += "." + target. toString();163 id += "." + target.getStringIdentifier(); 164 164 } 165 165 return id; -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/IEventTarget.java
r655 r681 15 15 16 16 public String getPlatform(); 17 18 public String getStringIdentifier(); 17 19 } -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/gui/KeyboardFocusChange.java
r655 r681 1 1 2 package de.ugoe.cs.quest.eventcore.gui; 2 3 … … 8 9 */ 9 10 public class KeyboardFocusChange implements IInteraction { 10 11 11 12 /** */ 12 13 private static final long serialVersionUID = 1L; … … 50 51 return "keyboard focus changed"; 51 52 } 53 54 /* 55 * (non-Javadoc) 56 * 57 * @see java.lang.Object#equals(java.lang.Object) 58 */ 59 @Override 60 public boolean equals(Object obj) { 61 if (obj instanceof KeyboardFocusChange) { 62 return true; 63 } 64 return false; 65 } 66 67 /* 68 * (non-Javadoc) 69 * 70 * @see java.lang.Object#hashCode() 71 */ 72 @Override 73 public int hashCode() { 74 return getClass().hashCode(); 75 } 52 76 } -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/gui/MouseButtonDown.java
r655 r681 77 77 return false; 78 78 } 79 80 /* 81 * (non-Javadoc) 82 * 83 * @see java.lang.Object#equals(java.lang.Object) 84 */ 85 @Override 86 public boolean equals(Object obj) { 87 if (obj instanceof MouseButtonDown) { 88 return getButton().equals(((MouseButtonDown) obj).getButton()); 89 } 90 return false; 91 } 92 93 /* 94 * (non-Javadoc) 95 * 96 * @see java.lang.Object#hashCode() 97 */ 98 @Override 99 public int hashCode() { 100 return getButton().hashCode(); 101 } 79 102 80 103 } -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/gui/MouseButtonInteraction.java
r655 r681 33 33 return button; 34 34 } 35 36 /* 37 * (non-Javadoc) 38 * 39 * @see java.lang.Object#equals(java.lang.Object) 40 */ 41 @Override 42 public boolean equals(Object obj) { 43 if (obj instanceof MouseButtonInteraction) { 44 return getButton().equals(((MouseButtonInteraction) obj).getButton()); 45 } 46 return false; 47 } 35 48 49 /* 50 * (non-Javadoc) 51 * 52 * @see java.lang.Object#hashCode() 53 */ 54 @Override 55 public int hashCode() { 56 return getButton().hashCode(); 57 } 36 58 } -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/gui/MouseButtonUp.java
r655 r681 78 78 } 79 79 80 /* 81 * (non-Javadoc) 82 * 83 * @see java.lang.Object#equals(java.lang.Object) 84 */ 85 @Override 86 public boolean equals(Object obj) { 87 if (obj instanceof MouseButtonUp) { 88 return getButton().equals(((MouseButtonUp) obj).getButton()); 89 } 90 return false; 91 } 92 93 /* 94 * (non-Javadoc) 95 * 96 * @see java.lang.Object#hashCode() 97 */ 98 @Override 99 public int hashCode() { 100 return getButton().hashCode(); 101 } 80 102 } -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/gui/MouseClick.java
r655 r681 78 78 } 79 79 80 /* 81 * (non-Javadoc) 82 * 83 * @see java.lang.Object#equals(java.lang.Object) 84 */ 85 @Override 86 public boolean equals(Object obj) { 87 if (obj instanceof MouseClick) { 88 return getButton().equals(((MouseClick) obj).getButton()); 89 } 90 return false; 91 } 92 93 /* 94 * (non-Javadoc) 95 * 96 * @see java.lang.Object#hashCode() 97 */ 98 @Override 99 public int hashCode() { 100 return getButton().hashCode(); 101 } 80 102 } -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/gui/MouseDoubleClick.java
r655 r681 78 78 } 79 79 80 /* 81 * (non-Javadoc) 82 * 83 * @see java.lang.Object#equals(java.lang.Object) 84 */ 85 @Override 86 public boolean equals(Object obj) { 87 if (obj instanceof MouseDoubleClick) { 88 return getButton().equals(((MouseDoubleClick) obj).getButton()); 89 } 90 return false; 91 } 92 93 /* 94 * (non-Javadoc) 95 * 96 * @see java.lang.Object#hashCode() 97 */ 98 @Override 99 public int hashCode() { 100 return getButton().hashCode(); 101 } 80 102 } -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/gui/TextInput.java
r655 r681 48 48 return false; 49 49 } 50 51 /* 52 * (non-Javadoc) 53 * 54 * @see java.lang.Object#equals(java.lang.Object) 55 */ 56 @Override 57 public boolean equals(Object obj) { 58 if (obj instanceof TextInput) { 59 return true; 60 } 61 return false; 62 } 63 64 /* 65 * (non-Javadoc) 66 * 67 * @see java.lang.Object#hashCode() 68 */ 69 @Override 70 public int hashCode() { 71 return getClass().hashCode(); 72 } 50 73 51 74 } -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/gui/TextSelection.java
r655 r681 48 48 return false; 49 49 } 50 51 /* 52 * (non-Javadoc) 53 * 54 * @see java.lang.Object#equals(java.lang.Object) 55 */ 56 @Override 57 public boolean equals(Object obj) { 58 if (obj instanceof TextSelection) { 59 return true; 60 } 61 return false; 62 } 63 64 /* 65 * (non-Javadoc) 66 * 67 * @see java.lang.Object#hashCode() 68 */ 69 @Override 70 public int hashCode() { 71 return getClass().hashCode(); 72 } 50 73 51 74 } -
trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/testutils/DummyGUIElement.java
r655 r681 1 1 2 package de.ugoe.cs.quest.tasktrees.testutils; 2 3 … … 12 13 */ 13 14 public class DummyGUIElement extends AbstractDefaultGUIElement implements IGUIElement { 14 15 15 16 /** */ 16 17 private static final long serialVersionUID = 1L; … … 27 28 } 28 29 29 /* (non-Javadoc) 30 /* 31 * (non-Javadoc) 32 * 30 33 * @see de.ugoe.cs.quest.eventcore.IEventTarget#getPlatform() 31 34 */ … … 33 36 public String getPlatform() { 34 37 return "Dummy"; 38 } 39 40 /* 41 * (non-Javadoc) 42 * 43 * @see de.ugoe.cs.quest.eventcore.IEventTarget#getStringIdentifier() 44 */ 45 @Override 46 public String getStringIdentifier() { 47 return name; 35 48 } 36 49 -
trunk/quest-plugin-guitar/src/main/java/de/ugoe/cs/quest/plugin/guitar/eventcore/GUITAREventTarget.java
r556 r681 1 1 2 package de.ugoe.cs.quest.plugin.guitar.eventcore; 2 3 … … 15 16 16 17 private static final long serialVersionUID = 1L; 17 18 18 19 String widgetId; 19 20 20 21 public GUITAREventTarget(String widgetId) { 21 22 this.widgetId = widgetId; 22 23 } 23 24 24 /* (non-Javadoc) 25 /* 26 * (non-Javadoc) 27 * 25 28 * @see de.ugoe.cs.quest.eventcore.IEventTarget#getPlatform() 26 29 */ 27 30 @Override 28 31 public String getPlatform() { 29 // TODO Auto-generated method stub 30 System.out.println("TODO: implement GUITAREventTarget.getPlatform "); 31 return null; 32 return "GUITAR"; 32 33 } 33 34 35 @Override 36 public String getStringIdentifier() { 37 return this.toString(); 38 } 39 34 40 /* 35 41 * (non-Javadoc) 42 * 36 43 * @see java.lang.Object#toString() 37 44 */ … … 41 48 } 42 49 50 /* 51 * (non-Javadoc) 52 * 53 * @see java.lang.Object#equals(java.lang.Object) 54 */ 55 @Override 56 public boolean equals(Object obj) { 57 if (obj instanceof GUITAREventTarget) { 58 if (widgetId != null) { 59 return widgetId.equals(((GUITAREventTarget) obj).widgetId); 60 } 61 else { 62 return ((GUITAREventTarget) obj).widgetId == null; 63 } 64 } 65 return false; 66 } 67 68 /* 69 * (non-Javadoc) 70 * 71 * @see java.lang.Object#hashCode() 72 */ 73 @Override 74 public int hashCode() { 75 int hash = 13; 76 if (widgetId != null) { 77 hash = widgetId.hashCode(); 78 } 79 return hash; 80 } 81 43 82 } -
trunk/quest-plugin-guitar/src/main/java/de/ugoe/cs/quest/plugin/guitar/eventcore/GUITAREventType.java
r556 r681 1 1 2 package de.ugoe.cs.quest.plugin.guitar.eventcore; 2 3 … … 16 17 /** */ 17 18 private static final long serialVersionUID = 1L; 18 19 19 20 String guitarEventId; 20 21 21 22 public GUITAREventType(String eventId) { 22 23 this.guitarEventId = eventId; 23 24 } 24 25 /* (non-Javadoc) 25 26 /* 27 * (non-Javadoc) 28 * 26 29 * @see de.ugoe.cs.quest.eventcore.IEventType#getName() 27 30 */ … … 30 33 return "GUITAREventType"; 31 34 } 32 35 33 36 /* 34 37 * (non-Javadoc) 38 * 35 39 * @see java.lang.Object#toString() 36 40 */ … … 40 44 } 41 45 46 /* 47 * (non-Javadoc) 48 * 49 * @see java.lang.Object#equals(java.lang.Object) 50 */ 51 @Override 52 public boolean equals(Object obj) { 53 if (obj instanceof GUITAREventType) { 54 if (guitarEventId != null) { 55 return guitarEventId.equals(((GUITAREventType) obj).guitarEventId); 56 } 57 else { 58 return ((GUITAREventType) obj).guitarEventId == null; 59 } 60 } 61 return false; 62 } 63 64 /* 65 * (non-Javadoc) 66 * 67 * @see java.lang.Object#hashCode() 68 */ 69 @Override 70 public int hashCode() { 71 int hash = 37; 72 if (guitarEventId != null) { 73 hash = guitarEventId.hashCode(); 74 } 75 return hash; 76 } 77 42 78 } -
trunk/quest-plugin-jfc/src/main/java/de/ugoe/cs/quest/plugin/jfc/guimodel/JFCGUIElement.java
r655 r681 92 92 */ 93 93 @Override 94 public String getStringIdentifier() { 95 String str = this.toString(); 96 if( getParent()!=null ) { 97 return getParent().getStringIdentifier() + "->" + str; 98 } 99 return str; 100 } 101 102 /* 103 * (non-Javadoc) 104 * 105 * @see java.lang.Object#toString() 106 */ 107 @Override 94 108 public String toString() { 95 109 String str = getElementDescriptor() + "(" + getName() + ", " + getElementHash() + "," + getIcon() + "," + getIndex() +")"; 96 if( getParent()!=null ) {97 return getParent().toString() + "->" + str;98 }99 110 return str; 100 111 } -
trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/guimodel/MFCGUIElement.java
r655 r681 78 78 ((MFCGUIElementSpec) super.getSpecification()).update(furtherSpec); 79 79 } 80 81 @Override 82 public String getStringIdentifier() { 83 String str = this.toString(); 84 if( getParent()!=null ) { 85 return getParent().getStringIdentifier() + "->" + str; 86 } 87 return str; 88 } 80 89 81 90 /* (non-Javadoc) -
trunk/quest-plugin-php/src/main/java/de/ugoe/cs/quest/plugin/php/eventcore/PHPEventTarget.java
r655 r681 1 1 2 package de.ugoe.cs.quest.plugin.php.eventcore; 2 3 … … 49 50 } 50 51 52 @Override 53 public String getStringIdentifier() { 54 return this.toString(); 55 } 56 51 57 /* 52 58 * (non-Javadoc) … … 59 65 } 60 66 67 /* 68 * (non-Javadoc) 69 * 70 * @see java.lang.Object#equals() 71 */ 72 @Override 73 public boolean equals(Object obj) { 74 if (obj instanceof PHPEventTarget) { 75 if (path != null) { 76 return path.equals(((PHPEventTarget) obj).path); 77 } 78 else { 79 return ((PHPEventTarget) obj).path == null; 80 } 81 } 82 return false; 83 } 84 85 /* 86 * (non-Javadoc) 87 * 88 * @see java.lang.Object#hashCode() 89 */ 90 @Override 91 public int hashCode() { 92 int hash = 3; 93 if (path != null) { 94 hash = path.hashCode(); 95 } 96 return hash; 97 } 98 61 99 } -
trunk/quest-plugin-php/src/main/java/de/ugoe/cs/quest/plugin/php/eventcore/PHPEventType.java
r655 r681 1 1 2 package de.ugoe.cs.quest.plugin.php.eventcore; 2 3 … … 27 28 * </p> 28 29 */ 29 private String path;30 private final String path; 30 31 31 32 /** … … 34 35 * </p> 35 36 */ 36 private List<String> postVars;37 private final List<String> postVars; 37 38 38 39 /** … … 41 42 * </p> 42 43 */ 43 private List<String> getVars;44 private final List<String> getVars; 44 45 45 46 /** … … 89 90 } 90 91 92 /* 93 * (non-Javadoc) 94 * 95 * @see java.lang.Object#equals(java.lang.Object) 96 */ 97 @Override 98 public boolean equals(Object obj) { 99 if (obj instanceof PHPEventType) { 100 PHPEventType other = (PHPEventType) obj; 101 return ((path == null && other.path == null) || path.equals(other.path)) && 102 ((postVars == null && other.postVars == null) || postVars.equals(other.postVars)) && 103 ((getVars == null && other.getVars == null) || getVars.equals(other.getVars)); 104 } 105 return false; 106 } 107 108 /* 109 * (non-Javadoc) 110 * 111 * @see java.lang.Object#hashCode() 112 */ 113 @Override 114 public int hashCode() { 115 int hash = 17; 116 int multiplier = 7; 117 if (path != null) { 118 hash = hash * multiplier + path.hashCode(); 119 } 120 if (postVars != null) { 121 hash = hash * multiplier + postVars.hashCode(); 122 } 123 if (getVars != null) { 124 hash = hash * multiplier + getVars.hashCode(); 125 } 126 return hash; 127 } 128 91 129 }
Note: See TracChangeset
for help on using the changeset viewer.