Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

19
LINES

< > BotCompany Repo | #1025208 // DynFlexibleRateTimer

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (10870L/76K).

asclass DynFlexibleRateTimer > DynModule {
  FlexibleRateTimer timer = new(1);
  transient SimpleLiveValue<S> lvRate;
  
  // call timer.setRunnableAndStart in subclass's start method!
  start {
    timer.onFrequencyChanged(r persistMe);
    lvRate = lvFlexibleRateTimerFreq(timer);
  }
  
  visualize {
    ret northAndCenterWithMargins(
      withLabelLeftAndRight("Rate:", jLiveValueTextField_bothWays(lvRate), "Hz"), mainPanel());
  }
  
  JComponent mainPanel() { ret dm_printLogComponent(); }

  void cleanMeUp_DynFlexibleRateTimer { cleanUp(timer); }
}

Author comment

Began life as a copy of #1025207

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025208
Snippet name: DynFlexibleRateTimer
Eternal ID of this version: #1025208/3
Text MD5: e79ffa525114b2e89b5f1fdddbdf671f
Transpilation MD5: cf9ebd6ffeea163dbdb0c1aa5bca363f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-13 14:34:02
Source code size: 577 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 246 / 649
Version history: 2 change(s)
Referenced in: #1025211 - DynFlexibleRateTimerAndEnabled
#1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674)