From 6c278cbb944e11ad09cc22f1cbdbe4d8d0e39307 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Wed, 24 Oct 2018 21:24:08 +0300 Subject: [PATCH] IDEA-198728: deprecate Tree.textForeground and use Tree.foreground instead --- .../action/ExternalSystemActionUtil.java | 5 +-- .../NotificationMessageElement.java | 4 +- .../usageView/UsageTreeColorsScheme.java | 2 +- .../codeStyle/OptionTreeWithPreviewPanel.java | 4 +- .../color/ArrangementColorsProviderImpl.java | 2 +- .../intellij/build/BuildTreeConsoleView.java | 4 +- .../impl/config/IntentionSettingsTree.java | 2 +- .../PostfixTemplatesCheckboxTree.java | 2 +- .../impl/BaseExecuteBeforeRunDialog.java | 6 +-- .../ide/impl/StructureViewWrapperImpl.java | 2 +- .../InspectionsConfigTreeRenderer.java | 5 +-- .../intellij/ui/ColoredTreeCellRenderer.java | 2 +- .../intellij/ui/GroupedElementsRenderer.java | 4 +- .../intellij/ui/HighlightableComponent.java | 2 +- .../ui/speedSearch/SpeedSearchUtil.java | 4 +- .../intellij/ui/treeStructure/SimpleNode.java | 2 +- .../com/intellij/ui/treeStructure/Tree.java | 2 +- .../openapi/keymap/impl/ui/ActionsTree.java | 2 +- .../com/intellij/ui/FinderRecursivePanel.java | 6 +-- .../ui/MultilineTreeCellRenderer.java | 2 +- .../ui/TreeExpandableItemsHandler.java | 2 +- .../intellij/ui/plaf/beg/BegCellRenderer.java | 4 +- .../plugin/ui/ExistingTemplatesComponent.java | 4 +- .../util/src/com/intellij/util/ui/JBUI.java | 17 +++++++++ .../util/src/com/intellij/util/ui/UIUtil.java | 38 +++++++++---------- .../idea/maven/utils/MavenUIUtil.java | 5 +-- .../util/xml/ui/AbstractTableView.java | 2 +- 27 files changed, 74 insertions(+), 62 deletions(-) diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/action/ExternalSystemActionUtil.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/action/ExternalSystemActionUtil.java index 9f7b92644138..98e11635097d 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/action/ExternalSystemActionUtil.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/action/ExternalSystemActionUtil.java @@ -96,9 +96,8 @@ public class ExternalSystemActionUtil { return baseComponent; } - final Color foreground = selected ? UIUtil.getTreeSelectionForeground() : UIUtil.getTreeTextForeground(); - - Color background = selected ? UIUtil.getTreeSelectionBackground(hasFocus) : UIUtil.getTreeTextBackground(); + Color foreground = UIUtil.getTreeForeground(selected, hasFocus); + Color background = UIUtil.getTreeBackground(selected, hasFocus); panel.add(baseComponent, BorderLayout.CENTER); panel.setBackground(background); diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/notification/NotificationMessageElement.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/notification/NotificationMessageElement.java index be6b67082ac6..4afc04d97fca 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/notification/NotificationMessageElement.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/notification/NotificationMessageElement.java @@ -122,10 +122,10 @@ public class NotificationMessageElement extends NavigatableMessageElement { } else { if (selected) { - StyleConstants.setForeground(style, hasFocus ? UIUtil.getTreeSelectionForeground() : UIUtil.getTreeTextForeground()); + StyleConstants.setForeground(style, hasFocus ? UIUtil.getTreeSelectionForeground() : UIUtil.getTreeForeground()); } else { - StyleConstants.setForeground(style, UIUtil.getTreeTextForeground()); + StyleConstants.setForeground(style, UIUtil.getTreeForeground()); } } diff --git a/platform/lang-api/src/com/intellij/usageView/UsageTreeColorsScheme.java b/platform/lang-api/src/com/intellij/usageView/UsageTreeColorsScheme.java index 032ad9eb322e..3a71cadac6d3 100644 --- a/platform/lang-api/src/com/intellij/usageView/UsageTreeColorsScheme.java +++ b/platform/lang-api/src/com/intellij/usageView/UsageTreeColorsScheme.java @@ -33,7 +33,7 @@ public class UsageTreeColorsScheme { } public EditorColorsScheme getScheme() { - return EditorColorsUtil.getColorSchemeForBackground(UIUtil.getTreeTextBackground()); + return EditorColorsUtil.getColorSchemeForBackground(UIUtil.getTreeBackground()); } } diff --git a/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTreeWithPreviewPanel.java b/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTreeWithPreviewPanel.java index a4baac7a2c20..cdd0ba58f8ec 100644 --- a/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTreeWithPreviewPanel.java +++ b/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTreeWithPreviewPanel.java @@ -432,7 +432,7 @@ public abstract class OptionTreeWithPreviewPanel extends CustomizableLanguageCod button.setBackground(UIUtil.getTreeSelectionBackground()); } else { - button.setForeground(UIUtil.getTreeTextForeground()); + button.setForeground(UIUtil.getTreeForeground()); button.setBackground(tree.getBackground()); } @@ -450,7 +450,7 @@ public abstract class OptionTreeWithPreviewPanel extends CustomizableLanguageCod myLabel.setBackground(UIUtil.getTreeSelectionBackground()); } else { - myLabel.setForeground(UIUtil.getTreeTextForeground()); + myLabel.setForeground(UIUtil.getTreeForeground()); myLabel.setBackground(tree.getBackground()); } diff --git a/platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/color/ArrangementColorsProviderImpl.java b/platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/color/ArrangementColorsProviderImpl.java index 4a722bd93565..7ab547b6f4a2 100644 --- a/platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/color/ArrangementColorsProviderImpl.java +++ b/platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/color/ArrangementColorsProviderImpl.java @@ -50,7 +50,7 @@ public class ArrangementColorsProviderImpl implements ArrangementColorsProvider myColorsAware = colorsAware; // Default settings. - myDefaultNormalAttributes.setForegroundColor(UIUtil.getTreeTextForeground()); + myDefaultNormalAttributes.setForegroundColor(UIUtil.getTreeForeground()); myDefaultNormalAttributes.setBackgroundColor(UIUtil.getPanelBackground()); myDefaultSelectedAttributes.setForegroundColor(UIUtil.getTreeSelectionForeground()); myDefaultSelectedAttributes.setBackgroundColor(UIUtil.getTreeSelectionBackground()); diff --git a/platform/lang-impl/src/com/intellij/build/BuildTreeConsoleView.java b/platform/lang-impl/src/com/intellij/build/BuildTreeConsoleView.java index afd463adf088..80f5336f23cd 100644 --- a/platform/lang-impl/src/com/intellij/build/BuildTreeConsoleView.java +++ b/platform/lang-impl/src/com/intellij/build/BuildTreeConsoleView.java @@ -161,8 +161,8 @@ public class BuildTreeConsoleView implements ConsoleView, DataProvider, BuildCon final Component rendererComponent = treeCellRenderer.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); if (rendererComponent instanceof SimpleColoredComponent) { - final Color bg = selected ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeTextBackground(); - final Color fg = selected ? UIUtil.getTreeSelectionForeground() : UIUtil.getTreeForeground(); + Color bg = UIUtil.getTreeBackground(selected, true); + Color fg = UIUtil.getTreeForeground(selected, true); if (selected) { for (SimpleColoredComponent.ColoredIterator it = ((SimpleColoredComponent)rendererComponent).iterator(); it.hasNext(); ) { it.next(); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/config/IntentionSettingsTree.java b/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/config/IntentionSettingsTree.java index e3278adfa1dc..c5cfd789fd77 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/config/IntentionSettingsTree.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/config/IntentionSettingsTree.java @@ -70,7 +70,7 @@ public abstract class IntentionSettingsTree { CheckedTreeNode node = (CheckedTreeNode)value; SimpleTextAttributes attributes = node.getUserObject() instanceof IntentionActionMetaData ? SimpleTextAttributes.REGULAR_ATTRIBUTES : SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES; final String text = getNodeText(node); - final Color background = selected ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeTextBackground(); + Color background = UIUtil.getTreeBackground(selected, true); UIUtil.changeBackGround(this, background); if (text != null) { SearchUtil.appendFragments(myFilter != null ? myFilter.getFilter() : null, diff --git a/platform/lang-impl/src/com/intellij/codeInsight/template/postfix/settings/PostfixTemplatesCheckboxTree.java b/platform/lang-impl/src/com/intellij/codeInsight/template/postfix/settings/PostfixTemplatesCheckboxTree.java index 8ccb71c32d4b..b280ec342763 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/template/postfix/settings/PostfixTemplatesCheckboxTree.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/template/postfix/settings/PostfixTemplatesCheckboxTree.java @@ -110,7 +110,7 @@ public class PostfixTemplatesCheckboxTree extends CheckboxTree implements Dispos if (!(value instanceof CheckedTreeNode)) return; CheckedTreeNode node = (CheckedTreeNode)value; - final Color background = selected ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeTextBackground(); + Color background = UIUtil.getTreeBackground(selected, true); PostfixTemplateCheckedTreeNode templateNode = ObjectUtils.tryCast(node, PostfixTemplateCheckedTreeNode.class); SimpleTextAttributes attributes; if (templateNode != null) { diff --git a/platform/lang-impl/src/com/intellij/execution/impl/BaseExecuteBeforeRunDialog.java b/platform/lang-impl/src/com/intellij/execution/impl/BaseExecuteBeforeRunDialog.java index 82b6d7255cfd..ff0ce060c78e 100644 --- a/platform/lang-impl/src/com/intellij/execution/impl/BaseExecuteBeforeRunDialog.java +++ b/platform/lang-impl/src/com/intellij/execution/impl/BaseExecuteBeforeRunDialog.java @@ -308,9 +308,9 @@ public abstract class BaseExecuteBeforeRunDialog extend myCheckbox.setSelected(descriptor.isChecked()); - myCheckbox.setBackground(UIUtil.getTreeTextBackground()); - setBackground(selected ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeTextBackground()); - final Color foreground = selected ? UIUtil.getTreeSelectionForeground() : UIUtil.getTreeTextForeground(); + myCheckbox.setBackground(UIUtil.getTreeBackground()); + setBackground(UIUtil.getTreeBackground(selected, true)); + Color foreground = UIUtil.getTreeForeground(selected, true); setForeground(foreground); myCheckbox.setForeground(foreground); myLabel.setForeground(foreground); diff --git a/platform/lang-impl/src/com/intellij/ide/impl/StructureViewWrapperImpl.java b/platform/lang-impl/src/com/intellij/ide/impl/StructureViewWrapperImpl.java index 67225a31cbfb..c251427793fc 100644 --- a/platform/lang-impl/src/com/intellij/ide/impl/StructureViewWrapperImpl.java +++ b/platform/lang-impl/src/com/intellij/ide/impl/StructureViewWrapperImpl.java @@ -379,7 +379,7 @@ public class StructureViewWrapperImpl implements StructureViewWrapper, Disposabl private ContentPanel createContentPanel(JComponent component) { final ContentPanel panel = new ContentPanel(); - panel.setBackground(UIUtil.getTreeTextBackground()); + panel.setBackground(UIUtil.getTreeBackground()); panel.add(component, BorderLayout.CENTER); return panel; } diff --git a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/inspectionsTree/InspectionsConfigTreeRenderer.java b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/inspectionsTree/InspectionsConfigTreeRenderer.java index e31bf2a47723..1c750b15b7fa 100644 --- a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/inspectionsTree/InspectionsConfigTreeRenderer.java +++ b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/inspectionsTree/InspectionsConfigTreeRenderer.java @@ -35,11 +35,10 @@ public abstract class InspectionsConfigTreeRenderer extends DefaultTreeRenderer InspectionConfigTreeNode node = (InspectionConfigTreeNode)value; boolean reallyHasFocus = ((TreeTableTree)tree).getTreeTable().hasFocus(); - final Color background = selected ? (reallyHasFocus ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeUnfocusedSelectionBackground()) - : UIUtil.getTreeTextBackground(); + Color background = UIUtil.getTreeBackground(selected, reallyHasFocus); UIUtil.changeBackGround(component, background); Color foreground = - selected ? UIUtil.getTreeSelectionForeground() : node.isProperSetting() ? PlatformColors.BLUE : UIUtil.getTreeTextForeground(); + selected ? UIUtil.getTreeSelectionForeground() : node.isProperSetting() ? PlatformColors.BLUE : UIUtil.getTreeForeground(); int style = SimpleTextAttributes.STYLE_PLAIN; String hint = null; diff --git a/platform/platform-api/src/com/intellij/ui/ColoredTreeCellRenderer.java b/platform/platform-api/src/com/intellij/ui/ColoredTreeCellRenderer.java index 750d89b87ecc..63f0c420636b 100644 --- a/platform/platform-api/src/com/intellij/ui/ColoredTreeCellRenderer.java +++ b/platform/platform-api/src/com/intellij/ui/ColoredTreeCellRenderer.java @@ -59,7 +59,7 @@ public abstract class ColoredTreeCellRenderer extends SimpleColoredComponent imp else if (WideSelectionTreeUI.isWideSelection(tree)) { setPaintFocusBorder(false); if (selected) { - setBackground(hasFocus ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeUnfocusedSelectionBackground()); + setBackground(UIUtil.getTreeSelectionBackground(hasFocus)); } else { setBackground(null); diff --git a/platform/platform-api/src/com/intellij/ui/GroupedElementsRenderer.java b/platform/platform-api/src/com/intellij/ui/GroupedElementsRenderer.java index bc819dadc9c5..ace5d0503065 100644 --- a/platform/platform-api/src/com/intellij/ui/GroupedElementsRenderer.java +++ b/platform/platform-api/src/com/intellij/ui/GroupedElementsRenderer.java @@ -145,12 +145,12 @@ public abstract class GroupedElementsRenderer { @Override protected Color getBackground() { - return UIUtil.getTreeTextBackground(); + return UIUtil.getTreeBackground(); } @Override protected Color getForeground() { - return UIUtil.getTreeTextForeground(); + return UIUtil.getTreeForeground(); } } diff --git a/platform/platform-api/src/com/intellij/ui/HighlightableComponent.java b/platform/platform-api/src/com/intellij/ui/HighlightableComponent.java index ab9c18a1176d..733fb2a60556 100644 --- a/platform/platform-api/src/com/intellij/ui/HighlightableComponent.java +++ b/platform/platform-api/src/com/intellij/ui/HighlightableComponent.java @@ -213,7 +213,7 @@ public class HighlightableComponent extends JComponent implements Accessible { paintHighlightsForeground = false; } else { - bgColor = myEnforcedBackground == null ? UIUtil.getTreeTextBackground() : myEnforcedBackground; + bgColor = myEnforcedBackground == null ? UIUtil.getTreeBackground() : myEnforcedBackground; fgColor = getForeground(); paintHighlightsBackground = isOpaque(); paintHighlightsForeground = true; diff --git a/platform/platform-api/src/com/intellij/ui/speedSearch/SpeedSearchUtil.java b/platform/platform-api/src/com/intellij/ui/speedSearch/SpeedSearchUtil.java index fb6cc54d1127..660fec9d562b 100644 --- a/platform/platform-api/src/com/intellij/ui/speedSearch/SpeedSearchUtil.java +++ b/platform/platform-api/src/com/intellij/ui/speedSearch/SpeedSearchUtil.java @@ -47,7 +47,7 @@ public final class SpeedSearchUtil { Iterable ranges = speedSearch == null ? null : speedSearch.matchingFragments(coloredComponent.getCharSequence(mainTextOnly).toString()); Iterator rangesIterator = ranges != null ? ranges.iterator() : null; if (rangesIterator == null || !rangesIterator.hasNext()) return; - Color bg = selected ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeTextBackground(); + Color bg = UIUtil.getTreeBackground(selected, true); SimpleColoredComponent.ColoredIterator coloredIterator = coloredComponent.iterator(); TextRange range = rangesIterator.next(); @@ -90,7 +90,7 @@ public final class SpeedSearchUtil { final Iterable fragments = speedSearch.matchingFragments(text); if (fragments != null) { final Color fg = attributes.getFgColor(); - final Color bg = selected ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeTextBackground(); + Color bg = UIUtil.getTreeBackground(selected, true); final int style = attributes.getStyle(); final SimpleTextAttributes plain = new SimpleTextAttributes(style, fg); final SimpleTextAttributes highlighted = new SimpleTextAttributes(bg, fg, null, style | SimpleTextAttributes.STYLE_SEARCH_MATCH); diff --git a/platform/platform-api/src/com/intellij/ui/treeStructure/SimpleNode.java b/platform/platform-api/src/com/intellij/ui/treeStructure/SimpleNode.java index a60baa1ffb3d..b05579b867ee 100644 --- a/platform/platform-api/src/com/intellij/ui/treeStructure/SimpleNode.java +++ b/platform/platform-api/src/com/intellij/ui/treeStructure/SimpleNode.java @@ -101,7 +101,7 @@ public abstract class SimpleNode extends PresentableNodeDescriptor implements Co Icon oldIcon = getIcon(); List oldFragments = new ArrayList<>(presentation.getColoredText()); - myColor = UIUtil.getTreeTextForeground(); + myColor = UIUtil.getTreeForeground(); updateFileStatus(); doUpdate(); diff --git a/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java b/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java index 3cc613de2c80..a7541816640d 100644 --- a/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java +++ b/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java @@ -185,7 +185,7 @@ public class Tree extends JTree implements ComponentWithEmptyText, ComponentWith @Override public Color getBackground() { - return isBackgroundSet() ? super.getBackground() : UIUtil.getTreeTextBackground(); + return isBackgroundSet() ? super.getBackground() : UIUtil.getTreeBackground(); } @Override diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/ActionsTree.java b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/ActionsTree.java index dbc41334878e..cf29f303acc7 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/ActionsTree.java +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/ActionsTree.java @@ -621,7 +621,7 @@ public class ActionsTree { } } if (!myHaveLink) { - Color background = selected ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeTextBackground(); + Color background = UIUtil.getTreeBackground(selected, true); SearchUtil.appendFragments(myFilter, text, SimpleTextAttributes.STYLE_PLAIN, foreground, background, this); if (actionId != null && myPaintInternalInfo) { String pluginName = myPluginNames.get(actionId); diff --git a/platform/platform-impl/src/com/intellij/ui/FinderRecursivePanel.java b/platform/platform-impl/src/com/intellij/ui/FinderRecursivePanel.java index a6ea983d2b69..78e78b2a0de6 100644 --- a/platform/platform-impl/src/com/intellij/ui/FinderRecursivePanel.java +++ b/platform/platform-impl/src/com/intellij/ui/FinderRecursivePanel.java @@ -640,8 +640,8 @@ public abstract class FinderRecursivePanel extends OnePixelSplitter implement boolean isSelected, boolean cellHasFocus) { mySelected = isSelected; - myForeground = UIUtil.getTreeTextForeground(); - mySelectionForeground = cellHasFocus ? list.getSelectionForeground() : UIUtil.getTreeTextForeground(); + myForeground = UIUtil.getTreeForeground(); + mySelectionForeground = cellHasFocus ? list.getSelectionForeground() : UIUtil.getTreeForeground(); clear(); setFont(UIUtil.getListFont()); @@ -664,7 +664,7 @@ public abstract class FinderRecursivePanel extends OnePixelSplitter implement // ignore } - Color bg = isSelected ? UIUtil.getTreeSelectionBackground(cellHasFocus) : UIUtil.getTreeTextBackground(); + Color bg = UIUtil.getTreeBackground(isSelected, cellHasFocus); if (!isSelected) { VirtualFile file = getContainingFile(t); Color bgColor = file == null ? null : getFileBackgroundColor(myProject, file); diff --git a/platform/platform-impl/src/com/intellij/ui/MultilineTreeCellRenderer.java b/platform/platform-impl/src/com/intellij/ui/MultilineTreeCellRenderer.java index 2d3977e848fb..814a21ec17af 100644 --- a/platform/platform-impl/src/com/intellij/ui/MultilineTreeCellRenderer.java +++ b/platform/platform-impl/src/com/intellij/ui/MultilineTreeCellRenderer.java @@ -126,7 +126,7 @@ public abstract class MultilineTreeCellRenderer extends JComponent implements Ac fgColor = UIUtil.getTreeSelectionForeground(); } else{ - bgColor = UIUtil.getTreeTextBackground(); + bgColor = UIUtil.getTreeBackground(); fgColor = getForeground(); } diff --git a/platform/platform-impl/src/com/intellij/ui/TreeExpandableItemsHandler.java b/platform/platform-impl/src/com/intellij/ui/TreeExpandableItemsHandler.java index cedf0ac4d34f..810d1384fd5e 100644 --- a/platform/platform-impl/src/com/intellij/ui/TreeExpandableItemsHandler.java +++ b/platform/platform-impl/src/com/intellij/ui/TreeExpandableItemsHandler.java @@ -145,7 +145,7 @@ public class TreeExpandableItemsHandler extends AbstractExpandableItemsHandler extends JPanel implements TypeSafeDat final boolean empty = messages.length == 0; final String tooltipText = TooltipUtils.getTooltipText(messages); if (myEmptyPane != null) { - myEmptyPane.getComponent().setBackground(empty ? UIUtil.getTreeTextBackground() : BaseControl.ERROR_BACKGROUND); + myEmptyPane.getComponent().setBackground(empty ? UIUtil.getTreeBackground() : BaseControl.ERROR_BACKGROUND); myEmptyPane.getComponent().setToolTipText(tooltipText); } final JViewport viewport = (JViewport)myTable.getParent();