⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yoyolabel.java

📁 java+eclipse做的TTPlayer
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.hadeslee.yoyoplayer.playlist;import javax.swing.JLabel;import javax.swing.plaf.LabelUI;/** * * @author hadeslee */public class YOYOLabel extends JLabel {    private static final long serialVersionUID = 20071214L;    private PlayListItem item;//要画的项目     private int index;//要画的下标    private boolean isSelected;//是否被选中了    private boolean hasFocus;//是否有了焦点    private boolean uiseted;//UI是否已经设了    private int itemCount;//要画的项目的总数    public YOYOLabel() {        this.setUI(new YOYOLabelUI(this));        uiseted = true;    }    public boolean isHasFocus() {        return hasFocus;    }    public void setHasFocus(boolean hasFocus) {        this.hasFocus = hasFocus;    }    public int getItemCount() {        return itemCount;    }    public void setItemCount(int itemCount) {        this.itemCount = itemCount;    }        @Override    public void setUI(LabelUI ui) {        if (!uiseted) {            super.setUI(new YOYOLabelUI(this));        }    }    public void setPlayListItem(PlayListItem item) {        this.item = item;    }    public PlayListItem getPlayListItem() {        return item;    }    public int getIndex() {        return index;    }    public void setIndex(int index) {        this.index = index;    }    public boolean getIsSelected() {        return isSelected;    }    public void setIsSelected(boolean hasFocus) {        this.isSelected = hasFocus;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -