MCPcopy Create free account
hub / github.com/dorkbox/SystemTray / bind

Method bind

src/dorkbox/systemTray/Menu.java:155–170  ·  view source on GitHub ↗

@param peer the platform specific implementation for all actions for this type @param parent the parent of this menu, null if the parent is the system tray @param imageResizeUtil the utility used to resize images. This can be Tray specific because of cache requirements

(final MenuPeer peer, final Menu parent, ImageResizeUtil imageResizeUtil)

Source from the content-addressed store, hash-verified

153 * @param imageResizeUtil the utility used to resize images. This can be Tray specific because of cache requirements
154 */
155 public
156 void bind(final MenuPeer peer, final Menu parent, ImageResizeUtil imageResizeUtil) {
157 super.bind(peer, parent, imageResizeUtil);
158
159 List<Entry> copy;
160 synchronized (menuEntries) {
161 // access on this object must be synchronized for object visibility
162 // a copy is made to prevent deadlocks from occurring when operating in different threads
163 copy = new ArrayList<>(menuEntries);
164 }
165
166 for (int i = 0, menuEntriesSize = copy.size(); i < menuEntriesSize; i++) {
167 final Entry menuEntry = copy.get(i);
168 peer.add(this, menuEntry, i);
169 }
170 }
171
172 /**
173 * Adds a menu entry, separator, or sub-menu to this menu

Callers 13

initFunction · 0.45
installHookFunction · 0.45
onTrayIconAddedFunction · 0.45
_WindowsNativeTrayMethod · 0.45
_SwingTrayMethod · 0.45
addMethod · 0.45
_OsxAwtTrayMethod · 0.45
addMethod · 0.45
_AwtTrayMethod · 0.45
addMethod · 0.45
addMethod · 0.45

Calls 2

addMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected