Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
245,600
TreeTableModel () { return myModel; }
getModel
245,601
void (RowSorter<? extends TableModel> sorter) { myTable.setRowSorter(sorter); final JTable ref = myTreeTableHeader.getTable(); ref.setModel(myTable.getModel()); ref.setRowSorter(sorter); }
setRowSorter
245,602
boolean () { return myTree.hasFocus() || myTable.hasFocus(); }
hasFocus
245,603
boolean (@NotNull JComponent component, long tm, int x, int y, int width, int height) { // checks if repaint manager should mark row of tree or table // and mark we need to repaint both components together, // otherwise super repaint boolean isNeedToRepaintRow = component.getWidth() == width; if (isNeedToRepaintRow) { ...
addTreeTableRowDirtyRegion
245,604
void (MouseEvent e) { if (e.getClickCount() == 2 && e.getSource() == myTable) { int row = myTable.getSelectedRow(); if (myTree.isCollapsed(row)) { myTree.expandRow(row); } else { myTree.collapseRow(row); } } }
mouseClicked
245,605
void (ListSelectionEvent e) { if (e.getSource() == myTable.getSelectionModel()) { int row = myTable.getSelectedRow(); if (row >= 0) { myTree.setSelectionRow(row); } } }
valueChanged
245,606
void (TreeSelectionEvent e) { if (e.getSource() == myTree.getSelectionModel()) { int row = myTree.getRowForPath(myTree.getSelectionPath()); if (row >= 0) { myTable.setRowSelectionInterval(row, row); } else { myTable.clearSelection(); } } }
valueChanged
245,607
AccessibleContext () { return new MyAccessibleContext(); }
getAccessibleContext
245,608
int () { return super.getWidth() + 1; }
getWidth
245,609
void (int rowHeight) { super.setRowHeight(rowHeight); if (myTree != null && myTree.getRowHeight() < rowHeight) { myTree.setRowHeight(getRowHeight()); } }
setRowHeight
245,610
void () { super.updateUI(); // dynamically update ui for stolen header if (ref != null) { ref.updateUI(); } }
updateUI
245,611
Container () { return JBTreeTable.this; }
getDelegateParent
245,612
int () { return getTotalColumnWidth(); }
getWidth
245,613
Object () { return treeColumnIndex < 0 ? " " : myModel.getColumnName(treeColumnIndex); }
getHeaderValue
245,614
int () { return myTree.getVisibleRect().width + 1; }
getTotalColumnWidth
245,615
void (long tm, int x, int y, int width, int height) { if (!addTreeTableRowDirtyRegion(this, tm, x, y, width, height)) { super.repaint(tm, x, y, width, height); } }
repaint
245,616
void () { super.treeDidChange(); if (myTable != null) { myTable.revalidate(); myTable.repaint(); } }
treeDidChange
245,617
void (@NotNull AnActionEvent event) { if (frame != null && frame.isVisible()) { frame.dispose(); frame = null; } else { if (frame == null) { frame = new JFrame("Test Text Fields"); frame.add(new View()); frame.pack(); frame.setLocationRelativeTo(null); } frame.setVisible(true); frame.toFront(); } }
actionPerformed
245,618
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
245,619
void (Graphics g) { if (g instanceof Graphics2D g2d && gradient.isSelected()) { Rectangle bounds = new Rectangle(getWidth(), getHeight()); g2d.setPaint(new LinearGradientPaint( bounds.x, bounds.y, bounds.width, bounds.height, new float[]{0, 1}, new Color[]{JBColor.LIGHT_GRAY, JBColor.DARK_GRAY})); g2d.fillRect(bounds.x...
paintComponent
245,620
Icon (boolean hovered) { return AllIcons.General.GearPlain; }
getIcon
245,621
String () { return "Settings"; }
getTooltip
245,622
boolean () { return true; }
isIconBeforeText
245,623
Icon (boolean hovered) { return hovered ? AllIcons.General.ContextHelp : AllIcons.General.Locate; }
getIcon
245,624
String () { return "Locate"; }
getTooltip
245,625
boolean () { return true; }
isIconBeforeText
245,626
Icon (boolean hovered) { return !hovered ? icon : AllIcons.Process.FS.Step_passive; }
getIcon
245,627
String () { return "Refresh"; }
getTooltip
245,628
Icon (boolean hovered) { return hovered ? fading : blinking; }
getIcon
245,629
Icon (boolean hovered) { if (null == getActionOnClick()) { icon.setFont(RelativeFont.SMALL.derive(getFont())); icon.setBackground(getForeground()); icon.setForeground(getBackground()); return icon; } return hovered ? AllIcons.Actions.CloseHovered : AllIcons.Actions.Close; }
getIcon
245,630
String () { return "Clear"; }
getTooltip
245,631
Runnable () { return getText().isEmpty() ? null : () -> setText(null); }
getActionOnClick
245,632
void () { int amount = columns.isSelected() ? 20 : 0; update(field -> field.setColumns(amount)); }
updateColumns
245,633
void () { boolean state = opaque.isSelected(); update(field -> field.setOpaque(state)); }
updateOpaque
245,634
void () { update(field -> { }); }
updateGradient
245,635
void () { GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.weightx = 1; gbc.weighty = 1; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = fill.getSelectedIndex(); if (gbc.fill < 0) gbc.fill = 0; center.removeAll(); update(field -> center.add(field, gbc)); }
updateFill
245,636
void (Consumer<? super JTextField> consumer) { fields.forEach(consumer); center.revalidate(); center.repaint(); }
update
245,637
Component () { return null; }
getHeader
245,638
void (Graphics g) { super.paintChildren(g); paintGradient(g); }
paintChildren
245,639
void (Graphics g) { g = g.create(); try { Color background = getViewColor(); Component header = getHeader(); if (header != null) { header.setBounds(0, 0, getWidth(), header.getPreferredSize().height); if (background != null) { g.setColor(background); g.fillRect(header.getX(), header.getY(), header.getWidth(), header.ge...
paintGradient
245,640
void (Rectangle bounds) { Component header = getHeader(); if (header != null) { int h = header.getPreferredSize().height; if (bounds.y < h) { bounds = new Rectangle(bounds); bounds.y -= h; bounds.height += h; } } super.scrollRectToVisible(bounds); }
scrollRectToVisible
245,641
void (Graphics2D g2d, Color background, int x1, int y1) { Component view = getView(); if (background != null && view != null) { int x2 = x1, x3 = getWidth() - x2, x4 = x3; int y2 = y1, y3 = getHeight() - y2, y4 = y3; if (myInsets.left > 0 && view.getX() < 0) { x2 += myInsets.left; } if (myInsets.top > 0 && view.getY() ...
paintGradient
245,642
void (ActionEvent e) { if (myValidator == null || myValidator.checkInput(myComboBox.getSelectedItem().toString().trim())) { close(exitCode); } }
actionPerformed
245,643
void (@NotNull DocumentEvent event) { actions[exitCode].setEnabled(myValidator == null || myValidator.checkInput(textField.getText().trim())); }
textChanged
245,644
void (ActionEvent e) { close(exitCode); }
actionPerformed
245,645
JComponent () { return null; }
createCenterPanel
245,646
JComponent () { JPanel panel = createIconPanel(); JPanel messagePanel = createMessagePanel(); myComboBox = new ComboBox<>(220); messagePanel.add(myComboBox, BorderLayout.SOUTH); panel.add(messagePanel, BorderLayout.CENTER); return panel; }
createNorthPanel
245,647
void () { String inputString = myComboBox.getSelectedItem().toString().trim(); if (myValidator == null || myValidator.checkInput(inputString) && myValidator.canClose(inputString)) { super.doOKAction(); } }
doOKAction
245,648
JComponent () { return myComboBox; }
getPreferredFocusedComponent
245,649
int () { if (getExitCode() == 0) { return myComboBox.getSelectedIndex(); } return -1; }
getSelectedIndex
245,650
JComboBox () { return myComboBox; }
getComboBox
245,651
void (@Nullable InputValidator validator) { myValidator = validator; }
setValidator
245,652
JTextComponent () { return new JPasswordField(30); }
createTextFieldComponent
245,653
JPasswordField () { return (JPasswordField)super.getTextField(); }
getTextField
245,654
JComponent () { return doCreateCenterPanel(); }
createNorthPanel
245,655
JComponent () { if (myInfoText == null) { return null; } final JPanel panel = new JPanel(new BorderLayout()); final JTextArea area = new JTextArea(myInfoText); area.setEditable(false); final JBScrollPane scrollPane = new JBScrollPane(area) { @Override public Dimension getPreferredSize() { final Dimension preferredSize ...
createCenterPanel
245,656
Dimension () { final Dimension preferredSize = super.getPreferredSize(); final Container parent = getParent(); if (parent != null) { return new Dimension(preferredSize.width, Math.min(150, preferredSize.height)); } return preferredSize; }
getPreferredSize
245,657
int (Project project, String message, String title, @NlsContexts.DetailedDescription String moreInfo, String[] options, int defaultOptionIndex, int focusedOptionIndex, Icon icon) { if (isApplicationInUnitTestOrHeadless()) { return TestDialogManager.getTestImplementation().show(message); } if (moreInfo == null) { AlertM...
showMoreInfoMessageDialog
245,658
int (String message, String title, String[] options, String checkboxText, boolean checked, int defaultOptionIndex, int focusedOptionIndex, Icon icon, BiFunction<? super Integer, ? super JCheckBox, Integer> exitFunc) { if (isApplicationInUnitTestOrHeadless()) { return TestDialogManager.getTestImplementation().show(messa...
showTwoStepConfirmationDialog
245,659
String (Project project, String message, String title, Icon icon, InputValidator validator) { if (isApplicationInUnitTestOrHeadless()) { return TestDialogManager.getTestInputImplementation().show(message, validator); } final InputDialog dialog = project != null ? new PasswordInputDialog(project, message, title, icon, v...
showPasswordDialog
245,660
char[] (@NotNull Component parentComponent, String message, String title, Icon icon, @Nullable InputValidator validator) { if (isApplicationInUnitTestOrHeadless()) { return TestDialogManager.getTestInputImplementation().show(message, validator).toCharArray(); } PasswordInputDialog dialog = new PasswordInputDialog(paren...
showPasswordDialog
245,661
String (@Nullable Project project, Component parentComponent, String message, String title, @Nullable Icon icon, @Nullable String initialValue, @Nullable InputValidator validator, @Nullable TextRange selection, @Nullable @NlsContexts.DetailedDescription String comment) { if (isApplicationInUnitTestOrHeadless()) { retur...
showInputDialog
245,662
String (Project project, String message, String title, String initialValue, Icon icon, @Nullable InputValidator validator) { if (isApplicationInUnitTestOrHeadless()) { return TestDialogManager.getTestInputImplementation().show(message, validator); } InputDialog dialog = new MessageMultilineInputDialog(project, message,...
showMultilineInputDialog
245,663
String (String message, String title, Icon icon, String[] values, @NlsSafe String initialValue, InputValidator validator) { if (isApplicationInUnitTestOrHeadless()) { return TestDialogManager.getTestInputImplementation().show(message, validator); } @SuppressWarnings("deprecation") ChooseDialog dialog = new ChooseDialog...
showEditableChooseDialog
245,664
int (@Nullable Project project, @Nullable Component parentComponent, String message, String title, String[] values, String initialValue, @Nullable Icon icon) { if (isApplicationInUnitTestOrHeadless()) { return TestDialogManager.getTestImplementation().show(message); } @SuppressWarnings("deprecation") ChooseDialog dialo...
showChooseDialog
245,665
void (final JTextField textField, String title, String dimensionServiceKey, Function<? super String, ? extends List<String>> parser, final Function<? super List<String>, String> lineJoiner) { if (isApplicationInUnitTestOrHeadless()) { TestDialogManager.getTestImplementation().show(title); return; } final JTextArea text...
showTextAreaDialog
245,666
void (@Nullable Project project, @Nullable @NlsContexts.DialogMessage String message, @NotNull @NlsContexts.DialogTitle String title) { Messages.showErrorDialog(project, message, title); }
showErrorDialog
245,667
boolean () { Application app = ApplicationManager.getApplication(); return app != null && (app.isUnitTestMode() || app.isHeadlessEnvironment()); }
isApplicationInUnitTestOrHeadless
245,668
JPanel () { JPanel messagePanel = new JPanel(new BorderLayout()); if (myMessage != null) { JComponent textComponent = createTextComponent(); messagePanel.add(textComponent, BorderLayout.NORTH); } myField = createTextFieldComponent(); messagePanel.add(createScrollableTextComponent(), BorderLayout.CENTER); myCheckBox = n...
createMessagePanel
245,669
Boolean () { return myCheckBox.isSelected(); }
isChecked
245,670
ComponentUI (JComponent c) { return begToggleButtonUI; }
createUI
245,671
void (Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect) { g.setColor(getFocusColor()); UIUtil.drawDottedRectangle(g, viewRect.x, viewRect.y, viewRect.x + viewRect.width, viewRect.y + viewRect.height); }
paintFocus
245,672
ComponentUI (JComponent component) { return new BegMenuItemUI(); }
createUI
245,673
void () { super.installDefaults(); final String propertyPrefix = getPropertyPrefix(); Integer integer = UIUtil.getPropertyMaxGutterIconWidth(propertyPrefix); if (integer != null){ myMaxGutterIconWidth2 = myMaxGutterIconWidth = integer.intValue(); } selectionBackground = JBColor.namedColor("Menu.selectionBackground", UI...
installDefaults
245,674
boolean (JMenuItem item) { if (item == null) return false; ButtonModel model = item.getModel(); if (model == null) return false; return model.isArmed() || (item instanceof JMenu) && model.isSelected(); }
isSelected
245,675
void () { if (arrowIcon != null && IdeaPopupMenuUI.isPartOfPopupMenu(menuItem)) { arrowIcon = null; } }
checkArrowIcon
245,676
void (JComponent comp) { myMaxGutterIconWidth = getAllowedIcon() == null && IdeaPopupMenuUI.hideEmptyIcon(comp) ? 0 : myMaxGutterIconWidth2; }
checkEmptyIcon
245,677
void (Graphics g, JComponent comp) { checkArrowIcon(); UISettings.setupAntialiasing(g); JMenuItem jmenuitem = (JMenuItem)comp; ButtonModel buttonmodel = jmenuitem.getModel(); int mnemonicIndex = jmenuitem.getDisplayedMnemonicIndex(); Icon icon1 = getIcon(); Icon icon2 = getAllowedIcon(); checkEmptyIcon(comp); int j1 = ...
paint
245,678
boolean () { if ((menuItem instanceof JMenu) && ((JMenu)menuItem).isTopLevelMenu()){ return false; } return true; }
useCheckAndArrow
245,679
MenuElement[] () { MenuSelectionManager menuselectionmanager = MenuSelectionManager.defaultManager(); MenuElement[] amenuelement = menuselectionmanager.getSelectedPath(); int i1 = amenuelement.length; if (i1 == 0){ return new MenuElement[0]; } Container container = menuItem.getParent(); MenuElement[] amenuelement1; if ...
getPath
245,680
Dimension (JComponent jcomponent) { return null; }
getMinimumSize
245,681
String ( FontMetrics fontmetrics, @NlsContexts.Command String text, FontMetrics fontmetrics1, @NlsContexts.Label String keyStrokeText, Icon icon, Icon checkIcon, Icon arrowIcon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewRect, Rectangle iconRect, ...
layoutMenuItem
245,682
Icon () { Icon icon = menuItem.getIcon(); if (icon != null && getAllowedIcon() != null){ icon = null; } return icon; }
getIcon
245,683
Dimension (JComponent comp) { checkArrowIcon(); JMenuItem jmenuitem = (JMenuItem)comp; Icon icon1 = getIcon(); Icon icon2 = getAllowedIcon(); checkEmptyIcon(comp); String text = jmenuitem.getText(); String keyStrokeText = getKeyStrokeText(jmenuitem); Font font = jmenuitem.getFont(); FontMetrics fontmetrics = comp.getFo...
getPreferredSize
245,684
void (Graphics g) { /* int i1 = a - 1; int j1 = e - 2; int k1 = i1 + myMaxGutterIconWidth + 1; int l1 = j1 + myMaxGutterIconWidth + 4; g.setColor(BegResources.m); g.drawLine(i1, j1, i1, l1); g.drawLine(i1, j1, k1, j1); g.setColor(BegResources.j); g.drawLine(k1, j1, k1, l1); g.drawLine(i1, l1, k1, l1); */ }
drawIconBorder
245,685
void () { l.setBounds(b); j.setBounds(b); c.setBounds(b); h.setBounds(b); d.setBounds(b); f.setBounds(0, 0, 32767, 32767); }
initBounds
245,686
Icon () { Icon icon = !menuItem.isEnabled() ? menuItem.getDisabledIcon() : isSelected(menuItem) ? menuItem.getSelectedIcon() : menuItem.getIcon(); if (icon != null && icon.getIconWidth() > myMaxGutterIconWidth){ icon = null; } return icon; }
getAllowedIcon
245,687
Dimension (JComponent comp) { return null; }
getMaximumSize
245,688
void (Graphics g, JComponent comp) { paint(g, comp); }
update
245,689
boolean () { String actionCommand=menuItem.getActionCommand(); if( ("Close".equals(actionCommand))|| ("Minimize".equals(actionCommand))|| ("Restore".equals(actionCommand))|| ("Maximize".equals(actionCommand)) ){ return true; } else{ return false; } }
isInternalFrameSystemMenu
245,690
void (MenuSelectionManager msm, MouseEvent e) { // Auditory cue if (!isInternalFrameSystemMenu()) { @NonNls ActionMap map = menuItem.getActionMap(); if (map != null) { Action audioAction = map.get(getPropertyPrefix() + ".commandSound"); if (audioAction != null) { // pass off firing the Action to a utility method BasicL...
doClick
245,691
void (@NotNull JPopupMenu component, @NotNull Consumer<? super JPopupMenu> onUpdate) { component.addPropertyChangeListener(KEEP_MENU_OPEN_PROP, evt -> onUpdate.accept((JPopupMenu)evt.getSource())); }
registerMultiChoiceSupport
245,692
MouseInputListener (JComponent c) { return new MyMouseInputHandler(); }
createMouseInputListener
245,693
void (MouseEvent e) { MenuSelectionManager manager=MenuSelectionManager.defaultManager(); Point p = e.getPoint(); if (p.x >= 0 && p.x < menuItem.getWidth() && p.y >= 0 && p.y < menuItem.getHeight()) { if (e.getButton() == MouseEvent.BUTTON1) { doClick(manager, e); } } else { manager.processMouseEvent(e); } }
mouseReleased
245,694
MenuDragMouseListener (JComponent c) { return new MyMenuDragMouseHandler(); }
createMenuDragMouseListener
245,695
void (MenuDragMouseEvent e) {}
menuDragMouseEntered
245,696
void (MenuDragMouseEvent e) { MenuSelectionManager manager=e.getMenuSelectionManager(); MenuElement[] path = e.getPath(); manager.setSelectedPath(path); }
menuDragMouseDragged
245,697
void (MenuDragMouseEvent e) {}
menuDragMouseExited
245,698
void (MenuDragMouseEvent e) { MenuSelectionManager manager=e.getMenuSelectionManager(); Point p=e.getPoint(); if(p.x>=0&&p.x<menuItem.getWidth()&& p.y>=0&&p.y<menuItem.getHeight()){ doClick(manager,e); } else{ manager.clearSelectedPath(); } }
menuDragMouseReleased
245,699
ComponentUI (JComponent c) { return begRadioButtonUI; }
createUI