change "goal" to "sub title." resolves #8
the sub title can still be used to put a goal if the end user really wants it. but it won't do the fancy automatic segment time text if the user had goal showing enabled but no text set.
This commit is contained in:
parent
e3b0e1be80
commit
1105a52a0a
|
@ -53,7 +53,7 @@ public enum Language {
|
||||||
GLOBAL_HOTKEYS_STARTUP_ERROR,
|
GLOBAL_HOTKEYS_STARTUP_ERROR,
|
||||||
|
|
||||||
// Settings > Header
|
// Settings > Header
|
||||||
setting_header_goal,
|
setting_header_subTitle,
|
||||||
setting_header_title,
|
setting_header_title,
|
||||||
setting_header_showAttempts,
|
setting_header_showAttempts,
|
||||||
setting_header_titleFont,
|
setting_header_titleFont,
|
||||||
|
@ -146,7 +146,7 @@ public enum Language {
|
||||||
FOOTER,
|
FOOTER,
|
||||||
MISC,
|
MISC,
|
||||||
USE_MAIN_FONT,
|
USE_MAIN_FONT,
|
||||||
LB_GOAL,
|
LB_SUBTITLE,
|
||||||
ICON,
|
ICON,
|
||||||
COLORS,
|
COLORS,
|
||||||
|
|
||||||
|
@ -231,7 +231,6 @@ public enum Language {
|
||||||
DISABLED,
|
DISABLED,
|
||||||
EDITING,
|
EDITING,
|
||||||
ERROR,
|
ERROR,
|
||||||
GOAL,
|
|
||||||
IMAGE,
|
IMAGE,
|
||||||
INPUTS,
|
INPUTS,
|
||||||
MAX_ORDINATE,
|
MAX_ORDINATE,
|
||||||
|
|
|
@ -326,7 +326,7 @@ public class Llanfair extends BorderlessFrame implements TableModelListener,
|
||||||
|| Settings.footerUseSplitData.equals(property)
|
|| Settings.footerUseSplitData.equals(property)
|
||||||
|| Settings.coreIconSize.equals(property)
|
|| Settings.coreIconSize.equals(property)
|
||||||
|| Settings.accuracy.equals(property)
|
|| Settings.accuracy.equals(property)
|
||||||
|| Settings.headerShowGoal.equals(property)
|
|| Settings.headerShowSubtitle.equals(property)
|
||||||
|| Settings.headerShowTitle.equals(property)
|
|| Settings.headerShowTitle.equals(property)
|
||||||
|| Settings.historyDeltas.equals(property)
|
|| Settings.historyDeltas.equals(property)
|
||||||
|| Settings.historySegmentFont.equals(property)
|
|| Settings.historySegmentFont.equals(property)
|
||||||
|
|
|
@ -79,6 +79,8 @@ public class Run implements TableModel, Serializable {
|
||||||
*/
|
*/
|
||||||
public static final String NAME_PROPERTY = "run.name";
|
public static final String NAME_PROPERTY = "run.name";
|
||||||
|
|
||||||
|
public static final String SUBTITLE_PROPERTY = "run.subTitle";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Identifier for the bean property state of the run.
|
* Identifier for the bean property state of the run.
|
||||||
*/
|
*/
|
||||||
|
@ -89,8 +91,6 @@ public class Run implements TableModel, Serializable {
|
||||||
*/
|
*/
|
||||||
public static final String CURRENT_SEGMENT_PROPERTY = "run.currentSegment";
|
public static final String CURRENT_SEGMENT_PROPERTY = "run.currentSegment";
|
||||||
|
|
||||||
public static final String GOAL_PROPERTY = "run.goal";
|
|
||||||
|
|
||||||
public static final String COUNTER_VALUE_PROPERTY = "run.counters.value";
|
public static final String COUNTER_VALUE_PROPERTY = "run.counters.value";
|
||||||
|
|
||||||
public static final String COUNTER_ADD_PROPERTY = "run.counters.add";
|
public static final String COUNTER_ADD_PROPERTY = "run.counters.add";
|
||||||
|
@ -114,6 +114,11 @@ public class Run implements TableModel, Serializable {
|
||||||
*/
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
/***
|
||||||
|
* The subtitle of the run.
|
||||||
|
*/
|
||||||
|
private String subTitle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Current state of the run. Transient as a deserialized run will always
|
* Current state of the run. Transient as a deserialized run will always
|
||||||
* start in {@link State#READY}.
|
* start in {@link State#READY}.
|
||||||
|
@ -166,8 +171,6 @@ public class Run implements TableModel, Serializable {
|
||||||
*/
|
*/
|
||||||
private long delayedStart;
|
private long delayedStart;
|
||||||
|
|
||||||
private String goal;
|
|
||||||
|
|
||||||
private boolean segmented;
|
private boolean segmented;
|
||||||
|
|
||||||
private List<Counters> counters;
|
private List<Counters> counters;
|
||||||
|
@ -191,8 +194,8 @@ public class Run implements TableModel, Serializable {
|
||||||
throw new NullPointerException("null run name");
|
throw new NullPointerException("null run name");
|
||||||
}
|
}
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
this.subTitle = "";
|
||||||
segments = new ArrayList<Segment>();
|
segments = new ArrayList<Segment>();
|
||||||
goal = "";
|
|
||||||
segmented = false;
|
segmented = false;
|
||||||
counters = new ArrayList<Counters>();
|
counters = new ArrayList<Counters>();
|
||||||
initializeTransients();
|
initializeTransients();
|
||||||
|
@ -217,8 +220,8 @@ public class Run implements TableModel, Serializable {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getGoal() {
|
public String getSubTitle() {
|
||||||
return goal;
|
return subTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getDelayedStart() {
|
public long getDelayedStart() {
|
||||||
|
@ -604,17 +607,14 @@ public class Run implements TableModel, Serializable {
|
||||||
pcSupport.firePropertyChange(NAME_PROPERTY, old, name);
|
pcSupport.firePropertyChange(NAME_PROPERTY, old, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSegmented(boolean segmented) {
|
public void setSubTitle(String subTitle) {
|
||||||
this.segmented = segmented;
|
String old = this.subTitle;
|
||||||
|
this.subTitle = subTitle;
|
||||||
|
pcSupport.firePropertyChange(SUBTITLE_PROPERTY, old, subTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGoal(String goal) {
|
public void setSegmented(boolean segmented) {
|
||||||
if (goal == null) {
|
this.segmented = segmented;
|
||||||
throw new NullPointerException("null goal string");
|
|
||||||
}
|
|
||||||
String old = this.goal;
|
|
||||||
this.goal = goal;
|
|
||||||
pcSupport.firePropertyChange(GOAL_PROPERTY, old, goal);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDelayedStart(long delayedStart) {
|
public void setDelayedStart(long delayedStart) {
|
||||||
|
@ -1121,8 +1121,8 @@ public class Run implements TableModel, Serializable {
|
||||||
current = -1;
|
current = -1;
|
||||||
startTime = 0L;
|
startTime = 0L;
|
||||||
|
|
||||||
if (goal == null) {
|
if (subTitle == null) {
|
||||||
goal = "";
|
subTitle = "";
|
||||||
}
|
}
|
||||||
if (counters == null) {
|
if (counters == null) {
|
||||||
counters = new ArrayList<Counters>();
|
counters = new ArrayList<Counters>();
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class Settings {
|
||||||
|
|
||||||
/* HEADER properties */
|
/* HEADER properties */
|
||||||
|
|
||||||
public static final Property<Boolean> headerShowGoal = new Property<>( "header.goal" );
|
public static final Property<Boolean> headerShowSubtitle = new Property<>( "header.subTitle" );
|
||||||
public static final Property<Boolean> headerShowTitle = new Property<>( "header.title" );
|
public static final Property<Boolean> headerShowTitle = new Property<>( "header.title" );
|
||||||
public static final Property<Boolean> headerShowAttempts = new Property<>( "header.showAttempts" );
|
public static final Property<Boolean> headerShowAttempts = new Property<>( "header.showAttempts" );
|
||||||
public static final Property<Font> headerTitleFont = new Property<>(" header.titleFont" );
|
public static final Property<Font> headerTitleFont = new Property<>(" header.titleFont" );
|
||||||
|
@ -227,7 +227,7 @@ public class Settings {
|
||||||
global.put( hotkeyPause.key, -1 );
|
global.put( hotkeyPause.key, -1 );
|
||||||
global.put( hotkeyLock.key, -1 );
|
global.put( hotkeyLock.key, -1 );
|
||||||
|
|
||||||
global.put( headerShowGoal.key, true );
|
global.put( headerShowSubtitle.key, true );
|
||||||
global.put( headerShowTitle.key, true );
|
global.put( headerShowTitle.key, true );
|
||||||
global.put( headerShowAttempts.key, true );
|
global.put( headerShowAttempts.key, true );
|
||||||
global.put( headerTitleFont.key, Font.decode( "Arial-14" ) );
|
global.put( headerTitleFont.key, Font.decode( "Arial-14" ) );
|
||||||
|
|
|
@ -56,6 +56,8 @@ implements ActionListener, ListSelectionListener {
|
||||||
*/
|
*/
|
||||||
private JLabel runTitleLabel;
|
private JLabel runTitleLabel;
|
||||||
|
|
||||||
|
private JTextField runSubTitle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Table d’édition des segments de la course.
|
* Table d’édition des segments de la course.
|
||||||
*/
|
*/
|
||||||
|
@ -103,8 +105,6 @@ implements ActionListener, ListSelectionListener {
|
||||||
*/
|
*/
|
||||||
private JButton moveDown;
|
private JButton moveDown;
|
||||||
|
|
||||||
private JTextField runGoal;
|
|
||||||
|
|
||||||
private JTextField runDelayedStart;
|
private JTextField runDelayedStart;
|
||||||
|
|
||||||
// ----------------------------------------------------------- CONSTRUCTEURS
|
// ----------------------------------------------------------- CONSTRUCTEURS
|
||||||
|
@ -128,7 +128,7 @@ implements ActionListener, ListSelectionListener {
|
||||||
|
|
||||||
runTitle = new JTextField(run.getName(), 61);
|
runTitle = new JTextField(run.getName(), 61);
|
||||||
runTitleLabel = new JLabel(Language.RUN_TITLE.get());
|
runTitleLabel = new JLabel(Language.RUN_TITLE.get());
|
||||||
runGoal = new JTextField(run.getGoal(), 48);
|
runSubTitle = new JTextField(run.getSubTitle(), 61);
|
||||||
runDelayedStart = new JTextField(delayedStartString, 5);
|
runDelayedStart = new JTextField(delayedStartString, 5);
|
||||||
segments = new JTable(run) {
|
segments = new JTable(run) {
|
||||||
@Override protected JTableHeader createDefaultTableHeader() {
|
@Override protected JTableHeader createDefaultTableHeader() {
|
||||||
|
@ -173,8 +173,8 @@ implements ActionListener, ListSelectionListener {
|
||||||
setLayout(new GridBagLayout());
|
setLayout(new GridBagLayout());
|
||||||
add(runTitleLabel, GBC.grid(0, 0).insets(4, 4, 0, 4).anchor(GBC.LE));
|
add(runTitleLabel, GBC.grid(0, 0).insets(4, 4, 0, 4).anchor(GBC.LE));
|
||||||
add(runTitle, GBC.grid(1, 0, 3, 1).insets(4, 0, 0, 4).anchor(GBC.LS));
|
add(runTitle, GBC.grid(1, 0, 3, 1).insets(4, 0, 0, 4).anchor(GBC.LS));
|
||||||
add(new JLabel("" + Language.LB_GOAL), GBC.grid(0, 1).insets(4, 4, 0, 4).anchor(GBC.LE));
|
add(new JLabel("" + Language.LB_SUBTITLE), GBC.grid(0, 1).insets(4, 4, 0, 4).anchor(GBC.LE));
|
||||||
add(runGoal, GBC.grid(1, 1).insets(4, 0, 0, 4).anchor(GBC.LS));
|
add(runSubTitle, GBC.grid(1, 1).insets(4, 0, 0, 4).anchor(GBC.LS));
|
||||||
add(new JLabel("" + Language.ED_DELAYED_START), GBC.grid(0, 2).insets(4, 4, 0, 4).anchor(GBC.LE));
|
add(new JLabel("" + Language.ED_DELAYED_START), GBC.grid(0, 2).insets(4, 4, 0, 4).anchor(GBC.LE));
|
||||||
add(runDelayedStart, GBC.grid(1, 2).insets(4, 0, 0, 4).anchor(GBC.LS));
|
add(runDelayedStart, GBC.grid(1, 2).insets(4, 0, 0, 4).anchor(GBC.LS));
|
||||||
add(segmented, GBC.grid(2, 2, 2, 1).insets(4, 0, 0, 4).anchor(GBC.LS));
|
add(segmented, GBC.grid(2, 2, 2, 1).insets(4, 0, 0, 4).anchor(GBC.LS));
|
||||||
|
@ -295,7 +295,7 @@ implements ActionListener, ListSelectionListener {
|
||||||
|
|
||||||
} else if (source.equals(save)) {
|
} else if (source.equals(save)) {
|
||||||
run.setName(runTitle.getText());
|
run.setName(runTitle.getText());
|
||||||
run.setGoal(runGoal.getText());
|
run.setSubTitle(runSubTitle.getText());
|
||||||
run.setSegmented(segmented.isSelected());
|
run.setSegmented(segmented.isSelected());
|
||||||
|
|
||||||
long delayedStart = parseDelayedStartTime(runDelayedStart.getText());
|
long delayedStart = parseDelayedStartTime(runDelayedStart.getText());
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class TabComponents extends SettingsTab
|
||||||
SCB_SETTINGS.add(Settings.graphDisplay);
|
SCB_SETTINGS.add(Settings.graphDisplay);
|
||||||
SCB_SETTINGS.add(Settings.coreShowSegmentTimer);
|
SCB_SETTINGS.add(Settings.coreShowSegmentTimer);
|
||||||
SCB_SETTINGS.add(Settings.coreShowIcons);
|
SCB_SETTINGS.add(Settings.coreShowIcons);
|
||||||
SCB_SETTINGS.add(Settings.headerShowGoal);
|
SCB_SETTINGS.add(Settings.headerShowSubtitle);
|
||||||
SCB_SETTINGS.add(Settings.headerShowAttempts);
|
SCB_SETTINGS.add(Settings.headerShowAttempts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ public class TabComponents extends SettingsTab
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
JPanel miscPanel = new JPanel(new GridBagLayout()); {
|
JPanel miscPanel = new JPanel(new GridBagLayout()); {
|
||||||
miscPanel.add(checkBoxes.get(Settings.headerShowGoal.getKey()), GBC.grid(0, 0).anchor(GBC.LS));
|
miscPanel.add(checkBoxes.get(Settings.headerShowSubtitle.getKey()), GBC.grid(0, 0).anchor(GBC.LS));
|
||||||
miscPanel.add(checkBoxes.get(Settings.headerShowTitle.getKey()), GBC.grid(0, 1).anchor(GBC.LS));
|
miscPanel.add(checkBoxes.get(Settings.headerShowTitle.getKey()), GBC.grid(0, 1).anchor(GBC.LS));
|
||||||
miscPanel.add(checkBoxes.get(Settings.graphDisplay.getKey()), GBC.grid(0, 2).anchor(GBC.LS));
|
miscPanel.add(checkBoxes.get(Settings.graphDisplay.getKey()), GBC.grid(0, 2).anchor(GBC.LS));
|
||||||
miscPanel.add(checkBoxes.get(Settings.headerShowAttempts.getKey()), GBC.grid(0, 3).anchor(GBC.LS));
|
miscPanel.add(checkBoxes.get(Settings.headerShowAttempts.getKey()), GBC.grid(0, 3).anchor(GBC.LS));
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class RunPane extends JPanel {
|
||||||
/**
|
/**
|
||||||
* Update identifier for time variables.
|
* Update identifier for time variables.
|
||||||
*/
|
*/
|
||||||
private static final int GOAL = 0x01;
|
private static final int SUBTITLE = 0x01;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update identifier for separator variables.
|
* Update identifier for separator variables.
|
||||||
|
@ -96,20 +96,9 @@ public class RunPane extends JPanel {
|
||||||
private JLabel title;
|
private JLabel title;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Label displaying the current goal of run. By default it’s the time of
|
* Label displaying the sub title of the current run.
|
||||||
* the run we’re comparing against, but it can be a customized string.
|
|
||||||
*/
|
*/
|
||||||
private JLabel goal;
|
private JLabel subTitle;
|
||||||
|
|
||||||
/**
|
|
||||||
* Label describing the goal value being displayed.
|
|
||||||
*/
|
|
||||||
private JLabel goalText;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Panel containing both goal value and text.
|
|
||||||
*/
|
|
||||||
private JPanel goalPane;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Label displaying the number of attempts the user has made of this run.
|
* Label displaying the number of attempts the user has made of this run.
|
||||||
|
@ -157,8 +146,7 @@ public class RunPane extends JPanel {
|
||||||
throw new NullPointerException("null run");
|
throw new NullPointerException("null run");
|
||||||
}
|
}
|
||||||
title = new JLabel();
|
title = new JLabel();
|
||||||
goal = new JLabel();
|
subTitle = new JLabel();
|
||||||
goalText = new JLabel();
|
|
||||||
attemptCounter = new JLabel();
|
attemptCounter = new JLabel();
|
||||||
core = new Core(run);
|
core = new Core(run);
|
||||||
graph = new Graph(run);
|
graph = new Graph(run);
|
||||||
|
@ -225,9 +213,8 @@ public class RunPane extends JPanel {
|
||||||
|
|
||||||
String property = event.getPropertyName();
|
String property = event.getPropertyName();
|
||||||
if (Run.STATE_PROPERTY.equals(property)) {
|
if (Run.STATE_PROPERTY.equals(property)) {
|
||||||
if (run.getState() == State.READY
|
if (run.getState() == State.READY || run.getState() == State.NULL) {
|
||||||
|| run.getState() == State.NULL) {
|
updateValues(ATTEMPTS | SEPARATOR);
|
||||||
updateValues(GOAL | SEPARATOR);
|
|
||||||
}
|
}
|
||||||
} else if (Run.NAME_PROPERTY.equals(property)) {
|
} else if (Run.NAME_PROPERTY.equals(property)) {
|
||||||
updateValues(TITLE);
|
updateValues(TITLE);
|
||||||
|
@ -239,28 +226,24 @@ public class RunPane extends JPanel {
|
||||||
updateColors(SEPARATOR);
|
updateColors(SEPARATOR);
|
||||||
} else if (Settings.historyRowCount.equals(property)) {
|
} else if (Settings.historyRowCount.equals(property)) {
|
||||||
updateValues(SEPARATOR);
|
updateValues(SEPARATOR);
|
||||||
} else if (Settings.colorTime.equals(property)) {
|
|
||||||
updateColors(GOAL);
|
|
||||||
} else if (Settings.colorTitle.equals(property)) {
|
} else if (Settings.colorTitle.equals(property)) {
|
||||||
updateColors(TITLE);
|
updateColors(TITLE);
|
||||||
} else if (Settings.compareMethod.equals(property)) {
|
|
||||||
updateValues(GOAL);
|
|
||||||
} else if (Settings.graphDisplay.equals(property)) {
|
} else if (Settings.graphDisplay.equals(property)) {
|
||||||
updateVisibility(GRAPH);
|
updateVisibility(GRAPH);
|
||||||
} else if (Settings.footerDisplay.equals(property)) {
|
} else if (Settings.footerDisplay.equals(property)) {
|
||||||
updateVisibility(FOOTER);
|
updateVisibility(FOOTER);
|
||||||
} else if (Settings.headerShowTitle.equals(property)) {
|
} else if (Settings.headerShowTitle.equals(property)) {
|
||||||
updateVisibility(TITLE | GOAL);
|
updateVisibility(TITLE);
|
||||||
updateValues(SEPARATOR);
|
updateValues(SEPARATOR);
|
||||||
} else if (Settings.headerShowGoal.equals(property)) {
|
} else if (Settings.headerShowSubtitle.equals(property)) {
|
||||||
updateVisibility(TITLE | GOAL);
|
updateVisibility(SUBTITLE);
|
||||||
updateValues(SEPARATOR);
|
updateValues(SEPARATOR);
|
||||||
} else if (Settings.headerShowAttempts.equals(property)) {
|
} else if (Settings.headerShowAttempts.equals(property)) {
|
||||||
updateVisibility(ATTEMPTS);
|
updateVisibility(ATTEMPTS);
|
||||||
updateValues(SEPARATOR);
|
updateValues(SEPARATOR);
|
||||||
} else if (Settings.accuracy.equals(property)
|
} else if (Settings.accuracy.equals(property)
|
||||||
|| Run.GOAL_PROPERTY.equals(property)) {
|
|| Run.SUBTITLE_PROPERTY.equals(property)) {
|
||||||
updateValues(GOAL);
|
updateValues(TITLE);
|
||||||
} else if (Run.ATTEMPT_COUNTER_PROPERTY.equals(property) ||
|
} else if (Run.ATTEMPT_COUNTER_PROPERTY.equals(property) ||
|
||||||
Run.COMPLETED_ATTEMPT_COUNTER_PROPERTY.equals(property)) {
|
Run.COMPLETED_ATTEMPT_COUNTER_PROPERTY.equals(property)) {
|
||||||
updateValues(ATTEMPTS);
|
updateValues(ATTEMPTS);
|
||||||
|
@ -284,7 +267,7 @@ public class RunPane extends JPanel {
|
||||||
if (event.getType() == TableModelEvent.INSERT
|
if (event.getType() == TableModelEvent.INSERT
|
||||||
|| event.getType() == TableModelEvent.DELETE
|
|| event.getType() == TableModelEvent.DELETE
|
||||||
|| event.getType() == TableModelEvent.UPDATE) {
|
|| event.getType() == TableModelEvent.UPDATE) {
|
||||||
updateValues(GOAL);
|
updateValues(TITLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,11 +290,7 @@ public class RunPane extends JPanel {
|
||||||
*/
|
*/
|
||||||
private void placeComponents() {
|
private void placeComponents() {
|
||||||
add(title, GBC.grid(0, 0).insets(3, 0, 1, 0));
|
add(title, GBC.grid(0, 0).insets(3, 0, 1, 0));
|
||||||
goalPane = new JPanel(new GridBagLayout()); {
|
add(subTitle, GBC.grid(0, 1).insets(3, 0, 0, 0));
|
||||||
goalPane.add(goalText, GBC.grid(0, 1));
|
|
||||||
goalPane.add(goal, GBC.grid(1, 1).insets(0, 3, 0, 0));
|
|
||||||
goalPane.setOpaque(false);
|
|
||||||
}
|
|
||||||
add(attemptCounter, GBC.grid(0, 2).insets(1, 0, 1, 3).anchor(GBC.LE));
|
add(attemptCounter, GBC.grid(0, 2).insets(1, 0, 1, 3).anchor(GBC.LE));
|
||||||
add(createSeparator(), GBC.grid(0, 3).insets(3, 0).fill(GBC.H));
|
add(createSeparator(), GBC.grid(0, 3).insets(3, 0).fill(GBC.H));
|
||||||
add(history, GBC.grid(0, 4).fill(GBC.H).insets(0, 5));
|
add(history, GBC.grid(0, 4).fill(GBC.H).insets(0, 5));
|
||||||
|
@ -328,19 +307,9 @@ public class RunPane extends JPanel {
|
||||||
* @param identifier - one of the constant update identifier.
|
* @param identifier - one of the constant update identifier.
|
||||||
*/
|
*/
|
||||||
private void updateValues(int identifier) {
|
private void updateValues(int identifier) {
|
||||||
if ((identifier & GOAL) == GOAL) {
|
|
||||||
if (run.getGoal() == null || run.getGoal().equals("")) {
|
|
||||||
Time time = run.getTime(Segment.SET);
|
|
||||||
goal.setText("" + (time == null ? "???" : time));
|
|
||||||
} else {
|
|
||||||
goal.setText(run.getGoal());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((identifier & TEXT) == TEXT) {
|
|
||||||
goalText.setText("" + Language.GOAL);
|
|
||||||
}
|
|
||||||
if ((identifier & TITLE) == TITLE) {
|
if ((identifier & TITLE) == TITLE) {
|
||||||
title.setText("" + run.getName());
|
title.setText("" + run.getName());
|
||||||
|
subTitle.setText(run.getSubTitle());
|
||||||
}
|
}
|
||||||
if ((identifier & ATTEMPTS) == ATTEMPTS) {
|
if ((identifier & ATTEMPTS) == ATTEMPTS) {
|
||||||
int attempts = run.getNumberOfAttempts();
|
int attempts = run.getNumberOfAttempts();
|
||||||
|
@ -353,12 +322,12 @@ public class RunPane extends JPanel {
|
||||||
attemptCounter.setText(String.format("%d / %d", completedAttempts, attempts));
|
attemptCounter.setText(String.format("%d / %d", completedAttempts, attempts));
|
||||||
}
|
}
|
||||||
if ((identifier & SEPARATOR) == SEPARATOR) {
|
if ((identifier & SEPARATOR) == SEPARATOR) {
|
||||||
boolean hdTitle = Settings.headerShowGoal.get();
|
boolean hdTitle = Settings.headerShowSubtitle.get();
|
||||||
boolean hdGoal = Settings.headerShowTitle.get();
|
boolean hdSubtitle = Settings.headerShowTitle.get();
|
||||||
boolean hdAttempts = Settings.headerShowAttempts.get();
|
boolean hdAttempts = Settings.headerShowAttempts.get();
|
||||||
boolean hsRows = history.getRowCount() > 0;
|
boolean hsRows = history.getRowCount() > 0;
|
||||||
|
|
||||||
separators.get(0).setVisible(hdTitle || hdGoal || hdAttempts);
|
separators.get(0).setVisible(hdTitle || hdSubtitle || hdAttempts);
|
||||||
separators.get(1).setVisible(hsRows);
|
separators.get(1).setVisible(hsRows);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -370,14 +339,9 @@ public class RunPane extends JPanel {
|
||||||
* @param identifier - one of the constant update identifier.
|
* @param identifier - one of the constant update identifier.
|
||||||
*/
|
*/
|
||||||
private void updateColors(int identifier) {
|
private void updateColors(int identifier) {
|
||||||
if ((identifier & GOAL) == GOAL) {
|
|
||||||
goal.setForeground(Settings.colorTime.get());
|
|
||||||
}
|
|
||||||
if ((identifier & TEXT) == TEXT) {
|
|
||||||
goalText.setForeground(Settings.colorForeground.get());
|
|
||||||
}
|
|
||||||
if ((identifier & TITLE) == TITLE) {
|
if ((identifier & TITLE) == TITLE) {
|
||||||
title.setForeground(Settings.colorTitle.get());
|
title.setForeground(Settings.colorTitle.get());
|
||||||
|
subTitle.setForeground(Settings.colorForeground.get());
|
||||||
}
|
}
|
||||||
if ((identifier & BACKGROUND) == BACKGROUND) {
|
if ((identifier & BACKGROUND) == BACKGROUND) {
|
||||||
setBackground(Settings.colorBackground.get());
|
setBackground(Settings.colorBackground.get());
|
||||||
|
@ -402,12 +366,7 @@ public class RunPane extends JPanel {
|
||||||
private void updateFonts(int identifier) {
|
private void updateFonts(int identifier) {
|
||||||
if ((identifier & TITLE) == TITLE) {
|
if ((identifier & TITLE) == TITLE) {
|
||||||
title.setFont(Settings.headerTitleFont.get());
|
title.setFont(Settings.headerTitleFont.get());
|
||||||
}
|
subTitle.setFont(Settings.headerTitleFont.get());
|
||||||
if ((identifier & GOAL) == GOAL) {
|
|
||||||
goal.setFont(Settings.coreFont.get());
|
|
||||||
}
|
|
||||||
if ((identifier & TEXT) == TEXT) {
|
|
||||||
goalText.setFont(Settings.coreFont.get());
|
|
||||||
}
|
}
|
||||||
if ((identifier & ATTEMPTS) == ATTEMPTS) {
|
if ((identifier & ATTEMPTS) == ATTEMPTS) {
|
||||||
attemptCounter.setFont(Settings.coreFont.get());
|
attemptCounter.setFont(Settings.coreFont.get());
|
||||||
|
@ -441,15 +400,15 @@ public class RunPane extends JPanel {
|
||||||
remove(footer);
|
remove(footer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((identifier & GOAL) == GOAL) {
|
if ((identifier & SUBTITLE) == SUBTITLE) {
|
||||||
if (Settings.headerShowGoal.get()) {
|
if (Settings.headerShowSubtitle.get()) {
|
||||||
if (Settings.headerShowTitle.get()) {
|
if (Settings.headerShowTitle.get()) {
|
||||||
add(goalPane, GBC.grid(0, 1));
|
add(subTitle, GBC.grid(0, 1));
|
||||||
} else {
|
} else {
|
||||||
add(goalPane, GBC.grid(0, 1).insets(3, 0, 0, 0));
|
add(subTitle, GBC.grid(0, 1).insets(3, 0, 0, 0));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
remove(goalPane);
|
remove(subTitle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((identifier & TITLE) == TITLE) {
|
if ((identifier & TITLE) == TITLE) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ setting_hotkey_lock = Lock / Unlock
|
||||||
GLOBAL_HOTKEYS_STARTUP_ERROR = <html><div style="width: 300px;">Key event hook registration failed.<br /><br />Llanfair requires global access to key events which (depending on your OS) might require some extra security or accessibility permissions. Click the "OK" button to close Llanfair. You will need to grant the required permissions before you will be able to use Llanfair.<br /><br />Your OS might have just now popped up some sort of notification which will allow you to quickly grant Llanfair the required permissions.</div></html>
|
GLOBAL_HOTKEYS_STARTUP_ERROR = <html><div style="width: 300px;">Key event hook registration failed.<br /><br />Llanfair requires global access to key events which (depending on your OS) might require some extra security or accessibility permissions. Click the "OK" button to close Llanfair. You will need to grant the required permissions before you will be able to use Llanfair.<br /><br />Your OS might have just now popped up some sort of notification which will allow you to quickly grant Llanfair the required permissions.</div></html>
|
||||||
|
|
||||||
# Settings > Header
|
# Settings > Header
|
||||||
setting_header_goal = Display Goal
|
setting_header_subTitle = Display Sub Title
|
||||||
setting_header_title = Display Run Title
|
setting_header_title = Display Run Title
|
||||||
setting_header_showAttempts = Display Attempt Counter
|
setting_header_showAttempts = Display Attempt Counter
|
||||||
setting_header_titleFont = Main Title
|
setting_header_titleFont = Main Title
|
||||||
|
@ -127,7 +127,7 @@ TIMER = Timer
|
||||||
FOOTER = Footer
|
FOOTER = Footer
|
||||||
MISC = Miscellaneous
|
MISC = Miscellaneous
|
||||||
USE_MAIN_FONT = Use Main Timer's font
|
USE_MAIN_FONT = Use Main Timer's font
|
||||||
LB_GOAL = Goal
|
LB_SUBTITLE = Sub Title
|
||||||
ICON = Icon
|
ICON = Icon
|
||||||
COLORS = Colors
|
COLORS = Colors
|
||||||
|
|
||||||
|
@ -205,7 +205,6 @@ COMPONENTS = Components
|
||||||
DISABLED = <Disabled>
|
DISABLED = <Disabled>
|
||||||
EDITING = Editing Run
|
EDITING = Editing Run
|
||||||
ERROR = Error
|
ERROR = Error
|
||||||
GOAL = Goal:
|
|
||||||
IMAGE = Image
|
IMAGE = Image
|
||||||
INPUTS = Hotkeys
|
INPUTS = Hotkeys
|
||||||
MAX_ORDINATE = Max Ord.:
|
MAX_ORDINATE = Max Ord.:
|
||||||
|
|
Reference in a new issue