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

25
LINES

< > BotCompany Repo | #1027030 - DynFullscreen

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

Libraryless. Click here for Pure Java version (10346L/72K).

abstract sclass DynFullscreen > DynModule {
  transient JFrame fullScreenFrame;
  
  void goFullscreen enter {
    if (fullScreenFrame != null) ret with activateFrame(fullScreenFrame);
    fullScreenFrame = showFullScreen(fullscreenVisualize());
    onFrameClose(fullScreenFrame, r { fullScreenFrame = null; });
  }
  
  JComponent fullscreenVisualize() { null; }
  
  void exitFullscreen enter {
    disposeFrame(fullScreenFrame);
  }
  
  // works only when we are in fullscreen mode
  void setFullscreenComponent(JComponent c) enter {
    setFrameContents(fullScreenFrame, c);
  }
  
  // switch to result of fullscreenVisualize()
  void defaultScreen enter {
    setFrameContents(fullScreenFrame, fullscreenVisualize());
  }
}

Author comment

Began life as a copy of #1027028

download  show line numbers  debug dex   

Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, pzhvpgtvlbxg, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027030
Snippet name: DynFullscreen
Eternal ID of this version: #1027030/7
Text MD5: d4f109153418eccc01ccc26b5dc15955
Transpilation MD5: f3d045a6a3c2c689472d818b0c3417d4
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-11 19:29:49
Source code size: 754 bytes / 25 lines
Pitched / IR pitched: No / No
Views / Downloads: 42 / 174
Version history: 6 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1027030 & http://1027030.tinybrain.de