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

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

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

JLabel.isEnabled介绍

暂无

代码示例

代码示例来源:origin: net.sf.taverna.t2.security/security-profiles

public void propertyChange(PropertyChangeEvent evt) {
  if (!jlProtocolDescription.isEnabled())
    jlProtocolDescription.setForeground(Color.gray);
  else 
    jlProtocolDescription.setForeground(Color.black);
}

代码示例来源:origin: net.sf.taverna.t2.security/security-profiles

public void propertyChange(PropertyChangeEvent evt) {
    if (!jlEncryptionKeyTransportAlgorithmInboundDescription.isEnabled())
      jlEncryptionKeyTransportAlgorithmInboundDescription.setForeground(Color.gray);
    else 
      jlEncryptionKeyTransportAlgorithmInboundDescription.setForeground(Color.black);
  }    
});

代码示例来源:origin: net.sf.taverna.t2.security/security-profiles

public void propertyChange(PropertyChangeEvent evt) {
  if (!jlPortDescription.isEnabled())
    jlPortDescription.setForeground(Color.gray);
  else 
    jlPortDescription.setForeground(Color.black);
}

代码示例来源:origin: net.sf.taverna.t2.security/security-profiles

public void propertyChange(PropertyChangeEvent evt) {
  if (!jlRequireClientCertDescription.isEnabled())
    jlRequireClientCertDescription.setForeground(Color.gray);
  else 
    jlRequireClientCertDescription.setForeground(Color.black);
}

代码示例来源:origin: net.sf.taverna.t2.security/security-profiles

public void propertyChange(PropertyChangeEvent evt) {
    if (!jlSignatureAlgorithmOutboundDescription.isEnabled())
      jlSignatureAlgorithmOutboundDescription.setForeground(Color.gray);
    else 
      jlSignatureAlgorithmOutboundDescription.setForeground(Color.black);
  }    
});

代码示例来源:origin: net.sf.taverna.t2.security/security-profiles

public void propertyChange(PropertyChangeEvent evt) {
    if (!jlEncrytpionAlgorithmOutboundDescription.isEnabled())
      jlEncrytpionAlgorithmOutboundDescription.setForeground(Color.gray);
    else 
      jlEncrytpionAlgorithmOutboundDescription.setForeground(Color.black);
  }    
});

代码示例来源:origin: net.sf.taverna.t2.security/security-profiles

public void propertyChange(PropertyChangeEvent evt) {
    if (!jlPasswordTypeOutboundDescription.isEnabled())
      jlPasswordTypeOutboundDescription.setForeground(Color.gray);
    else 
      jlPasswordTypeOutboundDescription.setForeground(Color.black);
  }    
});

代码示例来源:origin: net.sf.taverna.t2.security/security-profiles

public void propertyChange(PropertyChangeEvent evt) {
    if (!jlEncryptionKeyIdentifierOutboundDescription.isEnabled())
      jlEncryptionKeyIdentifierOutboundDescription.setForeground(Color.gray);
    else 
      jlEncryptionKeyIdentifierOutboundDescription.setForeground(Color.black);
  }    
});

代码示例来源:origin: net.sf.taverna.t2.security/security-profiles

public void propertyChange(PropertyChangeEvent evt) {
    if (!jlEncryptionKeyTransportAlgorithmOutboundDescription.isEnabled())
      jlEncryptionKeyTransportAlgorithmOutboundDescription.setForeground(Color.gray);
    else 
      jlEncryptionKeyTransportAlgorithmOutboundDescription.setForeground(Color.black);
  }    
});

代码示例来源:origin: net.sf.taverna.t2.security/security-profiles

public void propertyChange(PropertyChangeEvent evt) {
  if (!jlEncryptionKeyIdentifierInboundDescription.isEnabled())
    jlEncryptionKeyIdentifierInboundDescription.setForeground(Color.gray);
  else 
    jlEncryptionKeyIdentifierInboundDescription.setForeground(Color.black);
  }    
});

代码示例来源:origin: org.gdl-lang.gdl-tools/openehr-utils-gui-swing

public void mouseClicked(MouseEvent ev) {
  if (super.isEnabled()) {
    mouseClickedAction();
  }
}

代码示例来源:origin: org.gdl-lang.gdl-tools/openehr-utils-gui-swing

public void mousePressed(MouseEvent ev) {
  if (super.isEnabled()) {
    setForeground(pressColor);
  }
}

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

@ScriptFunction(jsDoc = ENABLED_JSDOC)
@Override
public boolean getEnabled() {
  return super.isEnabled();
}

代码示例来源:origin: org.gephi/desktop-datalab

@Override
public void mouseEntered(MouseEvent e) {
  int index = availableStrategiesComboBox.getSelectedIndex();
  if (infoLabel.isEnabled() && index != -1) {
    richTooltip = buildTooltip(availableMergeStrategies[index]);
  }
  if (richTooltip != null) {
    richTooltip.showTooltip(infoLabel);
  }
}

代码示例来源:origin: org.gephi/desktop-statistics

@Override
public void mouseEntered(MouseEvent e) {
  if (windowInfoLabel.isEnabled()) {
    richTooltip = buildTooltip();
    Point screenLocation = new Point(e.getLocationOnScreen().x, e.getLocationOnScreen().y + windowInfoLabel.getHeight());
    richTooltip.showTooltip(windowInfoLabel, screenLocation);
  }
}

代码示例来源:origin: org.gephi/desktop-layout

@Override
public void mouseEntered(MouseEvent e) {
  if (infoLabel.isEnabled() && model != null && model.getSelectedLayout() != null) {
    richTooltip = buildTooltip(model.getSelectedBuilder());
    richTooltip.showTooltip(infoLabel, e.getLocationOnScreen());
  }
}

代码示例来源:origin: net.java.dev.swing-layout/swing-layout

private int getLabelBaseline(JLabel label, int height) {
  Icon icon = (label.isEnabled()) ? label.getIcon() :
            label.getDisabledIcon();
  FontMetrics fm = label.getFontMetrics(label.getFont());
  resetRects(label, height);
  SwingUtilities.layoutCompoundLabel(label, fm,
    "a", icon, label.getVerticalAlignment(),
    label.getHorizontalAlignment(), label.getVerticalTextPosition(),
    label.getHorizontalTextPosition(), viewRect, iconRect, textRect,
    label.getIconTextGap());
  return textRect.y + fm.getAscent();
}

代码示例来源:origin: net.java.dev.swing-layout/swing-layout

private static int getLabelBaseline(JLabel label, int height) {
  Icon icon = (label.isEnabled()) ? label.getIcon() :
            label.getDisabledIcon();
  FontMetrics fm = label.getFontMetrics(label.getFont());
  resetRects(label, height);
  SwingUtilities.layoutCompoundLabel(label, fm,
    "a", icon, label.getVerticalAlignment(),
    label.getHorizontalAlignment(), label.getVerticalTextPosition(),
    label.getHorizontalTextPosition(), viewRect, iconRect, textRect,
    label.getIconTextGap());
  return textRect.y + fm.getAscent();
}

代码示例来源:origin: khuxtable/seaglass

protected void paint(SeaGlassContext context, Graphics g) {
  JLabel label = (JLabel) context.getComponent();
  Icon icon = (label.isEnabled()) ? label.getIcon() : label.getDisabledIcon();
  g.setColor(context.getStyle().getColor(context, ColorType.TEXT_FOREGROUND));
  g.setFont(style.getFont(context));
  context.getStyle().getGraphicsUtils(context).paintText(context, g, label.getText(), icon, label.getHorizontalAlignment(),
    label.getVerticalAlignment(), label.getHorizontalTextPosition(), label.getVerticalTextPosition(),
    label.getIconTextGap(), label.getDisplayedMnemonicIndex(), 0);
}

代码示例来源:origin: khuxtable/seaglass

public Dimension getMaximumSize(JComponent c) {
  JLabel label = (JLabel) c;
  Icon icon = (label.isEnabled()) ? label.getIcon() : label.getDisabledIcon();
  SeaGlassContext context = getContext(c);
  Dimension size = context.getStyle().getGraphicsUtils(context).getMaximumSize(context, context.getStyle().getFont(context),
    label.getText(), icon, label.getHorizontalAlignment(), label.getVerticalAlignment(), label.getHorizontalTextPosition(),
    label.getVerticalTextPosition(), label.getIconTextGap(), label.getDisplayedMnemonicIndex());
  context.dispose();
  return size;
}

相关文章

微信公众号

最新文章

更多

JLabel类方法