missing files
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
*/
|
||||
package org.jackhuang.hellominecraft.util.ui;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huang
|
||||
*/
|
||||
public interface AlwaysDirty {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
*/
|
||||
package org.jackhuang.hellominecraft.util.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.io.File;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.LookAndFeel;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.UnsupportedLookAndFeelException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class JSystemFileChooser extends JFileChooser {
|
||||
|
||||
public JSystemFileChooser() {
|
||||
super();
|
||||
}
|
||||
|
||||
public JSystemFileChooser(File f) {
|
||||
super(f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUI() {
|
||||
LookAndFeel old = UIManager.getLookAndFeel();
|
||||
try {
|
||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||
} catch (ClassNotFoundException | IllegalAccessException | InstantiationException | UnsupportedLookAndFeelException ignored) {
|
||||
old = null;
|
||||
}
|
||||
|
||||
super.updateUI();
|
||||
|
||||
if (old != null) {
|
||||
Color background = UIManager.getColor("Label.background");
|
||||
setBackground(background);
|
||||
setOpaque(true);
|
||||
|
||||
try {
|
||||
UIManager.setLookAndFeel(old);
|
||||
} catch (UnsupportedLookAndFeelException ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
package org.jackhuang.hellominecraft.util.ui;
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007, Romain Guy
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution.
|
||||
* * Neither the name of the TimingFramework project nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
/**
|
||||
* <p>A stack blur filter can be used to create an approximation of a
|
||||
* gaussian blur. The approximation is controlled by the number of times the
|
||||
* {@link org.jdesktop.swingx.image.FastBlurFilter} is applied onto the source
|
||||
* picture. The default number of iterations, 3, provides a decent compromise
|
||||
* between speed and rendering quality.</p>
|
||||
* <p>The force of the blur can be controlled with a radius and the
|
||||
* default radius is 3. Since the blur clamps values on the edges of the
|
||||
* source picture, you might need to provide a picture with empty borders
|
||||
* to avoid artifacts at the edges. The performance of this filter are
|
||||
* independant from the radius.</p>
|
||||
*
|
||||
* @author Romain Guy <romain.guy@mac.com>
|
||||
*/
|
||||
public class StackBlurFilter extends AbstractFilter {
|
||||
private final int radius;
|
||||
private final int iterations;
|
||||
|
||||
/**
|
||||
* <p>Creates a new blur filter with a default radius of 3 and 3 iterations.</p>
|
||||
*/
|
||||
public StackBlurFilter() {
|
||||
this(3, 3);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Creates a new blur filter with the specified radius and 3 iterations.
|
||||
* If the radius is lower than 1, a radius of 1 will be used automatically.</p>
|
||||
*
|
||||
* @param radius the radius, in pixels, of the blur
|
||||
*/
|
||||
public StackBlurFilter(int radius) {
|
||||
this(radius, 3);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Creates a new blur filter with the specified radius. If the radius
|
||||
* is lower than 1, a radius of 1 will be used automatically. The number
|
||||
* of iterations controls the approximation to a gaussian blur. If the
|
||||
* number of iterations is lower than 1, one iteration will be used
|
||||
* automatically.</p>
|
||||
*
|
||||
* @param radius the radius, in pixels, of the blur
|
||||
* @param iterations the number of iterations to approximate a gaussian blur
|
||||
*/
|
||||
public StackBlurFilter(int radius, int iterations) {
|
||||
if (radius < 1) {
|
||||
radius = 1;
|
||||
}
|
||||
if (iterations < 1) {
|
||||
iterations = 1;
|
||||
}
|
||||
|
||||
this.radius = radius;
|
||||
this.iterations = iterations;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Returns the effective radius of the stack blur. If the radius of the
|
||||
* blur is 1 and the stack iterations count is 3, then the effective blur
|
||||
* radius is 1 * 3 = 3.</p>
|
||||
* @return the number of iterations times the blur radius
|
||||
*/
|
||||
public int getEffectiveRadius() {
|
||||
return getIterations() * getRadius();
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Returns the radius used by this filter, in pixels.</p>
|
||||
*
|
||||
* @return the radius of the blur
|
||||
*/
|
||||
public int getRadius() {
|
||||
return radius;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Returns the number of iterations used to approximate a gaussian
|
||||
* blur.</p>
|
||||
*
|
||||
* @return the number of iterations used by this blur
|
||||
*/
|
||||
public int getIterations() {
|
||||
return iterations;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public BufferedImage filter(BufferedImage src, BufferedImage dst) {
|
||||
int width = src.getWidth();
|
||||
int height = src.getHeight();
|
||||
|
||||
if (dst == null) {
|
||||
dst = createCompatibleDestImage(src, null);
|
||||
}
|
||||
|
||||
int[] srcPixels = new int[width * height];
|
||||
int[] dstPixels = new int[width * height];
|
||||
|
||||
GraphicsUtils.getPixels(src, 0, 0, width, height, srcPixels);
|
||||
for (int i = 0; i < iterations; i++) {
|
||||
// horizontal pass
|
||||
FastBlurFilter.blur(srcPixels, dstPixels, width, height, radius);
|
||||
// vertical pass
|
||||
FastBlurFilter.blur(dstPixels, srcPixels, height, width, radius);
|
||||
}
|
||||
// the result is now stored in srcPixels due to the 2nd pass
|
||||
GraphicsUtils.setPixels(dst, 0, 0, width, height, srcPixels);
|
||||
|
||||
return dst;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
*/
|
||||
package org.jackhuang.hellominecraft.util.ui.wizard.spi;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import org.jackhuang.hellominecraft.util.func.Consumer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huang
|
||||
*/
|
||||
public abstract class AbstractWizard implements WizardImplementation {
|
||||
|
||||
protected final List listenerList = Collections.synchronizedList(new LinkedList());
|
||||
|
||||
protected void fireChanged(Consumer<WizardObserver> r) {
|
||||
WizardObserver[] listeners = (WizardObserver[]) listenerList.toArray(new WizardObserver[listenerList.size()]);
|
||||
|
||||
for (int i = listeners.length - 1; i >= 0; i--) {
|
||||
WizardObserver l = (WizardObserver) listeners[i];
|
||||
r.accept(l);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -310,11 +310,12 @@ launcher.choose_bgpath=选择背景路径
|
||||
launcher.background_tooltip=<html><body>启动器默认使用自带的背景<br />如果当前目录有background.png,则会使用该文件作为背景<br />如果当前目录有bg子目录,则会随机使用里面的一张图作为背景<br />如果该背景地址被修改,则会使用背景地址里的一张图作为背景<br />背景地址允许有多个地址,使用半角分号";"(不包含双引号)分隔</body></html>
|
||||
launcher.update_launcher=检查更新
|
||||
launcher.enable_shadow=启用窗口阴影
|
||||
launcher.enable_animation=启用动态效果
|
||||
launcher.enable_blur=启用主界面模糊
|
||||
launcher.theme=主题
|
||||
launcher.proxy=代理
|
||||
launcher.decorated=启用窗口边框(Linux下可解决程序界面全灰问题)
|
||||
launcher.modpack=<html><a href="http://huangyuhui.duapp.com/link.php?type=modpack">整合包作者帮助</a></html>
|
||||
launcher.enable_animation=启用动态效果
|
||||
launcher.lang=语言
|
||||
launcher.restart=本界面选项需要重启本启动器生效
|
||||
|
||||
|
||||
@@ -310,11 +310,12 @@ launcher.choose_bgpath=\u9009\u62e9\u80cc\u666f\u8def\u5f84
|
||||
launcher.background_tooltip=<html><body>\u542f\u52a8\u5668\u9ed8\u8ba4\u4f7f\u7528\u81ea\u5e26\u7684\u80cc\u666f<br />\u5982\u679c\u5f53\u524d\u76ee\u5f55\u6709background.png\uff0c\u5219\u4f1a\u4f7f\u7528\u8be5\u6587\u4ef6\u4f5c\u4e3a\u80cc\u666f<br />\u5982\u679c\u5f53\u524d\u76ee\u5f55\u6709bg\u5b50\u76ee\u5f55\uff0c\u5219\u4f1a\u968f\u673a\u4f7f\u7528\u91cc\u9762\u7684\u4e00\u5f20\u56fe\u4f5c\u4e3a\u80cc\u666f<br />\u5982\u679c\u8be5\u80cc\u666f\u5730\u5740\u88ab\u4fee\u6539\uff0c\u5219\u4f1a\u4f7f\u7528\u80cc\u666f\u5730\u5740\u91cc\u7684\u4e00\u5f20\u56fe\u4f5c\u4e3a\u80cc\u666f<br />\u80cc\u666f\u5730\u5740\u5141\u8bb8\u6709\u591a\u4e2a\u5730\u5740\uff0c\u4f7f\u7528\u534a\u89d2\u5206\u53f7";"(\u4e0d\u5305\u542b\u53cc\u5f15\u53f7)\u5206\u9694</body></html>
|
||||
launcher.update_launcher=\u68c0\u67e5\u66f4\u65b0
|
||||
launcher.enable_shadow=\u542f\u7528\u7a97\u53e3\u9634\u5f71
|
||||
launcher.enable_animation=\u542f\u7528\u52a8\u6001\u6548\u679c
|
||||
launcher.enable_blur=\u542f\u7528\u4e3b\u754c\u9762\u6a21\u7cca
|
||||
launcher.theme=\u4e3b\u9898
|
||||
launcher.proxy=\u4ee3\u7406
|
||||
launcher.decorated=\u542f\u7528\u7a97\u53e3\u8fb9\u6846(Linux\u4e0b\u53ef\u89e3\u51b3\u7a0b\u5e8f\u754c\u9762\u5168\u7070\u95ee\u9898)
|
||||
launcher.modpack=<html><a href="http://huangyuhui.duapp.com/link.php?type=modpack">\u6574\u5408\u5305\u4f5c\u8005\u5e2e\u52a9</a></html>
|
||||
launcher.enable_animation=\u542f\u7528\u52a8\u6001\u6548\u679c
|
||||
launcher.lang=\u8bed\u8a00
|
||||
launcher.restart=\u672c\u754c\u9762\u9009\u9879\u9700\u8981\u91cd\u542f\u672c\u542f\u52a8\u5668\u751f\u6548
|
||||
|
||||
|
||||
@@ -310,11 +310,12 @@ launcher.choose_bgpath=Choose background path.
|
||||
launcher.background_tooltip=<html><body>This app uses the default background at first.<br />If there is background.png in the directory, it will be used.<br />If there is "bg" subdirectory, this app will chooses one picture in "bgskin" randomly.<br />If you set the background setting, this app will use it.</body></html>
|
||||
launcher.update_launcher=Check for update
|
||||
launcher.enable_shadow=Enable Window Shadow
|
||||
launcher.enable_animation=Enable Animation
|
||||
launcher.enable_blur=Enable Blur
|
||||
launcher.theme=Theme
|
||||
launcher.proxy=Proxy
|
||||
launcher.decorated=Enable system window border(in order to fix the problem that the ui become all gray in Linux OS)
|
||||
launcher.modpack=<html><a href="http://blog.163.com/huanghongxun2008@126/blog/static/7738046920160323812771/">Documentations for modpacks.</a></html>
|
||||
launcher.enable_animation=Enable Animation
|
||||
launcher.lang=Language
|
||||
launcher.restart=Options will be in operations only if restart this app.
|
||||
|
||||
|
||||
@@ -310,11 +310,12 @@ launcher.choose_bgpath=Choose background path.
|
||||
launcher.background_tooltip=<html><body>This app uses the default background at first.<br />If there is background.png in the directory, it will be used.<br />If there is "bg" subdirectory, this app will chooses one picture in "bgskin" randomly.<br />If you set the background setting, this app will use it.</body></html>
|
||||
launcher.update_launcher=Check for update
|
||||
launcher.enable_shadow=Enable Window Shadow
|
||||
launcher.enable_animation=Enable Animation
|
||||
launcher.enable_blur=Enable Blur
|
||||
launcher.theme=Theme
|
||||
launcher.proxy=Proxy
|
||||
launcher.decorated=Enable system window border(in order to fix the problem that the ui become all gray in Linux OS)
|
||||
launcher.modpack=<html><a href="http://blog.163.com/huanghongxun2008@126/blog/static/7738046920160323812771/">Documentations for modpacks.</a></html>
|
||||
launcher.enable_animation=Enable Animation
|
||||
launcher.lang=Language
|
||||
launcher.restart=Options will be in operations only if restart this app.
|
||||
|
||||
|
||||
@@ -309,12 +309,13 @@ launcher.versions_json_not_formatted=版本%s信息資料格式错误,是否
|
||||
launcher.choose_bgpath=選擇背景路徑
|
||||
launcher.background_tooltip=<html><body>啟動器默認使用自帶的背景<br />如果當前目錄有background.png,則會使用該資料作為背景<br />如果當前目錄有bg子目錄,則會隨機使用裡面的一張圖作為背景<br />如果該背景地址被修改,則會使用背景地址裡的一張圖作為背景<br />背景地址允許有多個地址,使用半角分號";"(不包含雙引號)分隔</body></html>
|
||||
launcher.update_launcher=检查更新
|
||||
launcher.enable_shadow=启用窗口阴影
|
||||
launcher.enable_shadow=啟用窗口陰影
|
||||
launcher.enable_animation=啟用動態效果
|
||||
launcher.enable_blur=啟用主界面模糊
|
||||
launcher.theme=主题
|
||||
launcher.proxy=代理
|
||||
launcher.decorated=啟用窗口邊框(Linux下可解決程序界面全灰問題)
|
||||
launcher.modpack=<html><a href="http://huangyuhui.duapp.com/link.php?type=modpack">整合包作者帮助</a></html>
|
||||
launcher.enable_animation=啟用動態效果
|
||||
launcher.lang=語言
|
||||
launcher.restart=本界面選項需要重啟本啟動器生效
|
||||
|
||||
|
||||
@@ -309,12 +309,13 @@ launcher.versions_json_not_formatted=\u7248\u672c%s\u4fe1\u606f\u8cc7\u6599\u683
|
||||
launcher.choose_bgpath=\u9078\u64c7\u80cc\u666f\u8def\u5f91
|
||||
launcher.background_tooltip=<html><body>\u555f\u52d5\u5668\u9ed8\u8a8d\u4f7f\u7528\u81ea\u5e36\u7684\u80cc\u666f<br />\u5982\u679c\u7576\u524d\u76ee\u9304\u6709background.png\uff0c\u5247\u6703\u4f7f\u7528\u8a72\u8cc7\u6599\u4f5c\u70ba\u80cc\u666f<br />\u5982\u679c\u7576\u524d\u76ee\u9304\u6709bg\u5b50\u76ee\u9304\uff0c\u5247\u6703\u96a8\u6a5f\u4f7f\u7528\u88e1\u9762\u7684\u4e00\u5f35\u5716\u4f5c\u70ba\u80cc\u666f<br />\u5982\u679c\u8a72\u80cc\u666f\u5730\u5740\u88ab\u4fee\u6539\uff0c\u5247\u6703\u4f7f\u7528\u80cc\u666f\u5730\u5740\u88e1\u7684\u4e00\u5f35\u5716\u4f5c\u70ba\u80cc\u666f<br />\u80cc\u666f\u5730\u5740\u5141\u8a31\u6709\u591a\u500b\u5730\u5740\uff0c\u4f7f\u7528\u534a\u89d2\u5206\u865f";"(\u4e0d\u5305\u542b\u96d9\u5f15\u865f)\u5206\u9694</body></html>
|
||||
launcher.update_launcher=\u68c0\u67e5\u66f4\u65b0
|
||||
launcher.enable_shadow=\u542f\u7528\u7a97\u53e3\u9634\u5f71
|
||||
launcher.enable_shadow=\u555f\u7528\u7a97\u53e3\u9670\u5f71
|
||||
launcher.enable_animation=\u555f\u7528\u52d5\u614b\u6548\u679c
|
||||
launcher.enable_blur=\u555f\u7528\u4e3b\u754c\u9762\u6a21\u7cca
|
||||
launcher.theme=\u4e3b\u9898
|
||||
launcher.proxy=\u4ee3\u7406
|
||||
launcher.decorated=\u555f\u7528\u7a97\u53e3\u908a\u6846(Linux\u4e0b\u53ef\u89e3\u6c7a\u7a0b\u5e8f\u754c\u9762\u5168\u7070\u554f\u984c)
|
||||
launcher.modpack=<html><a href="http://huangyuhui.duapp.com/link.php?type=modpack">\u6574\u5408\u5305\u4f5c\u8005\u5e2e\u52a9</a></html>
|
||||
launcher.enable_animation=\u555f\u7528\u52d5\u614b\u6548\u679c
|
||||
launcher.lang=\u8a9e\u8a00
|
||||
launcher.restart=\u672c\u754c\u9762\u9078\u9805\u9700\u8981\u91cd\u555f\u672c\u555f\u52d5\u5668\u751f\u6548
|
||||
|
||||
|
||||
Reference in New Issue
Block a user