1 | static JMenuItem directJMenuItem(Action a) {
|
2 | ret new JMenuItem(a) {
|
3 | public Dimension getMaximumSize() {
|
4 | return new Dimension(super.getPreferredSize().width, super.getMaximumSize().height); |
5 | } |
6 | }; |
7 | } |
8 | |
9 | static JMenuItem directJMenuItem(S text, O action) {
|
10 | ret directJMenuItem(abstractAction(text, action)); |
11 | } |
Began life as a copy of #1010357
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1010359 |
| Snippet name: | directJMenuItem - JMenuItem for adding to JMenuBar |
| Eternal ID of this version: | #1010359/5 |
| Text MD5: | 057528d2eb5b6d17705a97c982877b00 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-09-12 16:18:37 |
| Source code size: | 334 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 766 / 806 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |