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

📄 config.java

📁 java+eclipse做的TTPlayer
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
    public void setMouseScrollAjustTime(boolean mouseScrollAjustTime) {        this.mouseScrollAjustTime = mouseScrollAjustTime;    }    public int getShowTimeStyle() {        return showTimeStyle;    }    public void setShowTimeStyle(int showTimeStyle) {        this.showTimeStyle = showTimeStyle;    }    public Dimension getLrcSize() {        return lrcSize;    }    public void setLrcSize(Dimension lrcSize) {        this.lrcSize = lrcSize;    }    public Dimension getPlSize() {        return plSize;    }    public void setPlSize(Dimension plSize) {        this.plSize = plSize;    }    public boolean isKaraoke() {        return karaoke;    }    public void setKaraoke(boolean karaoke) {        this.karaoke = karaoke;    }    public int getReadTagOrder() {        return readTagOrder;    }    public void setReadTagOrder(int readTagOrder) {        this.readTagOrder = readTagOrder;    }    public int getWriteTagMode() {        return writeTagMode;    }    public void setWriteTagMode(int writeTagMode) {        this.writeTagMode = writeTagMode;    }    public List getMixers() {        return mixers;    }    public void setMixers(List mixers) {        this.mixers = mixers;    }    public int getBufferSize() {        return bufferSize;    }    public void setBufferSize(int bufferSize) {        this.bufferSize = bufferSize;    }    public String getProxyHost() {        return proxyHost;    }    public void setProxyHost(String proxyHost) {        this.proxyHost = proxyHost;    }    public String getProxyPort() {        return proxyPort;    }    public void setProxyPort(String proxyPort) {        this.proxyPort = proxyPort;    }    public String getProxyPwd() {        return proxyPwd;    }    public void setProxyPwd(String proxyPwd) {        this.proxyPwd = proxyPwd;    }    public String getProxyUserName() {        return proxyUserName;    }    public void setProxyUserName(String proxyUserName) {        this.proxyUserName = proxyUserName;    }    public boolean isUseProxy() {        return useProxy;    }    public void setUseProxy(boolean useProxy) {        this.useProxy = useProxy;    }    public String getEncoding() {        return encoding;    }    public void setEncoding(String encoding) {        this.encoding = encoding;    }    public void updateDistance() {        disLrc = new Point(lrcWindow.getLocation().x - topParent.getLocation().x,                lrcWindow.getLocation().y - topParent.getLocation().y);        disEq = new Point(eqWindow.getLocation().x - topParent.getLocation().x,                eqWindow.getLocation().y - topParent.getLocation().y);        disPl = new Point(plWindow.getLocation().x - topParent.getLocation().x,                plWindow.getLocation().y - topParent.getLocation().y);    }    public boolean isLinux() {        return isLinux;    }    public Point getDisEq() {        return disEq;    }    public Point getDisLrc() {        return disLrc;    }    public Point getDisPl() {        return disPl;    }    public String getCurrentPlayListName() {        return currentPlayListName;    }    public void setCurrentPlayListName(String currentPlayListName) {        this.currentPlayListName = currentPlayListName;    }    public JDialog getPlWindow() {        return plWindow;    }    public void setPlWindow(JDialog plWindow) {        this.plWindow = plWindow;    }    public JDialog getLrcWindow() {        return lrcWindow;    }    public void setLrcWindow(JDialog lrcWindow) {        this.lrcWindow = lrcWindow;    }    public JDialog getEqWindow() {        return eqWindow;    }    public void setEqWindow(JDialog eqWindow) {        this.eqWindow = eqWindow;    }    public boolean isShadow() {        return shadow;//        return true;    }    public void setShadow(boolean shadow) {        this.shadow = shadow;    }    public void addPlayList(PlayList list) {        playlists.add(list);    }    public Vector<PlayList> getPlayLists() {        return playlists;    }    public Point getEqLocation() {        return eqLocation;    }    public void setEqLocation(Point eqLocation) {        this.eqLocation = eqLocation;    }    public Point getLrcLocation() {        return lrcLocation;    }    public void setLrcLocation(Point lrcLocation) {        this.lrcLocation = lrcLocation;    }    public Point getPlLocation() {        return plLocation;    }    public void setPlLocation(Point plLocation) {        this.plLocation = plLocation;    }    public boolean isSnapEqWindow() {        return isSnapEqWindow;    }    public void setIsSnapEqWindow(boolean isSnapEqWindow) {        this.isSnapEqWindow = isSnapEqWindow;    }    public boolean isSnapLrcWindow() {        return isSnapLrcWindow;    }    private void setSnapWindow(Component com, boolean snap) {        if (com == this.lrcWindow) {            this.setIsSnapLrcWindow(snap);        } else if (com == this.plWindow) {            this.setIsSnapPlWindow(snap);        } else if (com == this.eqWindow) {            this.setIsSnapEqWindow(snap);        }    }    public String getComponentName(Component com) {        if (com == this.lrcWindow) {            return LRC_WINDOW;        } else if (com == this.plWindow) {            return PL_WINDOW;        } else if (com == this.eqWindow) {            return EQ_WINDOW;        } else if (com == this.topParent) {            return MAIN_WINDOW;        } else {            return UNKNOWN_WINDOW;        }    }    private int getDirection(int dis, Rectangle myBound, Rectangle otherBound) {        int x1 = (int) myBound.getCenterX();        int y1 = (int) myBound.getCenterY();        int x2 = (int) otherBound.getCenterX();        int y2 = (int) otherBound.getCenterY();        int abs = Math.abs(x1 - x2 - myBound.width / 2 - otherBound.width / 2 - dis);        if (abs < 3) {            return RIGHT;        }        abs = Math.abs(x2 - x1 - myBound.width / 2 - otherBound.width / 2 - dis);        if (abs < 3) {            return LEFT;        }        abs = Math.abs(y1 - y2 - myBound.height / 2 - otherBound.height / 2 - dis);        if (abs < 3) {            return BOTTOM;        }        abs = Math.abs(y2 - y1 - myBound.height / 2 - otherBound.height / 2 - dis);        if (abs < 3) {            return TOP;        }        return -1;    }    private void udpateComponentMapWithLoation() {        List<Component> list = new ArrayList<Component>();        Rectangle otherBound = new Rectangle();        Rectangle myBound = new Rectangle();        list.add(eqWindow);        list.add(lrcWindow);        list.add(topParent);        list.add(plWindow);        componentMap.clear();        //先查歌词秀窗口吸附到谁了        Component me = lrcWindow;        me.getBounds(myBound);        Set<String> set = new HashSet<String>();        for (Component c1 : list) {            if (c1 != null && c1 != me && c1.isShowing() && me.isShowing()) {                c1.getBounds(otherBound);                int dis = Util.getDistance(myBound, otherBound);                if (Math.abs(dis) <= 3) {                    set.add(getComponentName(c1));                    if (c1 == topParent) {                        break;                    }                }            }        }        componentMap.put(getComponentName(me), set);        //再查播放列表窗口        set = new HashSet<String>();        me = plWindow;        me.getBounds(myBound);        for (Component c1 : list) {            if (c1 != null && c1 != me && c1.isShowing() && me.isShowing()) {                c1.getBounds(otherBound);                int dis = Util.getDistance(myBound, otherBound);                if (Math.abs(dis) <= 3) {                    set.add(getComponentName(c1));                    if (c1 == topParent) {                        break;                    }                }            }        }        componentMap.put(getComponentName(me), set);        //再查EQ窗口        set = new HashSet<String>();        me = eqWindow;        me.getBounds(myBound);        for (Component c1 : list) {            if (c1 != null && c1 != me && c1.isShowing() && me.isShowing()) {                c1.getBounds(otherBound);                int dis = Util.getDistance(myBound, otherBound);                if (Math.abs(dis) <= 3) {                    set.add(getComponentName(c1));                    if (c1 == topParent) {                        break;                    }                }            }        }        componentMap.put(getComponentName(me), set);    }    /**     * 更新组件的吸附状态     */    public void updateComponentSnap() {        //先更新窗口互相之间的状态,比如有没有吸附        udpateComponentMapWithLoation();        log.log(Level.CONFIG, componentMap.toString());        //更新歌词秀窗口状态        String me = this.getComponentName(lrcWindow);        Set<String> set = componentMap.get(me);//这里放的是可以遍历的字符串        Set<String> list = new HashSet<String>();//这个列表放的是遍历过的字符串        list.add(me);        boolean find = false;        out:        while (true) {            if (set.size() == 0) {                break out;            } else {                Set<String> temp = new HashSet<String>();                for (String other : set) {                    log.log(Level.FINEST, "me=" + me + ",other=" + other);                    if (other.equals(MAIN_WINDOW)) {                        find = true;                        break out;                    } else if (!list.contains(other)) {                        temp.addAll(componentMap.get(other));                    }                    list.add(other);                }                set.removeAll(list);                set.addAll(temp);            }        }        this.setSnapWindow(lrcWindow, find);        //更新播放列表状态        me = this.getComponentName(plWindow);        list.clear();        list.add(me);        set = componentMap.get(me);        find = false;        out:        while (true) {            if (set.size() == 0) {                break out;            } else {                Set<String> temp = new HashSet<String>();                for (String other : set) {                    log.log(Level.FINEST, "me=" + me + ",other=" + other);                    if (other.equals(MAIN_WINDOW)) {                        find = true;                        break out;                    } else if (!list.contains(other)) {

⌨️ 快捷键说明

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