mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-04-06 18:20:26 +08:00
fix IllegalStateException crashes the application
This commit is contained in:
parent
296df23e15
commit
6c8c189b72
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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.launcher.launch;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class GameException extends RuntimeException {
|
||||
|
||||
public GameException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
}
|
@ -85,13 +85,8 @@ public class GameLauncher {
|
||||
|
||||
try {
|
||||
loader = provider.provideMinecraftLoader(result);
|
||||
} catch (IllegalStateException e) {
|
||||
HMCLog.err("Failed to get minecraft loader", e);
|
||||
failEvent.execute(C.i18n("launch.circular_dependency_versions"));
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
failEvent.execute(C.i18n("launch.failed"));
|
||||
HMCLog.err("Failed to get minecraft loader", e);
|
||||
} catch (GameException e) {
|
||||
failEvent.execute(C.i18n("launch.failed") + ", " + e.getMessage());
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -106,7 +101,14 @@ public class GameLauncher {
|
||||
}
|
||||
|
||||
HMCLog.log("Unpacking natives...");
|
||||
if (!decompressNativesEvent.execute(provider.getDecompressLibraries(loader.getMinecraftVersion()))) {
|
||||
DecompressLibraryJob job = null;
|
||||
try {
|
||||
job = provider.getDecompressLibraries(loader.getMinecraftVersion());
|
||||
} catch (GameException e) {
|
||||
failEvent.execute(C.i18n("launch.failed") + ", " + e.getMessage());
|
||||
return null;
|
||||
}
|
||||
if (!decompressNativesEvent.execute(job)) {
|
||||
failEvent.execute(C.i18n("launch.failed"));
|
||||
return null;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public class MinecraftLoader extends AbstractMinecraftLoader {
|
||||
DownloadType dt;
|
||||
String text;
|
||||
|
||||
public MinecraftLoader(Profile ver, IMinecraftProvider provider, UserProfileProvider lr) throws IllegalStateException {
|
||||
public MinecraftLoader(Profile ver, IMinecraftProvider provider, UserProfileProvider lr) throws GameException {
|
||||
super(ver, provider, lr);
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ import org.jackhuang.hellominecraft.utils.code.DigestUtils;
|
||||
*/
|
||||
public final class OfflineAuthenticator extends IAuthenticator {
|
||||
|
||||
Map<String, String> uuidMap = null;
|
||||
Map<String, String> uuidMap = new HashMap<>();
|
||||
|
||||
public OfflineAuthenticator(String clientToken) {
|
||||
super(clientToken);
|
||||
@ -38,11 +38,11 @@ public final class OfflineAuthenticator extends IAuthenticator {
|
||||
@Override
|
||||
public void onLoadSettings(Map m) {
|
||||
super.onLoadSettings(m);
|
||||
if (m == null)
|
||||
return;
|
||||
Object o = m.get("uuidMap");
|
||||
if (o != null && o instanceof Map)
|
||||
uuidMap = (Map) o;
|
||||
else
|
||||
uuidMap = new HashMap<>();
|
||||
uuidMap = (Map<String, String>) o;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -22,6 +22,8 @@ import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import org.jackhuang.hellominecraft.C;
|
||||
import org.jackhuang.hellominecraft.launcher.launch.GameException;
|
||||
import org.jackhuang.hellominecraft.launcher.launch.IMinecraftProvider;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.assets.AssetsIndex;
|
||||
import org.jackhuang.hellominecraft.utils.ArrayUtils;
|
||||
@ -78,7 +80,7 @@ public class MinecraftVersion implements Cloneable, Comparable<MinecraftVersion>
|
||||
if (inheritsFrom == null)
|
||||
return this;
|
||||
if (!resolvedSoFar.add(id))
|
||||
throw new IllegalStateException("Circular dependency detected.");
|
||||
throw new GameException(C.i18n("launch.circular_dependency_versions"));
|
||||
|
||||
MinecraftVersion parent = manager.getVersionById(inheritsFrom);
|
||||
if (parent == null) {
|
||||
|
@ -26,6 +26,7 @@ import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import org.jackhuang.hellominecraft.C;
|
||||
import org.jackhuang.hellominecraft.HMCLog;
|
||||
import org.jackhuang.hellominecraft.launcher.launch.GameException;
|
||||
import org.jackhuang.hellominecraft.launcher.launch.GameLauncher;
|
||||
import org.jackhuang.hellominecraft.launcher.launch.IMinecraftAssetService;
|
||||
import org.jackhuang.hellominecraft.launcher.launch.IMinecraftDownloadService;
|
||||
@ -211,7 +212,7 @@ public class MinecraftVersionManager extends IMinecraftProvider {
|
||||
@Override
|
||||
public GameLauncher.DecompressLibraryJob getDecompressLibraries(MinecraftVersion v) {
|
||||
if (v.libraries == null)
|
||||
throw new IllegalStateException("Wrong format: minecraft.json");
|
||||
throw new GameException("Wrong format: minecraft.json");
|
||||
ArrayList<File> unzippings = new ArrayList<>();
|
||||
ArrayList<String[]> extractRules = new ArrayList<>();
|
||||
for (IMinecraftLibrary l : v.libraries) {
|
||||
@ -236,7 +237,7 @@ public class MinecraftVersionManager extends IMinecraftProvider {
|
||||
|
||||
@Override
|
||||
public IMinecraftLoader provideMinecraftLoader(UserProfileProvider p)
|
||||
throws IllegalStateException {
|
||||
throws GameException {
|
||||
return new MinecraftLoader(profile, this, p);
|
||||
}
|
||||
|
||||
|
@ -896,11 +896,8 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
|
||||
private void btnRemoveProfileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveProfileActionPerformed
|
||||
if (MessageBox.Show(C.i18n("ui.message.sure_remove", getProfile().getName()), MessageBox.YES_NO_OPTION) == MessageBox.NO_OPTION)
|
||||
return;
|
||||
String name = getProfile().getName();
|
||||
if (Settings.delProfile(getProfile())) {
|
||||
cboProfiles.removeItem(name);
|
||||
prepare(getProfile());
|
||||
}
|
||||
if (Settings.delProfile(getProfile()))
|
||||
loadProfiles();
|
||||
}//GEN-LAST:event_btnRemoveProfileActionPerformed
|
||||
|
||||
private void cboVersionsItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cboVersionsItemStateChanged
|
||||
@ -1197,8 +1194,6 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
|
||||
}
|
||||
|
||||
//</editor-fold>
|
||||
// <editor-fold defaultstate="collapsed" desc="Game Download">
|
||||
// </editor-fold>
|
||||
// <editor-fold defaultstate="collapsed" desc="Installer">
|
||||
String getMinecraftVersionFormatted() {
|
||||
return minecraftVersion == null ? "" : (StrUtils.formatVersion(minecraftVersion.version) == null) ? mcVersion : minecraftVersion.version;
|
||||
|
@ -23,6 +23,7 @@ import java.text.ParseException;
|
||||
import java.util.Map;
|
||||
import javax.swing.UIDefaults;
|
||||
import javax.swing.plaf.synth.SynthLookAndFeel;
|
||||
import org.jackhuang.hellominecraft.HMCLog;
|
||||
import org.jackhuang.hellominecraft.utils.NetUtils;
|
||||
|
||||
/**
|
||||
@ -37,7 +38,7 @@ public class HelloMinecraftLookAndFeel extends SynthLookAndFeel {
|
||||
* Creates a new instance of NimbusLookAndFeel
|
||||
*
|
||||
* @throws java.text.ParseException error parsing the xml, it must not
|
||||
* happen.
|
||||
* happen.
|
||||
*/
|
||||
public HelloMinecraftLookAndFeel() throws ParseException {
|
||||
this(DEFAULT_SETTINGS);
|
||||
@ -49,9 +50,9 @@ public class HelloMinecraftLookAndFeel extends SynthLookAndFeel {
|
||||
for (String ss : settings.keySet())
|
||||
s = s.replace("${" + ss + "}", settings.get(ss));
|
||||
load(new ByteArrayInputStream(s.getBytes("UTF-8")), HelloMinecraftLookAndFeel.class);
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
throw new ParseException("FUCKING BUG", 0);
|
||||
} catch (Throwable ex) {
|
||||
HMCLog.err("This fucking exception should not happen. Retry backup solution.", ex);
|
||||
load(HelloMinecraftLookAndFeel.class.getResourceAsStream("/org/jackhuang/hellominecraft/lookandfeel/synth_backup.xml"), HelloMinecraftLookAndFeel.class);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,8 @@ public enum Theme {
|
||||
public final Map<String, String> settings;
|
||||
|
||||
private Theme(String localizedName, Map<String, String> settings) {
|
||||
if (settings == null)
|
||||
throw new NullPointerException("Theme settings map should not be null.");
|
||||
this.localizedName = localizedName;
|
||||
this.settings = settings;
|
||||
}
|
||||
|
@ -0,0 +1,393 @@
|
||||
<!--
|
||||
Copyright 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 2 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.
|
||||
-->
|
||||
<synth>
|
||||
|
||||
<!-- ########################################################################################################### -->
|
||||
<!-- TOP LEVEL CONTAINERS -->
|
||||
<!-- ########################################################################################################### -->
|
||||
|
||||
<style id="default">
|
||||
<state>
|
||||
<color value="#000000" type="FOREGROUND"/>
|
||||
<color value="#9CC5D8" type="TEXT_BACKGROUND"/>
|
||||
<font name="微软雅黑" size="12" />
|
||||
</state>
|
||||
<object id="GraphicsUtils" class="org.jackhuang.hellominecraft.lookandfeel.GraphicsUtils"/>
|
||||
<graphicsUtils idref="GraphicsUtils"/>
|
||||
</style>
|
||||
<bind style="default" type="region" key=".*"/>
|
||||
|
||||
<style id="RootPane">
|
||||
<state>
|
||||
<color value="#ffffff" type="BACKGROUND"/>
|
||||
<opaque value="true"/>
|
||||
</state>
|
||||
</style>
|
||||
<bind style="RootPane" type="region" key="RootPane"/>
|
||||
|
||||
<!-- ########################################################################################################### -->
|
||||
<!-- SCROLL BARS & VIEW PORT -->
|
||||
<!-- ########################################################################################################### -->
|
||||
|
||||
<defaultsProperty key="ScrollBarUI" type="string" value="org.jackhuang.hellominecraft.lookandfeel.ui.ScrollBarUI"/>
|
||||
<defaultsProperty key="ScrollBar.width" type="integer" value="15"/>
|
||||
<defaultsProperty key="ScrollBar.minimumThumbSize" type="dimension" value="29 29"/>
|
||||
<defaultsProperty key="ScrollBar.maximumThumbSize" type="dimension" value="1000 1000"/>
|
||||
|
||||
<style id="Viewport">
|
||||
<insets top="0" left="0" bottom="0" right="0"/>
|
||||
</style>
|
||||
<bind style="Viewport" type="region" key="Viewport"/>
|
||||
|
||||
<!-- ########################################################################################################### -->
|
||||
<!-- BUTTONS -->
|
||||
<!-- ########################################################################################################### -->
|
||||
|
||||
<style id="button">
|
||||
<object id="ButtonPainter" class="org.jackhuang.hellominecraft.lookandfeel.painters.ButtonPainter"/>
|
||||
<painter idref="ButtonPainter"/>
|
||||
<state value="DISABLED">
|
||||
<color value="#ACAEB2" type="TEXT_FOREGROUND"/>
|
||||
</state>
|
||||
<state value="DEFAULT AND PRESSED">
|
||||
<color value="#000000" type="TEXT_FOREGROUND"/>
|
||||
</state>
|
||||
<property key="Button.margin" type="insets" value="4 12 5 12"/>
|
||||
</style>
|
||||
<bind style="button" type="region" key="Button"/>
|
||||
<style id="togglebutton">
|
||||
<object id="ButtonPainter" class="org.jackhuang.hellominecraft.lookandfeel.painters.ButtonPainter"/>
|
||||
<painter idref="ButtonPainter"/>
|
||||
<state value="DISABLED">
|
||||
<color value="#ACAEB2" type="TEXT_FOREGROUND"/>
|
||||
</state>
|
||||
<state value="PRESSED">
|
||||
<color value="#000000" type="TEXT_FOREGROUND"/>
|
||||
</state>
|
||||
<state value="SELECTED">
|
||||
<color value="#000000" type="TEXT_FOREGROUND"/>
|
||||
</state>
|
||||
<property key="ToggleButton.margin" type="insets" value="4 12 5 12"/>
|
||||
</style>
|
||||
<bind style="togglebutton" type="region" key="ToggleButton"/>
|
||||
|
||||
<style id="checkbox">
|
||||
<insets top="1" left="1" bottom="1" right="1"/>
|
||||
<imageIcon id="check_off" path="images/checkbox_off.png"/>
|
||||
<imageIcon id="check_off_over" path="images/checkbox_off_over.png"/>
|
||||
<imageIcon id="check_off_pressed" path="images/checkbox_off_pressed.png"/>
|
||||
<imageIcon id="check_off_disabled" path="images/checkbox_off_disabled.png"/>
|
||||
<imageIcon id="check_on" path="images/checkbox_on.png"/>
|
||||
<imageIcon id="check_on_over" path="images/checkbox_on_over.png"/>
|
||||
<imageIcon id="check_on_pressed" path="images/checkbox_on_pressed.png"/>
|
||||
<imageIcon id="check_on_disabled" path="images/checkbox_on_disabled.png"/>
|
||||
<property key="CheckBox.icon" value="check_off"/>
|
||||
<state value="DISABLED and SELECTED">
|
||||
<property key="CheckBox.icon" value="check_on_disabled"/>
|
||||
</state>
|
||||
<state value="DISABLED">
|
||||
<property key="CheckBox.icon" value="check_off_disabled"/>
|
||||
</state>
|
||||
<state value="PRESSED">
|
||||
<property key="CheckBox.icon" value="check_off_pressed"/>
|
||||
</state>
|
||||
<state value="MOUSE_OVER">
|
||||
<property key="CheckBox.icon" value="check_off_over"/>
|
||||
</state>
|
||||
<state value="SELECTED and PRESSED">
|
||||
<property key="CheckBox.icon" value="check_on_pressed"/>
|
||||
</state>
|
||||
<state value="SELECTED and MOUSE_OVER">
|
||||
<property key="CheckBox.icon" value="check_on_over"/>
|
||||
</state>
|
||||
<state value="SELECTED">
|
||||
<property key="CheckBox.icon" value="check_on"/>
|
||||
</state>
|
||||
</style>
|
||||
<bind style="checkbox" type="region" key="Checkbox"/>
|
||||
|
||||
<style id="radiobutton">
|
||||
<insets top="2" left="2" bottom="2" right="2"/>
|
||||
<imageIcon id="radio_off" path="images/radio_btn.png"/>
|
||||
<imageIcon id="radio_off_over" path="images/radio_btn_over.png"/>
|
||||
<imageIcon id="radio_off_pressed" path="images/radio_btn_pressed.png"/>
|
||||
<imageIcon id="radio_off_disabled" path="images/radio_btn_disabled_normal.png"/>
|
||||
<imageIcon id="radio_on" path="images/radio_btn_selected.png"/>
|
||||
<imageIcon id="radio_on_over" path="images/radio_btn_selected_over.png"/>
|
||||
<imageIcon id="radio_on_pressed" path="images/radio_btn_selected_pressed.png"/>
|
||||
<imageIcon id="radio_on_disabled" path="images/radio_btn_disabled_selected.png"/>
|
||||
<property key="RadioButton.icon" value="radio_off"/>
|
||||
<state value="DISABLED and SELECTED">
|
||||
<property key="RadioButton.icon" value="radio_on_disabled"/>
|
||||
</state>
|
||||
<state value="DISABLED">
|
||||
<property key="RadioButton.icon" value="radio_off_disabled"/>
|
||||
</state>
|
||||
<state value="PRESSED">
|
||||
<property key="RadioButton.icon" value="radio_off_pressed"/>
|
||||
</state>
|
||||
<state value="MOUSE_OVER">
|
||||
<property key="RadioButton.icon" value="radio_off_over"/>
|
||||
</state>
|
||||
<state value="SELECTED and PRESSED">
|
||||
<property key="RadioButton.icon" value="radio_on_pressed"/>
|
||||
</state>
|
||||
<state value="SELECTED and MOUSE_OVER">
|
||||
<property key="RadioButton.icon" value="radio_on_over"/>
|
||||
</state>
|
||||
<state value="SELECTED">
|
||||
<property key="RadioButton.icon" value="radio_on"/>
|
||||
</state>
|
||||
</style>
|
||||
<bind style="radiobutton" type="region" key="RadioButton"/>
|
||||
|
||||
<!-- ########################################################################################################### -->
|
||||
<!-- TEXT FIELDS -->
|
||||
<!-- ########################################################################################################### -->
|
||||
|
||||
<style id="textfield">
|
||||
<object id="TextFieldPainter" class="org.jackhuang.hellominecraft.lookandfeel.painters.TextFieldPainter"/>
|
||||
<painter idref="TextFieldPainter"/>
|
||||
<state>
|
||||
<font name="微软雅黑" size="12" />
|
||||
<color value="#000000" type="TEXT_FOREGROUND"/>
|
||||
</state>
|
||||
<insets top="4" left="6" bottom="4" right="6"/>
|
||||
</style>
|
||||
<bind style="textfield" type="region" key="TextField"/>
|
||||
<bind style="textfield" type="region" key="TextArea"/>
|
||||
<bind style="textfield" type="region" key="PasswordField"/>
|
||||
|
||||
<!-- ########################################################################################################### -->
|
||||
<!-- SCROLL PANE -->
|
||||
<!-- ########################################################################################################### -->
|
||||
|
||||
<style id="scrollpane">
|
||||
<object id="TextFieldPainter" class="org.jackhuang.hellominecraft.lookandfeel.painters.TextFieldPainter"/>
|
||||
<painter idref="TextFieldPainter"/>
|
||||
<insets top="4" left="6" bottom="4" right="6"/>
|
||||
</style>
|
||||
<bind style="scrollpane" type="region" key="ScrollPane"/>
|
||||
|
||||
<!-- ########################################################################################################### -->
|
||||
<!-- MENUS -->
|
||||
<!-- ########################################################################################################### -->
|
||||
|
||||
<style id="MenuBar">
|
||||
<insets top="2" left="6" bottom="2" right="6"/>
|
||||
</style>
|
||||
<bind style="MenuBar" type="region" key="MenuBar"/>
|
||||
|
||||
<style id="Menu">
|
||||
<insets top="2" left="2" bottom="3" right="2"/>
|
||||
<state>
|
||||
<color value="#000000" type="TEXT_FOREGROUND"/>
|
||||
<color value="#FFFFFF" type="BACKGROUND"/>
|
||||
</state>
|
||||
</style>
|
||||
<bind style="Menu" type="region" key="Menu"/>
|
||||
|
||||
<style id="MenuItem">
|
||||
<insets top="2" left="2" bottom="3" right="2"/>
|
||||
<opaque value="true"/>
|
||||
<state>
|
||||
<color value="#000000" type="TEXT_FOREGROUND"/>
|
||||
<color value="#FFFFFF" type="BACKGROUND"/>
|
||||
</state>
|
||||
<state value="DISABLED">
|
||||
<color value="#FFFFFF" type="BACKGROUND"/>
|
||||
<color value="#D8D8D9" type="TEXT_FOREGROUND"/>
|
||||
</state>
|
||||
<state value="MOUSE_OVER">
|
||||
<color value="#000000" type="TEXT_FOREGROUND"/>
|
||||
<color value="#C2E6F6" type="BACKGROUND"/>
|
||||
</state>
|
||||
<state value="SELECTED">
|
||||
<color value="#000000" type="TEXT_FOREGROUND"/>
|
||||
<color value="#E85D00" type="BACKGROUND"/>
|
||||
</state>
|
||||
</style>
|
||||
<bind style="MenuItem" type="region" key="MenuItem"/>
|
||||
|
||||
<style id="PopupMenuSeparator">
|
||||
<insets top="2" left="0" bottom="2" right="0"/>
|
||||
</style>
|
||||
<bind style="PopupMenuSeparator" type="region" key="PopupMenuSeparator"/>
|
||||
|
||||
<style id="PopupMenu">
|
||||
<insets top="6" left="1" bottom="6" right="1"/>
|
||||
</style>
|
||||
<bind style="PopupMenu" type="region" key="PopupMenu"/>
|
||||
|
||||
<!-- ########################################################################################################### -->
|
||||
<!-- PROGRESS BARS -->
|
||||
<!-- ########################################################################################################### -->
|
||||
|
||||
<style id="progress">
|
||||
<object id="ProgressPainter" class="org.jackhuang.hellominecraft.lookandfeel.painters.ProgressPainter" />
|
||||
<painter idref="ProgressPainter"/>
|
||||
<property key="ProgressBar.horizontalSize" type="dimension" value="50 20"/>
|
||||
<property key="ProgressBar.vertictalSize" type="dimension" value="20 50"/>
|
||||
</style>
|
||||
<bind style="progress" type="region" key="ProgressBar"/>
|
||||
|
||||
<!-- ########################################################################################################### -->
|
||||
<!-- TABBED PANE -->
|
||||
<!-- ########################################################################################################### -->
|
||||
|
||||
<style id="TabbedPaneTab">
|
||||
<insets top="4" left="8" right="8" bottom="4"/>
|
||||
<state>
|
||||
<font name="微软雅黑" size="14" />
|
||||
<color type="TEXT_FOREGROUND" value="#000000" /> <!-- #000000 -->
|
||||
</state>
|
||||
<state value="SELECTED">
|
||||
<color type="TEXT_FOREGROUND" value="#106CA3" />
|
||||
</state>
|
||||
</style>
|
||||
<bind style="TabbedPaneTab" type="region" key="TabbedPaneTab"/>
|
||||
<style id="TabbedPaneTabArea">
|
||||
<insets top="3" left="10" right="10" bottom="5"/>
|
||||
</style>
|
||||
<bind style="TabbedPaneTabArea" type="region" key="TabbedPaneTabArea"/>
|
||||
|
||||
<int id="TabbedPane.selectedLabelShift">0</int>
|
||||
<int id="TabbedPane.labelShift">0</int>
|
||||
<boolean id="TabbedPane.nudgeSelectedLabel">false</boolean>
|
||||
<defaultsProperty key="TabbedPane.selectedLabelShift" type="idref" value="TabbedPane.selectedLabelShift" />
|
||||
<defaultsProperty key="TabbedPane.labelShift" type="idref" value="TabbedPane.labelShift" />
|
||||
<defaultsProperty key="TabbedPane.nudgeSelectedLabel" type="idref" value="TabbedPane.nudgeSelectedLabel" />
|
||||
|
||||
<!-- ########################################################################################################### -->
|
||||
<!-- COMBO BOX -->
|
||||
<!-- ########################################################################################################### -->
|
||||
|
||||
<color id = "ComboBox.background" value="#EDEFF2" />
|
||||
<defaultsProperty key="ComboBox.background" type="idref" value="ComboBox.background"/>
|
||||
<color id = "ComboBox.selectionForeground" value="#000000" />
|
||||
<defaultsProperty key="ComboBox.selectionForeground" type="idref" value="ComboBox.selectionForeground"/>
|
||||
<color id = "ComboBox.selectionBackground" value="#A0D8F0" />
|
||||
<defaultsProperty key="ComboBox.selectionBackground" type="idref" value="ComboBox.selectionBackground"/>
|
||||
<color id = "ComboBox.foreground" value="#232324" />
|
||||
<defaultsProperty key="ComboBox.foreground" type="idref" value="ComboBox.foreground"/>
|
||||
|
||||
<style id="Combo listRenderer">
|
||||
<insets top="2" left="2" bottom="3" right="2"/>
|
||||
<opaque value="true"/>
|
||||
<state value="DISABLED">
|
||||
<color value="#EDEFF2" type="BACKGROUND"/>
|
||||
<color value="#8E8F91" type="TEXT_FOREGROUND"/>
|
||||
</state>
|
||||
<state value="ENABLED">
|
||||
<color value="#000000" type="TEXT_FOREGROUND"/>
|
||||
<color value="#A0D8F0" type="BACKGROUND"/>
|
||||
</state>
|
||||
<state value="SELECTED">
|
||||
<color type="BACKGROUND" value="#A0D8F0" />
|
||||
<color type="TEXT_FOREGROUND" value="#70C5E9" />
|
||||
</state>
|
||||
</style>
|
||||
<!--bind style="combobox" type="region" key="ComboBox" /-->
|
||||
<bind style="Combo listRenderer" type="name" key="ComboBox.listRenderer"/>
|
||||
|
||||
<defaultsProperty key="ComboBoxUI" type="string" value="org.jackhuang.hellominecraft.lookandfeel.ui.ComboBoxUI"/>
|
||||
|
||||
<!-- ########################################################################################################### -->
|
||||
<!-- LIST -->
|
||||
<!-- ########################################################################################################### -->
|
||||
|
||||
<style id="List">
|
||||
<state>
|
||||
<color value="#000000" type="TEXT_FOREGROUND"/>
|
||||
</state>
|
||||
<state value="SELECTED">
|
||||
<color value="#000000" type="TEXT_FOREGROUND"/>
|
||||
<color value="#E85D00" type="BACKGROUND"/>
|
||||
</state>
|
||||
<state value="DISABLED">
|
||||
<color value="#C1C1C1" type="TEXT_FOREGROUND"/>
|
||||
</state>
|
||||
<state value="MOUSE_OVER">
|
||||
<color value="#000000" type="TEXT_FOREGROUND"/>
|
||||
<color value="#A0D8F0" type="BACKGROUND"/>
|
||||
</state>
|
||||
<property key="List.rendererUseListColors" type="boolean" value="false"/>
|
||||
</style>
|
||||
<bind style="List" type="region" key="List" />
|
||||
<style id="List listRenderer">
|
||||
<insets top="2" left="2" bottom="3" right="2"/>
|
||||
<opaque value="true"/>
|
||||
<state>
|
||||
<color value="#232324" type="TEXT_FOREGROUND"/>
|
||||
<color value="#EDEFF2" type="BACKGROUND"/>
|
||||
</state>
|
||||
<state value="DISABLED">
|
||||
<color value="#EDEFF2" type="BACKGROUND"/>
|
||||
<color value="#8E8F91" type="TEXT_FOREGROUND"/>
|
||||
</state>
|
||||
<state value="MOUSE_OVER">
|
||||
<color value="#FFFFFF" type="TEXT_FOREGROUND"/>
|
||||
<color value="#3A698A" type="BACKGROUND"/>
|
||||
</state>
|
||||
</style>
|
||||
<bind style="List listRenderer" type="name" key="List.listRenderer"/>
|
||||
|
||||
|
||||
<color id="List.background" value="#EDEFF2" />
|
||||
<defaultsProperty key="List.background" type="idref" value="List.background"/>
|
||||
<color id="List.selectionForeground" value="#FFFFFF" />
|
||||
<defaultsProperty key="List.selectionForeground" type="idref" value="List.selectionForeground"/>
|
||||
<color id="ListSelectionBackground" value="#0000FF" />
|
||||
<defaultsProperty key="List.selectionBackground" type="idref" value="ListSelectionBackground"/>
|
||||
<color id="List.foreground" value="#232324" />
|
||||
<defaultsProperty key="List.foreground" type="idref" value="List.foreground"/>
|
||||
|
||||
<defaultsProperty key="List.rendererUseListColors" type="boolean" value="false"/>
|
||||
|
||||
<!-- ########################################################################################################### -->
|
||||
<!-- OPTION PANE -->
|
||||
<!-- ########################################################################################################### -->
|
||||
|
||||
<style id="OptionPane">
|
||||
<imageIcon id="infoIcon" path="images/option_pane_info.png"/>
|
||||
<property key="OptionPane.informationIcon" value="infoIcon"/>
|
||||
<imageIcon id="errorIcon" path="images/option_pane_error.png"/>
|
||||
<property key="OptionPane.errorIcon" value="errorIcon"/>
|
||||
<imageIcon id="warningIcon" path="images/option_pane_warning.png"/>
|
||||
<property key="OptionPane.warningIcon" value="warningIcon"/>
|
||||
<imageIcon id="questionIcon" path="images/option_pane_question.png"/>
|
||||
<property key="OptionPane.questionIcon" value="questionIcon"/>
|
||||
<property key="OptionPane.buttonOrientation" type="integer" value="4"/>
|
||||
<property key="OptionPane.isYesLast" type="boolean" value="false"/>
|
||||
</style>
|
||||
<bind style="OptionPane" type="region" key="OptionPane"/>
|
||||
|
||||
<style id="table">
|
||||
<color id="color" value="#FF0000" />
|
||||
<color id="gridColor" value="#1E7B87" />
|
||||
<defaultsProperty key="Table.gridColor" type="idref" value="gridColor"/>
|
||||
<defaultsProperty key="Table.background" type="idref" value="gridColor"/>
|
||||
</style>
|
||||
<bind style="table" type="region" key="Table"/>
|
||||
<style id="defaultBackground">
|
||||
<state>
|
||||
<color value="#F1F2F2" type="BACKGROUND"></color>
|
||||
<color value="#000000" type="TEXT_FOREGROUND"></color>
|
||||
</state>
|
||||
</style>
|
||||
<bind style="defaultBackground" type="region" key="Table.*"/>
|
||||
</synth>
|
Loading…
x
Reference in New Issue
Block a user