Java Code Examples for com.intellij.util.ui.UIUtil#isClientPropertyTrue()

The following examples show how to use com.intellij.util.ui.UIUtil#isClientPropertyTrue() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExpandedItemListCellRendererWrapper.java    From consulo with Apache License 2.0 6 votes vote down vote up
@Override
public Component getListCellRendererComponent(JList<? extends T> list, T value, int index, boolean isSelected, boolean cellHasFocus) {
  GraphicsUtil.setAntialiasingType(list, AntialiasingTypeUtil.getAntialiasingTypeForSwingComponent());
  Component result = myWrappee.getListCellRendererComponent(list, UIUtil.htmlInjectionGuard(value), index, isSelected, cellHasFocus);
  if (!myHandler.getExpandedItems().contains(index)) return result;
  Rectangle bounds = result.getBounds();
  ExpandedItemRendererComponentWrapper wrapper = ExpandedItemRendererComponentWrapper.wrap(result);
  if (UIUtil.isClientPropertyTrue(list, ExpandableItemsHandler.EXPANDED_RENDERER)) {
    if (UIUtil.isClientPropertyTrue(result, ExpandableItemsHandler.USE_RENDERER_BOUNDS)) {
      wrapper.setBounds(bounds);
      UIUtil.putClientProperty(wrapper, ExpandableItemsHandler.USE_RENDERER_BOUNDS, true);
    }
  }
  wrapper.owner = list;
  return wrapper;
}
 
Example 2
Source File: EditorSearchSession.java    From consulo with Apache License 2.0 5 votes vote down vote up
private void nothingToSearchFor(boolean allowedToChangedEditorSelection) {
  updateUIWithEmptyResults();
  mySearchResults.clear();
  if (allowedToChangedEditorSelection && !UIUtil.isClientPropertyTrue(myComponent.getSearchTextComponent(), SearchTextArea.JUST_CLEARED_KEY)) {
    restoreInitialCaretPositionAndSelection();
  }
}
 
Example 3
Source File: AnimatedIcon.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nullable
protected Component getRendererOwner(@Nullable Component component) {
  return UIUtil.isClientPropertyTrue(component, ANIMATION_IN_RENDERER_ALLOWED) ? component : null;
}