当前位置: 首页>>代码示例>>Java>>正文


Java UIManager.getIcon方法代码示例

本文整理汇总了Java中javax.swing.UIManager.getIcon方法的典型用法代码示例。如果您正苦于以下问题:Java UIManager.getIcon方法的具体用法?Java UIManager.getIcon怎么用?Java UIManager.getIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.UIManager的用法示例。


在下文中一共展示了UIManager.getIcon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: installUI

import javax.swing.UIManager; //导入方法依赖的package包/类
@Override
public synchronized void installUI(JComponent c)
{
	super.installUI(c);

	mBackgroundNormal = UIManager.getColor("RadioButton.background");
	mBackgroundPressed = UIManager.getColor("RadioButton.backgroundPressed");
	mBackgroundActive = UIManager.getColor("RadioButton.backgroundActive");
	mTextNormal = UIManager.getColor("RadioButton.textNormal");
	mTextPressed = UIManager.getColor("RadioButton.textPressed");
	mTextActive = UIManager.getColor("RadioButton.textActive");
	mTextDisabled = UIManager.getColor("RadioButton.textDisabled");
	mIconChecked = UIManager.getIcon("RadioButton.iconChecked");
	mIconUnchecked = UIManager.getIcon("RadioButton.iconUnchecked");
	mIconPressedChecked = UIManager.getIcon("RadioButton.iconPressedChecked");
	mIconPressedUnchecked = UIManager.getIcon("RadioButton.iconPressedUnchecked");

	c.setBackground(mBackgroundNormal);
	c.addMouseListener(this);
}
 
开发者ID:equella,项目名称:Equella,代码行数:21,代码来源:FlatterRadioButtonUI.java

示例2: installUI

import javax.swing.UIManager; //导入方法依赖的package包/类
@Override
public synchronized void installUI(JComponent c)
{
	super.installUI(c);

	mBackgroundNormal = UIManager.getColor("CheckBox.background");
	mBackgroundPressed = UIManager.getColor("CheckBox.backgroundPressed");
	mBackgroundActive = UIManager.getColor("CheckBox.backgroundActive");
	mTextNormal = UIManager.getColor("CheckBox.textNormal");
	mTextPressed = UIManager.getColor("CheckBox.textPressed");
	mTextActive = UIManager.getColor("CheckBox.textActive");
	mTextDisabled = UIManager.getColor("CheckBox.textDisabled");
	mTextIconGap = UIManager.getInt("CheckBox.textIconGap");
	mIconChecked = UIManager.getIcon("CheckBox.iconChecked");
	mIconUnchecked = UIManager.getIcon("CheckBox.iconUnchecked");
	mIconPressedChecked = UIManager.getIcon("CheckBox.iconPressedChecked");
	mIconPressedUnchecked = UIManager.getIcon("CheckBox.iconPressedUnchecked");

	c.setBackground(mBackgroundNormal);
	c.addMouseListener(this);
}
 
开发者ID:equella,项目名称:Equella,代码行数:22,代码来源:FlatterCheckBoxUI.java

示例3: getListCellRendererComponent

import javax.swing.UIManager; //导入方法依赖的package包/类
@Override
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected,
		boolean cellHasFocus) {
	super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);

	if (value == null) {
		setText("");
		return this;
	}
	File directory = (File) value;
	setText(getFileChooser().getName(directory));
	Icon icon = getFileChooser().getIcon(directory);
	if (icon == null) {
		icon = UIManager.getIcon("FileChooser.defaultDirectoryIcon");
	}

	this.indentIcon.icon = icon;
	this.indentIcon.depth = FileChooserUI.this.directoryComboBoxModel.getDepth(index);
	setIcon(this.indentIcon);

	if (isSelected && index > -1) {
		setBorder(FileChooserUI.this.roundComboboxListRendererBorder);
	}

	return this;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:27,代码来源:FileChooserUI.java

示例4: icon

import javax.swing.UIManager; //导入方法依赖的package包/类
private static @Nullable Icon icon(final TFile file) {
    if (isTrueArchive(file)) {
        return UIManager.getIcon("FileView.directoryIcon");
    } else if (isTrueEntry(file)) {
        return file.isDirectory()
                ? UIManager.getIcon("FileView.directoryIcon")
                : file.isFile()
                    ? UIManager.getIcon("FileView.fileIcon")
                    : null;
    }
    return null;
}
 
开发者ID:christian-schlichtherle,项目名称:truevfs,代码行数:13,代码来源:TFileView.java

示例5: paint

import javax.swing.UIManager; //导入方法依赖的package包/类
/** Paint bumps to specific Graphics. */
@Override
public void paint (Graphics g) {
    Icon icon = UIManager.getIcon("ToolBar.handleIcon");
    Region region = Region.TOOL_BAR;
    SynthStyleFactory sf = SynthLookAndFeel.getStyleFactory();
    SynthStyle style = sf.getStyle(toolbar, region);
    SynthContext context = new SynthContext(toolbar, region, style, SynthConstants.DEFAULT);

    SynthGraphicsUtils sgu = context.getStyle().getGraphicsUtils(context);
    sgu.paintText(context, g, null, icon, SwingConstants.LEADING, SwingConstants.LEADING, 0, 0, 0, -1, 0);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:ToolbarContainer.java

示例6: initComponents

import javax.swing.UIManager; //导入方法依赖的package包/类
private void initComponents() {
	Container cp = getContentPane();
	cp.setLayout(new BorderLayout());
	JPanel butPane = new JPanel();
	butPane.add(new JButton(close), BorderLayout.SOUTH);
	cp.add(butPane, BorderLayout.SOUTH);
	JTabbedPane jtp = new JTabbedPane();

	JPanel general = new JPanel(new BorderLayout());
	JLabel ghelp = new JLabel(generalHelp);
	ghelp.setHorizontalAlignment(SwingConstants.CENTER);
	ghelp.setVerticalAlignment(SwingConstants.CENTER);
	JLabel icon = new JLabel(UIManager.getIcon("OptionPane.informationIcon"));
	Box lbox = Box.createHorizontalBox();
	lbox.add(Box.createHorizontalStrut(10));
	lbox.add(icon);
	lbox.add(Box.createHorizontalStrut(10));

	general.add(ghelp, BorderLayout.CENTER);
	general.add(lbox, BorderLayout.WEST);
	general.add(Box.createHorizontalStrut(10), BorderLayout.EAST);

	jtp.add("General", general);

	JPanel evaluator = new JPanel(new BorderLayout());

	HtmlPanel ehelp = new HtmlPanel(evalHelp);

	evaluator.add(Box.createHorizontalStrut(10), BorderLayout.WEST);
	evaluator.add(new JScrollPane(ehelp), BorderLayout.CENTER);
	evaluator.add(Box.createHorizontalStrut(10), BorderLayout.EAST);

	jtp.add("Evaluator", evaluator);

	cp.add(jtp, BorderLayout.CENTER);
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:37,代码来源:LDHelpDialog.java

示例7: getIcon

import javax.swing.UIManager; //导入方法依赖的package包/类
@Override
public Icon getIcon() {
	int modelCol = header.getTable().convertColumnIndexToModel(curCol);
	TableModel model = header.getTable().getModel();
	if (model instanceof ExtendedJTableSorterModel) {
		ExtendedJTableSorterModel sortModel = (ExtendedJTableSorterModel) model;
		switch (sortModel.getSortingStatus(modelCol)) {
			case ExtendedJTableSorterModel.ASCENDING:
				return UIManager.getIcon("Table.ascendingSortIcon");
			case ExtendedJTableSorterModel.DESCENDING:
				return UIManager.getIcon("Table.descendingSortIcon");
			case ExtendedJTableSorterModel.NOT_SORTED:
			default:
				return null;
		}
	} else {
		SortKey sortKey = getSortKey(header.getTable().getRowSorter(), modelCol);
		SortOrder sortOrder = sortKey != null ? sortKey.getSortOrder() : SortOrder.UNSORTED;
		switch (sortOrder) {
			case ASCENDING:
				return UIManager.getIcon("Table.ascendingSortIcon");
			case DESCENDING:
				return UIManager.getIcon("Table.descendingSortIcon");
			case UNSORTED:
			default:
				return null;
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:30,代码来源:TableHeaderUI.java

示例8: installDefaults

import javax.swing.UIManager; //导入方法依赖的package包/类
@Override
public void installDefaults(AbstractButton abstractbutton) {
	super.installDefaults(abstractbutton);
	if (!this.initialize) {
		this.icon = UIManager.getIcon(getPropertyPrefix() + "icon");
		this.initialize = true;
	}
	abstractbutton.setRolloverEnabled(true);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:10,代码来源:CheckBoxUI.java

示例9: installDefaults

import javax.swing.UIManager; //导入方法依赖的package包/类
@Override
public void installDefaults(AbstractButton abstractbutton) {
	super.installDefaults(abstractbutton);
	if (!this.initialized) {
		this.icon = UIManager.getIcon(getPropertyPrefix() + "icon");
		this.initialized = true;
	}
	abstractbutton.setRolloverEnabled(true);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:10,代码来源:RadioButtonUI.java

示例10: getCollapsedIcon

import javax.swing.UIManager; //导入方法依赖的package包/类
private static Icon getCollapsedIcon() {
    return UIManager.getIcon ("Tree.collapsedIcon"); //NOI18N
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:OutlineComboBox.java

示例11: getDefaultOpenIcon

import javax.swing.UIManager; //导入方法依赖的package包/类
private static Icon getDefaultOpenIcon() {
return UIManager.getIcon("Tree.openIcon"); //NOI18N
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:DefaultOutlineCellRenderer.java

示例12: getDefaultClosedIcon

import javax.swing.UIManager; //导入方法依赖的package包/类
private static Icon getDefaultClosedIcon() {
return UIManager.getIcon("Tree.closedIcon"); //NOI18N
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:DefaultOutlineCellRenderer.java

示例13: getDefaultLeafIcon

import javax.swing.UIManager; //导入方法依赖的package包/类
private static Icon getDefaultLeafIcon() {
return UIManager.getIcon("Tree.leafIcon"); //NOI18N
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:DefaultOutlineCellRenderer.java

示例14: getExpandedIcon

import javax.swing.UIManager; //导入方法依赖的package包/类
static Icon getExpandedIcon() {
    return UIManager.getIcon ("Tree.expandedIcon"); //NOI18N
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:DefaultOutlineCellRenderer.java

示例15: getCollapsedIcon

import javax.swing.UIManager; //导入方法依赖的package包/类
static Icon getCollapsedIcon() {
    return UIManager.getIcon ("Tree.collapsedIcon"); //NOI18N
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:DefaultOutlineCellRenderer.java


注:本文中的javax.swing.UIManager.getIcon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。