當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。