本文整理了Java中javax.swing.JLabel.setDisabledIcon()
方法的一些代码示例,展示了JLabel.setDisabledIcon()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JLabel.setDisabledIcon()
方法的具体详情如下:
包路径:javax.swing.JLabel
类名称:JLabel
方法名:setDisabledIcon
暂无
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateTable() {
if (table == null ||
tableModel == null) {
return;
}
int selectedRow = table.getSelectedRow();
tableModel.fireTableDataChanged();
if (table.getRowCount() > 0) {
selectedRow = MathUtils.clamp(selectedRow, 0, table.getRowCount());
table.setRowSelectionInterval(selectedRow, selectedRow);
} else {
imageContainer.setDisabledIcon(null);
}
}
代码示例来源:origin: Multibit-Legacy/multibit-hd
/**
* <p>Remove an icon from a label. Both icon states (enabled/disabled) will be removed.</p>
*
* @param label The label
*/
public static void removeIcon(JLabel label) {
label.setIcon(null);
label.setDisabledIcon(null);
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public Object visitar(NoTitulo noTitulo) throws ExcecaoVisitaASA {
component.setText("titulo");
Icon icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "unknown.png");
component.setIcon(icone);
component.setDisabledIcon(icone);
return null;
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public Object visitar(NoEscolha noEscolha) throws ExcecaoVisitaASA {
StringBuilder sb = new StringBuilder();
sb.append("<html>");
sb.append(noEscolha.getClass().getSimpleName().replace("No", "").toLowerCase());
component.setText(sb.toString());
Icon icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "desvio.png");
component.setIcon(icone);
component.setDisabledIcon(icone);
return null;
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public Object visitar(NoPara noPara) throws ExcecaoVisitaASA {
StringBuilder sb = new StringBuilder();
sb.append("<html>");
sb.append(noPara.getClass().getSimpleName().replace("No", "").toLowerCase());
component.setText(sb.toString());
Icon icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "loop.png");
component.setIcon(icone);
component.setDisabledIcon(icone);
return null;
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public Object visitar(NoSe noSe) throws ExcecaoVisitaASA {
StringBuilder sb = new StringBuilder();
sb.append("<html>");
sb.append(noSe.getClass().getSimpleName().replace("No", "").toLowerCase());
component.setText(sb.toString());
Icon icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "desvio.png");
component.setIcon(icone);
component.setDisabledIcon(icone);
return null;
}
代码示例来源:origin: xyz.cofe/gui.swing
@Override
public void setTabDisabledIcon(javax.swing.Icon disabledIcon) {
if (isClosed())return;
titleLabel.setDisabledIcon(disabledIcon);
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public Object visitar(NoEnquanto noEnquanto) throws ExcecaoVisitaASA {
StringBuilder sb = new StringBuilder();
sb.append("<html>");
sb.append(noEnquanto.getClass().getSimpleName().replace("No", "").toLowerCase());
component.setText(sb.toString());
Icon icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "loop.png");
component.setIcon(icone);
component.setDisabledIcon(icone);
return null;
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public Object visitar(NoContinue noContinue) throws ExcecaoVisitaASA {
component.setText("continue");
Icon icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "unknown.png");
component.setIcon(icone);
component.setDisabledIcon(icone);
return null;
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public Object visitar(NoVaPara noVaPara) throws ExcecaoVisitaASA {
component.setText("va-para");
Icon icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "unknown.png");
component.setIcon(icone);
component.setDisabledIcon(icone);
return null;
}
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
public void setDisabledIcon(Icon _icon)
{
if((delegate_==this)||(delegate_==null))
super.setDisabledIcon(_icon);
else
delegate_.setDisabledIcon(_icon);
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public Object visitar(NoCaso noCaso) throws ExcecaoVisitaASA {
StringBuilder sb = new StringBuilder();
sb.append("<html>");
sb.append(noCaso.getClass().getSimpleName().replace("No", "").toLowerCase());
component.setText(sb.toString());
Icon icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "desvio.png");
component.setIcon(icone);
component.setDisabledIcon(icone);
return null;
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public Object visitar(NoFacaEnquanto noFacaEnquanto) throws ExcecaoVisitaASA {
StringBuilder sb = new StringBuilder();
sb.append("<html>");
// sb.append(noFacaEnquanto.getClass().getSimpleName().replace("No", "").toLowerCase());
sb.append("faca-enquanto");
component.setText(sb.toString());
Icon icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "loop.png");
component.setIcon(icone);
component.setDisabledIcon(icone);
return null;
}
代码示例来源:origin: ru.sbtqa/monte-media
@Override
protected void done(Image value) {
if (value == null) {
failed(new IOException("Could not load image."));
return;
}
label.setText(null);
ImageIcon icon = new ImageIcon(value);
label.setIcon(icon);
label.setDisabledIcon(icon);
SwingUtilities.getWindowAncestor(ILBMViewer.this).pack();
}
代码示例来源:origin: ru.sbtqa/monte-media
@Override
protected void done(Image value) {
if (value == null) {
failed(new IOException("Could not load image."));
return;
}
label.setText(null);
ImageIcon icon = new ImageIcon(value);
label.setIcon(icon);
label.setDisabledIcon(icon);
SwingUtilities.getWindowAncestor(PBMViewer.this).pack();
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public Object visitar(ProgramaTreeNode no) {
component.setText((String) no.getUserObject());
Icon icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "light_pix.png");
component.setIcon(icone);
component.setDisabledIcon(icone);
return null;
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public Object visitar(NoInclusaoBiblioteca noInclusaoBiblioteca) throws ExcecaoVisitaASA {
StringBuilder sb = new StringBuilder();
sb.append("<html>");
sb.append(noInclusaoBiblioteca.getNome());
if (noInclusaoBiblioteca.getAlias() != null) {
sb.append(" (");
sb.append(noInclusaoBiblioteca.getAlias());
sb.append(")");
}
component.setText(sb.toString());
Icon icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "lib2.png");
component.setIcon(icone);
component.setDisabledIcon(icone);
return null;
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public Object visitar(GenericTreeNode no) {
component.setText((String) no.getUserObject());
Icon icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "unknown.png");
if(no.getUserObject().equals("verdadeiro")){
icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "true.png");
}else if(no.getUserObject().equals("falso")){
icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "false.png");
}
component.setIcon(icone);
component.setDisabledIcon(icone);
return null;
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public Object visitar(LibraryTreeNode no) {
StringBuilder sb = new StringBuilder("<html>");
if (no.getErro() != null) {
sb.append(no.getErro().getMessage());
} else {
sb.append(no.getNoInclusaoBiblioteca().getNome());
if (no.getNoInclusaoBiblioteca().getAlias() != null) {
sb.append(" (");
sb.append(no.getNoInclusaoBiblioteca().getAlias());
sb.append(")");
}
}
component.setText(sb.toString());
Icon icone = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "biblioteca.gif");
component.setIcon(icone);
component.setDisabledIcon(icone);
return null;
}
代码示例来源:origin: Multibit-Legacy/multibit-hd
/**
* <p>Bind an icon to a label. Both icon states (enabled/disabled) will be added.</p>
* <p>The icon will use the font and color from the label and will reflect any subsequent updates.</p>
*
* @param icon The icon reference
* @param label The label (iconography will change will changes to the label color and font)
* @param leading True if the icon comes before the text in the reading direction (LTR and RTL is handled automatically)
* @param size The icon size (font metrics)
*/
public static void bindIcon(AwesomeIcon icon, JLabel label, boolean leading, int size) {
Icon enabledIcon = new AwesomeSwingIcon(label, icon.getChar(), size, true);
Icon disabledIcon = new AwesomeSwingIcon(label, icon.getChar(), size, false);
label.setIcon(enabledIcon);
label.setDisabledIcon(disabledIcon);
align(label, leading);
}
内容来源于网络,如有侵权,请联系作者删除!