Class: KeepYourHead::AdaptorCollection
- Defined in:
- lib/Keepyourhead/gui/WindowEditAdapters.rb
Instance Method Summary collapse
- #firstChild(object) ⇒ Object
- #insertAfter(parent, item, other) ⇒ Object
- #name(object) ⇒ Object
- #nextSibling(object) ⇒ Object
- #parent(object) ⇒ Object
- #previousSibling(object) ⇒ Object
- #realization(object) ⇒ Object
- #remove(item) ⇒ Object
Methods inherited from Adaptor
Instance Method Details
#firstChild(object) ⇒ Object
139 140 141 |
# File 'lib/Keepyourhead/gui/WindowEditAdapters.rb', line 139 def firstChild(object) object.items[0] end |
#insertAfter(parent, item, other) ⇒ Object
149 150 151 152 153 154 155 |
# File 'lib/Keepyourhead/gui/WindowEditAdapters.rb', line 149 def insertAfter(parent,item,other) if other then parent.itemInsertAfter(item,other) else parent.itemInsertFirst(item) end end |
#name(object) ⇒ Object
132 133 134 |
# File 'lib/Keepyourhead/gui/WindowEditAdapters.rb', line 132 def name(object) object.name end |
#nextSibling(object) ⇒ Object
142 143 144 |
# File 'lib/Keepyourhead/gui/WindowEditAdapters.rb', line 142 def nextSibling(object) object.parent.collectionNext(object) end |
#parent(object) ⇒ Object
136 137 138 |
# File 'lib/Keepyourhead/gui/WindowEditAdapters.rb', line 136 def parent(object) object.file end |
#previousSibling(object) ⇒ Object
145 146 147 |
# File 'lib/Keepyourhead/gui/WindowEditAdapters.rb', line 145 def previousSibling(object) object.parent.collectionPrevious(object) end |
#realization(object) ⇒ Object
159 160 161 |
# File 'lib/Keepyourhead/gui/WindowEditAdapters.rb', line 159 def realization(object) object.node end |
#remove(item) ⇒ Object
156 157 158 |
# File 'lib/Keepyourhead/gui/WindowEditAdapters.rb', line 156 def remove(item) item.parent.collectionRemove item end |