Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
45,900
RadLayoutManager (final Class aClass) { // we can't use isInstance() because the class in our map and aClass may have been loaded with // different classloaders for(Map.Entry<Class, Class<? extends RadLayoutManager>> e: ourLayoutManagerClassRegistry.entrySet()) { if (e.getKey().getName().equals(aClass.getName())) { try...
createFromLayoutClass
45,901
boolean (String className) { for(Class c: ourLayoutManagerClassRegistry.keySet()) { if (c.getName().equals(className)) { return true; } } return false; }
isKnownLayoutClass
45,902
RadLayoutManager (Project project) { final String defaultLayoutManager = GuiDesignerConfiguration.getInstance(project).DEFAULT_LAYOUT_MANAGER; if (defaultLayoutManager.equals(UIFormXmlConstants.LAYOUT_GRIDBAG)) { return new RadGridBagLayoutManager(); } else if (defaultLayoutManager.equals(UIFormXmlConstants.LAYOUT_FORM...
createDefaultGridLayoutManager
45,903
LayoutManager () { return null; }
createLayout
45,904
void (final XmlWriter writer, final RadContainer radContainer) { }
writeLayout
45,905
void (RadContainer container) { }
refresh
45,906
ComponentDropLocation (RadContainer container, @Nullable final Point location) { return NoDropLocation.INSTANCE; }
getDropLocation
45,907
void (final RadContainer container, final RadComponent component) { container.getDelegee().remove(component.getDelegee()); }
removeComponentFromContainer
45,908
boolean (RadContainer container, RadComponent child) { return true; }
isSwitchedToChild
45,909
boolean (RadContainer container, RadComponent child) { return false; }
switchContainerToChild
45,910
Property[] (final Project project) { return Property.EMPTY_ARRAY; }
getContainerProperties
45,911
Property[] (final Project project, final RadComponent component) { return Property.EMPTY_ARRAY; }
getComponentProperties
45,912
boolean () { return false; }
isIndexed
45,913
boolean () { return false; }
isGrid
45,914
boolean () { return false; }
areChildrenExclusive
45,915
void (RadComponent child, boolean dragging) { child.getDelegee().setVisible(!dragging); }
setChildDragging
45,916
boolean (RadComponent c, int rowDelta, int colDelta, final int rowSpanDelta, final int colSpanDelta) { return false; }
canMoveComponent
45,917
void (RadComponent c, int rowDelta, int colDelta, final int rowSpanDelta, final int colSpanDelta) { }
moveComponent
45,918
void (final RadContainer container) { if (container.getLayoutManager().areChildrenExclusive()) { // ensure that components which were hidden by previous layout are visible (IDEADEV-16077) for (RadComponent child : container.getComponents()) { final IProperty property = FormInspectionUtil.findProperty(child, SwingProper...
ensureChildrenVisible
45,919
RadComponent (ModuleProvider module, Class aClass, String id) { return new RadContainer(module, aClass, id); }
newInstance
45,920
RadComponent (final Class componentClass, final String id, final Palette palette) { return new RadContainer(componentClass, id, palette); }
newInstance
45,921
RadLayoutManager () { String defaultLayoutManager = UIFormXmlConstants.LAYOUT_INTELLIJ; if (getModule() != null) { final GuiDesignerConfiguration configuration = GuiDesignerConfiguration.getInstance(getProject()); defaultLayoutManager = configuration.DEFAULT_LAYOUT_MANAGER; } try { return LayoutManagerRegistry.createLa...
createInitialLayoutManager
45,922
Property (final int x, final int y) { // 1. We have to check whether user clicked inside border (if any) or not. // In this case we have return inplace editor for border text final Insets insets = getDelegee().getInsets(); // border insets if ( x < insets.left || x > getWidth() - insets.right || y < 0 || y > insets.top...
getInplaceProperty
45,923
Property () { return new MyBorderTitleProperty(); }
getDefaultInplaceProperty
45,924
Rectangle () { return getBorderInPlaceEditorBounds(new MyBorderTitleProperty()); }
getDefaultInplaceEditorBounds
45,925
Rectangle (final Property property, final int x, final int y) { if (property instanceof MyBorderTitleProperty) { // If this is our property return getBorderInPlaceEditorBounds(property); } return super.getInplaceEditorBounds(property, x, y); }
getInplaceEditorBounds
45,926
Rectangle (final Property property) { final MyBorderTitleProperty _property = (MyBorderTitleProperty)property; final Insets insets = getDelegee().getInsets(); return new Rectangle( insets.left, 0, getWidth() - insets.left - insets.right, _property.getPreferredSize().height ); }
getBorderInPlaceEditorBounds
45,927
LayoutManager () { if (myDelegeeLayout != null) { return myDelegeeLayout; } return getDelegee().getLayout(); }
getLayout
45,928
void (final LayoutManager layout) { // some components (for example, JXCollapsiblePanel from SwingX) have asymmetrical getLayout/setLayout - a different // layout is returned compared to what was passed to setLayout(). to avoid crashes, we store the layout we passed to // the component. myDelegeeLayout = layout; getDel...
setLayout
45,929
boolean () { return getLayout() instanceof XYLayoutManager; }
isXY
45,930
void (@NotNull final RadComponent component, int index) { if (myComponents.contains(component)) { throw new IllegalArgumentException("component is already added: " + component); } final RadComponent[] oldChildren = myComponents.toArray(RadComponent.EMPTY_ARRAY); // Remove from old parent final RadContainer oldParent = ...
addComponent
45,931
void (@NotNull final RadComponent component) { addComponent(component, myComponents.size()); }
addComponent
45,932
void (@NotNull final RadComponent component) { if (!myComponents.contains(component)) { throw new IllegalArgumentException("component is not added: " + component); } final RadComponent[] oldChildren = myComponents.toArray(RadComponent.EMPTY_ARRAY); // Remove child component.setParent(null); myComponents.remove(componen...
removeComponent
45,933
RadComponent (final int index) { return myComponents.get(index); }
getComponent
45,934
int () { return myComponents.size(); }
getComponentCount
45,935
int (IComponent component) { return myComponents.indexOf(component); }
indexOfComponent
45,936
RadComponent[] () { return myComponents.toArray(RadComponent.EMPTY_ARRAY); }
getComponents
45,937
ComponentDropLocation (@Nullable Point location) { return getLayoutManager().getDropLocation(this, location); }
getDropLocation
45,938
RadComponent (final int startRow, final int startCol, final int rowSpan, final int colSpan) { for (int r = startRow; r < startRow + rowSpan; r++) { for (int c = startCol; c < startCol + colSpan; c++) { final RadComponent result = getComponentAtGrid(r, c); if (result != null) { return result; } } } return null; }
findComponentInRect
45,939
RadComponent (boolean rowFirst, int coord1, int coord2) { return rowFirst ? getComponentAtGrid(coord1, coord2) : getComponentAtGrid(coord2, coord1); }
getComponentAtGrid
45,940
RadComponent (int row, int col) { return RadAbstractGridLayoutManager.getComponentAtGrid(this, row, col); }
getComponentAtGrid
45,941
int () { return getGridLayoutManager().getGridRowCount(this); }
getGridRowCount
45,942
int () { return getGridLayoutManager().getGridColumnCount(this); }
getGridColumnCount
45,943
int (boolean isRow) { return isRow ? getGridRowCount() : getGridColumnCount(); }
getGridCellCount
45,944
int (int y) { return getGridLayoutManager().getGridRowAt(this, y); }
getGridRowAt
45,945
int (int x) { return getGridLayoutManager().getGridColumnAt(this, x); }
getGridColumnAt
45,946
BorderType () { return myBorderType; }
getBorderType
45,947
void (@NotNull final BorderType type) { if (myBorderType == type) { return; } myBorderType = type; updateBorder(); }
setBorderType
45,948
StringDescriptor () { return myBorderTitle; }
getBorderTitle
45,949
void (final StringDescriptor title) { if (Comparing.equal(title, myBorderTitle)) { return; } myBorderTitle = title; updateBorder(); }
setBorderTitle
45,950
int () { return myBorderTitleJustification; }
getBorderTitleJustification
45,951
void (final int borderTitleJustification) { if (myBorderTitleJustification != borderTitleJustification) { myBorderTitleJustification = borderTitleJustification; updateBorder(); } }
setBorderTitleJustification
45,952
int () { return myBorderTitlePosition; }
getBorderTitlePosition
45,953
void (final int borderTitlePosition) { if (myBorderTitlePosition != borderTitlePosition) { myBorderTitlePosition = borderTitlePosition; updateBorder(); } }
setBorderTitlePosition
45,954
FontDescriptor () { return myBorderTitleFont; }
getBorderTitleFont
45,955
void (final FontDescriptor borderTitleFont) { if (!Comparing.equal(myBorderTitleFont, borderTitleFont)) { myBorderTitleFont = borderTitleFont; updateBorder(); } }
setBorderTitleFont
45,956
ColorDescriptor () { return myBorderTitleColor; }
getBorderTitleColor
45,957
void (final ColorDescriptor borderTitleColor) { if (!Comparing.equal(myBorderTitleColor, borderTitleColor)) { myBorderTitleColor = borderTitleColor; updateBorder(); } }
setBorderTitleColor
45,958
Insets () { return myBorderSize; }
getBorderSize
45,959
void (final Insets borderSize) { if (!Comparing.equal(myBorderSize, borderSize)) { myBorderSize = borderSize; updateBorder(); } }
setBorderSize
45,960
ColorDescriptor () { return myBorderColor; }
getBorderColor
45,961
void (final ColorDescriptor borderColor) { if (!Comparing.equal(myBorderColor, borderColor)) { myBorderColor = borderColor; updateBorder(); } }
setBorderColor
45,962
boolean () { @NlsSafe String title = null; String oldTitle = null; if (myBorderTitle != null) { oldTitle = myBorderTitle.getResolvedValue(); myBorderTitle.setResolvedValue(null); // NOTE: the explicit getValue() check is required for SnapShooter operation if (myBorderTitle.getValue() != null) { title = myBorderTitle.ge...
updateBorder
45,963
RadLayoutManager () { RadContainer parent = this; while (parent != null) { if (parent.myLayoutManager != null) { return parent.myLayoutManager; } parent = parent.getParent(); } return null; }
getLayoutManager
45,964
void (final RadLayoutManager layoutManager) { myLayoutManager = layoutManager; setLayout(myLayoutManager.createLayout()); }
setLayoutManager
45,965
void (RadLayoutManager layoutManager, LayoutManager layout) { myLayoutManager = layoutManager; setLayout(layout); }
setLayoutManager
45,966
RadComponent (RadComponent child) { return child; }
getActionTargetComponent
45,967
boolean () { return myLayoutManager.areChildrenExclusive(); }
areChildrenExclusive
45,968
void () { for (int i = 0; i < getComponentCount(); i++) { getComponent(i).refresh(); } myLayoutManager.refresh(this); }
refresh
45,969
void (final XmlWriter writer) { writer.startElement(UIFormXmlConstants.ELEMENT_BORDER); try { writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_TYPE, getBorderType().getId()); if (getBorderTitle() != null) { final StringDescriptor descriptor = getBorderTitle(); writer.writeStringDescriptor(descriptor, UIFormXmlConstants...
writeBorder
45,970
void (final XmlWriter writer) { // Children writer.startElement("children"); try { writeChildrenImpl(writer); } finally { writer.endElement(); // children } }
writeChildren
45,971
void (final XmlWriter writer) { for (int i = 0; i < getComponentCount(); i++) { getComponent(i).write(writer); } }
writeChildrenImpl
45,972
void (final XmlWriter writer) { if (isXY()) { writer.startElement("xy"); } else { writer.startElement("grid"); } try { writeId(writer); writeClassIfDifferent(writer, JPanel.class.getName()); writeBinding(writer); if (myLayoutManager != null) { writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_LAYOUT_MANAGER, myLayoutMan...
write
45,973
boolean (ComponentVisitor visitor) { if (!super.accept(visitor)) { return false; } for (int i = 0; i < getComponentCount(); i++) { final IComponent c = getComponent(i); if (!c.accept(visitor)) { return false; } } return true; }
accept
45,974
void (final XmlWriter writer, final String defaultClassName) { writeId(writer); writeClassIfDifferent(writer, defaultClassName); writeBinding(writer); // Constraints and properties writeConstraints(writer); writeProperties(writer); // Margin and border writeBorder(writer); writeChildren(writer); }
writeNoLayout
45,975
RadAbstractGridLayoutManager () { if (!(myLayoutManager instanceof RadAbstractGridLayoutManager)) { throw new RuntimeException("Not a grid container: " + myLayoutManager); } return (RadAbstractGridLayoutManager)myLayoutManager; }
getGridLayoutManager
45,976
RadComponent (final Object constraints) { for (RadComponent component : getComponents()) { if (constraints.equals(component.getCustomLayoutConstraints())) { return component; } } return null; }
findComponentWithConstraints
45,977
Dimension () { return myEditor.getPreferredSize(); }
getPreferredSize
45,978
StringDescriptor (final RadContainer component) { return myBorderTitle; }
getValue
45,979
PropertyRenderer<StringDescriptor> () { return null; }
getRenderer
45,980
PropertyEditor<StringDescriptor> () { return myEditor; }
getEditor
45,981
String () { return UIFormXmlConstants.LAYOUT_CARD; }
getName
45,982
LayoutManager () { return new CardLayout(); }
createLayout
45,983
void (final XmlWriter writer, final RadComponent child) { writer.startElement(UIFormXmlConstants.ELEMENT_CARD); try { writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_NAME, (String) child.getCustomLayoutConstraints()); } finally { writer.endElement(); } }
writeChildConstraints
45,984
void (final XmlWriter writer, final RadContainer radContainer) { CardLayout layout = (CardLayout) radContainer.getLayout(); writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_HGAP, layout.getHgap()); writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_VGAP, layout.getVgap()); String defaultCard = DefaultCardProperty.INSTANC...
writeLayout
45,985
void (final RadContainer container, final RadComponent component, final int index) { container.getDelegee().add(component.getDelegee(), component.getCustomLayoutConstraints()); }
addComponentToContainer
45,986
void (RadContainer container, RadComponent component) { if (component.getId().equals(DefaultCardProperty.INSTANCE.getValue(container))) { DefaultCardProperty.INSTANCE.setValueEx(container, null); } super.removeComponentFromContainer(container, component); }
removeComponentFromContainer
45,987
ComponentDropLocation (RadContainer container, @Nullable final Point location) { return new CardDropLocation(container); }
getDropLocation
45,988
Property[] (final Project project) { return new Property[]{ HGapProperty.getInstance(project), VGapProperty.getInstance(project), DefaultCardProperty.INSTANCE }; }
getContainerProperties
45,989
Property[] (final Project project, final RadComponent component) { return new Property[] { CardNameProperty.INSTANCE }; }
getComponentProperties
45,990
boolean (RadContainer container, RadComponent child) { return child.getDelegee().isVisible(); }
isSwitchedToChild
45,991
boolean (RadContainer container, RadComponent child) { CardLayout cardLayout = (CardLayout) container.getLayout(); String card = (String) child.getCustomLayoutConstraints(); cardLayout.show(container.getDelegee(), card); return true; }
switchContainerToChild
45,992
boolean () { return true; }
areChildrenExclusive
45,993
RadContainer () { return myContainer; }
getContainer
45,994
boolean (ComponentDragObject dragObject) { return dragObject.getComponentCount() == 1; }
canDrop
45,995
void (FeedbackLayer feedbackLayer, ComponentDragObject dragObject) { Rectangle rc = myContainer.getBounds(); feedbackLayer.putFeedback(myContainer.getParent().getDelegee(), rc, null); }
placeFeedback
45,996
void (GuiEditor editor, RadComponent[] components, GridConstraints[] constraintsToAdjust, ComponentDragObject dragObject) { int cardIndex = 1; while(myContainer.findComponentWithConstraints(CARD_NAME_PREFIX + cardIndex) != null) { cardIndex++; } components [0].setCustomLayoutConstraints(CARD_NAME_PREFIX + cardIndex); m...
processDrop
45,997
ComponentDropLocation (Direction direction) { return null; }
getAdjacentLocation
45,998
void (RadComponent component, String value) { myTf.setText((String)component.getCustomLayoutConstraints()); }
setValueFromComponent
45,999
String (final RadComponent component) { return (String) component.getCustomLayoutConstraints(); }
getValue