Action Bar Cheat Sheet
Action Bar Cheat Sheet
- cheat sheet -
<text>Hello ActionBar
<line>
<button>
label=<html><h1><font color='red'>Press me</font></h1></html>
bgcolor=#FFFF88
arg=<macro>
print("Hello"); ● label=... the button’s text label (also takes
</macro> html)
<button> ● bgcolor=#ffff88the button’s background color
icon=bar_name/microscope.png ● icon=... the button’s face icon
arg=<macro>
print("Hello"); ● arg=... the button’s action
</macro> ○ arg=s=”hello”;print(s); single line
○ arg=<macro>... </macro> multi-line
○ arg=<tool>... </tool> multi-line tool
○ arg=<hide> toggle ImageJ main window
○ arg=<close> close this bar
CC BY 4.0, J. Mutterer, 2021
Button modifiers
<codeLibrary> Specify macro code that will be shared across buttons. The same
function test() {
… code is appended to each button code. Typically functions.
}
</codeLibrary>
<DnDAction> Bar accepts drag and drop and specify macro code to be run upon
f=getArgument();
open(f); dropping a file on this bar
…
</DnDAction>
using
<stickToImageJ>