-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFocusSystem.ctxt
More file actions
58 lines (58 loc) · 4.83 KB
/
FocusSystem.ctxt
File metadata and controls
58 lines (58 loc) · 4.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#BlueJ class context
comment0.target=FocusSystem
comment0.text=\n\ The\ {@code\ FocusSystem}\ class\ manages\ the\ core\ functionality\ of\ the\ focus\ application.\n\ It\ handles\ the\ countdown\ timer,\ audio\ playback,\ coin\ management,\ and\ communicates\ with\ the\ GUI\n\ through\ the\ {@link\ FocusSystemListener}\ interface.\n
comment1.params=listener
comment1.target=FocusSystem(FocusSystemListener)
comment1.text=\n\ Constructs\ a\ new\ {@code\ FocusSystem}\ with\ the\ specified\ listener.\n\n\ @param\ listener\ The\ listener\ interface\ to\ communicate\ with\ the\ GUI.\n
comment10.params=
comment10.target=void\ stopAudio()
comment10.text=\n\ Stops\ the\ background\ audio\ if\ it\ is\ playing.\n\ Releases\ audio\ resources.\n
comment11.params=
comment11.target=void\ handleBreak()
comment11.text=\n\ Handles\ the\ break\ functionality\ during\ a\ focus\ session.\n\ If\ the\ timer\ is\ running,\ stops\ the\ countdown\ and\ audio,\ and\ unmutes.\n\ If\ the\ timer\ is\ not\ running,\ starts\ the\ countdown\ and\ mutes.\n\ Notifies\ the\ listener\ of\ the\ mute\ status\ change.\n
comment12.params=seconds
comment12.target=java.lang.String\ formatTime(int)
comment12.text=\n\ Formats\ the\ time\ in\ seconds\ to\ a\ string\ in\ "MM\:SS"\ format.\n\n\ @param\ seconds\ The\ time\ in\ seconds.\n\ @return\ A\ formatted\ time\ string.\n
comment13.params=lockNumber
comment13.target=void\ unlockFeature(int)
comment13.text=\n\ Attempts\ to\ unlock\ a\ feature\ identified\ by\ the\ lock\ number.\n\ If\ the\ feature\ is\ already\ unlocked\ or\ the\ lock\ number\ is\ invalid,\ does\ nothing.\n\ If\ the\ user\ has\ enough\ coins,\ deducts\ coins,\ unlocks\ the\ feature,\n\ and\ notifies\ the\ listener.\n\ If\ not\ enough\ coins,\ notifies\ the\ listener\ of\ the\ error.\n\n\ @param\ lockNumber\ The\ lock\ number\ of\ the\ feature\ (1-9).\n
comment14.params=
comment14.target=int\ getAccumulatedTime()
comment14.text=\n\ Retrieves\ the\ total\ accumulated\ focus\ time.\n\n\ @return\ The\ accumulated\ time\ in\ seconds.\n
comment15.params=
comment15.target=int\ getCompletedFocusCount()
comment15.text=\n\ Retrieves\ the\ number\ of\ completed\ focus\ sessions.\n\n\ @return\ The\ count\ of\ completed\ focus\ sessions.\n
comment16.params=
comment16.target=int\ getCoins()
comment16.text=\n\ Retrieves\ the\ current\ number\ of\ coins\ the\ user\ has.\n\n\ @return\ The\ number\ of\ coins.\n
comment17.params=lockNumber
comment17.target=boolean\ isFeatureUnlocked(int)
comment17.text=\n\ Checks\ if\ a\ feature\ identified\ by\ the\ lock\ number\ is\ unlocked.\n\n\ @param\ lockNumber\ The\ lock\ number\ of\ the\ feature\ (1-9).\n\ @return\ {@code\ true}\ if\ the\ feature\ is\ unlocked;\ {@code\ false}\ otherwise.\n
comment18.params=args
comment18.target=void\ main(java.lang.String[])
comment18.text=\n\ The\ main\ method\ to\ launch\ the\ focus\ application.\n\ Creates\ and\ displays\ the\ {@link\ FocusFrame}.\n\n\ @param\ args\ Command-line\ arguments\ (not\ used).\n
comment2.params=
comment2.target=boolean\ isMuted()
comment2.text=\n\ Checks\ if\ the\ audio\ is\ currently\ muted.\n\n\ @return\ {@code\ true}\ if\ muted;\ {@code\ false}\ otherwise.\n
comment3.params=
comment3.target=int\ getTimeLeft()
comment3.text=\n\ Retrieves\ the\ current\ time\ left\ in\ the\ countdown\ timer.\n\n\ @return\ The\ time\ left\ in\ seconds.\n
comment4.params=
comment4.target=void\ startCountdown()
comment4.text=\n\ Starts\ the\ countdown\ timer\ for\ the\ focus\ session.\n\ If\ the\ timer\ is\ already\ running,\ it\ does\ nothing.\n\ Updates\ the\ GUI\ with\ the\ remaining\ time\ every\ second.\n\ When\ the\ timer\ reaches\ zero,\ stops\ the\ timer,\ rewards\ coins,\n\ updates\ accumulated\ time\ and\ completed\ focus\ count,\ and\ notifies\ the\ listener.\n
comment5.params=
comment5.target=void\ stopCountdown()
comment5.text=\n\ Stops\ the\ countdown\ timer\ if\ it\ is\ running.\n
comment6.params=
comment6.target=void\ resetTimer()
comment6.text=\n\ Resets\ the\ countdown\ timer\ to\ the\ initial\ time\ left.\n\ Stops\ any\ running\ timer\ and\ updates\ the\ GUI\ with\ the\ reset\ time.\n
comment7.params=minutes
comment7.target=void\ setInitialTime(int)
comment7.text=\n\ Sets\ a\ new\ initial\ time\ for\ the\ focus\ session.\n\ Updates\ the\ current\ time\ left\ and\ notifies\ the\ GUI.\n\n\ @param\ minutes\ The\ new\ initial\ time\ in\ minutes.\n
comment8.params=
comment8.target=void\ toggleMute()
comment8.text=\n\ Toggles\ the\ mute\ status\ of\ the\ audio.\n\ If\ currently\ muted,\ unmutes\ by\ stopping\ the\ audio.\n\ If\ not\ muted,\ mutes\ by\ playing\ the\ background\ sound.\n\ Notifies\ the\ listener\ of\ the\ mute\ status\ change.\n
comment9.params=filePath
comment9.target=void\ playSound(java.lang.String)
comment9.text=\n\ Plays\ a\ background\ sound\ from\ the\ specified\ file\ path.\n\ Loops\ the\ audio\ continuously.\n\n\ @param\ filePath\ The\ path\ to\ the\ audio\ file.\n
numComments=19