Class: JLDrill::LoadKanjiContext
Overview
Load the kanji, radicals and kana files one after another.
Instance Attribute Summary collapse
#mainView, #parent, #viewBridge
Instance Method Summary
collapse
#addView, #exit, #isEntered?, #onExit, #peekAtView, #setupViews
Constructor Details
Returns a new instance of LoadKanjiContext.
Instance Attribute Details
#kanaFile ⇒ Object
Returns the value of attribute kanaFile.
12
13
14
|
# File 'lib/jldrill/contexts/LoadKanjiContext.rb', line 12
def kanaFile
@kanaFile
end
|
#kanjiFile ⇒ Object
Returns the value of attribute kanjiFile.
12
13
14
|
# File 'lib/jldrill/contexts/LoadKanjiContext.rb', line 12
def kanjiFile
@kanjiFile
end
|
#radicalsFile ⇒ Object
Returns the value of attribute radicalsFile.
12
13
14
|
# File 'lib/jldrill/contexts/LoadKanjiContext.rb', line 12
def radicalsFile
@radicalsFile
end
|
Instance Method Details
#createViews ⇒ Object
23
24
25
|
# File 'lib/jldrill/contexts/LoadKanjiContext.rb', line 23
def createViews
@mainView = @viewBridge.VBoxView.new(self)
end
|
#destroyViews ⇒ Object
27
28
29
|
# File 'lib/jldrill/contexts/LoadKanjiContext.rb', line 27
def destroyViews
@mainView = nil
end
|
#enter(parent, kanji, radicals, kana) ⇒ Object
64
65
66
67
68
69
70
|
# File 'lib/jldrill/contexts/LoadKanjiContext.rb', line 64
def enter(parent, kanji, radicals, kana)
super(parent)
@kanji = kanji
@radicals = radicals
@kana = kana
loadKanji
end
|
#exitLoadKanjiContext ⇒ Object
52
53
54
|
# File 'lib/jldrill/contexts/LoadKanjiContext.rb', line 52
def exitLoadKanjiContext
self.exit
end
|
#loadKana ⇒ Object
45
46
47
48
49
50
|
# File 'lib/jldrill/contexts/LoadKanjiContext.rb', line 45
def loadKana
@loadFileContext.onExit do
exitLoadKanjiContext
end
@loadFileContext.enter(self, @kana, @kanaFile)
end
|
#loadKanji ⇒ Object
31
32
33
34
35
36
|
# File 'lib/jldrill/contexts/LoadKanjiContext.rb', line 31
def loadKanji
@loadFileContext.onExit do
loadRadicals
end
@loadFileContext.enter(self, @kanji, @kanjiFile)
end
|
#loadRadicals ⇒ Object
38
39
40
41
42
43
|
# File 'lib/jldrill/contexts/LoadKanjiContext.rb', line 38
def loadRadicals
@loadFileContext.onExit do
loadKana
end
@loadFileContext.enter(self, @radicals, @radicalsFile)
end
|
#startLongEvent ⇒ Object
56
57
58
|
# File 'lib/jldrill/contexts/LoadKanjiContext.rb', line 56
def startLongEvent()
@parent.startLongEvent()
end
|
#stopLongEvent ⇒ Object
60
61
62
|
# File 'lib/jldrill/contexts/LoadKanjiContext.rb', line 60
def stopLongEvent()
@parent.stopLongEvent()
end
|