mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
Runtime fixes and improvements. (#43)
* Big fixes of runtime. * Fixed forms...
This commit is contained in:
parent
9190fd98d0
commit
4dc275bb17
13 changed files with 30 additions and 100 deletions
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
<!-- DrLeonardo Design -->
|
<!-- DrLeonardo Design -->
|
||||||
|
|
||||||
<Pane fx:id="layout" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" visible="true" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
|
<Pane fx:id="layout" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" visible="true" xmlns="http://javafx.com/javafx/8.0.20" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<children>
|
<children>
|
||||||
<ImageView id="background" fitHeight="400.0" fitWidth="600.0">
|
<ImageView id="background" fitHeight="400.0" fitWidth="600.0">
|
||||||
<image>
|
<image>
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="background-color: rgba(0,0,0,0);">
|
|
||||||
<div style="color:#ffbb19; text-shadow: 1px 1px 2px black; width:300px;">
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sodales blandit turpis et imperdiet. Nunc egestas ipsum vitae mauris euismod euismod. Curabitur ut posuere odio. Donec sagittis faucibus commodo. Aenean id nunc sem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed id nunc lorem. Mauris iaculis, felis et sollicitudin faucibus, nisi nisl dapibus libero, ac venenatis tellus nibh sit amet ex. Duis sit amet nisi vitae mi venenatis mollis semper sollicitudin tortor. Interdum et malesuada fames ac ante ipsum primis in faucibus. Praesent et risus in quam ornare ullamcorper nec sed arcu. Cras eget libero augue. Duis nisl tellus, pulvinar non dolor at, scelerisque vestibulum erat. Quisque eu augue aliquet, rhoncus nunc non, pellentesque est.
|
|
||||||
|
|
||||||
Vivamus ut ipsum lacinia erat faucibus interdum eget sed neque. Curabitur vestibulum quis ante ac euismod. Morbi consequat ante quam, ut hendrerit ligula sagittis nec. Fusce pretium in turpis vel aliquet. Duis malesuada nulla ut interdum maximus. Phasellus commodo enim a ligula aliquam, sed semper nisl posuere. Vestibulum gravida mi nisl, vel porta nisl sollicitudin a. Quisque dui massa, ullamcorper a dolor vel, viverra fermentum dolor. Mauris condimentum lacinia mauris at rhoncus. Nullam sed mollis ex. Sed magna purus, varius et imperdiet at, porta eu erat. Pellentesque eu ornare nibh. Quisque vel eros sit amet tellus elementum venenatis. Etiam id elit elit. Phasellus malesuada et augue sit amet consequat.
|
|
||||||
|
|
||||||
Mauris viverra ipsum at laoreet porttitor. Maecenas interdum egestas risus eget aliquet. Sed vestibulum arcu ut odio bibendum consequat. Etiam ultrices dui vitae dolor dignissim, in accumsan erat aliquet. Vivamus eu justo vitae mauris molestie suscipit. Donec dui erat, posuere eget ipsum quis, consequat porta neque. Donec hendrerit mi ac consectetur lacinia. Nullam aliquet nisi at tincidunt venenatis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque turpis nulla, consequat non volutpat id, vehicula vitae nulla. Aenean pulvinar aliquam felis, ut dictum sem pretium vel. Vestibulum eget sollicitudin justo. Fusce in erat massa. Donec imperdiet justo vitae imperdiet laoreet. Donec pretium, lacus non accumsan sollicitudin, ex nisl maximus risus, semper lacinia lectus leo vel metus. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
||||||
|
|
||||||
Curabitur sit amet orci iaculis, venenatis sapien vel, dignissim arcu. Etiam tincidunt ac enim nec faucibus. Nullam fringilla ultrices sagittis. Quisque ac risus augue. Etiam neque ligula, convallis ut fermentum condimentum, mattis a libero. Aenean purus leo, semper vel hendrerit quis, ornare sit amet dui. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin nisl neque, tempor eu erat at, suscipit vulputate lacus. Quisque facilisis interdum posuere. Nam tortor metus, placerat at dapibus ac, tincidunt nec est. Pellentesque consequat risus vitae condimentum pulvinar. Aenean hendrerit, magna vitae ornare dignissim, lorem ipsum venenatis ex, et auctor mauris massa a eros.
|
|
||||||
|
|
||||||
Mauris tellus augue, condimentum ut tempor eget, facilisis quis ipsum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec fermentum in purus imperdiet feugiat. Cras vitae felis nisi. Duis sed justo condimentum, efficitur enim ut, pretium velit. Sed ac vestibulum lorem. Nullam pharetra, neque id mollis lobortis, augue odio ullamcorper quam, et dignissim nunc arcu nec arcu. Integer ac purus semper, scelerisque est sed, posuere lorem. Vivamus metus ante, placerat eget scelerisque id, dapibus ut nisi. Interdum et malesuada fames ac ante ipsum primis in faucibus.
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
<!-- DrLeonardo Design -->
|
<!-- DrLeonardo Design -->
|
||||||
|
|
||||||
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8">
|
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.20">
|
||||||
<stylesheets>
|
<stylesheets>
|
||||||
<URL value="@debug.css" />
|
<URL value="@debug.css" />
|
||||||
</stylesheets>
|
</stylesheets>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<!-- DrLeonardo Design -->
|
<!-- DrLeonardo Design -->
|
||||||
|
|
||||||
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
|
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.20" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<children>
|
<children>
|
||||||
<ImageView fitHeight="400.0" fitWidth="600.0" pickOnBounds="true" preserveRatio="true">
|
<ImageView fitHeight="400.0" fitWidth="600.0" pickOnBounds="true" preserveRatio="true">
|
||||||
<image>
|
<image>
|
||||||
|
|
|
@ -67,9 +67,13 @@ var EnvHelper = EnvHelperClass.static;
|
||||||
var SecurityHelper = SecurityHelperClass.static;
|
var SecurityHelper = SecurityHelperClass.static;
|
||||||
var DigestAlgorithm = DigestAlgorithmClass.static;
|
var DigestAlgorithm = DigestAlgorithmClass.static;
|
||||||
var VerifyHelper = VerifyHelperClass.static;
|
var VerifyHelper = VerifyHelperClass.static;
|
||||||
var RingProgressIndicator = RingProgressIndicatorClass.static
|
var CheckComboBox = CheckComboBoxClass.static;
|
||||||
var RingProgressIndicatorSkin = RingProgressIndicatorSkinClass.static
|
var CheckModel = CheckModelClass.static;
|
||||||
var LauncherSettings = LauncherSettingsClass.static
|
var IndexedCheckModel = IndexedCheckModelClass.static;
|
||||||
|
var CheckComboBoxSkin = CheckComboBoxSkinClass.static;
|
||||||
|
var RingProgressIndicator = RingProgressIndicatorClass.static;
|
||||||
|
var RingProgressIndicatorSkin = RingProgressIndicatorSkinClass.static;
|
||||||
|
var LauncherSettings = LauncherSettingsClass.static;
|
||||||
|
|
||||||
// Helper JS class API imports
|
// Helper JS class API imports
|
||||||
var JSApplication = null;
|
var JSApplication = null;
|
||||||
|
|
|
@ -15,8 +15,12 @@
|
||||||
import javax.script.ScriptException;
|
import javax.script.ScriptException;
|
||||||
|
|
||||||
import ru.gravit.launcher.client.*;
|
import ru.gravit.launcher.client.*;
|
||||||
import ru.gravit.launcher.gui.buttons.RingProgressIndicator;
|
import ru.gravit.launcher.gui.choosebox.CheckComboBox;
|
||||||
import ru.gravit.launcher.gui.buttons.RingProgressIndicatorSkin;
|
import ru.gravit.launcher.gui.choosebox.CheckComboBoxSkin;
|
||||||
|
import ru.gravit.launcher.gui.choosebox.CheckModel;
|
||||||
|
import ru.gravit.launcher.gui.choosebox.IndexedCheckModel;
|
||||||
|
import ru.gravit.launcher.gui.indicator.RingProgressIndicator;
|
||||||
|
import ru.gravit.launcher.gui.indicator.RingProgressIndicatorSkin;
|
||||||
import ru.gravit.launcher.hasher.FileNameMatcher;
|
import ru.gravit.launcher.hasher.FileNameMatcher;
|
||||||
import ru.gravit.launcher.hasher.HashedDir;
|
import ru.gravit.launcher.hasher.HashedDir;
|
||||||
import ru.gravit.launcher.hasher.HashedEntry;
|
import ru.gravit.launcher.hasher.HashedEntry;
|
||||||
|
@ -139,11 +143,15 @@ public static void addLauncherClassBindings(Map<String, Object> bindings) {
|
||||||
bindings.put("LauncherSettingsClass", LauncherSettings.class);
|
bindings.put("LauncherSettingsClass", LauncherSettings.class);
|
||||||
|
|
||||||
// Load JS API if available
|
// Load JS API if available
|
||||||
bindings.put("RingProgressIndicatorClass", RingProgressIndicator.class);
|
|
||||||
bindings.put("RingProgressIndicatorSkinClass", RingProgressIndicatorSkin.class);
|
|
||||||
try {
|
try {
|
||||||
Class.forName("javafx.application.Application");
|
Class.forName("javafx.application.Application");
|
||||||
bindings.put("JSApplicationClass", JSApplication.class);
|
bindings.put("JSApplicationClass", JSApplication.class);
|
||||||
|
bindings.put("RingProgressIndicatorClass", RingProgressIndicator.class);
|
||||||
|
bindings.put("RingProgressIndicatorSkinClass", RingProgressIndicatorSkin.class);
|
||||||
|
bindings.put("CheckComboBoxClass", CheckComboBox.class);
|
||||||
|
bindings.put("CheckModelClass", CheckModel.class);
|
||||||
|
bindings.put("IndexedCheckModelClass", IndexedCheckModel.class);
|
||||||
|
bindings.put("CheckComboBoxSkinClass", CheckComboBoxSkin.class);
|
||||||
} catch (ClassNotFoundException ignored) {
|
} catch (ClassNotFoundException ignored) {
|
||||||
LogHelper.warning("JavaFX API isn't available");
|
LogHelper.warning("JavaFX API isn't available");
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
import javafx.beans.property.SimpleBooleanProperty;
|
import javafx.beans.property.SimpleBooleanProperty;
|
||||||
import javafx.collections.ListChangeListener;
|
import javafx.collections.ListChangeListener;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
|
|
||||||
abstract class CheckBitSetModelBase<T> implements IndexedCheckModel<T> {
|
abstract class CheckBitSetModelBase<T> implements IndexedCheckModel<T> {
|
||||||
private final Map<T, BooleanProperty> itemBooleanMap;
|
private final Map<T, BooleanProperty> itemBooleanMap;
|
||||||
|
@ -104,7 +103,6 @@ public int size() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public void check(int index) {
|
public void check(int index) {
|
||||||
if (index < 0 || index >= getItemCount())
|
if (index < 0 || index >= getItemCount())
|
||||||
|
@ -121,21 +119,18 @@ public void check(T item) {
|
||||||
check(index);
|
check(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public void checkAll() {
|
public void checkAll() {
|
||||||
for (int i = 0; i < getItemCount(); i++)
|
for (int i = 0; i < getItemCount(); i++)
|
||||||
check(i);
|
check(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public void checkIndices(int... indices) {
|
public void checkIndices(int... indices) {
|
||||||
for (int indice : indices)
|
for (int indice : indices)
|
||||||
check(indice);
|
check(indice);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public void clearCheck(int index) {
|
public void clearCheck(int index) {
|
||||||
if (index < 0 || index >= getItemCount())
|
if (index < 0 || index >= getItemCount())
|
||||||
|
@ -147,69 +142,57 @@ public void clearCheck(int index) {
|
||||||
new NonIterableChange.SimpleRemovedChange<>(changeIndex, changeIndex, index, checkedIndicesList));
|
new NonIterableChange.SimpleRemovedChange<>(changeIndex, changeIndex, index, checkedIndicesList));
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public void clearCheck(T item) {
|
public void clearCheck(T item) {
|
||||||
int index = getItemIndex(item);
|
int index = getItemIndex(item);
|
||||||
clearCheck(index);
|
clearCheck(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public void clearChecks() {
|
public void clearChecks() {
|
||||||
for (int index = 0; index < checkedIndices.length(); index++)
|
for (int index = 0; index < checkedIndices.length(); index++)
|
||||||
clearCheck(index);
|
clearCheck(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public ObservableList<Integer> getCheckedIndices() {
|
public ObservableList<Integer> getCheckedIndices() {
|
||||||
return checkedIndicesList;
|
return checkedIndicesList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public ObservableList<T> getCheckedItems() {
|
public ObservableList<T> getCheckedItems() {
|
||||||
return checkedItemsList;
|
return checkedItemsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public abstract T getItem(int index);
|
public abstract T getItem(int index);
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
BooleanProperty getItemBooleanProperty(T item) {
|
BooleanProperty getItemBooleanProperty(T item) {
|
||||||
return itemBooleanMap.get(item);
|
return itemBooleanMap.get(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public abstract int getItemCount();
|
public abstract int getItemCount();
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public abstract int getItemIndex(T item);
|
public abstract int getItemIndex(T item);
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isChecked(int index) {
|
public boolean isChecked(int index) {
|
||||||
return checkedIndices.get(index);
|
return checkedIndices.get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isChecked(T item) {
|
public boolean isChecked(T item) {
|
||||||
int index = getItemIndex(item);
|
int index = getItemIndex(item);
|
||||||
return isChecked(index);
|
return isChecked(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return checkedIndices.isEmpty();
|
return checkedIndices.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public void toggleCheckState(int index) {
|
public void toggleCheckState(int index) {
|
||||||
if (isChecked(index))
|
if (isChecked(index))
|
||||||
|
@ -218,14 +201,12 @@ public void toggleCheckState(int index) {
|
||||||
check(index);
|
check(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public void toggleCheckState(T item) {
|
public void toggleCheckState(T item) {
|
||||||
int index = getItemIndex(item);
|
int index = getItemIndex(item);
|
||||||
toggleCheckState(index);
|
toggleCheckState(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
protected void updateMap() {
|
protected void updateMap() {
|
||||||
itemBooleanMap.clear();
|
itemBooleanMap.clear();
|
||||||
for (int i = 0; i < getItemCount(); i++) {
|
for (int i = 0; i < getItemCount(); i++) {
|
||||||
|
|
|
@ -13,16 +13,13 @@
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
import javafx.scene.control.Skin;
|
import javafx.scene.control.Skin;
|
||||||
import javafx.util.StringConverter;
|
import javafx.util.StringConverter;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
import ru.gravit.launcher.LauncherAPI;
|
||||||
import ru.gravit.launcher.gui.choosebox.impl.CheckComboBoxSkin;
|
|
||||||
|
|
||||||
public class CheckComboBox<T> extends ControlsFXControl {
|
public class CheckComboBox<T> extends ControlsFXControl {
|
||||||
@LauncherAPI
|
|
||||||
private static class CheckComboBoxBitSetCheckModel<T> extends CheckBitSetModelBase<T> {
|
private static class CheckComboBoxBitSetCheckModel<T> extends CheckBitSetModelBase<T> {
|
||||||
@LauncherAPI
|
|
||||||
private final ObservableList<T> items;
|
private final ObservableList<T> items;
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
CheckComboBoxBitSetCheckModel(final ObservableList<T> items, final Map<T, BooleanProperty> itemBooleanMap) {
|
CheckComboBoxBitSetCheckModel(final ObservableList<T> items, final Map<T, BooleanProperty> itemBooleanMap) {
|
||||||
super(itemBooleanMap);
|
super(itemBooleanMap);
|
||||||
|
|
||||||
|
@ -32,19 +29,16 @@ private static class CheckComboBoxBitSetCheckModel<T> extends CheckBitSetModelBa
|
||||||
updateMap();
|
updateMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public T getItem(int index) {
|
public T getItem(int index) {
|
||||||
return items.get(index);
|
return items.get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemCount() {
|
public int getItemCount() {
|
||||||
return items.size();
|
return items.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemIndex(T item) {
|
public int getItemIndex(T item) {
|
||||||
return items.indexOf(item);
|
return items.indexOf(item);
|
||||||
|
@ -53,17 +47,10 @@ public int getItemIndex(T item) {
|
||||||
|
|
||||||
private final ObservableList<T> items;
|
private final ObservableList<T> items;
|
||||||
private final Map<T, BooleanProperty> itemBooleanMap;
|
private final Map<T, BooleanProperty> itemBooleanMap;
|
||||||
|
|
||||||
private CheckComboBoxSkin<T> checkComboBoxSkin;
|
private CheckComboBoxSkin<T> checkComboBoxSkin;
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
private ObjectProperty<IndexedCheckModel<T>> checkModel = new SimpleObjectProperty<>(this, "checkModel");
|
private ObjectProperty<IndexedCheckModel<T>> checkModel = new SimpleObjectProperty<>(this, "checkModel");
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
private ObjectProperty<StringConverter<T>> converter = new SimpleObjectProperty<>(this,
|
private ObjectProperty<StringConverter<T>> converter = new SimpleObjectProperty<>(this,
|
||||||
"converter");
|
"converter");
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
private StringProperty title = new SimpleStringProperty(null);
|
private StringProperty title = new SimpleStringProperty(null);
|
||||||
|
|
||||||
public CheckComboBox() {
|
public CheckComboBox() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.gravit.launcher.gui.choosebox.impl;
|
package ru.gravit.launcher.gui.choosebox;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
@ -16,8 +16,6 @@
|
||||||
import javafx.scene.control.cell.CheckBoxListCell;
|
import javafx.scene.control.cell.CheckBoxListCell;
|
||||||
import javafx.scene.input.KeyCode;
|
import javafx.scene.input.KeyCode;
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
import ru.gravit.launcher.LauncherAPI;
|
||||||
import ru.gravit.launcher.gui.choosebox.CheckComboBox;
|
|
||||||
import ru.gravit.launcher.gui.choosebox.IndexedCheckModel;
|
|
||||||
|
|
||||||
public class CheckComboBoxSkin<T> extends BehaviorSkinBase<CheckComboBox<T>, BehaviorBase<CheckComboBox<T>>> {
|
public class CheckComboBoxSkin<T> extends BehaviorSkinBase<CheckComboBox<T>, BehaviorBase<CheckComboBox<T>>> {
|
||||||
|
|
||||||
|
@ -76,7 +74,6 @@ protected void updateItem(T item, boolean empty) {
|
||||||
getChildren().add(comboBox);
|
getChildren().add(comboBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
private String buildString() {
|
private String buildString() {
|
||||||
final StringBuilder sb = new StringBuilder();
|
final StringBuilder sb = new StringBuilder();
|
||||||
for (int i = 0, max = selectedItems.size(); i < max; i++) {
|
for (int i = 0, max = selectedItems.size(); i < max; i++) {
|
||||||
|
@ -133,7 +130,6 @@ protected double computePrefWidth(double height, double topInset, double rightIn
|
||||||
return comboBox.prefWidth(height);
|
return comboBox.prefWidth(height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
private Skin<?> createComboBoxListViewSkin(ComboBox<T> comboBox) {
|
private Skin<?> createComboBoxListViewSkin(ComboBox<T> comboBox) {
|
||||||
final ComboBoxListViewSkin<T> comboBoxListViewSkin = new ComboBoxListViewSkin<T>(comboBox) {
|
final ComboBoxListViewSkin<T> comboBoxListViewSkin = new ComboBoxListViewSkin<T>(comboBox) {
|
||||||
@Override
|
@Override
|
|
@ -1,7 +1,6 @@
|
||||||
package ru.gravit.launcher.gui.choosebox;
|
package ru.gravit.launcher.gui.choosebox;
|
||||||
|
|
||||||
import javafx.scene.control.Control;
|
import javafx.scene.control.Control;
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
|
|
||||||
abstract class ControlsFXControl extends Control {
|
abstract class ControlsFXControl extends Control {
|
||||||
|
|
||||||
|
@ -11,7 +10,6 @@ public ControlsFXControl() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
protected final String getUserAgentStylesheet(Class<?> clazz, String fileName) {
|
protected final String getUserAgentStylesheet(Class<?> clazz, String fileName) {
|
||||||
|
|
||||||
if (stylesheet == null)
|
if (stylesheet == null)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.gravit.launcher.gui.buttons;
|
package ru.gravit.launcher.gui.indicator;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -13,27 +13,17 @@
|
||||||
|
|
||||||
import com.sun.javafx.css.converters.SizeConverter;
|
import com.sun.javafx.css.converters.SizeConverter;
|
||||||
import javafx.scene.control.ProgressIndicator;
|
import javafx.scene.control.ProgressIndicator;
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
abstract class ProgressCircleIndicator extends ProgressIndicator {
|
abstract class ProgressCircleIndicator extends ProgressIndicator {
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
public ProgressCircleIndicator() {
|
public ProgressCircleIndicator() {
|
||||||
this.getStylesheets().add(ProgressCircleIndicator.class.getResource("/runtime/launcher/overlay/update/circleprogress.css").toExternalForm());
|
this.getStylesheets().add(ProgressCircleIndicator.class.getResource("/runtime/launcher/overlay/update/circleprogress.css").toExternalForm());
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
public final void setInnerCircleRadius(int value) {
|
public final void setInnerCircleRadius(int value) {
|
||||||
innerCircleRadiusProperty().set(value);
|
innerCircleRadiusProperty().set(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
public final DoubleProperty innerCircleRadiusProperty() {
|
public final DoubleProperty innerCircleRadiusProperty() {
|
||||||
return innerCircleRadius;
|
return innerCircleRadius;
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
public final double getInnerCircleRadius() {
|
public final double getInnerCircleRadius() {
|
||||||
return innerCircleRadiusProperty().get();
|
return innerCircleRadiusProperty().get();
|
||||||
}
|
}
|
||||||
|
@ -82,13 +72,9 @@ public StyleableProperty<Number> getStyleableProperty(ProgressCircleIndicator n)
|
||||||
STYLEABLES = Collections.unmodifiableList(styleables);
|
STYLEABLES = Collections.unmodifiableList(styleables);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData() {
|
public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData() {
|
||||||
return StyleableProperties.STYLEABLES;
|
return StyleableProperties.STYLEABLES;
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData() {
|
public List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData() {
|
||||||
return StyleableProperties.STYLEABLES;
|
return StyleableProperties.STYLEABLES;
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.gravit.launcher.gui.buttons;
|
package ru.gravit.launcher.gui.indicator;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -16,7 +16,6 @@
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
import ru.gravit.launcher.LauncherAPI;
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
public class RingProgressIndicator extends ProgressCircleIndicator {
|
public class RingProgressIndicator extends ProgressCircleIndicator {
|
||||||
public RingProgressIndicator() {
|
public RingProgressIndicator() {
|
||||||
LogHelper.debug("Setting JVM dir name");
|
LogHelper.debug("Setting JVM dir name");
|
||||||
|
@ -24,7 +23,6 @@ public RingProgressIndicator() {
|
||||||
this.getStyleClass().add("ringindicator");
|
this.getStyleClass().add("ringindicator");
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
protected Skin<?> createDefaultSkin() {
|
protected Skin<?> createDefaultSkin() {
|
||||||
return new RingProgressIndicatorSkin(this);
|
return new RingProgressIndicatorSkin(this);
|
||||||
|
@ -91,7 +89,6 @@ public StyleableProperty<Number> getStyleableProperty(RingProgressIndicator n) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData() {
|
public List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData() {
|
||||||
return StyleableProperties.STYLEABLES;
|
return StyleableProperties.STYLEABLES;
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.gravit.launcher.gui.buttons;
|
package ru.gravit.launcher.gui.indicator;
|
||||||
|
|
||||||
import javafx.animation.Animation;
|
import javafx.animation.Animation;
|
||||||
import javafx.animation.Interpolator;
|
import javafx.animation.Interpolator;
|
||||||
|
@ -18,7 +18,6 @@
|
||||||
*
|
*
|
||||||
* @author Andrea Vacondio
|
* @author Andrea Vacondio
|
||||||
*/
|
*/
|
||||||
@LauncherAPI
|
|
||||||
public class RingProgressIndicatorSkin implements Skin<RingProgressIndicator> {
|
public class RingProgressIndicatorSkin implements Skin<RingProgressIndicator> {
|
||||||
|
|
||||||
private final RingProgressIndicator indicator;
|
private final RingProgressIndicator indicator;
|
||||||
|
@ -29,7 +28,6 @@ public class RingProgressIndicatorSkin implements Skin<RingProgressIndicator> {
|
||||||
private final Arc fillerArc = new Arc();
|
private final Arc fillerArc = new Arc();
|
||||||
private final RotateTransition transition = new RotateTransition(Duration.millis(2000), fillerArc);
|
private final RotateTransition transition = new RotateTransition(Duration.millis(2000), fillerArc);
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
public RingProgressIndicatorSkin(final RingProgressIndicator indicator) {
|
public RingProgressIndicatorSkin(final RingProgressIndicator indicator) {
|
||||||
this.indicator = indicator;
|
this.indicator = indicator;
|
||||||
initContainer(indicator);
|
initContainer(indicator);
|
||||||
|
@ -108,20 +106,14 @@ private void initIndeterminate(boolean newVal) {
|
||||||
transition.stop();
|
transition.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public RingProgressIndicator getSkinnable() {
|
public RingProgressIndicator getSkinnable() {
|
||||||
return indicator;
|
return indicator;
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public Node getNode() {
|
public Node getNode() {
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
@Override
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
transition.stop();
|
transition.stop();
|
Loading…
Reference in a new issue