当前位置: 首页>>代码示例>>Java>>正文


Java Wrapper.setFocusable方法代码示例

本文整理汇总了Java中com.intellij.ui.components.panels.Wrapper.setFocusable方法的典型用法代码示例。如果您正苦于以下问题:Java Wrapper.setFocusable方法的具体用法?Java Wrapper.setFocusable怎么用?Java Wrapper.setFocusable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.ui.components.panels.Wrapper的用法示例。


在下文中一共展示了Wrapper.setFocusable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MergeRequestProcessor

import com.intellij.ui.components.panels.Wrapper; //导入方法依赖的package包/类
public MergeRequestProcessor(@Nullable Project project, @NotNull MergeRequest request) {
  myProject = project;
  myRequest = request;

  myContext = new MyDiffContext();
  myContext.putUserData(DiffUserDataKeys.PLACE, DiffPlaces.MERGE);

  myAvailableTools = DiffManagerEx.getInstance().getMergeTools();

  myMainPanel = new MyPanel();
  myContentPanel = new Wrapper();
  myToolbarPanel = new Wrapper();
  myToolbarPanel.setFocusable(true);
  myToolbarStatusPanel = new Wrapper();

  myPanel = JBUI.Panels.simplePanel(myMainPanel);

  JPanel topPanel = JBUI.Panels.simplePanel(myToolbarPanel).addToRight(myToolbarStatusPanel);

  myMainPanel.add(topPanel, BorderLayout.NORTH);
  myMainPanel.add(myContentPanel, BorderLayout.CENTER);

  myMainPanel.setFocusTraversalPolicyProvider(true);
  myMainPanel.setFocusTraversalPolicy(new MyFocusTraversalPolicy());

  MergeTool.MergeViewer viewer;
  try {
    viewer = getFittedTool().createComponent(myContext, myRequest);
  }
  catch (Throwable e) {
    LOG.error(e);
    viewer = ErrorMergeTool.INSTANCE.createComponent(myContext, myRequest);
  }

  myViewer = viewer;
  updateBottomActions();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:38,代码来源:MergeRequestProcessor.java

示例2: MergeRequestProcessor

import com.intellij.ui.components.panels.Wrapper; //导入方法依赖的package包/类
public MergeRequestProcessor(@javax.annotation.Nullable Project project, @Nonnull MergeRequest request) {
  myProject = project;
  myRequest = request;

  myContext = new MyDiffContext();
  myContext.putUserData(DiffUserDataKeys.PLACE, DiffPlaces.MERGE);

  myAvailableTools = DiffManagerEx.getInstance().getMergeTools();

  myMainPanel = new MyPanel();
  myContentPanel = new Wrapper();
  myToolbarPanel = new Wrapper();
  myToolbarPanel.setFocusable(true);
  myToolbarStatusPanel = new Wrapper();

  myPanel = JBUI.Panels.simplePanel(myMainPanel);

  JPanel topPanel = JBUI.Panels.simplePanel(myToolbarPanel).addToRight(myToolbarStatusPanel);

  myMainPanel.add(topPanel, BorderLayout.NORTH);
  myMainPanel.add(myContentPanel, BorderLayout.CENTER);

  myMainPanel.setFocusTraversalPolicyProvider(true);
  myMainPanel.setFocusTraversalPolicy(new MyFocusTraversalPolicy());

  MergeTool.MergeViewer viewer;
  try {
    viewer = getFittedTool().createComponent(myContext, myRequest);
  }
  catch (Throwable e) {
    LOG.error(e);
    viewer = ErrorMergeTool.INSTANCE.createComponent(myContext, myRequest);
  }

  myViewer = viewer;
  updateBottomActions();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:38,代码来源:MergeRequestProcessor.java

示例3: DiffRequestProcessor

import com.intellij.ui.components.panels.Wrapper; //导入方法依赖的package包/类
public DiffRequestProcessor(@Nullable Project project, @NotNull UserDataHolder context) {
  myProject = project;

  myContext = new MyDiffContext(context);
  myActiveRequest = new LoadingDiffRequest();

  mySettings = DiffSettingsHolder.getInstance().getSettings(myContext.getUserData(DiffUserDataKeys.PLACE));

  myAvailableTools = DiffManagerEx.getInstance().getDiffTools();
  myToolOrder = new LinkedList<DiffTool>(getToolOrderFromSettings(myAvailableTools));

  // UI

  myMainPanel = new MyPanel();
  myContentPanel = new Wrapper();
  myToolbarPanel = new Wrapper();
  myToolbarPanel.setFocusable(true);
  myToolbarStatusPanel = new Wrapper();
  myProgressBar = new MyProgressBar();

  myPanel = JBUI.Panels.simplePanel(myMainPanel);

  JPanel statusPanel = JBUI.Panels.simplePanel(myToolbarStatusPanel).addToLeft(myProgressBar);
  JPanel topPanel = JBUI.Panels.simplePanel(myToolbarPanel).addToRight(statusPanel);

  myMainPanel.add(topPanel, BorderLayout.NORTH);
  myMainPanel.add(myContentPanel, BorderLayout.CENTER);

  myMainPanel.setFocusTraversalPolicyProvider(true);
  myMainPanel.setFocusTraversalPolicy(new MyFocusTraversalPolicy());

  JComponent bottomPanel = myContext.getUserData(DiffUserDataKeysEx.BOTTOM_PANEL);
  if (bottomPanel != null) myMainPanel.add(bottomPanel, BorderLayout.SOUTH);
  if (bottomPanel instanceof Disposable) Disposer.register(this, (Disposable)bottomPanel);

  myState = EmptyState.INSTANCE;
  myContentPanel.setContent(DiffUtil.createMessagePanel(((LoadingDiffRequest)myActiveRequest).getMessage()));

  myOpenInEditorAction = new OpenInEditorAction(new Runnable() {
    @Override
    public void run() {
      onAfterNavigate();
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:46,代码来源:DiffRequestProcessor.java

示例4: DiffRequestProcessor

import com.intellij.ui.components.panels.Wrapper; //导入方法依赖的package包/类
public DiffRequestProcessor(@javax.annotation.Nullable Project project, @Nonnull UserDataHolder context) {
  myProject = project;

  myContext = new MyDiffContext(context);
  myActiveRequest = new LoadingDiffRequest();

  mySettings = DiffSettingsHolder.getInstance().getSettings(myContext.getUserData(DiffUserDataKeys.PLACE));

  myAvailableTools = DiffManagerEx.getInstance().getDiffTools();
  myToolOrder = new LinkedList<DiffTool>(getToolOrderFromSettings(myAvailableTools));

  // UI

  myMainPanel = new MyPanel();
  myContentPanel = new Wrapper();
  myToolbarPanel = new Wrapper();
  myToolbarPanel.setFocusable(true);
  myToolbarStatusPanel = new Wrapper();
  myProgressBar = new MyProgressBar();

  myPanel = JBUI.Panels.simplePanel(myMainPanel);

  JPanel statusPanel = JBUI.Panels.simplePanel(myToolbarStatusPanel).addToLeft(myProgressBar);
  JPanel topPanel = JBUI.Panels.simplePanel(myToolbarPanel).addToRight(statusPanel);

  myMainPanel.add(topPanel, BorderLayout.NORTH);
  myMainPanel.add(myContentPanel, BorderLayout.CENTER);

  myMainPanel.setFocusTraversalPolicyProvider(true);
  myMainPanel.setFocusTraversalPolicy(new MyFocusTraversalPolicy());

  JComponent bottomPanel = myContext.getUserData(DiffUserDataKeysEx.BOTTOM_PANEL);
  if (bottomPanel != null) myMainPanel.add(bottomPanel, BorderLayout.SOUTH);
  if (bottomPanel instanceof Disposable) Disposer.register(this, (Disposable)bottomPanel);

  myState = EmptyState.INSTANCE;
  myContentPanel.setContent(DiffUtil.createMessagePanel(((LoadingDiffRequest)myActiveRequest).getMessage()));

  myOpenInEditorAction = new OpenInEditorAction(new Runnable() {
    @Override
    public void run() {
      onAfterNavigate();
    }
  });
}
 
开发者ID:consulo,项目名称:consulo,代码行数:46,代码来源:DiffRequestProcessor.java


注:本文中的com.intellij.ui.components.panels.Wrapper.setFocusable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。