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

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

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

JLabel.setFocusable介绍

暂无

代码示例

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

jMemUsageLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/menu/memory.png"))); // NOI18N
jMemUsageLabel.setText("100% Free mem");
jMemUsageLabel.setFocusable(false);
jMemUsageLabel.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
mageToolbar.add(jMemUsageLabel);

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

lbDeckType.setFocusable(false);
lblGameType.setFocusable(false);

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

lblPlayer01.setFocusable(false);
lblPlayer01.setRequestFocusEnabled(false);
lblPlayer01.setVerifyInputWhenFocusTarget(false);
lblPlayer02.setFocusable(false);
lblPlayer02.setRequestFocusEnabled(false);
lblPlayer02.setVerifyInputWhenFocusTarget(false);
lblPlayer03.setFocusable(false);
lblPlayer03.setRequestFocusEnabled(false);
lblPlayer03.setVerifyInputWhenFocusTarget(false);
lblPlayer04.setFocusable(false);
lblPlayer04.setRequestFocusEnabled(false);
lblPlayer04.setVerifyInputWhenFocusTarget(false);
lblPlayer05.setFocusable(false);
lblPlayer05.setRequestFocusEnabled(false);
lblPlayer05.setVerifyInputWhenFocusTarget(false);
lblPlayer06.setFocusable(false);
lblPlayer06.setRequestFocusEnabled(false);
lblPlayer06.setVerifyInputWhenFocusTarget(false);
lblPlayer07.setFocusable(false);
lblPlayer07.setRequestFocusEnabled(false);
lblPlayer07.setVerifyInputWhenFocusTarget(false);
lblPlayer08.setFocusable(false);

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

lblCount.setToolTipText("Number of all cards in this area.");
lblCount.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
lblCount.setFocusable(false);
lblCount.setInheritsPopupMenu(false);
lblCount.setRequestFocusEnabled(false);
lblLandCount.setVerticalAlignment(javax.swing.SwingConstants.TOP);
lblLandCount.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
lblLandCount.setFocusable(false);
lblLandCount.setInheritsPopupMenu(false);
lblLandCount.setRequestFocusEnabled(false);
lblCreatureCount.setVerticalAlignment(javax.swing.SwingConstants.TOP);
lblCreatureCount.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
lblCreatureCount.setFocusable(false);
lblCreatureCount.setInheritsPopupMenu(false);
lblCreatureCount.setRequestFocusEnabled(false);

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

labelPreferedImageLanguage.setFocusable(false);

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

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

代码示例来源:origin: gurkenlabs/litiengine

public CheckBoxPanel(String text) {
 this.newCheck = new JCheckBox();
 this.newLabel = new JLabel(text);
 this.newCheck.setFocusPainted(false);
 this.newCheck.setBorderPainted(true);
 this.newLabel.setOpaque(true);
 this.newLabel.setFocusable(false);
 this.setLayout(new BorderLayout());
 this.add(newCheck, BorderLayout.WEST);
 this.add(newLabel, BorderLayout.CENTER);
}

代码示例来源:origin: org.openbase.bco/dal.visual

reedSwitchStateLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
reedSwitchStateLabel.setText("ReedSwitchState");
reedSwitchStateLabel.setFocusable(false);
reedSwitchStateLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

代码示例来源:origin: org.openbase.bco/dal.visual

buttonStatusLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
buttonStatusLabel.setText("ButtonState");
buttonStatusLabel.setFocusable(false);
buttonStatusLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

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

public Component create(Context context) {
    ResourceManager resourceManager = context.get(ResourceManager.class);
    JLabel label = new JLabel() {
      public void setUI(LabelUI ui) {
        if (ui instanceof ToolScrollBarArrowUI)
          super.setUI(ui);
      }
    };
    label.setUI(new ToolScrollBarArrowUI(resourceManager));
    label.setPreferredSize(new Dimension(16, 16));
    label.setHorizontalAlignment(SwingConstants.CENTER);
    label.setVerticalAlignment(SwingConstants.CENTER);
    label.setOpaque(false);
    label.setFocusable(false);
    label.setBackground(Colors.orange);
    label.setIcon(resourceManager.getIcon((String) context.get("icon")));
    return label;
  }
}

代码示例来源:origin: com.projectdarkstar.client/sgs-tutorial-client

c.add(appPanel, BorderLayout.CENTER);
statusLabel = new JLabel();
statusLabel.setFocusable(false);
setStatus("Not Started");
c.add(statusLabel, BorderLayout.SOUTH);

代码示例来源:origin: org.reddwarfserver.client/sgs-tutorial-client

c.add(appPanel, BorderLayout.CENTER);
statusLabel = new JLabel();
statusLabel.setFocusable(false);
setStatus("Not Started");
c.add(statusLabel, BorderLayout.SOUTH);

代码示例来源:origin: JGillam/burp-co2

private void addMasherTab() {
  final JLabel closeButton = new JLabel("x");
  closeButton.setOpaque(false);
  closeButton.setFocusable(false);
  closeButton.setForeground(Color.gray);
  final LineBorder blackBorder = new LineBorder(Color.black);

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-profiler

private JavaPlatformSelector() {
  setLayout(new BorderLayout());
  setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
  list = new JList();
  list.setVisibleRowCount(6);
  list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  list.addListSelectionListener(this);
  list.getAccessibleContext().setAccessibleName(Bundle.JavaPlatformSelector_ListAccessName());
  noteLabel = new JLabel();
  noteLabel.setLabelFor(list);
  noteLabel.setFocusable(false);        
  alwaysCheckBox = new JCheckBox(Bundle.JavaPlatformSelector_UseSelPlatformChckBoxName(), false);
  add(new JScrollPane(list) {
    public Dimension getPreferredSize() {
      Dimension d = super.getPreferredSize();
      d.width = Math.max(d.width, 400);
      return d;
    }
  }, BorderLayout.CENTER);
  add(noteLabel, BorderLayout.NORTH);
  add(alwaysCheckBox, BorderLayout.SOUTH);
}

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

jLTitulo.setFocusable(false);
jLTitulo.setName("labelTitulo"); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();

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

public ModelComponentDecorator() {
  super();
  setLayout(new BorderLayout());
  setOpaque(true);
  iconLabel.setOpaque(false);
  iconLabel.setBorder(null);
  iconLabel.setFocusable(false);
  iconLabel.setText("");
  iconLabel.setInheritsPopupMenu(true);
  checkEvents(iconLabel);
  //
  gapLabel.setOpaque(false);
  gapLabel.setBorder(null);
  gapLabel.setFocusable(false);
  gapLabel.setText("");
  gapLabel.setInheritsPopupMenu(true);
  checkEvents(gapLabel);
  //
  extraTools.setBorder(null);
  extraTools.setBorderPainted(false);
  extraTools.setFloatable(false);
  extraTools.setOpaque(false);
  extraTools.setFocusable(false);
  extraTools.setInheritsPopupMenu(true);
  recreateExtraEditingControls();
  checkEvents(extraTools);
  add(extraTools, BorderLayout.EAST);
  //
  setBorder(new LineBorder(WDIGETS_BORDER_COLOR));
}

代码示例来源:origin: nroduit/Weasis

public SeriesPane(MediaSeriesGroup sequence) {
  this.sequence = Objects.requireNonNull(sequence);
  // To handle selection color with all L&Fs
  this.setUI(new javax.swing.plaf.PanelUI() {
  });
  this.setOpaque(true);
  this.setBackground(JMVUtils.TREE_BACKROUND);
  this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
  int thumbnailSize = slider.getValue();
  if (sequence instanceof Series) {
    Series series = (Series) sequence;
    Thumbnail thumb = (Thumbnail) series.getTagValue(TagW.Thumbnail);
    if (thumb == null) {
      thumb = createThumbnail(series, model, thumbnailSize);
      series.setTag(TagW.Thumbnail, thumb);
    }
    Optional.ofNullable(thumb).ifPresent(this::add);
  }
  this.setAlignmentX(LEFT_ALIGNMENT);
  this.setAlignmentY(TOP_ALIGNMENT);
  String desc = TagD.getTagValue(sequence, Tag.SeriesDescription, String.class);
  label = new JLabel(desc == null ? "" : desc, SwingConstants.CENTER); //$NON-NLS-1$
  label.setFont(FontTools.getFont10());
  label.setFocusable(false);
  this.setFocusable(false);
  updateSize(thumbnailSize);
  this.add(label);
}

代码示例来源:origin: hneemann/Digital

text = "";
textLabel.setFocusable(true);
textLabel.addKeyListener(new KeyAdapter() {
  @Override

代码示例来源:origin: gurkenlabs/litiengine

@Override
public Component getListCellRendererComponent(JList<? extends JCheckBox> list, JCheckBox value, int index, boolean isSelected, boolean cellHasFocus) {
 if(!this.panels.containsKey(value)) {
  this.panels.put(value, new CheckBoxPanel(value.getText()));
 }
 
 CheckBoxPanel panel = this.panels.get(value);
 panel.getCheck().setSelected(value.isSelected());
 // Drawing checkbox, change the appearance here
 panel.getCheck().setBackground(isSelected ? getSelectionBackground() : getBackground());
 panel.getCheck().setForeground(isSelected ? getSelectionForeground() : getForeground());
 panel.getCheck().setEnabled(isEnabled());
 panel.getCheck().setFont(getFont());
 panel.getCheck().setFocusPainted(false);
 panel.getCheck().setBorderPainted(true);
 panel.getCheck().setBorder(isSelected ? UIManager.getBorder("List.focusCellHighlightBorder") : noFocusBorder);
 panel.getLabel().setOpaque(true);
 panel.getLabel().setBackground(isSelected ? getSelectionBackground() : getBackground());
 panel.getLabel().setForeground(isSelected ? getSelectionForeground() : getForeground());
 panel.getLabel().setEnabled(isEnabled());
 panel.getLabel().setFocusable(false);
 panel.getLabel().setFont(getFont());
 panel.getLabel().setBorder(isSelected ? UIManager.getBorder("List.focusCellHighlightBorder") : noFocusBorder);
 panel.getLabel().setIcon(value.getIcon());
 return panel;
}

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

representativeAnchor.setFocusable(false);
representativeAnchor.putClientProperty(ToolWindowDescriptor.class, this);

相关文章

JLabel类方法