Skip to content
Snippets Groups Projects
Commit cb8181af authored by Kristyna Fuchsova's avatar Kristyna Fuchsova Committed by Ondřej Hrdlička
Browse files

fixes line length and pipeline

parent d318bf01
No related branches found
No related tags found
2 merge requests!52Final project MR,!47Localization
Showing
with 24 additions and 29 deletions
......@@ -49,7 +49,8 @@ public class TaskDialog extends AbstractLaidOutDialog<Task> {
protected void addFields() {
addLabeledField(I18N.getString("labelTitle"), titleField, labelGbc, componentGbc, getRowThenIncrement());
addLabeledField(I18N.getString("labelDescription"), new JScrollPane(descriptionField), labelGbc, componentGbc, getRowThenIncrement());
addLabeledField(I18N.getString("labelDescription"),
new JScrollPane(descriptionField), labelGbc, componentGbc, getRowThenIncrement());
addLabeledField(I18N.getString("labelEstTime"), createEstimatedTimePanel(), labelGbc, componentGbc, getRowThenIncrement());
addLabeledField(I18N.getString("labelDueTime"), datePicker, labelGbc, componentGbc, getRowThenIncrement());
}
......@@ -103,7 +104,8 @@ public class TaskDialog extends AbstractLaidOutDialog<Task> {
private final Pattern pattern = Pattern.compile("\\d*");
@Override
public void replace(FilterBypass fb, int offset, int length, String text, AttributeSet attrs) throws BadLocationException {
public void replace(FilterBypass fb, int offset, int length, String text, AttributeSet attrs)
throws BadLocationException {
if (!pattern.matcher(text).matches()) {
return;
}
......
......@@ -15,14 +15,14 @@ public final class I18N {
prefix = clazz.getSimpleName() + ".";
}
public String getString(String key) {
return bundle.getString(prefix + key);
}
public String getFormattedMessage(String key, Object... arguments) {
return MessageFormat.format(getString(key), arguments);
}
public String getString(String key) {
return bundle.getString(prefix + key);
}
public <E extends Enum<E>> String getString(E key) {
return bundle.getString(key.getClass().getSimpleName() + "." + key.name());
}
......
......@@ -31,9 +31,12 @@ public class CategoryHolderPanel extends AbstractHolderPanel<Category> {
factory = new ExistingCategoryDialogFactory(parentDao);
PopupMenuFactory.builder()
.addMenuItem(new AddAction<>(this, Icons.ADD_CATEGORY_ICON, I18N.getString("addCategoryOption")).addUpdatable(this))
.addMenuItem(new EditAction<>(this, Icons.EDIT_CATEGORY_ICON, I18N.getString("editCategoryOption")).addUpdatable(this))
.addMenuItem(new DeleteAction<>(this, Icons.REMOVE_CATEGORY_BIN_ICON, I18N.getString("removeCategoryOption")).addUpdatable(this))
.addMenuItem(new AddAction<>(this, Icons.ADD_CATEGORY_ICON,
I18N.getString("addCategoryOption")).addUpdatable(this))
.addMenuItem(new EditAction<>(this, Icons.EDIT_CATEGORY_ICON,
I18N.getString("editCategoryOption")).addUpdatable(this))
.addMenuItem(new DeleteAction<>(this, Icons.REMOVE_CATEGORY_BIN_ICON,
I18N.getString("removeCategoryOption")).addUpdatable(this))
.buildFor(this.getList());
}
......
......@@ -2,24 +2,13 @@ package cz.muni.fi.pv168.project.ui.renderer.list;
import cz.muni.fi.pv168.project.data.task.Task;
import cz.muni.fi.pv168.project.data.task.TaskStatus;
import cz.muni.fi.pv168.project.ui.dialog.TaskDialog;
import cz.muni.fi.pv168.project.ui.i18n.I18N;
import cz.muni.fi.pv168.project.ui.main.panel.TaskStatusPanel;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.ListCellRenderer;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import javax.swing.border.EtchedBorder;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.*;
public class TaskListRenderer implements ListCellRenderer<Task> {
......
CategoryStatisticsTableModel.columnNameTitle=Category name
CategoryStatisticsTableModel.columnTimeTitle=Time spent
\ No newline at end of file
CategoryStatisticsTableModel.columnTimeTitle=Time spent
CategoryStatisticsTableModel.columnNameTitle=Jm\u00E9no kategorie
CategoryStatisticsTableModel.columnTimeTitle=Str\u00E1ven\u00FD \u010Das
\ No newline at end of file
CategoryStatisticsTableModel.columnTimeTitle=Str\u00E1ven\u00FD \u010Das
WelcomePanel.welcomeMessage=Welcome to to:do, your daily task reminder.\n\n\
You can use the toolbar buttons above to add, edit, or delete tasks and categories.\n\
Switch between tasks and categories using the tabs.\n\
Click on a task in the list on the left to see details.
\ No newline at end of file
Click on a task in the list on the left to see details.
WelcomePanel.welcomeMessage=V\u00EDtejte v to:do, va\u0161em denn\u00EDm pl\u00E1nova\u010Di \u00FAloh.\n\n\
M\u016F\u017Eete pou\u017E\u00EDt horn\u00ED tla\u010D\u00EDtka pro p\u0159id\u00E1n\u00ED, editaci, nebo odstran\u011Bn\u00ED \u00FAloh a kategori\u00ED.\n\
M\u016F\u017Eete pou\u017E\u00EDt horn\u00ED tla\u010D\u00EDtka pro p\u0159id\u00E1n\u00ED, editaci,\
nebo odstran\u011Bn\u00ED \u00FAloh a kategori\u00ED.\n\
P\u0159ep\u00EDnat mezi plohami a kategoriemi m\u016F\u017Eete pomoc\u00ED z\u00E1lo\u017Eek.\n\
Klikn\u011Bte na \u00FAlohu nalevo pro zobrazen\u00ED jej\u00EDch detail\u016F.
\ No newline at end of file
Klikn\u011Bte na \u00FAlohu nalevo pro zobrazen\u00ED jej\u00EDch detail\u016F.
......@@ -12,4 +12,4 @@ SubTaskHolderPanel.panelName=Sub tasks
SubTaskHolderPanel.completionToggle=Toggle completion
SubTaskHolderPanel.addAction=Add subtask
SubTaskHolderPanel.editAction=Edit subtask
SubTaskHolderPanel.removeAction=Remove subtask
\ No newline at end of file
SubTaskHolderPanel.removeAction=Remove subtask
......@@ -12,4 +12,4 @@ SubTaskHolderPanel.panelName=Pod\u00FAlohy
SubTaskHolderPanel.completionToggle=P\u0159epnout spln\u011Bn\u00ED
SubTaskHolderPanel.addAction=P\u0159idat pod\u00FAlohu
SubTaskHolderPanel.editAction=Upravit pod\u00FAlohu
SubTaskHolderPanel.removeAction=Smazat pod\u00FAlohu
\ No newline at end of file
SubTaskHolderPanel.removeAction=Smazat pod\u00FAlohu
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment