本文整理了Java中javax.swing.UIManager.getIcon()
方法的一些代码示例,展示了UIManager.getIcon()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UIManager.getIcon()
方法的具体详情如下:
包路径:javax.swing.UIManager
类名称:UIManager
方法名:getIcon
暂无
代码示例来源:origin: kiegroup/optaplanner
Icon errorIcon = UIManager.getIcon("OptionPane.errorIcon");
BufferedImage errorImage = new BufferedImage(
errorIcon.getIconWidth(), errorIcon.getIconHeight(), BufferedImage.TYPE_INT_RGB);
代码示例来源:origin: stackoverflow.com
JPanel p = new JPanel(new BorderLayout());
p.add(new JLabel(s, JLabel.LEFT), BorderLayout.WEST);
Icon icon = UIManager.getIcon("FileChooser.detailsViewIcon");
p.add(new JLabel(icon, JLabel.RIGHT), BorderLayout.EAST);
p.setBorder(BorderFactory.createLineBorder(Color.blue));
代码示例来源:origin: stackoverflow.com
super(UIManager.getIcon("OptionPane.informationIcon"));
setContentAreaFilled(false);
setFocusPainted(false);
代码示例来源:origin: stackoverflow.com
DragPanel p1 = new DragPanel();
p1.setBorder(BorderFactory.createLineBorder(Color.BLACK));
p1.add(new JLabel(UIManager.getIcon("OptionPane.warningIcon")));
p1.add(new JLabel(UIManager.getIcon("OptionPane.errorIcon")));
p1.add(new JLabel("Label1"));
p1.add(new JLabel("Label2"));
代码示例来源:origin: stackoverflow.com
public Thumbnail(String name) {
this.name = name;
this.icon = UIManager.getIcon("OptionPane."+name+"Icon");
代码示例来源:origin: org.swinglabs.swingx/swingx-all
/**
* @return the default warning icon
*/
protected Icon getDefaultWarningIcon() {
try {
Icon icon = UIManager.getIcon(CLASS_NAME + ".warningIcon");
return icon == null ? UIManager.getIcon("OptionPane.warningIcon") : icon;
} catch (Exception e) {
return null;
}
}
代码示例来源:origin: com.github.insubstantial/substance
/**
* Returns the default icon that is used to represent leaf nodes.
*
* @return The default icon for leaf nodes.
*/
public Icon getDefaultLeafIcon() {
return UIManager.getIcon("Tree.leafIcon");
}
代码示例来源:origin: org.java.net.substance/substance
/**
* Returns the default icon that is used to represent non-leaf nodes that
* are expanded.
*
* @return The default icon for non-leaf expanded nodes.
*/
public Icon getDefaultOpenIcon() {
return UIManager.getIcon("Tree.openIcon");
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
/** Get the icon displayed by a collapsed set. Typically this is just the
* icon the look and feel supplies for trees */
static Icon getCollapsedIcon() {
Icon collapsedIcon = UIManager.getIcon(isGtk ? "Tree.gtk_collapsedIcon" : "Tree.collapsedIcon"); //NOI18N
if (collapsedIcon == null) {
LOG.info("no Tree.collapsedIcon found");
}
return collapsedIcon;
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
/** Get the icon displayed by an expanded set. Typically this is just the
* same icon the look and feel supplies for trees */
static Icon getExpandedIcon() {
Icon expandedIcon = UIManager.getIcon(isGtk ? "Tree.gtk_expandedIcon" : "Tree.expandedIcon"); //NOI18N
if (expandedIcon == null) {
LOG.info("no Tree.expandedIcon found");
}
return expandedIcon;
}
代码示例来源:origin: com.github.insubstantial/substance
protected Icon getThumbIcon() {
if (slider.getOrientation() == JSlider.HORIZONTAL) {
return UIManager.getIcon("Slider.upThumbSmall");
} else {
return UIManager.getIcon("Slider.leftThumbSmall");
}
}
代码示例来源:origin: org.java.net.substance/substance
protected Icon getThumbIcon() {
if (slider.getOrientation() == JSlider.HORIZONTAL) {
return UIManager.getIcon("Slider.upThumbSmall");
} else {
return UIManager.getIcon("Slider.leftThumbSmall");
}
}
代码示例来源:origin: BaseXdb/basex
/**
* Constructor.
* @param s small icon
* @param l large icon
*/
Msg(final String s, final String l) {
small = BaseXImages.icon(s);
large = UIManager.getIcon("OptionPane." + l + "Icon");
}
}
代码示例来源:origin: org.basex/basex
/**
* Constructor.
* @param s small icon
* @param l large icon
*/
Msg(final String s, final String l) {
small = BaseXImages.icon(s);
large = UIManager.getIcon("OptionPane." + l + "Icon");
}
}
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
/**
* Returns the default icon to use for leaf cell.
*
* @return the icon to use for leaf cell.
*/
protected Icon getLeafIcon() {
return leafIcon != null ? leafIcon : UIManager
.getIcon(getUIKey("leafIcon"));
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
/**
* Installs this ui delegate's properties.
*/
protected void installDelegate() {
isLeftToRight = monthView.getComponentOrientation().isLeftToRight();
// PENDING JW: remove here if rendererHandler takes over control completely
// as is, some properties are duplicated
monthDownImage = UIManager.getIcon("JXMonthView.monthDownFileName");
monthUpImage = UIManager.getIcon("JXMonthView.monthUpFileName");
// install date related state
setFirstDisplayedDay(monthView.getFirstDisplayedDay());
}
代码示例来源:origin: net.sf.nimrod/nimrod-laf
protected JButton createArrowButton() {
return new NimRODComboBoxButton( comboBox, UIManager.getIcon( "ComboBox.buttonDownIcon"),
(comboBox.isEditable() ? true : false),
currentValuePane, listBox);
}
代码示例来源:origin: atarw/material-ui-swing
@Override
public void installUI (JComponent c) {
super.installUI (c);
JRadioButton radioButton = (JRadioButton) c;
radioButton.setFont (UIManager.getFont ("RadioButton.font"));
radioButton.setBackground (UIManager.getColor ("RadioButton.background"));
radioButton.setForeground (UIManager.getColor ("RadioButton.foreground"));
radioButton.setIcon (UIManager.getIcon ("RadioButton.icon"));
radioButton.setSelectedIcon (UIManager.getIcon ("RadioButton.selectedIcon"));
}
代码示例来源:origin: javax.help/javahelp
public BasicGlossaryNavigatorUI(JHelpGlossaryNavigator b) {
ImageIcon icon = getImageIcon(b.getNavigatorView());
if (icon != null) {
setIcon(icon);
} else {
setIcon(UIManager.getIcon("GlossaryNav.icon"));
}
}
代码示例来源:origin: javax.help/javahelp
public BasicTOCNavigatorUI(JHelpTOCNavigator b) {
debug (this + " " + "CreateUI - sort of");
ImageIcon icon = getImageIcon(b.getNavigatorView());
if (icon != null) {
setIcon(icon);
} else {
setIcon(UIManager.getIcon("TOCNav.icon"));
}
}
内容来源于网络,如有侵权,请联系作者删除!