Added explanation tooltips to the settings activity
This commit is contained in:
40
src/com/sheepit/client/standalone/SwingTooltips.java
Normal file
40
src/com/sheepit/client/standalone/SwingTooltips.java
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
package com.sheepit.client.standalone;
|
||||||
|
|
||||||
|
public enum SwingTooltips {
|
||||||
|
WORKING_DIRECTORY(
|
||||||
|
"Where Sheepit stores things like downloaded projects, finished frames etc. Unless you want to free up your C: drive, Auto detected will do just fine."),
|
||||||
|
|
||||||
|
COMPUTE_DEVICES("What Sheepit will use to render. Note that only one device can be active at a time, e.g. sometimes you get jobs for your \n"
|
||||||
|
+ "GPU so your CPU takes a break, sometimes it's the other way around. The only way to always use 100% of your system \n"
|
||||||
|
+ "is to setup 2 clients, but for that you need to use the command line to give them different configs."),
|
||||||
|
|
||||||
|
RENDERBUCKET_SIZE("Basically the size of the orange squares you see in blender when you render. Blender calls it tile size. Unless you know better, the default is fine."),
|
||||||
|
|
||||||
|
CPU_CORES("How many (logical) cores of your CPU, often called threads, Sheepit may use. This doesn't apply to GPU-jobs. \n"
|
||||||
|
+ "(Generally GPU jobs will use a single core to use the GPU, which doesn't use 100% of that core.)"),
|
||||||
|
|
||||||
|
MEMORY("How much RAM Sheepit may use. This isn't a 100% safe limit, since Blender can erroneously use more, \n"
|
||||||
|
+ "but Sheepit will try its best to give you jobs that require less than what you've entered here."),
|
||||||
|
|
||||||
|
PRIORITY("Which priority in your system the rendering process should have. Note that minus 19 is the highest, 19 is the lowest."),
|
||||||
|
|
||||||
|
MINIMIZE_TO_SYSTRAY("Whether Sheepit should vanish into your system tray (the icons next to the clock in the bottom right) when you minimize the window."),
|
||||||
|
|
||||||
|
PROXY("If you don't know what this does, you don't need it. Useful for example if you're in a company network with restricted access."),
|
||||||
|
|
||||||
|
COMPUTER_NAME("What this machine will be displayed as on your Sheepit profile page. Only you and admins can see this."),
|
||||||
|
|
||||||
|
MAX_TIME_PER_FRAME("How much time a frame should take at most. Sheepit will try to assign jobs to your machine that take less time to compute.");
|
||||||
|
|
||||||
|
|
||||||
|
private final String explanation;
|
||||||
|
|
||||||
|
private SwingTooltips(String explanation) {
|
||||||
|
this.explanation = explanation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getText() {
|
||||||
|
return explanation;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -73,6 +73,7 @@ import com.sheepit.client.os.OS;
|
|||||||
import com.sheepit.client.standalone.GuiSwing;
|
import com.sheepit.client.standalone.GuiSwing;
|
||||||
import com.sheepit.client.standalone.GuiText;
|
import com.sheepit.client.standalone.GuiText;
|
||||||
import com.sheepit.client.standalone.GuiTextOneLine;
|
import com.sheepit.client.standalone.GuiTextOneLine;
|
||||||
|
import com.sheepit.client.standalone.SwingTooltips;
|
||||||
import com.sheepit.client.standalone.swing.components.CollapsibleJPanel;
|
import com.sheepit.client.standalone.swing.components.CollapsibleJPanel;
|
||||||
|
|
||||||
public class Settings implements Activity {
|
public class Settings implements Activity {
|
||||||
@@ -220,6 +221,7 @@ public class Settings implements Activity {
|
|||||||
CollapsibleJPanel directory_panel = new CollapsibleJPanel(new GridLayout(1, 3), this);
|
CollapsibleJPanel directory_panel = new CollapsibleJPanel(new GridLayout(1, 3), this);
|
||||||
directory_panel.setBorder(BorderFactory.createTitledBorder("Cache"));
|
directory_panel.setBorder(BorderFactory.createTitledBorder("Cache"));
|
||||||
JLabel cacheLabel = new JLabel("Working directory:");
|
JLabel cacheLabel = new JLabel("Working directory:");
|
||||||
|
cacheLabel.setToolTipText(SwingTooltips.WORKING_DIRECTORY.getText());
|
||||||
directory_panel.add(cacheLabel);
|
directory_panel.add(cacheLabel);
|
||||||
String destination = DUMMY_CACHE_DIR;
|
String destination = DUMMY_CACHE_DIR;
|
||||||
if (config.isUserHasSpecifiedACacheDir()) {
|
if (config.isUserHasSpecifiedACacheDir()) {
|
||||||
@@ -254,6 +256,7 @@ public class Settings implements Activity {
|
|||||||
CollapsibleJPanel compute_devices_panel = new CollapsibleJPanel(gridbag, this);
|
CollapsibleJPanel compute_devices_panel = new CollapsibleJPanel(gridbag, this);
|
||||||
|
|
||||||
compute_devices_panel.setBorder(BorderFactory.createTitledBorder("Compute devices"));
|
compute_devices_panel.setBorder(BorderFactory.createTitledBorder("Compute devices"));
|
||||||
|
compute_devices_panel.setToolTipText(SwingTooltips.COMPUTE_DEVICES.getText());
|
||||||
|
|
||||||
ComputeType method = config.getComputeMethod();
|
ComputeType method = config.getComputeMethod();
|
||||||
useCPU = new JCheckBox("CPU");
|
useCPU = new JCheckBox("CPU");
|
||||||
@@ -289,6 +292,7 @@ public class Settings implements Activity {
|
|||||||
renderbucketSize.setMinorTickSpacing(1);
|
renderbucketSize.setMinorTickSpacing(1);
|
||||||
renderbucketSize.setPaintTicks(true);
|
renderbucketSize.setPaintTicks(true);
|
||||||
renderbucketSize.setPaintLabels(true);
|
renderbucketSize.setPaintLabels(true);
|
||||||
|
renderbucketSizeLabel.setToolTipText(SwingTooltips.RENDERBUCKET_SIZE.getText());
|
||||||
|
|
||||||
renderbucketSizeLabel.setVisible(false);
|
renderbucketSizeLabel.setVisible(false);
|
||||||
renderbucketSize.setVisible(false);
|
renderbucketSize.setVisible(false);
|
||||||
@@ -370,6 +374,7 @@ public class Settings implements Activity {
|
|||||||
cpuCores.setPaintLabels(true);
|
cpuCores.setPaintLabels(true);
|
||||||
cpuCores.setValue(config.getNbCores() != -1 ? config.getNbCores() : cpuCores.getMaximum());
|
cpuCores.setValue(config.getNbCores() != -1 ? config.getNbCores() : cpuCores.getMaximum());
|
||||||
JLabel coreLabel = new JLabel("CPU cores:");
|
JLabel coreLabel = new JLabel("CPU cores:");
|
||||||
|
coreLabel.setToolTipText(SwingTooltips.CPU_CORES.getText());
|
||||||
|
|
||||||
compute_devices_constraints.weightx = 1.0 / gpus.size();
|
compute_devices_constraints.weightx = 1.0 / gpus.size();
|
||||||
compute_devices_constraints.gridx = 0;
|
compute_devices_constraints.gridx = 0;
|
||||||
@@ -406,6 +411,7 @@ public class Settings implements Activity {
|
|||||||
ram.setPaintLabels(true);
|
ram.setPaintLabels(true);
|
||||||
ram.setValue((int) (config.getMaxMemory() != -1 ? config.getMaxMemory() : os.getMemory()));
|
ram.setValue((int) (config.getMaxMemory() != -1 ? config.getMaxMemory() : os.getMemory()));
|
||||||
JLabel ramLabel = new JLabel("Memory:");
|
JLabel ramLabel = new JLabel("Memory:");
|
||||||
|
ramLabel.setToolTipText(SwingTooltips.MEMORY.getText());
|
||||||
|
|
||||||
compute_devices_constraints.weightx = 1.0 / gpus.size();
|
compute_devices_constraints.weightx = 1.0 / gpus.size();
|
||||||
compute_devices_constraints.gridx = 0;
|
compute_devices_constraints.gridx = 0;
|
||||||
@@ -432,6 +438,7 @@ public class Settings implements Activity {
|
|||||||
priority.setPaintLabels(true);
|
priority.setPaintLabels(true);
|
||||||
priority.setValue(config.getPriority());
|
priority.setValue(config.getPriority());
|
||||||
JLabel priorityLabel = new JLabel(high_priority_support ? "Priority (High <-> Low):" : "Priority (Normal <-> Low):");
|
JLabel priorityLabel = new JLabel(high_priority_support ? "Priority (High <-> Low):" : "Priority (Normal <-> Low):");
|
||||||
|
priorityLabel.setToolTipText(SwingTooltips.PRIORITY.getText());
|
||||||
|
|
||||||
boolean showPrioritySlider = os.checkNiceAvailability();
|
boolean showPrioritySlider = os.checkNiceAvailability();
|
||||||
priority.setVisible(showPrioritySlider);
|
priority.setVisible(showPrioritySlider);
|
||||||
@@ -461,6 +468,7 @@ public class Settings implements Activity {
|
|||||||
advanced_panel.setBorder(BorderFactory.createTitledBorder("Advanced options"));
|
advanced_panel.setBorder(BorderFactory.createTitledBorder("Advanced options"));
|
||||||
|
|
||||||
JLabel useSysTrayLabel = new JLabel("Minimize to SysTray");
|
JLabel useSysTrayLabel = new JLabel("Minimize to SysTray");
|
||||||
|
useSysTrayLabel.setToolTipText(SwingTooltips.MINIMIZE_TO_SYSTRAY.getText());
|
||||||
|
|
||||||
useSysTray = new JCheckBox();
|
useSysTray = new JCheckBox();
|
||||||
useSysTray.setSelected(config.isUseSysTray());
|
useSysTray.setSelected(config.isUseSysTray());
|
||||||
@@ -468,7 +476,7 @@ public class Settings implements Activity {
|
|||||||
advanced_panel.add(useSysTray);
|
advanced_panel.add(useSysTray);
|
||||||
|
|
||||||
JLabel proxyLabel = new JLabel("Proxy:");
|
JLabel proxyLabel = new JLabel("Proxy:");
|
||||||
proxyLabel.setToolTipText("http://login:password@host:port");
|
proxyLabel.setToolTipText("http://login:password@host:port\n" + SwingTooltips.PROXY.getText());
|
||||||
proxy = new JTextField();
|
proxy = new JTextField();
|
||||||
proxy.setToolTipText("http://login:password@host:port");
|
proxy.setToolTipText("http://login:password@host:port");
|
||||||
proxy.setText(parent.getConfiguration().getProxy());
|
proxy.setText(parent.getConfiguration().getProxy());
|
||||||
@@ -478,6 +486,7 @@ public class Settings implements Activity {
|
|||||||
advanced_panel.add(proxy);
|
advanced_panel.add(proxy);
|
||||||
|
|
||||||
JLabel hostnameLabel = new JLabel("Computer name:");
|
JLabel hostnameLabel = new JLabel("Computer name:");
|
||||||
|
hostnameLabel.setToolTipText(SwingTooltips.COMPUTER_NAME.getText());
|
||||||
hostname = new JTextField();
|
hostname = new JTextField();
|
||||||
hostname.setText(parent.getConfiguration().getHostname());
|
hostname.setText(parent.getConfiguration().getHostname());
|
||||||
|
|
||||||
@@ -485,6 +494,7 @@ public class Settings implements Activity {
|
|||||||
advanced_panel.add(hostname);
|
advanced_panel.add(hostname);
|
||||||
|
|
||||||
JLabel renderTimeLabel = new JLabel("Max time per frame (in minute):");
|
JLabel renderTimeLabel = new JLabel("Max time per frame (in minute):");
|
||||||
|
renderTimeLabel.setToolTipText(SwingTooltips.MAX_TIME_PER_FRAME.getText());
|
||||||
int val = 0;
|
int val = 0;
|
||||||
if (parent.getConfiguration().getMaxRenderTime() > 0) {
|
if (parent.getConfiguration().getMaxRenderTime() > 0) {
|
||||||
val = parent.getConfiguration().getMaxRenderTime() / 60;
|
val = parent.getConfiguration().getMaxRenderTime() / 60;
|
||||||
|
|||||||
Reference in New Issue
Block a user