本文整理汇总了Java中javax.swing.Icon.equals方法的典型用法代码示例。如果您正苦于以下问题:Java Icon.equals方法的具体用法?Java Icon.equals怎么用?Java Icon.equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.Icon
的用法示例。
在下文中一共展示了Icon.equals方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIcon
import javax.swing.Icon; //导入方法依赖的package包/类
public @Override Icon getIcon(File _f) {
File f = FileUtil.normalizeFile(_f);
Icon original = fsv.getSystemIcon(f);
if (original == null) {
// L&F (e.g. GTK) did not specify any icon.
original = EMPTY;
}
if ( isPlatformDir( f ) ) {
if ( original.equals( lastOriginal ) ) {
return lastMerged;
}
lastOriginal = original;
lastMerged = new MergedIcon(original, BADGE, -1, -1);
return lastMerged;
}
else {
return original;
}
}
示例2: setBackButtonIcon
import javax.swing.Icon; //导入方法依赖的package包/类
void setBackButtonIcon(Icon newIcon) {
Object oldIcon = getBackButtonIcon();
if (newIcon!=null&&!newIcon.equals(oldIcon)) {
buttonIconHashmap.put(BACK_BUTTON_ICON_PROPERTY, newIcon);
firePropertyChange(BACK_BUTTON_ICON_PROPERTY, oldIcon, newIcon);
} else if(newIcon==null&&oldIcon!=null){
buttonIconHashmap.put(BACK_BUTTON_ICON_PROPERTY, newIcon);
firePropertyChange(BACK_BUTTON_ICON_PROPERTY, oldIcon, newIcon);
}
}
示例3: setNextFinishButtonIcon
import javax.swing.Icon; //导入方法依赖的package包/类
void setNextFinishButtonIcon(Icon newIcon) {
Object oldIcon = getNextFinishButtonIcon();
if (newIcon!=null&&!newIcon.equals(oldIcon)) {
buttonIconHashmap.put(NEXT_FINISH_BUTTON_ICON_PROPERTY, newIcon);
firePropertyChange(NEXT_FINISH_BUTTON_ICON_PROPERTY, oldIcon,
newIcon);
} else if(newIcon==null&&oldIcon!=null){
buttonIconHashmap.put(NEXT_FINISH_BUTTON_ICON_PROPERTY, newIcon);
firePropertyChange(NEXT_FINISH_BUTTON_ICON_PROPERTY, oldIcon, newIcon);
}
}
示例4: setCancelButtonIcon
import javax.swing.Icon; //导入方法依赖的package包/类
void setCancelButtonIcon(Icon newIcon) {
Icon oldIcon = getCancelButtonIcon();
if (newIcon!=null&&!newIcon.equals(oldIcon)) {
buttonIconHashmap.put(CANCEL_BUTTON_ICON_PROPERTY, newIcon);
firePropertyChange(CANCEL_BUTTON_ICON_PROPERTY, oldIcon, newIcon);
} else if(newIcon==null&&oldIcon!=null){
buttonIconHashmap.put(CANCEL_BUTTON_ICON_PROPERTY, newIcon);
firePropertyChange(CANCEL_BUTTON_ICON_PROPERTY, oldIcon, newIcon);
}
}
示例5: setBackButtonIcon
import javax.swing.Icon; //导入方法依赖的package包/类
void setBackButtonIcon(Icon newIcon) {
Object oldIcon = getBackButtonIcon();
if (!newIcon.equals(oldIcon)) {
buttonIconHashmap.put(BACK_BUTTON_ICON_PROPERTY, newIcon);
firePropertyChange(BACK_BUTTON_ICON_PROPERTY, oldIcon, newIcon);
}
}
示例6: setNextFinishButtonIcon
import javax.swing.Icon; //导入方法依赖的package包/类
public void setNextFinishButtonIcon(Icon newIcon) {
Object oldIcon = getNextFinishButtonIcon();
if (!newIcon.equals(oldIcon)) {
buttonIconHashmap.put(NEXT_FINISH_BUTTON_ICON_PROPERTY, newIcon);
firePropertyChange(NEXT_FINISH_BUTTON_ICON_PROPERTY, oldIcon, newIcon);
}
}
示例7: setCancelButtonIcon
import javax.swing.Icon; //导入方法依赖的package包/类
void setCancelButtonIcon(Icon newIcon) {
Icon oldIcon = getCancelButtonIcon();
if (!newIcon.equals(oldIcon)) {
buttonIconHashmap.put(CANCEL_BUTTON_ICON_PROPERTY, newIcon);
firePropertyChange(CANCEL_BUTTON_ICON_PROPERTY, oldIcon, newIcon);
}
}