Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
283,900 | void (@NotNull JComponent component) { List<HoverListener> list = ClientProperty.get(component, HOVER_LISTENER_LIST_KEY); if (list == null) { component.putClientProperty(HOVER_LISTENER_LIST_KEY, list = ContainerUtil.createLockFreeCopyOnWriteList()); } list.add(0, this); } | addTo |
283,901 | void (@NotNull JComponent component) { List<HoverListener> list = ClientProperty.get(component, HOVER_LISTENER_LIST_KEY); if (list != null) { list.remove(this); } } | removeFrom |
283,902 | List<HoverListener> (@NotNull Component component) { List<HoverListener> list = ClientProperty.get(component, HOVER_LISTENER_LIST_KEY); return list == null ? Collections.emptyList() : list; } | getAll |
283,903 | void (@NotNull Component component, int x, int y) { mouseMoved(component, x, y); } | mouseEntered |
283,904 | void (@NotNull Component component, int x, int y) { update(component, tree -> TreeUtil.getRowForLocation(tree, x, y)); } | mouseMoved |
283,905 | void (@NotNull Component component) { update(component, tree -> -1); } | mouseExited |
283,906 | void (@NotNull Component component, @NotNull ToIntFunction<? super JTree> rowFunc) { if (component instanceof JTree tree) { int rowNew = rowFunc.applyAsInt(tree); int rowOld = rowHolder.getAndSet(rowNew); if (rowNew != rowOld) onHover(tree, rowNew); } } | update |
283,907 | void (@NotNull JTree tree, int row) { setHoveredRow(tree, row); // support JBTreeTable and similar views Object property = tree.getClientProperty(RenderingUtil.FOCUSABLE_SIBLING); if (property instanceof JTable) TableHoverListener.setHoveredRow((JTable)property, row); } | onHover |
283,908 | void (@NotNull JTree tree, int rowNew) { int rowOld = getHoveredRow(tree); if (rowNew == rowOld) return; tree.putClientProperty(HOVERED_ROW_KEY, rowNew < 0 ? null : rowNew); if (RenderingUtil.isHoverPaintingDisabled(tree)) return; TreeUtil.repaintRow(tree, rowOld); TreeUtil.repaintRow(tree, rowNew); } | setHoveredRow |
283,909 | int (@NotNull JTree tree) { Object property = tree.getClientProperty(HOVERED_ROW_KEY); return property instanceof Integer ? (Integer)property : -1; } | getHoveredRow |
283,910 | void (@NotNull Component component, int x, int y) { mouseMoved(component, x, y); } | mouseEntered |
283,911 | void (@NotNull Component component, int x, int y) { update(component, table -> table.rowAtPoint(new Point(x, y)), table -> table.columnAtPoint(new Point(x, y))); } | mouseMoved |
283,912 | void (@NotNull Component component) { update(component, table -> -1, table -> -1); } | mouseExited |
283,913 | void (@NotNull Component component, @NotNull ToIntFunction<? super JTable> rowFunc, @NotNull ToIntFunction<? super JTable> columnFunc) { if (component instanceof JTable table) { int rowNew = rowFunc.applyAsInt(table); int rowOld = rowHolder.getAndSet(rowNew); int columnNew = columnFunc.applyAsInt(table); int columnOld ... | update |
283,914 | void (@NotNull JTable table, int row, int column) { setHoveredRow(table, row); // support JBTreeTable and similar views Object property = table.getClientProperty(RenderingUtil.FOCUSABLE_SIBLING); if (property instanceof JTree) TreeHoverListener.setHoveredRow((JTree)property, row); } | onHover |
283,915 | void (@NotNull JTable table, int rowNew) { int rowOld = getHoveredRow(table); if (rowNew == rowOld) return; table.putClientProperty(HOVERED_ROW_KEY, rowNew < 0 ? null : rowNew); // tables without scroll pane do not repaint rows correctly (BasicTableUI.paint:1868-1872) if (table.getParent() instanceof JViewport) { repai... | setHoveredRow |
283,916 | int (@NotNull JTable table) { Object property = table.getClientProperty(HOVERED_ROW_KEY); return property instanceof Integer ? (Integer)property : -1; } | getHoveredRow |
283,917 | void (@NotNull JTable table, int row) { Rectangle bounds = row < 0 ? null : table.getCellRect(row, 0, false); if (bounds != null) table.repaint(0, bounds.y, table.getWidth(), bounds.height); } | repaintRow |
283,918 | void (@NotNull Component component, int x, int y) { mouseMoved(component, x, y); } | mouseEntered |
283,919 | void (@NotNull Component component, int x, int y) { update(component, list -> list.locationToIndex(new Point(x, y))); } | mouseMoved |
283,920 | void (@NotNull Component component) { update(component, list -> -1); } | mouseExited |
283,921 | void (@NotNull Component component, @NotNull ToIntFunction<? super JList<?>> indexFunc) { if (component instanceof JList<?> list) { int indexNew = indexFunc.applyAsInt(list); int indexOld = indexHolder.getAndSet(indexNew); if (indexNew != indexOld) onHover(list, indexNew); } } | update |
283,922 | void (@NotNull JList<?> list, int index) { setHoveredIndex(list, index); } | onHover |
283,923 | void (@NotNull JList<?> list, int indexNew) { int indexOld = getHoveredIndex(list); if (indexNew == indexOld) return; list.putClientProperty(HOVERED_INDEX_KEY, indexNew < 0 ? null : indexNew); if (RenderingUtil.isHoverPaintingDisabled(list)) return; repaintIndex(list, indexOld); repaintIndex(list, indexNew); } | setHoveredIndex |
283,924 | int (@NotNull JList<?> list) { Object property = list.getClientProperty(HOVERED_INDEX_KEY); return property instanceof Integer ? (Integer)property : -1; } | getHoveredIndex |
283,925 | void (@NotNull JList<?> list, int index) { Rectangle bounds = index < 0 ? null : list.getCellBounds(index, index); if (bounds != null) list.repaint(0, bounds.y, list.getWidth(), bounds.height); } | repaintIndex |
283,926 | void (Runnable actionDelegate) { this.actionDelegate = actionDelegate; } | setActionDelegate |
283,927 | void (PropertyChangeEvent e) {} | propertyChange |
283,928 | void (@NotNull Presentation newPresentation) { if (presentation != null) { presentation.removePropertyChangeListener(this); } newPresentation.addPropertyChangeListener(this); setEnabled(newPresentation.isEnabled()); presentation = newPresentation; } | listenPresentationChanges |
283,929 | void (@NotNull Menu subMenu, boolean onAppKit) { ensureNativePeer(); subMenu.ensureNativePeer(); nativeSetSubmenu(nativePeer, subMenu.nativePeer, isInHierarchy || subMenu.isInHierarchy); } | setSubmenu |
283,930 | void (boolean isToggled) { ensureNativePeer(); nativeSetState(nativePeer, isToggled, isInHierarchy); } | setState |
283,931 | void (boolean isEnabled) { ensureNativePeer(); nativeSetEnabled(nativePeer, isEnabled, isInHierarchy); } | setEnabled |
283,932 | void (String label, KeyStroke ks) { ensureNativePeer(); // convert (code from native_peer.setLabel) char keyChar = ks == null ? 0 : ks.getKeyChar(); int keyCode = ks == null ? 0 : ks.getKeyCode(); int modifiers = ks == null ? 0 : ks.getModifiers(); if (label == null) { label = ""; } if (keyChar == KeyEvent.CHAR_UNDEFIN... | setLabel |
283,933 | void (String label) { ensureNativePeer(); if (label == null) label = ""; myTitle = label; nativeSetTitle(nativePeer, label, isInHierarchy); } | setLabel |
283,934 | void (Icon icon) { if (icon == null) return; // todo: the context should belong to the device the icon is displayed on ScaleContext ctx = ScaleContext.create(); // make sure the icon is in JB format icon = MultiResolutionImageProvider.convertFromMRIcon(icon, ctx); int w = icon.getIconWidth(); int h = icon.getIconHeight... | setIcon |
283,935 | void (String acceleratorText) { ensureNativePeer(); nativeSetAcceleratorText(nativePeer, acceleratorText, isInHierarchy); } | setAcceleratorText |
283,936 | void (WindowEvent e) { refillIfNeeded(); } | windowActivated |
283,937 | boolean () { for (MenuItem item : myItems) { if (item instanceof Menu && ((Menu)item).myIsOpened) { return true; } } return false; } | isAnyChildOpened |
283,938 | boolean () { return myIsOpened; } | isOpened |
283,939 | long () { return myOpenTimeMs; } | getOpenTimeMs |
283,940 | Menu () { if (ourAppMenu == null) { ourAppMenu = new Menu(); // returns retained pointer long nsMenu = nativeGetAppMenu(); ourAppMenu.nativePeer = ourAppMenu.nativeAttachMenu(nsMenu); ourAppMenu.isInHierarchy = true; } return ourAppMenu; } | getAppMenu |
283,941 | void (@Nullable DynamicBundle replacements) { if (replacements == null) { return; } Set<String> keySet = replacements.getResourceBundle().keySet(); List<String> replace = new ArrayList<>(keySet.size() * 2); for (String title : keySet) { replace.add(title); replace.add(replacements.getMessage(title)); } //macOS 13.0 Ven... | renameAppMenuItems |
283,942 | void (@NotNull Component component, @NotNull Runnable fillMenuProcedure) { this.myOnOpen = fillMenuProcedure; this.myComponent = component; } | setOnOpen |
283,943 | void (Component component, Runnable onClose) { this.myOnClose = onClose; this.myComponent = component; } | setOnClose |
283,944 | void (PropertyChangeEvent e) { @NonNls String propertyName = e.getPropertyName(); if (Presentation.PROP_TEXT.equals(propertyName) || Presentation.PROP_DESCRIPTION.equals(propertyName)) { setTitle(presentation.getText()); } } | propertyChange |
283,945 | void (String label) { ensureNativePeer(); if (label == null) { label = ""; } myTitle = label; nativeSetTitle(nativePeer, label, isInHierarchy); } | setTitle |
283,946 | int (String re) { if (re == null || re.isEmpty()) return -1; ensureNativePeer(); return nativeFindIndexByTitle(nativePeer, re); } | findIndexByTitle |
283,947 | void () { for (MenuItem item : myBuffer) { if (item != null) { Disposer.dispose(item); } } myBuffer.clear(); } | beginFill |
283,948 | void () { // Called on AppKit when the menu opening myIsOpened = true; if (myOnOpen == null) { return; } myOpenTimeMs = System.currentTimeMillis(); if (USE_STUB) { // NOTE: must add stub item when the menu opens (otherwise AppKit considers it as empty, and we can't fill it later) MenuItem stub = new MenuItem(); myItems... | menuNeedsUpdate |
283,949 | void () { // Called on AppKit when a menu opening if (!myIsOpened) { // When a user opens some menu at second time (without focus lost), apple doesn't call menuNeedsUpdate for // this menu (but always calls menuWillOpen) and for all submenus. It causes problems like IDEA-319117. // So detect this case and call menuNeed... | menuWillOpen |
283,950 | void () { // Called on AppKit when the menu closed myIsOpened = false; // When a user selects item of a system menu (under macOS), // AppKit sometimes generates such sequence: CloseParentMenu -> PerformItemAction // So we can destroy menu-item before item's action performed, and because of that action will not be execu... | invokeMenuClosing |
283,951 | boolean () { if (IS_ENABLED != null) { return IS_ENABLED; } IS_ENABLED = false; if (!SystemInfoRt.isJBSystemMenu) { return false; } if (Boolean.getBoolean("apple.laf.useScreenMenuBar")) { getLogger().info("apple.laf.useScreenMenuBar==true, default screen menu implementation will be used"); return false; } @SuppressWarn... | isJbScreenMenuEnabled |
283,952 | void (Runnable r, Component invoker, boolean wait) { MethodHandle invokeMethod = getToolkitInvokeMethod(wait); if (invokeMethod == null) { return; } try { if (wait) { invokeMethod.invoke(r, invoker, true, -1); } else { invokeMethod.invoke(r, invoker); } } catch (Throwable e) { // suppress InvocationTargetException as i... | invokeWithLWCToolkit |
283,953 | Logger () { return Logger.getInstance(Menu.class); } | getLogger |
283,954 | boolean () { return myShowText; } | isShowText |
283,955 | boolean () { return myShowImage; } | isShowImage |
283,956 | boolean () { return myCrossEsc; } | isCrossEsc |
283,957 | boolean () { return myPrincipal; } | isPrincipal |
283,958 | boolean () { return myDefault; } | isDefault |
283,959 | JComponent () { return myComponent; } | getComponent |
283,960 | TouchbarActionCustomizations (boolean showText) { myShowText = showText; return this; } | setShowText |
283,961 | TouchbarActionCustomizations (boolean showImage) { myShowImage = showImage; return this; } | setShowImage |
283,962 | TouchbarActionCustomizations (boolean crossEsc) { myCrossEsc = crossEsc; return this; } | setCrossEsc |
283,963 | TouchbarActionCustomizations (boolean principal) { myPrincipal = principal; return this; } | setPrincipal |
283,964 | TouchbarActionCustomizations (boolean aDefault) { myDefault = aDefault; return this; } | setDefault |
283,965 | TouchbarActionCustomizations (JComponent component) { myComponent = component; return this; } | setComponent |
283,966 | TouchbarActionCustomizations (@NotNull AnAction action, boolean showText) { return getClientProperty(action, true).setShowText(showText); } | setShowText |
283,967 | TouchbarActionCustomizations (@NotNull AnAction action, boolean isDefault) { return getClientProperty(action, true).setDefault(isDefault); } | setDefault |
283,968 | TouchbarActionCustomizations (@NotNull AnAction action, boolean principal) { return getClientProperty(action, true).setPrincipal(principal); } | setPrincipal |
283,969 | TouchbarActionCustomizations (@NotNull AnAction action, JComponent contextComponent) { return getClientProperty(action, true).setComponent(contextComponent); } | setComponent |
283,970 | void (@NotNull JComponent component, @Nullable ActionGroup group) { if (!SystemInfoRt.isMac || !LoadingState.COMPONENTS_REGISTERED.isOccurred() || ApplicationManager.getApplication() == null) { return; } component.putClientProperty(ACTION_GROUP_KEY, group); } | setActions |
283,971 | void (@NotNull JComponent component, @Nullable AnAction action) { setActions(component, action == null ? null : new DefaultActionGroup(action)); } | setActions |
283,972 | void (@NotNull JComponent component, @NotNull String actionId) { setActions(component, ActionManager.getInstance().getAction(actionId)); } | setActions |
283,973 | void (@NotNull JComponent component, @Nullable ActionGroup group) { if (!SystemInfoRt.isMac || !LoadingState.COMPONENTS_REGISTERED.isOccurred() || ApplicationManager.getApplication() == null) { return; } ActionGroup old = ClientProperty.get(component, ACTION_GROUP_KEY); if (old == null) { setActions(component, group); ... | addActions |
283,974 | void (@NotNull JComponent component, Collection<? extends JButton> buttons, Collection<? extends JButton> principal, JButton defaultButton) { setButtonActions(component, buttons, principal, defaultButton, null); } | setButtonActions |
283,975 | void (@NotNull JComponent component, Collection<? extends JButton> buttons, Collection<? extends JButton> principal, JButton defaultButton, @Nullable ActionGroup extraActions) { if (!SystemInfoRt.isMac || !LoadingState.COMPONENTS_REGISTERED.isOccurred() || ApplicationManager.getApplication() == null) { return; } Action... | setButtonActions |
283,976 | DefaultActionGroup (Collection<? extends JButton> buttons, JButton defaultButton, boolean isPrincipal) { final DefaultActionGroup result = new DefaultActionGroup(); if (EXPAND_OPTION_BUTTONS) { DefaultActionGroup options = null; for (JButton jb : buttons) { if (jb instanceof JBOptionButton ob) { final Action[] opts = o... | buildActionsFromButtons |
283,977 | AnAction (@Nullable Action action, @NotNull JButton button, boolean useTextFromAction /*for optional buttons*/) { Object anAct = action == null ? null : action.getValue(OptionAction.AN_ACTION); if (anAct == null) { anAct = new MyAction(useTextFromAction, action, button); } if (!(anAct instanceof AnAction)) { return nul... | _createActionFromButton |
283,978 | Object () { return action == null ? button : action; } | getDelegate |
283,979 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
283,980 | void (@NotNull AnActionEvent e) { if (action == null) { button.doClick(); return; } // also can be used something like: ApplicationManager.getApplication().invokeLater(() -> jb.doClick(), ms) action.actionPerformed(new ActionEvent(button, ActionEvent.ACTION_PERFORMED, null)); } | actionPerformed |
283,981 | void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(action == null ? button.isEnabled() : action.isEnabled()); if (!useTextFromAction) { e.getPresentation().setText(DialogWrapper.extractMnemonic(button.getText()).second); } } | update |
283,982 | MouseWheelSmoothScroll () { return create(() -> true); } | create |
283,983 | MouseWheelSmoothScroll (@NotNull Supplier<Boolean> isScrollEnabled) { return new MouseWheelSmoothScroll(isScrollEnabled); } | create |
283,984 | void (@NotNull MouseWheelEvent e, @Nullable Consumer<? super MouseWheelEvent> alternative) { JScrollBar bar = !myScrollEnabled.get() ? null : getEventScrollBar(e); if (bar == null) { if (alternative != null) alternative.accept(e); return; } InertialAnimator animator = isHorizontalScroll(e) ? horizontal : vertical; int ... | processMouseWheelEvent |
283,985 | Predicate<Integer> (JScrollBar bar) { return (v) -> { return v - bar.getValue() != 0 || !bar.isShowing(); }; } | shouldStop |
283,986 | double (@NotNull JScrollBar bar, @NotNull MouseWheelEvent event, double animationTargetValue) { double rotation = event.getPreciseWheelRotation(); int direction = rotation < 0 ? -1 : 1; if (event.getScrollType() == MouseWheelEvent.WHEEL_BLOCK_SCROLL) { return direction * bar.getBlockIncrement(direction); } if (event.ge... | getDelta |
283,987 | void (int initValue, int targetValue, @NotNull Consumer<? super Integer> consumer, @Nullable Predicate<? super Integer> shouldStop, @NotNull AnimationSettings settings) { mySettings = settings; double duration = mySettings.getDuration(); if (duration == 0) { consumer.accept(targetValue); stop(); return; } boolean isSam... | start |
283,988 | void (double value) { if (value == 1.0) { // should happen only if animator doesn't play animations myConsumer.accept((int) round(myTargetValue)); stop(); return; } if (myShouldStop.test((int)round(myCurrentValue))) { stop(); return; } myLastEventTime = System.currentTimeMillis(); long currentEventTime = min(myLastEven... | run |
283,989 | void () { myTimer.stop(); myDuration = myLastEventTime = myStartEventTime = -1; myInitValue = myCurrentValue = myTargetValue = Double.NaN; myConsumer = BLACK_HOLE; myShouldStop = FALSE_PREDICATE; mySettings = null; } | stop |
283,990 | double () { return LoadingState.CONFIGURATION_STORE_INITIALIZED.isOccurred() ? UISettings.getShadowInstance().getAnimatedScrollingDuration() : UISettingsStateKt.getDefaultAnimatedScrollingDuration(); } | getDuration |
283,991 | Easing () { int points = UISettings.getShadowInstance().getAnimatedScrollingCurvePoints(); if (points != curvePoints || ourEasing == null) { double x1 = (points >> 24 & 0xFF) / 200.0; double y1 = (points >> 16 & 0xFF) / 200.0; double x2 = (points >> 8 & 0xFF) / 200.0; double y2 = (points & 0xFF) / 200.0; if (ourEasing ... | getEasing |
283,992 | void (double c1x, double c1y, double c2x, double c2y) { delegate.update(c1x, c1y, c2x, c2y); } | update |
283,993 | int () { return delegate.getSize(); } | getSize |
283,994 | double (double t, double b, double c, double d) { double x = t / d; return c * delegate.calc(x) + b; } | calc |
283,995 | TouchScroll () { return create(() -> true); } | create |
283,996 | TouchScroll (@NotNull Supplier<Boolean> isScrollEnabled) { return new TouchScroll(isScrollEnabled); } | create |
283,997 | void (@NotNull MouseWheelEvent e, @Nullable Consumer<? super MouseWheelEvent> alternative) { JScrollBar bar = !myScrollEnabled.get() ? null : getEventScrollBar(e); if (bar == null) { if (alternative != null) alternative.accept(e); return; } if (TouchScrollUtil.isBegin(e)) { verticalFling.registerBegin(); horizontalFlin... | processMouseWheelEvent |
283,998 | Predicate<Integer> (JScrollBar bar) { return (v) -> { return v - bar.getValue() != 0 || !bar.isShowing(); }; } | shouldStop |
283,999 | void () { beginTime = System.currentTimeMillis(); lastDelta = 0; } | registerBegin |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.