本文整理汇总了Java中com.intellij.openapi.actionSystem.ActionPlaces.UNKNOWN属性的典型用法代码示例。如果您正苦于以下问题:Java ActionPlaces.UNKNOWN属性的具体用法?Java ActionPlaces.UNKNOWN怎么用?Java ActionPlaces.UNKNOWN使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.openapi.actionSystem.ActionPlaces
的用法示例。
在下文中一共展示了ActionPlaces.UNKNOWN属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SearchTextArea
public SearchTextArea(boolean search) {
myTextArea = new JTextArea();
setBorder(JBUI.Borders.empty(6, 6, 6, 8));
setLayout(new BorderLayout(JBUI.scale(4), 0));
myTextArea.addPropertyChangeListener("background", this);
myTextArea.addFocusListener(this);
myTextArea.setBorder(null);
myTextArea.setOpaque(false);
JBScrollPane scrollPane = new JBScrollPane(myTextArea,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrollPane.getVerticalScrollBar().setBackground(UIUtil.TRANSPARENT_COLOR);
scrollPane.getViewport().setBorder(null);
scrollPane.getViewport().setOpaque(false);
scrollPane.setBorder(JBUI.Borders.emptyRight(2));
scrollPane.setOpaque(false);
ShowHistoryAction historyAction = new ShowHistoryAction(search);
ActionButton button =
new ActionButton(historyAction, historyAction.getTemplatePresentation(), ActionPlaces.UNKNOWN, new Dimension(JBUI.scale(16), JBUI.scale(16)));
button.setLook(new InplaceActionButtonLook());
JPanel p = new NonOpaquePanel(new BorderLayout());
p.add(button, BorderLayout.NORTH);
add(p, BorderLayout.WEST);
add(scrollPane, BorderLayout.CENTER);
}
示例2: handlePopup
private void handlePopup(final MouseEvent e) {
if (e.getClickCount() != 1 || !e.isPopupTrigger()) return;
if (e.getX() < 0 || e.getX() >= e.getComponent().getWidth() || e.getY() < 0 || e.getY() >= e.getComponent().getHeight()) return;
String place = myTabs.getPopupPlace();
place = place != null ? place : ActionPlaces.UNKNOWN;
myTabs.myPopupInfo = myInfo;
final DefaultActionGroup toShow = new DefaultActionGroup();
if (myTabs.getPopupGroup() != null) {
toShow.addAll(myTabs.getPopupGroup());
toShow.addSeparator();
}
JBTabsImpl tabs =
JBTabsImpl.NAVIGATION_ACTIONS_KEY.getData(DataManager.getInstance().getDataContext(e.getComponent(), e.getX(), e.getY()));
if (tabs == myTabs && myTabs.myAddNavigationGroup) {
toShow.addAll(myTabs.myNavigationActions);
}
if (toShow.getChildrenCount() == 0) return;
myTabs.myActivePopup = myTabs.myActionManager.createActionPopupMenu(place, toShow).getComponent();
myTabs.myActivePopup.addPopupMenuListener(myTabs.myPopupListener);
myTabs.myActivePopup.addPopupMenuListener(myTabs);
myTabs.myActivePopup.show(e.getComponent(), e.getX(), e.getY());
}
示例3: invokeAction
private void invokeAction() {
String actionId = GitToolBoxConfig.getInstance().getUpdateProjectActionId();
AnAction action = GitToolBoxUpdateProjectApp.getInstance().getById(actionId).getAction();
DataManager dataManager = DataManager.getInstance();
WindowManager windowManager = WindowManager.getInstance();
AnActionEvent evt = new AnActionEvent(null,
dataManager.getDataContext(windowManager.getFrame(project)), ActionPlaces.UNKNOWN,
action.getTemplatePresentation(), ActionManager.getInstance(), 5);
action.actionPerformed(evt);
}
示例4: handlePopup
private void handlePopup(final MouseEvent e) {
if (e.getClickCount() != 1 || !e.isPopupTrigger()) return;
if (e.getX() < 0 || e.getX() >= e.getComponent().getWidth() || e.getY() < 0 || e.getY() >= e.getComponent().getHeight()) return;
String place = myTabs.getPopupPlace();
place = place != null ? place : ActionPlaces.UNKNOWN;
myTabs.myPopupInfo = myInfo;
final DefaultActionGroup toShow = new DefaultActionGroup();
if (myTabs.getPopupGroup() != null) {
toShow.addAll(myTabs.getPopupGroup());
toShow.addSeparator();
}
JBTabsImpl tabs = JBTabsImpl.NAVIGATION_ACTIONS_KEY.getData(DataManager.getInstance().getDataContext(e.getComponent(), e.getX(), e.getY()));
if (tabs == myTabs && myTabs.myAddNavigationGroup) {
toShow.addAll(myTabs.myNavigationActions);
}
if (toShow.getChildrenCount() == 0) return;
myTabs.myActivePopup = myTabs.myActionManager.createActionPopupMenu(place, toShow).getComponent();
myTabs.myActivePopup.addPopupMenuListener(myTabs.myPopupListener);
myTabs.myActivePopup.addPopupMenuListener(myTabs);
myTabs.myActivePopup.show(e.getComponent(), e.getX(), e.getY());
}
示例5: executeAction
protected void executeAction(final String actionId) {
final AnAction action = ActionManager.getInstance().getAction(actionId);
final AnActionEvent event = new AnActionEvent(null, DataManager.getInstance().getDataContext(this), ActionPlaces.UNKNOWN,
action.getTemplatePresentation(), ActionManager.getInstance(),
0);
action.beforeActionPerformedUpdate(event);
action.update(event);
if (event.getPresentation().isEnabled() && event.getPresentation().isVisible()) {
action.actionPerformed(event);
}
}
示例6: handlePopup
private void handlePopup(final MouseEvent e) {
if (e.getClickCount() != 1 || !e.isPopupTrigger()) return;
if (e.getX() < 0 ||
e.getX() >= e.getComponent().getWidth() ||
e.getY() < 0 ||
e.getY() >= e.getComponent().getHeight()) {
return;
}
String place = myTabs.getPopupPlace();
place = place != null ? place : ActionPlaces.UNKNOWN;
myTabs.myPopupInfo = myInfo;
final DefaultActionGroup toShow = new DefaultActionGroup();
if (myTabs.getPopupGroup() != null) {
toShow.addAll(myTabs.getPopupGroup());
toShow.addSeparator();
}
JBTabsImpl tabs = DataManager.getInstance().getDataContext(e.getComponent(), e.getX(), e.getY()).getData(JBTabsImpl.NAVIGATION_ACTIONS_KEY);
if (tabs == myTabs && myTabs.myAddNavigationGroup) {
toShow.addAll(myTabs.myNavigationActions);
}
if (toShow.getChildrenCount() == 0) return;
myTabs.myActivePopup = myTabs.myActionManager.createActionPopupMenu(place, toShow).getComponent();
myTabs.myActivePopup.addPopupMenuListener(myTabs.myPopupListener);
myTabs.myActivePopup.addPopupMenuListener(myTabs);
myTabs.myActivePopup.show(e.getComponent(), e.getX(), e.getY());
}
示例7: executeAction
@RequiredDispatchThread
protected void executeAction(final String actionId) {
final AnAction action = ActionManager.getInstance().getAction(actionId);
final AnActionEvent event = new AnActionEvent(null, DataManager.getInstance().getDataContext(this), ActionPlaces.UNKNOWN, action.getTemplatePresentation(),
ActionManager.getInstance(), 0);
action.beforeActionPerformedUpdate(event);
action.update(event);
if (event.getPresentation().isEnabled() && event.getPresentation().isVisible()) {
action.actionPerformed(event);
}
}
示例8: ToolbarPanel
public ToolbarPanel(JComponent contentComponent, ActionGroup actions) {
this(contentComponent, actions, ActionPlaces.UNKNOWN);
}
示例9: createCustomComponentImpl
public static JComponent createCustomComponentImpl(final AnAction action, final Presentation presentation) {
return new ActionButtonWithText(action, presentation, ActionPlaces.UNKNOWN, ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE);
}
示例10: getToolbarPlace
@Nullable
@Override
public String getToolbarPlace() {
return ActionPlaces.UNKNOWN;
}
示例11: createCustomComponentImpl
public static JComponent createCustomComponentImpl(final AnAction action, final Presentation presentation) {
return new ActionButtonWithText(action, presentation, ActionPlaces.UNKNOWN, JBUI.size(ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE));
}