Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,8 @@ public class Messages extends NLS
public static String JobMsgRunningConsistencyChecks;
public static String JobMsgSamplingHistoricalQuotes;
public static String JobMsgUpdatingQuotesFor;
public static String Label4PRuleMonthly;
public static String Label4PRuleYearly;
public static String LabelAbout;
public static String LabelAbsoluteChange;
public static String LabelAbsoluteDelta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,10 @@ JobMsgSamplingHistoricalQuotes = Sampling historical quotes from exchange {0}

JobMsgUpdatingQuotesFor = Quotes: {0}

Label4PRuleMonthly = Sell monthly by 4% Rule

Label4PRuleYearly = Sell yearly by 4% Rule

LabelAbout = About Portfolio Performance

LabelAbsoluteChange = Absolute Change
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,10 @@ JobMsgSamplingHistoricalQuotes = Vzorkov\u00E1n\u00ED historick\u00FDch kurz\u01

JobMsgUpdatingQuotesFor = Kurzy: {0}

Label4PRuleMonthly = V\u00FDb\u011Br m\u011Bs\u00ED\u010Dn\u011B podle pravidla 4 %

Label4PRuleYearly = V\u00FDb\u011Br ro\u010Dn\u011B podle pravidla 4 %

LabelAbout = O Portfolio Performance

LabelAbsoluteChange = Absolutn\u00ED zm\u011Bna
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,32 @@ public enum WidgetFactory
}) //
.build()),

RULE_4P_YEARLY(Messages.Label4PRuleYearly, Messages.LabelStatementOfAssets, //
(widget, data) -> IndicatorWidget.<Money>create(widget, data) //
.with(Values.Money) //
.with((ds, period) -> {
PerformanceIndex index = data.calculate(ds, period);
int length = index.getTotals().length;
return Money.of(index.getCurrency(),
(long) (index.getTotals()[length - 1] * 0.04));
}) //
.withBenchmarkDataSeries(false) //
.withColoredValues(false) //
.build()),

RULE_4P_MONTHLY(Messages.Label4PRuleMonthly, Messages.LabelStatementOfAssets, //
(widget, data) -> IndicatorWidget.<Money>create(widget, data) //
.with(Values.Money) //
.with((ds, period) -> {
PerformanceIndex index = data.calculate(ds, period);
int length = index.getTotals().length;
return Money.of(index.getCurrency(),
(long) (index.getTotals()[length - 1] * 0.04 / 12));
}) //
.withBenchmarkDataSeries(false) //
.withColoredValues(false) //
.build()),

// typo is API now!!
VERTICAL_SPACEER(Messages.LabelVerticalSpacer, Messages.LabelCommon, VerticalSpacerWidget::new);

Expand Down