當前位置: 首頁>>代碼示例>>Java>>正文


Java UIUtil.getClientProperty方法代碼示例

本文整理匯總了Java中com.intellij.util.ui.UIUtil.getClientProperty方法的典型用法代碼示例。如果您正苦於以下問題:Java UIUtil.getClientProperty方法的具體用法?Java UIUtil.getClientProperty怎麽用?Java UIUtil.getClientProperty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.util.ui.UIUtil的用法示例。


在下文中一共展示了UIUtil.getClientProperty方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getListCellRendererComponent

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
  list.putClientProperty(SwingUtilities2.AA_TEXT_PROPERTY_KEY, AntialiasingType.getAAHintForSwingComponent());
  Component result = myWrappee.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
  if (!myHandler.getExpandedItems().contains(index)) return result;
  Rectangle bounds = result.getBounds();
  ExpandedItemRendererComponentWrapper wrapper = ExpandedItemRendererComponentWrapper.wrap(result);
  if (UIUtil.getClientProperty(list, ExpandableItemsHandler.EXPANDED_RENDERER) == Boolean.TRUE) {
    JComponent res = ObjectUtils.tryCast(result, JComponent.class);
    if (res != null && UIUtil.getClientProperty(res, ExpandableItemsHandler.USE_RENDERER_BOUNDS) == Boolean.TRUE) {
      Insets insets = wrapper.getInsets();
      bounds.translate(-insets.left, -insets.top);
      bounds.grow(insets.left + insets.right, insets.top + insets.bottom);
      wrapper.setBounds(bounds);
      UIUtil.putClientProperty(wrapper, ExpandableItemsHandler.USE_RENDERER_BOUNDS, true);
    }
  }
  return wrapper;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:20,代碼來源:ExpandedItemListCellRendererWrapper.java

示例2: getEditorPanel

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@NotNull
private RendererComponent getEditorPanel(final JTable table) {
  RendererComponent panel = UIUtil.getClientProperty(table, MY_PANEL_PROPERTY);
  if (panel != null) {
    DelegateColorScheme scheme = (DelegateColorScheme)panel.getEditor().getColorsScheme();
    scheme.setDelegate(EditorColorsManager.getInstance().getGlobalScheme());
    return panel;
  }

  panel = createRendererComponent(myProject, myFileType, myInheritFontFromLaF);
  Disposer.register(this, panel);
  Disposer.register(this, new Disposable() {
    @Override
    public void dispose() {
      UIUtil.putClientProperty(table, MY_PANEL_PROPERTY, null);
    }
  });

  table.putClientProperty(MY_PANEL_PROPERTY, panel);
  return panel;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:22,代碼來源:EditorTextFieldCellRenderer.java

示例3: propertyChange

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public void propertyChange(PropertyChangeEvent evt) {
  if (evt.getSource() != myTabs) return;
  Integer limit = UIUtil.getClientProperty(myTabs, JBTabsImpl.SIDE_TABS_SIZE_LIMIT_KEY);
  if (limit == null) limit = JBTabsImpl.DEFAULT_MAX_TAB_WIDTH;
  setSideTabsLimit(limit);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:8,代碼來源:TabsSideSplitter.java

示例4: getMagnificator

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Nullable
@Override
public Magnificator getMagnificator() {
  JComponent view = (JComponent)getView();
  return view != null ? UIUtil.getClientProperty(view, Magnificator.CLIENT_PROPERTY_KEY) : null;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:7,代碼來源:JBViewport.java


注:本文中的com.intellij.util.ui.UIUtil.getClientProperty方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。