javax.swing.JPanel.setFocusable()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(264)

本文整理了Java中javax.swing.JPanel.setFocusable()方法的一些代码示例,展示了JPanel.setFocusable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPanel.setFocusable()方法的具体详情如下:
包路径:javax.swing.JPanel
类名称:JPanel
方法名:setFocusable

JPanel.setFocusable介绍

暂无

代码示例

代码示例来源:origin: 4thline/cling

statusIconPanel.add(fullscreenCheckbox);
getLogPanel().setFocusable(false);
getLogPanel().setPreferredSize(new Dimension(800, 175));

代码示例来源:origin: magefree/mage

draftLeftPane.setFocusable(false);
draftLeftPane.setRequestFocusEnabled(false);
draftLeftPane.setVerifyInputWhenFocusTarget(false);
jPanel1.setLayout(null);
pnlLeft.setFocusable(false);
pnlLeft.setMaximumSize(new java.awt.Dimension(80, 132));
pnlLeft.setMinimumSize(new java.awt.Dimension(80, 132));
lblTableImage.setBounds(95, 5, 40, 136);
pnlRight.setFocusable(false);
pnlRight.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
pnlRight.setMaximumSize(new java.awt.Dimension(80, 132));

代码示例来源:origin: UNIVALI-LITE/Portugol-Studio

private void criarPainelTemporario() {
  painelTemporario = new JPanel();
  painelTemporario.setBorder(null);
  painelTemporario.setLayout(new GridLayout(1, 1));
  painelTemporario.setOpaque(false);
  painelTemporario.setFocusable(false);
  painelTemporario.setBackground(Color.RED);
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction
@Override
public void setFocusable(boolean aValue) {
  super.setFocusable(aValue);
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction
@Override
public void setFocusable(boolean aValue) {
  super.setFocusable(aValue);
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction
@Override
public void setFocusable(boolean aValue) {
  super.setFocusable(aValue);
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction
@Override
public void setFocusable(boolean aValue) {
  super.setFocusable(aValue);
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction
@Override
public void setFocusable(boolean aValue) {
  super.setFocusable(aValue);
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction
@Override
public void setFocusable(boolean aValue) {
  super.setFocusable(aValue);
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction
@Override
public void setFocusable(boolean aValue) {
  super.setFocusable(aValue);
}

代码示例来源:origin: stackoverflow.com

JPanel p = new JPanel(); //!! This should be a JPanel, not a Panel
p.setFocusable(true); //!! This is needed
p.setLayout(new BorderLayout());
p.addKeyListener(this);
p.requestFocusInWindow();

代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client

private JPanel getSearchComponent() {
  final SearchConditionGroupItem entireQueryModel = new SearchConditionGroupItem(null);
  queryViewController = new QueryViewController(entireQueryModel, MedSavantConditionViewGenerator.getInstance());
  JPanel p = new JPanel();
  p.setFocusable(true);
  p.setOpaque(false);
  p.setLayout(new BorderLayout());
  p.add(queryViewController, BorderLayout.CENTER);
  return p;
}

代码示例来源:origin: com.synaptix/SynaptixSwing

public void setEnabled(boolean enabled) {
  labelPanel.setFocusable(enabled);
  cropAction.setEnabled(false);
  if (enabled) {
    noImageLabel.setText(SwingMessages.getString("JImageCropping.6")); //$NON-NLS-1$
  } else {
    noImageLabel.setText(SwingMessages.getString("JImageCropping.12")); //$NON-NLS-1$
  }
  super.setEnabled(enabled);
}

代码示例来源:origin: uwolfer/gerrit-intellij-plugin

public BasePopupAction(String filterName) {
  myFilterNameLabel = new JLabel(filterName + ": ");
  myFilterValueLabel = new JLabel();
  myPanel = new JPanel();
  BoxLayout layout = new BoxLayout(myPanel, BoxLayout.X_AXIS);
  myPanel.setLayout(layout);
  myPanel.setFocusable(true);
  myPanel.setBorder(UNFOCUSED_BORDER);
  myPanel.add(myFilterNameLabel);
  myPanel.add(myFilterValueLabel);
  myPanel.add(Box.createHorizontalStrut(GAP_BEFORE_ARROW));
  myPanel.add(new JLabel(AllIcons.Ide.Statusbar_arrows));
  showPopupMenuOnClick();
  showPopupMenuFromKeyboard();
  indicateHovering();
  indicateFocusing();
}

代码示例来源:origin: igniterealtime/Spark

public Component getListCellRendererComponent(JList list,
                         Object value,
                         int index,
                         boolean isSelected,
                         boolean cellHasFocus) {
    JPanel panel = (JPanel)value;
    panel.setFocusable(false);

    if (isSelected) {
      panel.setForeground((Color)UIManager.get("List.selectionForeground"));
      panel.setBackground((Color)UIManager.get("List.selectionBackground"));
      panel.setBorder(BorderFactory.createLineBorder((Color)UIManager.get("List.selectionBorder")));
    }
    else {
      panel.setBackground(list.getBackground());
      panel.setForeground(list.getForeground());
      panel.setBorder(BorderFactory.createLineBorder((Color)UIManager.get("ContactItem.background")));
    }

    list.setBackground((Color)UIManager.get("ContactItem.background"));

    return panel;
  }
}

代码示例来源:origin: org.rwshop/org.rwshop.swing.common

/**
 *
 * @param panel
 * @return
 */
public static FocusRequestor setFocusable(JPanel panel){
  panel.setFocusable(true);
  FocusRequestor f = new FocusRequestor();
  f.init(panel);
  return f;
}

代码示例来源:origin: UNIVALI-LITE/Portugol-Studio

private void criarSuperficieDesenho()
{
  SuperficieDesenhoImpl superficie = new SuperficieDesenhoImpl();
  superficieDesenho = superficie;
  JPanel painelConteudo = (JPanel) getContentPane();
  painelConteudo.setFocusable(false);
  painelConteudo.setRequestFocusEnabled(false);
  painelConteudo.setLayout(null);
  painelConteudo.add(superficie);
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction
@Override
public void setFocusable(boolean aValue) {
  super.setFocusable(aValue);
  decorated.setFocusable(aValue);
}

代码示例来源:origin: zgqq/mah

@Override
public void setPost(Post post) {
  WindowMode.triggerMode();
  triggerMode();
  postPane.reset(post);
  applyTheme();
  SwingUtilities.invokeLater(() -> {
    postPane.getPanel().setFocusable(true);
    postPane.getPanel().requestFocusInWindow();
  });
}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

protected void initComponents() {
  propertyChangeBridge = new PropertyChangeBridge();
  descriptor.getCleaner().addCleaner(propertyChangeBridge);
  setLayout(new ExtendedTableLayout(new double[][]{{TableLayout.FILL, 1, 14}, {0, TableLayout.FILL, 0}}, false));
  setFocusable(false);
  setBorder(null);
  tabContainer = new JPanel(containerLayout = new TableLayout(new double[][]{{0},
                                        {resourceManager.getFloat("toolwindow.title.font.size", 12) + 4}}));
  tabContainer.setName("toolWindow.tabContainer." + descriptor.getToolWindow().getId());
  tabContainer.setOpaque(false);
  tabContainer.setBorder(null);
  tabContainer.setFocusable(false);
  viewport = new JViewport();
  viewport.setBorder(null);
  viewport.setOpaque(false);
  viewport.setFocusable(false);
  viewport.setView(tabContainer);
  add(viewport, "0,1,FULL,FULL");
  add(popupButton = new PopupButton(), "2,1,FULL,FULL");
  viewport.addMouseWheelListener(new WheelScroller());
  initTabs();
}

相关文章

JPanel类方法