Class: JLDrill::ShowAllVocabularyContext::VocabularyTableView
- Inherits:
-
Context::View
- Object
- Context::View
- JLDrill::ShowAllVocabularyContext::VocabularyTableView
- Defined in:
- lib/jldrill/contexts/ShowAllVocabularyContext.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#quiz ⇒ Object
readonly
Returns the value of attribute quiz.
Attributes inherited from Context::View
Instance Method Summary collapse
-
#addItem(item) ⇒ Object
Add the item to the table This happens when an item has been added while the table is open.
-
#close ⇒ Object
Close the window Closing the window exits the context.
-
#destroy ⇒ Object
Destroy the window.
-
#initialize(context) ⇒ VocabularyTableView
constructor
A new instance of VocabularyTableView.
-
#removeItem(item) ⇒ Object
Remove an item from the table This happens when the item has been removed while the table is open.
-
#select(item) ⇒ Object
Select one of the items in the table.
-
#showBusy(bool) ⇒ Object
Show the busy cursor in the UI if bool is true.
-
#update(items) ⇒ Object
Update the items in the table.
-
#updateItem(item) ⇒ Object
Modify one of the items in the table This happens when an item has been edited while the table is open.
Methods inherited from Context::View
#addView, #getWidget, #removeView, #removingViewFrom, #viewAddedTo
Constructor Details
#initialize(context) ⇒ VocabularyTableView
Returns a new instance of VocabularyTableView.
17 18 19 20 21 |
# File 'lib/jldrill/contexts/ShowAllVocabularyContext.rb', line 17 def initialize(context) super(context) @quiz = nil @items = nil end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
15 16 17 |
# File 'lib/jldrill/contexts/ShowAllVocabularyContext.rb', line 15 def items @items end |
#quiz ⇒ Object (readonly)
Returns the value of attribute quiz.
15 16 17 |
# File 'lib/jldrill/contexts/ShowAllVocabularyContext.rb', line 15 def quiz @quiz end |
Instance Method Details
#addItem(item) ⇒ Object
Add the item to the table This happens when an item has been added while the table is open
47 48 49 |
# File 'lib/jldrill/contexts/ShowAllVocabularyContext.rb', line 47 def addItem(item) # Please define in the concrete class end |
#close ⇒ Object
Close the window Closing the window exits the context.
67 68 69 70 71 |
# File 'lib/jldrill/contexts/ShowAllVocabularyContext.rb', line 67 def close # Please define in the concrete class. # Run super() after everything is complete. @context.exit end |
#destroy ⇒ Object
Destroy the window
24 25 26 |
# File 'lib/jldrill/contexts/ShowAllVocabularyContext.rb', line 24 def destroy # Please define in the concrete class end |
#removeItem(item) ⇒ Object
Remove an item from the table This happens when the item has been removed while the table is open
54 55 56 |
# File 'lib/jldrill/contexts/ShowAllVocabularyContext.rb', line 54 def removeItem(item) # Please define in the concrete class end |
#select(item) ⇒ Object
Select one of the items in the table
35 36 37 |
# File 'lib/jldrill/contexts/ShowAllVocabularyContext.rb', line 35 def select(item) # Please define in the concrete class end |
#showBusy(bool) ⇒ Object
Show the busy cursor in the UI if bool is true. This happens during a long event where the user can’t interact with the window
61 62 63 |
# File 'lib/jldrill/contexts/ShowAllVocabularyContext.rb', line 61 def showBusy(bool) # Please define in the concrete class end |
#update(items) ⇒ Object
Update the items in the table
29 30 31 32 |
# File 'lib/jldrill/contexts/ShowAllVocabularyContext.rb', line 29 def update(items) @items = items # Please define the rest in the concrete class end |
#updateItem(item) ⇒ Object
Modify one of the items in the table This happens when an item has been edited while the table is open
41 42 43 |
# File 'lib/jldrill/contexts/ShowAllVocabularyContext.rb', line 41 def updateItem(item) # Please define in the concrete class end |