本文整理汇总了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();
}
示例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();
}
示例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();
}
});
}
示例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();
}
});
}