本文整理汇总了Java中com.intellij.openapi.ui.FixedSizeButton.setFocusable方法的典型用法代码示例。如果您正苦于以下问题:Java FixedSizeButton.setFocusable方法的具体用法?Java FixedSizeButton.setFocusable怎么用?Java FixedSizeButton.setFocusable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.ui.FixedSizeButton
的用法示例。
在下文中一共展示了FixedSizeButton.setFocusable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createComponent
import com.intellij.openapi.ui.FixedSizeButton; //导入方法依赖的package包/类
public void createComponent() {
removeAll();
setLayout(new GridBagLayout());
if (myLabelText != null) {
myLabel = new JLabel(myLabelText);
this.add(myLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 5, 0), 0, 0));
myLabel.setLabelFor(myComponent);
}
this.add(myComponent, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
if (myBrowseButtonActionListener != null) {
FixedSizeButton browseButton = new FixedSizeButton(getComponent());
myDoClickAction = new TextFieldWithBrowseButton.MyDoClickAction(browseButton);
browseButton.setFocusable(false);
browseButton.addActionListener(myBrowseButtonActionListener);
myButtons.add(browseButton);
this.add(browseButton, new GridBagConstraints(GridBagConstraints.RELATIVE, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 0, 0), 0, 0));
}
if (myViewerDialogTitle != null) {
final FixedSizeButton showViewerButton = new FixedSizeButton(getComponent());
if (myBrowseButtonActionListener == null) {
LOG.assertTrue(myDoClickAction == null);
myDoClickAction = new TextFieldWithBrowseButton.MyDoClickAction(showViewerButton);
}
showViewerButton.setFocusable(false);
showViewerButton.setIcon(PlatformIcons.OPEN_EDIT_DIALOG_ICON);
showViewerButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Viewer viewer = new Viewer();
viewer.setTitle(myViewerDialogTitle);
viewer.show();
}
});
myButtons.add(showViewerButton);
this.add(showViewerButton, new GridBagConstraints(GridBagConstraints.RELATIVE, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
}
}
示例2: createUIComponents
import com.intellij.openapi.ui.FixedSizeButton; //导入方法依赖的package包/类
private void createUIComponents() {
projectNameLabel = new HyperlinkLabelWithStateAccess();
projectNameLabel.setHyperlinkText(
GctBundle.getString("cloud.project.selector.no.selected.project"));
projectNameLabel.addHyperlinkListener(
(event) -> {
if (event.getEventType() == EventType.ACTIVATED) {
handleOpenProjectSelectionDialog();
}
});
projectAccountSeparatorLabel = new JBLabel("/");
projectAccountSeparatorLabel.setVisible(false /* only visible when project is selected. */);
accountInfoLabel = new HyperlinkLabelWithStateAccess();
accountInfoLabel.addHyperlinkListener(
(event) -> {
if (event.getEventType() == EventType.ACTIVATED) {
handleOpenProjectSelectionDialog();
}
});
hyperlinksPanel = new JPanel();
hyperlinksPanel.setBorder(UIManager.getBorder("TextField.border"));
hyperlinksPanel.setLayout(new BoxLayout(hyperlinksPanel, BoxLayout.X_AXIS));
browseButton = new FixedSizeButton(hyperlinksPanel);
browseButton.addActionListener((actionEvent) -> handleOpenProjectSelectionDialog());
browseButton.setFocusable(true);
browseButton.setToolTipText(GctBundle.getString("cloud.project.selector.open.dialog.tooltip"));
}
示例3: createComponent
import com.intellij.openapi.ui.FixedSizeButton; //导入方法依赖的package包/类
public void createComponent() {
removeAll();
setLayout(new GridBagLayout());
if (myLabelText != null) {
myLabel = new JLabel(myLabelText);
this.add(myLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 5, 0), 0, 0));
myLabel.setLabelFor(myComponent);
}
this.add(myComponent, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
if (myBrowseButtonActionListener != null) {
FixedSizeButton browseButton = new FixedSizeButton(getComponent());
myDoClickAction = new TextFieldWithBrowseButton.MyDoClickAction(browseButton);
browseButton.setFocusable(false);
browseButton.addActionListener(myBrowseButtonActionListener);
myButtons.add(browseButton);
this.add(browseButton, new GridBagConstraints(GridBagConstraints.RELATIVE, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 0, 0), 0, 0));
}
if (myViewerDialogTitle != null) {
final FixedSizeButton showViewerButton = new FixedSizeButton(getComponent());
if (myBrowseButtonActionListener == null) {
LOG.assertTrue(myDoClickAction == null);
myDoClickAction = new TextFieldWithBrowseButton.MyDoClickAction(showViewerButton);
}
showViewerButton.setFocusable(false);
showViewerButton.setIcon(AllIcons.Actions.ShowViewer);
showViewerButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Viewer viewer = new Viewer();
viewer.setTitle(myViewerDialogTitle);
viewer.show();
}
});
myButtons.add(showViewerButton);
this.add(showViewerButton, new GridBagConstraints(GridBagConstraints.RELATIVE, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
}
}