本文整理汇总了Java中com.intellij.openapi.actionSystem.ex.ComboBoxAction类的典型用法代码示例。如果您正苦于以下问题:Java ComboBoxAction类的具体用法?Java ComboBoxAction怎么用?Java ComboBoxAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ComboBoxAction类属于com.intellij.openapi.actionSystem.ex包,在下文中一共展示了ComboBoxAction类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: click
import com.intellij.openapi.actionSystem.ex.ComboBoxAction; //导入依赖的package包/类
private void click() throws ClassNotFoundException {
final Class<?> comboBoxButtonClass = getClass().getClassLoader().loadClass(ComboBoxAction.class.getCanonicalName() + "$ComboBoxButton");
final ActionButtonFixture runButton = projectFrame.findRunApplicationButton();
Container actionToolbarContainer = execute(new GuiQuery<Container>() {
@Override
protected Container executeInEDT() throws Throwable {
return runButton.target().getParent();
}
});
assertNotNull(actionToolbarContainer);
JButton comboBoxButton = robot.finder().find(actionToolbarContainer, new GenericTypeMatcher<JButton>(JButton.class) {
@Override
protected boolean isMatching(@NotNull JButton component) {
return comboBoxButtonClass.isInstance(component);
}
});
final JButtonFixture comboBoxButtonFixture = new JButtonFixture(robot, comboBoxButton);
pause(new Condition("Wait until comboBoxButton is enabled") {
@Override
public boolean test() {
//noinspection ConstantConditions
return execute(new GuiQuery<Boolean>() {
@Override
protected Boolean executeInEDT() throws Throwable {
return comboBoxButtonFixture.target().isEnabled();
}
});
}
}, SHORT_TIMEOUT);
comboBoxButtonFixture.click();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:35,代码来源:ComboBoxActionFixture.java
示例2: getPreferredSize
import com.intellij.openapi.actionSystem.ex.ComboBoxAction; //导入依赖的package包/类
@Override
public Dimension getPreferredSize(JComponent c) {
ComboBoxButton comboBoxButton = (ComboBoxButton)c;
ComboBoxAction comboBoxAction = comboBoxButton.getComboBoxAction();
final boolean isEmpty = comboBoxButton.getIcon() == null && StringUtil.isEmpty(comboBoxButton.getText());
int width = isEmpty ? JBUI.scale(10) + getArrowIcon().getIconWidth() : super.getPreferredSize(c).width;
if (comboBoxAction.isSmallVariant()) width += JBUI.scale(4);
return new Dimension(width, comboBoxAction.isSmallVariant() ? JBUI.scale(19) : super.getPreferredSize(c).height);
}
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:ComboBoxButtonUI.java
示例3: getPreferredSize
import com.intellij.openapi.actionSystem.ex.ComboBoxAction; //导入依赖的package包/类
@Override
public Dimension getPreferredSize(JComponent c) {
ComboBoxButton comboBoxButton = (ComboBoxButton)c;
ComboBoxAction comboBoxAction = comboBoxButton.getComboBoxAction();
final boolean isEmpty = comboBoxButton.getIcon() == null && StringUtil.isEmpty(comboBoxButton.getText());
int width = isEmpty ? JBUI.scale(18) : super.getPreferredSize(c).width;
if (comboBoxAction.isSmallVariant()) width += JBUI.scale(4);
return new Dimension(width, comboBoxAction.isSmallVariant() ? JBUI.scale(21) : super.getPreferredSize(c).height);
}
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:ModernComboBoxButtonUI.java
示例4: isNeedGap
import com.intellij.openapi.actionSystem.ex.ComboBoxAction; //导入依赖的package包/类
private static boolean isNeedGap(final AnAction group) {
final AnAction firstAction = getFirstAction(group);
return firstAction instanceof ComboBoxAction;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:NavBarRootPaneExtension.java
注:本文中的com.intellij.openapi.actionSystem.ex.ComboBoxAction类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论