本文整理匯總了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;
}
示例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;
}
示例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);
}
示例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;
}